summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-db
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/4store-1.1.5-r112
-rw-r--r--dev-db/4store/4store-1.1.5-r1.ebuild62
-rw-r--r--dev-db/4store/Manifest3
-rw-r--r--dev-db/4store/metadata.xml8
-rw-r--r--dev-db/Manifest.gzbin48209 -> 20669 bytes
-rw-r--r--dev-db/SchemaSync-0.9.2-r114
-rw-r--r--dev-db/SchemaSync-0.9.414
-rw-r--r--dev-db/SchemaSync-0.9.514
-rw-r--r--dev-db/SchemaSync/Manifest7
-rw-r--r--dev-db/SchemaSync/SchemaSync-0.9.2-r1.ebuild24
-rw-r--r--dev-db/SchemaSync/SchemaSync-0.9.4.ebuild23
-rw-r--r--dev-db/SchemaSync/SchemaSync-0.9.5.ebuild23
-rw-r--r--dev-db/SchemaSync/metadata.xml12
-rw-r--r--dev-db/aerospike-server-community-3.13.0.912
-rw-r--r--dev-db/aerospike-server-community-3.14.1.812
-rw-r--r--dev-db/aerospike-server-community-3.15.1.412
-rw-r--r--dev-db/aerospike-server-community-3.16.0.612
-rw-r--r--dev-db/aerospike-server-community-4.0.0.112
-rw-r--r--dev-db/aerospike-server-community-4.0.0.412
-rw-r--r--dev-db/aerospike-server-community-4.1.0.112
-rw-r--r--dev-db/aerospike-server-community-999911
-rw-r--r--dev-db/aerospike-server-community/Manifest22
-rw-r--r--dev-db/aerospike-server-community/aerospike-server-community-3.13.0.9.ebuild71
-rw-r--r--dev-db/aerospike-server-community/aerospike-server-community-3.14.1.8.ebuild71
-rw-r--r--dev-db/aerospike-server-community/aerospike-server-community-3.15.1.4.ebuild71
-rw-r--r--dev-db/aerospike-server-community/aerospike-server-community-3.16.0.6.ebuild71
-rw-r--r--dev-db/aerospike-server-community/aerospike-server-community-4.0.0.1.ebuild71
-rw-r--r--dev-db/aerospike-server-community/aerospike-server-community-4.0.0.4.ebuild71
-rw-r--r--dev-db/aerospike-server-community/aerospike-server-community-4.1.0.1.ebuild71
-rw-r--r--dev-db/aerospike-server-community/aerospike-server-community-9999.ebuild84
-rw-r--r--dev-db/aerospike-server-community/files/3.5.8-use-system-libs.patch63
-rw-r--r--dev-db/aerospike-server-community/files/aerospike.conf70
-rw-r--r--dev-db/aerospike-server-community/files/aerospike.init53
-rw-r--r--dev-db/aerospike-server-community/files/aerospike.logrotate10
-rw-r--r--dev-db/aerospike-server-community/files/aerospike_mesh.conf73
-rw-r--r--dev-db/aerospike-server-community/files/aerospike_ssd.conf68
-rw-r--r--dev-db/aerospike-server-community/metadata.xml10
-rw-r--r--dev-db/apgdiff-1.413
-rw-r--r--dev-db/apgdiff-2.2.113
-rw-r--r--dev-db/apgdiff-2.2.213
-rw-r--r--dev-db/apgdiff-2.313
-rw-r--r--dev-db/apgdiff-2.413
-rw-r--r--dev-db/apgdiff/Manifest11
-rw-r--r--dev-db/apgdiff/apgdiff-1.4.ebuild50
-rw-r--r--dev-db/apgdiff/apgdiff-2.2.1.ebuild50
-rw-r--r--dev-db/apgdiff/apgdiff-2.2.2.ebuild50
-rw-r--r--dev-db/apgdiff/apgdiff-2.3.ebuild50
-rw-r--r--dev-db/apgdiff/apgdiff-2.4.ebuild50
-rw-r--r--dev-db/apgdiff/metadata.xml10
-rw-r--r--dev-db/barman-2.114
-rw-r--r--dev-db/barman-2.314
-rw-r--r--dev-db/barman-2.414
-rw-r--r--dev-db/barman/Manifest7
-rw-r--r--dev-db/barman/barman-2.1.ebuild26
-rw-r--r--dev-db/barman/barman-2.3.ebuild26
-rw-r--r--dev-db/barman/barman-2.4.ebuild26
-rw-r--r--dev-db/barman/metadata.xml11
-rw-r--r--dev-db/bucardo-5.4.113
-rw-r--r--dev-db/bucardo/Manifest3
-rw-r--r--dev-db/bucardo/bucardo-5.4.1.ebuild31
-rw-r--r--dev-db/bucardo/metadata.xml8
-rw-r--r--dev-db/cdb-0.75-r412
-rw-r--r--dev-db/cdb/Manifest5
-rw-r--r--dev-db/cdb/cdb-0.75-r4.ebuild52
-rw-r--r--dev-db/cdb/files/cdb-0.75-errno.diff11
-rw-r--r--dev-db/cdb/files/cdb-0.75-stdint.diff436
-rw-r--r--dev-db/cdb/metadata.xml5
-rw-r--r--dev-db/clickhouse-1.1.5439014
-rw-r--r--dev-db/clickhouse/Manifest6
-rw-r--r--dev-db/clickhouse/clickhouse-1.1.54390.ebuild199
-rw-r--r--dev-db/clickhouse/files/clickhouse-server.initd17
-rw-r--r--dev-db/clickhouse/files/clickhouse-server.service15
-rw-r--r--dev-db/clickhouse/metadata.xml19
-rw-r--r--dev-db/cockroach-1.011
-rw-r--r--dev-db/cockroach-1.0-r111
-rw-r--r--dev-db/cockroach-1.0.111
-rw-r--r--dev-db/cockroach-1.0.311
-rw-r--r--dev-db/cockroach-1.0_rc111
-rw-r--r--dev-db/cockroach-1.1.211
-rw-r--r--dev-db/cockroach-1.1.311
-rw-r--r--dev-db/cockroach-2.0.111
-rw-r--r--dev-db/cockroach/Manifest22
-rw-r--r--dev-db/cockroach/cockroach-1.0-r1.ebuild61
-rw-r--r--dev-db/cockroach/cockroach-1.0.1.ebuild61
-rw-r--r--dev-db/cockroach/cockroach-1.0.3.ebuild61
-rw-r--r--dev-db/cockroach/cockroach-1.0.ebuild61
-rw-r--r--dev-db/cockroach/cockroach-1.0_rc1.ebuild59
-rw-r--r--dev-db/cockroach/cockroach-1.1.2.ebuild61
-rw-r--r--dev-db/cockroach/cockroach-1.1.3.ebuild63
-rw-r--r--dev-db/cockroach/cockroach-2.0.1.ebuild65
-rw-r--r--dev-db/cockroach/files/cockroach-limits.conf4
-rw-r--r--dev-db/cockroach/files/cockroach.confd14
-rw-r--r--dev-db/cockroach/files/cockroach.confd-1.045
-rw-r--r--dev-db/cockroach/files/cockroach.initd23
-rw-r--r--dev-db/cockroach/files/cockroach.initd-1.060
-rw-r--r--dev-db/cockroach/files/cockroach.initd-1.0.170
-rw-r--r--dev-db/cockroach/metadata.xml12
-rw-r--r--dev-db/couchdb-1.7.114
-rw-r--r--dev-db/couchdb-1.7.214
-rw-r--r--dev-db/couchdb/Manifest7
-rw-r--r--dev-db/couchdb/couchdb-1.7.1.ebuild77
-rw-r--r--dev-db/couchdb/couchdb-1.7.2.ebuild77
-rw-r--r--dev-db/couchdb/files/couchdb.conf-29
-rw-r--r--dev-db/couchdb/files/couchdb.init-417
-rw-r--r--dev-db/couchdb/metadata.xml7
-rw-r--r--dev-db/cpp-driver-2.8.113
-rw-r--r--dev-db/cpp-driver/Manifest3
-rw-r--r--dev-db/cpp-driver/cpp-driver-2.8.1.ebuild28
-rw-r--r--dev-db/cpp-driver/metadata.xml18
-rw-r--r--dev-db/cppdb-0.3.1-r113
-rw-r--r--dev-db/cppdb/Manifest3
-rw-r--r--dev-db/cppdb/cppdb-0.3.1-r1.ebuild49
-rw-r--r--dev-db/cppdb/metadata.xml13
-rw-r--r--dev-db/datadraw-3.1.111
-rw-r--r--dev-db/datadraw/Manifest3
-rw-r--r--dev-db/datadraw/datadraw-3.1.1.ebuild50
-rw-r--r--dev-db/datadraw/metadata.xml18
-rw-r--r--dev-db/db-je-3.3.7513
-rw-r--r--dev-db/db-je/Manifest4
-rw-r--r--dev-db/db-je/db-je-3.3.75.ebuild40
-rw-r--r--dev-db/db-je/files/db-je-3.3.75-optional-test.patch45
-rw-r--r--dev-db/db-je/metadata.xml12
-rw-r--r--dev-db/etcd-3.2.2213
-rw-r--r--dev-db/etcd-3.3.513
-rw-r--r--dev-db/etcd-3.3.713
-rw-r--r--dev-db/etcd-3.3.813
-rw-r--r--dev-db/etcd/Manifest15
-rw-r--r--dev-db/etcd/etcd-3.2.22.ebuild63
-rw-r--r--dev-db/etcd/etcd-3.3.5.ebuild69
-rw-r--r--dev-db/etcd/etcd-3.3.7.ebuild69
-rw-r--r--dev-db/etcd/etcd-3.3.8.ebuild69
-rw-r--r--dev-db/etcd/files/etcd.conf39
-rw-r--r--dev-db/etcd/files/etcd.confd7
-rw-r--r--dev-db/etcd/files/etcd.initd35
-rw-r--r--dev-db/etcd/files/etcd.logrotated7
-rw-r--r--dev-db/etcd/files/etcd.service17
-rw-r--r--dev-db/etcd/files/etcd.tmpfiles.d.conf2
-rw-r--r--dev-db/etcd/metadata.xml20
-rw-r--r--dev-db/firebird-3.0.2.32703.0-r213
-rw-r--r--dev-db/firebird/Manifest10
-rw-r--r--dev-db/firebird/files/firebird-3.0.2.32703.0-cloop-compiler.patch15
-rw-r--r--dev-db/firebird/files/firebird-3.0.2.32703.0-gcc6.patch19
-rw-r--r--dev-db/firebird/files/firebird-3.0.2.32703.0-unbundle.patch51
-rw-r--r--dev-db/firebird/files/firebird.init.d.3.022
-rw-r--r--dev-db/firebird/files/firebird.logrotate10
-rw-r--r--dev-db/firebird/files/firebird.xinetd.3.011
-rw-r--r--dev-db/firebird/firebird-3.0.2.32703.0-r2.ebuild235
-rw-r--r--dev-db/firebird/metadata.xml21
-rw-r--r--dev-db/freetds-1.00.34114
-rw-r--r--dev-db/freetds-1.00.4114
-rw-r--r--dev-db/freetds-1.00.54-r115
-rw-r--r--dev-db/freetds-999913
-rw-r--r--dev-db/freetds/Manifest9
-rw-r--r--dev-db/freetds/files/without-flags.patch48
-rw-r--r--dev-db/freetds/freetds-1.00.341.ebuild62
-rw-r--r--dev-db/freetds/freetds-1.00.41.ebuild72
-rw-r--r--dev-db/freetds/freetds-1.00.54-r1.ebuild72
-rw-r--r--dev-db/freetds/freetds-9999.ebuild62
-rw-r--r--dev-db/freetds/metadata.xml5
-rw-r--r--dev-db/gigabase-3.83-r211
-rw-r--r--dev-db/gigabase/Manifest6
-rw-r--r--dev-db/gigabase/files/gigabase-3.83-cpp14.patch34
-rw-r--r--dev-db/gigabase/files/gigabase-3.83-fix-build-system.patch63
-rw-r--r--dev-db/gigabase/files/gigabase-3.83-fix-dereferencing.patch182
-rw-r--r--dev-db/gigabase/gigabase-3.83-r2.ebuild58
-rw-r--r--dev-db/gigabase/metadata.xml27
-rw-r--r--dev-db/go-etcd-0_p20141013-r111
-rw-r--r--dev-db/go-etcd-2.0.011
-rw-r--r--dev-db/go-etcd-2.0.0-r110
-rw-r--r--dev-db/go-etcd/Manifest6
-rw-r--r--dev-db/go-etcd/go-etcd-0_p20141013-r1.ebuild46
-rw-r--r--dev-db/go-etcd/go-etcd-2.0.0-r1.ebuild46
-rw-r--r--dev-db/go-etcd/go-etcd-2.0.0.ebuild48
-rw-r--r--dev-db/go-etcd/metadata.xml13
-rw-r--r--dev-db/gqlplus-1.1612
-rw-r--r--dev-db/gqlplus/Manifest3
-rw-r--r--dev-db/gqlplus/gqlplus-1.16.ebuild28
-rw-r--r--dev-db/gqlplus/metadata.xml17
-rw-r--r--dev-db/henplus-0.9.8-r113
-rw-r--r--dev-db/henplus/Manifest5
-rw-r--r--dev-db/henplus/files/0.9.8-build.xml.patch23
-rw-r--r--dev-db/henplus/files/henplus.pre51
-rw-r--r--dev-db/henplus/henplus-0.9.8-r1.ebuild43
-rw-r--r--dev-db/henplus/metadata.xml11
-rw-r--r--dev-db/hsqldb-1.8.1.3-r213
-rw-r--r--dev-db/hsqldb/Manifest10
-rw-r--r--dev-db/hsqldb/files/StringComparator.java53
-rw-r--r--dev-db/hsqldb/files/TestBug1191815.java129
-rw-r--r--dev-db/hsqldb/files/hsqldb19
-rw-r--r--dev-db/hsqldb/files/hsqldb-1.8.1.3-java7.patch380
-rw-r--r--dev-db/hsqldb/files/resolve-config-softlinks.patch22
-rw-r--r--dev-db/hsqldb/files/server.properties20
-rw-r--r--dev-db/hsqldb/files/sqltool.rc18
-rw-r--r--dev-db/hsqldb/hsqldb-1.8.1.3-r2.ebuild173
-rw-r--r--dev-db/hsqldb/metadata.xml11
-rw-r--r--dev-db/hyperdex-1.6.0-r115
-rw-r--r--dev-db/hyperdex-1.7.115
-rw-r--r--dev-db/hyperdex-1.8.015
-rw-r--r--dev-db/hyperdex-1.8.115
-rw-r--r--dev-db/hyperdex-999913
-rw-r--r--dev-db/hyperdex/Manifest13
-rw-r--r--dev-db/hyperdex/files/hyperdex.confd4
-rw-r--r--dev-db/hyperdex/files/hyperdex.initd10
-rw-r--r--dev-db/hyperdex/hyperdex-1.6.0-r1.ebuild61
-rw-r--r--dev-db/hyperdex/hyperdex-1.7.1.ebuild61
-rw-r--r--dev-db/hyperdex/hyperdex-1.8.0.ebuild66
-rw-r--r--dev-db/hyperdex/hyperdex-1.8.1.ebuild66
-rw-r--r--dev-db/hyperdex/hyperdex-9999.ebuild59
-rw-r--r--dev-db/hyperdex/metadata.xml8
-rw-r--r--dev-db/influxdb-1.5.111
-rw-r--r--dev-db/influxdb/Manifest50
-rw-r--r--dev-db/influxdb/files/influxd.conf140
-rw-r--r--dev-db/influxdb/files/influxdb.confd12
-rw-r--r--dev-db/influxdb/files/influxdb.rc34
-rw-r--r--dev-db/influxdb/influxdb-1.5.1.ebuild102
-rw-r--r--dev-db/influxdb/metadata.xml13
-rw-r--r--dev-db/innotop-1.11.112
-rw-r--r--dev-db/innotop-1.11.412
-rw-r--r--dev-db/innotop/Manifest5
-rw-r--r--dev-db/innotop/innotop-1.11.1.ebuild27
-rw-r--r--dev-db/innotop/innotop-1.11.4.ebuild27
-rw-r--r--dev-db/innotop/metadata.xml13
-rw-r--r--dev-db/kdb-3.1.0-r113
-rw-r--r--dev-db/kdb/Manifest3
-rw-r--r--dev-db/kdb/kdb-3.1.0-r1.ebuild50
-rw-r--r--dev-db/kdb/metadata.xml8
-rw-r--r--dev-db/kyotocabinet-1.2.76-r113
-rw-r--r--dev-db/kyotocabinet/Manifest7
-rw-r--r--dev-db/kyotocabinet/files/fix_configure-1.2.62.patch51
-rw-r--r--dev-db/kyotocabinet/files/kyotocabinet-1.2.76-configure-8-byte-atomics.patch44
-rw-r--r--dev-db/kyotocabinet/files/kyotocabinet-1.2.76-flags.patch31
-rw-r--r--dev-db/kyotocabinet/files/kyotocabinet-1.2.76-gcc6.patch11
-rw-r--r--dev-db/kyotocabinet/kyotocabinet-1.2.76-r1.ebuild62
-rw-r--r--dev-db/kyotocabinet/metadata.xml8
-rw-r--r--dev-db/lib_mysqludf_log-0.0.212
-rw-r--r--dev-db/lib_mysqludf_log/Manifest4
-rw-r--r--dev-db/lib_mysqludf_log/files/lib_mysqludf_log-warnings.patch11
-rw-r--r--dev-db/lib_mysqludf_log/lib_mysqludf_log-0.0.2.ebuild56
-rw-r--r--dev-db/lib_mysqludf_log/metadata.xml5
-rw-r--r--dev-db/lib_mysqludf_stem-0.9.113
-rw-r--r--dev-db/lib_mysqludf_stem/Manifest4
-rw-r--r--dev-db/lib_mysqludf_stem/files/lib_mysqludf_stem-mysql_m4.patch71
-rw-r--r--dev-db/lib_mysqludf_stem/lib_mysqludf_stem-0.9.1.ebuild68
-rw-r--r--dev-db/lib_mysqludf_stem/metadata.xml5
-rw-r--r--dev-db/libdbi-0.9.013
-rw-r--r--dev-db/libdbi-drivers-0.9.015
-rw-r--r--dev-db/libdbi-drivers/Manifest4
-rw-r--r--dev-db/libdbi-drivers/files/libdbi-drivers-0.9.0-doc-build-fix.patch22
-rw-r--r--dev-db/libdbi-drivers/libdbi-drivers-0.9.0.ebuild85
-rw-r--r--dev-db/libdbi-drivers/metadata.xml10
-rw-r--r--dev-db/libdbi/Manifest5
-rw-r--r--dev-db/libdbi/files/dbi.pc.in10
-rw-r--r--dev-db/libdbi/files/libdbi-0.9.0-doc-build-fix.patch22
-rw-r--r--dev-db/libdbi/libdbi-0.9.0.ebuild58
-rw-r--r--dev-db/libdbi/metadata.xml10
-rw-r--r--dev-db/libiodbc-3.52.1213
-rw-r--r--dev-db/libiodbc-3.52.8-r213
-rw-r--r--dev-db/libiodbc/Manifest15
-rw-r--r--dev-db/libiodbc/files/fix-runpaths-r1.patch15
-rw-r--r--dev-db/libiodbc/files/fix-runpaths.patch15
-rw-r--r--dev-db/libiodbc/files/libiodbc-3.52.12-multilib.patch37
-rw-r--r--dev-db/libiodbc/files/libiodbc-3.52.7-debian_bug501100.patch14
-rw-r--r--dev-db/libiodbc/files/libiodbc-3.52.7-debian_bug508480.patch14
-rw-r--r--dev-db/libiodbc/files/libiodbc-3.52.7-gtk.patch16
-rw-r--r--dev-db/libiodbc/files/libiodbc-3.52.7-multilib.patch35
-rw-r--r--dev-db/libiodbc/files/libiodbc-3.52.7-unicode_includes.patch12
-rw-r--r--dev-db/libiodbc/files/libiodbc-3.52.8-gtk-parallel-make.patch23
-rw-r--r--dev-db/libiodbc/files/libiodbc-3.52.8-runtime-failures.patch56
-rw-r--r--dev-db/libiodbc/libiodbc-3.52.12.ebuild67
-rw-r--r--dev-db/libiodbc/libiodbc-3.52.8-r2.ebuild67
-rw-r--r--dev-db/libiodbc/metadata.xml8
-rw-r--r--dev-db/libodbc++-0.2.5-r213
-rw-r--r--dev-db/libodbc++/Manifest6
-rw-r--r--dev-db/libodbc++/files/libodbc++-0.2.3-doxygen.patch12
-rw-r--r--dev-db/libodbc++/files/libodbc++-0.2.3-gcc41.patch12
-rw-r--r--dev-db/libodbc++/files/libodbc++-0.2.3-gcc44.patch11
-rw-r--r--dev-db/libodbc++/libodbc++-0.2.5-r2.ebuild108
-rw-r--r--dev-db/libodbc++/metadata.xml14
-rw-r--r--dev-db/libzdb-2.11.115
-rw-r--r--dev-db/libzdb-2.11.215
-rw-r--r--dev-db/libzdb-2.11.315
-rw-r--r--dev-db/libzdb-2.1215
-rw-r--r--dev-db/libzdb-3.015
-rw-r--r--dev-db/libzdb-3.115
-rw-r--r--dev-db/libzdb/Manifest13
-rw-r--r--dev-db/libzdb/libzdb-2.11.1.ebuild89
-rw-r--r--dev-db/libzdb/libzdb-2.11.2.ebuild89
-rw-r--r--dev-db/libzdb/libzdb-2.11.3.ebuild89
-rw-r--r--dev-db/libzdb/libzdb-2.12.ebuild89
-rw-r--r--dev-db/libzdb/libzdb-3.0.ebuild89
-rw-r--r--dev-db/libzdb/libzdb-3.1.ebuild89
-rw-r--r--dev-db/libzdb/metadata.xml8
-rw-r--r--dev-db/lmdb++-0.9.14.010
-rw-r--r--dev-db/lmdb++/Manifest3
-rw-r--r--dev-db/lmdb++/lmdb++-0.9.14.0.ebuild23
-rw-r--r--dev-db/lmdb++/metadata.xml16
-rw-r--r--dev-db/lmdb-0.9.1812
-rw-r--r--dev-db/lmdb-0.9.1912
-rw-r--r--dev-db/lmdb-0.9.21-r112
-rw-r--r--dev-db/lmdb/Manifest7
-rw-r--r--dev-db/lmdb/lmdb-0.9.18.ebuild47
-rw-r--r--dev-db/lmdb/lmdb-0.9.19.ebuild58
-rw-r--r--dev-db/lmdb/lmdb-0.9.21-r1.ebuild60
-rw-r--r--dev-db/lmdb/metadata.xml18
-rw-r--r--dev-db/m17n-db-1.7.011
-rw-r--r--dev-db/m17n-db/Manifest3
-rw-r--r--dev-db/m17n-db/m17n-db-1.7.0.ebuild27
-rw-r--r--dev-db/m17n-db/metadata.xml8
-rw-r--r--dev-db/maatkit-7540-r113
-rw-r--r--dev-db/maatkit/Manifest3
-rw-r--r--dev-db/maatkit/maatkit-7540-r1.ebuild110
-rw-r--r--dev-db/maatkit/metadata.xml18
-rw-r--r--dev-db/mariadb-10.0.3316
-rw-r--r--dev-db/mariadb-10.0.3416
-rw-r--r--dev-db/mariadb-10.0.3516
-rw-r--r--dev-db/mariadb-10.0.35-r216
-rw-r--r--dev-db/mariadb-10.1.2916
-rw-r--r--dev-db/mariadb-10.1.31-r116
-rw-r--r--dev-db/mariadb-10.1.3316
-rw-r--r--dev-db/mariadb-10.1.3416
-rw-r--r--dev-db/mariadb-10.2.1516
-rw-r--r--dev-db/mariadb-10.2.1616
-rw-r--r--dev-db/mariadb-10.3.6_rc16
-rw-r--r--dev-db/mariadb-10.3.716
-rw-r--r--dev-db/mariadb-10.3.816
-rw-r--r--dev-db/mariadb-5.5.6016
-rw-r--r--dev-db/mariadb-connector-c-3.0.313
-rw-r--r--dev-db/mariadb-connector-c-3.0.413
-rw-r--r--dev-db/mariadb-connector-c-999911
-rw-r--r--dev-db/mariadb-connector-c/Manifest7
-rw-r--r--dev-db/mariadb-connector-c/files/gentoo-layout-3.0.patch9
-rw-r--r--dev-db/mariadb-connector-c/mariadb-connector-c-3.0.3.ebuild115
-rw-r--r--dev-db/mariadb-connector-c/mariadb-connector-c-3.0.4.ebuild100
-rw-r--r--dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild100
-rw-r--r--dev-db/mariadb-connector-c/metadata.xml11
-rw-r--r--dev-db/mariadb-galera-10.0.35-r116
-rw-r--r--dev-db/mariadb-galera/Manifest5
-rw-r--r--dev-db/mariadb-galera/files/my.cnf-5.6158
-rw-r--r--dev-db/mariadb-galera/mariadb-galera-10.0.35-r1.ebuild849
-rw-r--r--dev-db/mariadb-galera/metadata.xml27
-rw-r--r--dev-db/mariadb/Manifest41
-rw-r--r--dev-db/mariadb/files/my.cnf-10.23
-rw-r--r--dev-db/mariadb/files/my.cnf-5.1145
-rw-r--r--dev-db/mariadb/files/my.cnf-5.5149
-rw-r--r--dev-db/mariadb/files/my.cnf-5.6142
-rw-r--r--dev-db/mariadb/files/my.cnf-5.6-r1142
-rw-r--r--dev-db/mariadb/files/my.cnf.distro-client21
-rw-r--r--dev-db/mariadb/files/my.cnf.distro-server28
-rw-r--r--dev-db/mariadb/mariadb-10.0.33.ebuild209
-rw-r--r--dev-db/mariadb/mariadb-10.0.34.ebuild209
-rw-r--r--dev-db/mariadb/mariadb-10.0.35-r2.ebuild844
-rw-r--r--dev-db/mariadb/mariadb-10.0.35.ebuild210
-rw-r--r--dev-db/mariadb/mariadb-10.1.29.ebuild229
-rw-r--r--dev-db/mariadb/mariadb-10.1.31-r1.ebuild244
-rw-r--r--dev-db/mariadb/mariadb-10.1.33.ebuild248
-rw-r--r--dev-db/mariadb/mariadb-10.1.34.ebuild881
-rw-r--r--dev-db/mariadb/mariadb-10.2.15.ebuild1011
-rw-r--r--dev-db/mariadb/mariadb-10.2.16.ebuild1011
-rw-r--r--dev-db/mariadb/mariadb-10.3.6_rc.ebuild1022
-rw-r--r--dev-db/mariadb/mariadb-10.3.7.ebuild960
-rw-r--r--dev-db/mariadb/mariadb-10.3.8.ebuild960
-rw-r--r--dev-db/mariadb/mariadb-5.5.60.ebuild124
-rw-r--r--dev-db/mariadb/metadata.xml42
-rw-r--r--dev-db/metadata.xml40
-rw-r--r--dev-db/metakit-2.4.9.7-r215
-rw-r--r--dev-db/metakit/Manifest5
-rw-r--r--dev-db/metakit/files/metakit-2.4.9.7-linking.patch45
-rw-r--r--dev-db/metakit/files/metakit-2.4.9.7-tcltk86.patch70
-rw-r--r--dev-db/metakit/metadata.xml5
-rw-r--r--dev-db/metakit/metakit-2.4.9.7-r2.ebuild82
-rw-r--r--dev-db/mongodb-3.0.1414
-rw-r--r--dev-db/mongodb-3.0.1514
-rw-r--r--dev-db/mongodb-3.2.1714
-rw-r--r--dev-db/mongodb-3.4.1014
-rw-r--r--dev-db/mongodb-3.4.1314
-rw-r--r--dev-db/mongodb-3.4.1414
-rw-r--r--dev-db/mongodb-3.4.1514
-rw-r--r--dev-db/mongodb-3.6.2-r114
-rw-r--r--dev-db/mongodb-3.6.3-r114
-rw-r--r--dev-db/mongodb-3.6.4-r114
-rw-r--r--dev-db/mongodb-3.6.5-r114
-rw-r--r--dev-db/mongodb-4.0.0-r114
-rw-r--r--dev-db/mongodb/Manifest49
-rw-r--r--dev-db/mongodb/files/mongodb-3.0.14-fix-scons.patch36
-rw-r--r--dev-db/mongodb/files/mongodb-3.0.14-fix-std-string.patch83
-rw-r--r--dev-db/mongodb/files/mongodb-3.2.0-fix-scons.patch49
-rw-r--r--dev-db/mongodb/files/mongodb-3.2.10-boost-1.62.patch15
-rw-r--r--dev-db/mongodb/files/mongodb-3.2.16-Replace-string-with-explicit-std-string.patch283
-rw-r--r--dev-db/mongodb/files/mongodb-3.2.4-boost-1.60.patch84
-rw-r--r--dev-db/mongodb/files/mongodb-3.4.0-fix-scons.patch35
-rw-r--r--dev-db/mongodb/files/mongodb-3.4.6-sysmacros-include.patch38
-rw-r--r--dev-db/mongodb/files/mongodb-3.4.7-no-boost-check.patch13
-rw-r--r--dev-db/mongodb/files/mongodb-3.6.1-fix-scons.patch32
-rw-r--r--dev-db/mongodb/files/mongodb-3.6.1-no-compass.patch46
-rw-r--r--dev-db/mongodb/files/mongodb-4.0.0-no-compass.patch57
-rw-r--r--dev-db/mongodb/files/mongodb.conf-r334
-rw-r--r--dev-db/mongodb/files/mongodb.confd-r212
-rw-r--r--dev-db/mongodb/files/mongodb.confd-r311
-rw-r--r--dev-db/mongodb/files/mongodb.initd-r226
-rw-r--r--dev-db/mongodb/files/mongodb.initd-r318
-rw-r--r--dev-db/mongodb/files/mongodb.logrotate13
-rw-r--r--dev-db/mongodb/files/mongodb.service10
-rw-r--r--dev-db/mongodb/files/mongos.conf-r230
-rw-r--r--dev-db/mongodb/files/mongos.confd-r212
-rw-r--r--dev-db/mongodb/files/mongos.confd-r311
-rw-r--r--dev-db/mongodb/files/mongos.initd-r226
-rw-r--r--dev-db/mongodb/files/mongos.initd-r318
-rw-r--r--dev-db/mongodb/metadata.xml28
-rw-r--r--dev-db/mongodb/mongodb-3.0.14.ebuild174
-rw-r--r--dev-db/mongodb/mongodb-3.0.15.ebuild174
-rw-r--r--dev-db/mongodb/mongodb-3.2.17.ebuild197
-rw-r--r--dev-db/mongodb/mongodb-3.4.10.ebuild194
-rw-r--r--dev-db/mongodb/mongodb-3.4.13.ebuild167
-rw-r--r--dev-db/mongodb/mongodb-3.4.14.ebuild167
-rw-r--r--dev-db/mongodb/mongodb-3.4.15.ebuild167
-rw-r--r--dev-db/mongodb/mongodb-3.6.2-r1.ebuild170
-rw-r--r--dev-db/mongodb/mongodb-3.6.3-r1.ebuild170
-rw-r--r--dev-db/mongodb/mongodb-3.6.4-r1.ebuild170
-rw-r--r--dev-db/mongodb/mongodb-3.6.5-r1.ebuild170
-rw-r--r--dev-db/mongodb/mongodb-4.0.0-r1.ebuild170
-rw-r--r--dev-db/mtop-0.6.6-r312
-rw-r--r--dev-db/mtop/Manifest4
-rw-r--r--dev-db/mtop/files/mtop-0.6.6-globalstatusfix.patch12
-rw-r--r--dev-db/mtop/metadata.xml11
-rw-r--r--dev-db/mtop/mtop-0.6.6-r3.ebuild33
-rw-r--r--dev-db/mycli-1.10.014
-rw-r--r--dev-db/mycli-1.15.0-r214
-rw-r--r--dev-db/mycli-1.7.114
-rw-r--r--dev-db/mycli-999912
-rw-r--r--dev-db/mycli/Manifest9
-rw-r--r--dev-db/mycli/files/remove-tasks.patch15
-rw-r--r--dev-db/mycli/metadata.xml11
-rw-r--r--dev-db/mycli/mycli-1.10.0.ebuild26
-rw-r--r--dev-db/mycli/mycli-1.15.0-r2.ebuild31
-rw-r--r--dev-db/mycli/mycli-1.7.1.ebuild31
-rw-r--r--dev-db/mycli/mycli-9999.ebuild29
-rw-r--r--dev-db/mydumper-0.9.3-r113
-rw-r--r--dev-db/mydumper-0.9.513
-rw-r--r--dev-db/mydumper/Manifest7
-rw-r--r--dev-db/mydumper/files/mydumper-atomic.patch27
-rw-r--r--dev-db/mydumper/files/mydumper-mariadb-define.patch28
-rw-r--r--dev-db/mydumper/metadata.xml15
-rw-r--r--dev-db/mydumper/mydumper-0.9.3-r1.ebuild42
-rw-r--r--dev-db/mydumper/mydumper-0.9.5.ebuild44
-rw-r--r--dev-db/myodbc-5.2.7-r114
-rw-r--r--dev-db/myodbc-5.2.7-r314
-rw-r--r--dev-db/myodbc-5.3.10-r213
-rw-r--r--dev-db/myodbc-5.3.913
-rw-r--r--dev-db/myodbc/Manifest18
-rw-r--r--dev-db/myodbc/files/5.2.7-mariadb-dynamic-array.patch79
-rw-r--r--dev-db/myodbc/files/5.2.7-my_malloc.patch18
-rw-r--r--dev-db/myodbc/files/5.2.7-r1-cxxlinkage.patch40
-rw-r--r--dev-db/myodbc/files/5.3-cmake-doc-path.patch43
-rw-r--r--dev-db/myodbc/files/5.3.10-cxxlinkage.patch29
-rw-r--r--dev-db/myodbc/files/5.3.10-mariadb.patch58
-rw-r--r--dev-db/myodbc/files/cmake-doc-path.patch43
-rw-r--r--dev-db/myodbc/files/odbc.ini.m417
-rw-r--r--dev-db/myodbc/files/odbcinst.ini.m45
-rw-r--r--dev-db/myodbc/metadata.xml8
-rw-r--r--dev-db/myodbc/myodbc-5.2.7-r1.ebuild117
-rw-r--r--dev-db/myodbc/myodbc-5.2.7-r3.ebuild131
-rw-r--r--dev-db/myodbc/myodbc-5.3.10-r2.ebuild130
-rw-r--r--dev-db/myodbc/myodbc-5.3.9.ebuild112
-rw-r--r--dev-db/mysql++-2.3.212
-rw-r--r--dev-db/mysql++-3.1.012
-rw-r--r--dev-db/mysql++-3.2.112
-rw-r--r--dev-db/mysql++-3.2.212
-rw-r--r--dev-db/mysql++-3.2.313
-rw-r--r--dev-db/mysql++/Manifest16
-rw-r--r--dev-db/mysql++/files/mysql++-2.3.2-gcc-4.3.patch11
-rw-r--r--dev-db/mysql++/files/mysql++-3.0-gcc-as-needed.patch130
-rw-r--r--dev-db/mysql++/files/mysql++-3.2.1-gold.patch11
-rw-r--r--dev-db/mysql++/files/mysql++-3.2.3-as-needed.patch254
-rw-r--r--dev-db/mysql++/files/mysql++-3.2.3-mariadb-10.2.patch29
-rw-r--r--dev-db/mysql++/metadata.xml8
-rw-r--r--dev-db/mysql++/mysql++-2.3.2.ebuild55
-rw-r--r--dev-db/mysql++/mysql++-3.1.0.ebuild49
-rw-r--r--dev-db/mysql++/mysql++-3.2.1.ebuild37
-rw-r--r--dev-db/mysql++/mysql++-3.2.2.ebuild36
-rw-r--r--dev-db/mysql++/mysql++-3.2.3.ebuild55
-rw-r--r--dev-db/mysql-5.5.6016
-rw-r--r--dev-db/mysql-5.6.3816
-rw-r--r--dev-db/mysql-5.6.3916
-rw-r--r--dev-db/mysql-5.6.4016
-rw-r--r--dev-db/mysql-5.7.2216
-rw-r--r--dev-db/mysql-cluster-7.2.3116
-rw-r--r--dev-db/mysql-cluster-7.3.1916
-rw-r--r--dev-db/mysql-cluster-7.4.1716
-rw-r--r--dev-db/mysql-cluster/Manifest11
-rw-r--r--dev-db/mysql-cluster/files/my.cnf-5.5147
-rw-r--r--dev-db/mysql-cluster/files/my.cnf-5.6139
-rw-r--r--dev-db/mysql-cluster/metadata.xml26
-rw-r--r--dev-db/mysql-cluster/mysql-cluster-7.2.31.ebuild126
-rw-r--r--dev-db/mysql-cluster/mysql-cluster-7.3.19.ebuild190
-rw-r--r--dev-db/mysql-cluster/mysql-cluster-7.4.17.ebuild190
-rw-r--r--dev-db/mysql-connector-c++-1.1.313
-rw-r--r--dev-db/mysql-connector-c++-1.1.613
-rw-r--r--dev-db/mysql-connector-c++-1.1.813
-rw-r--r--dev-db/mysql-connector-c++-1.1.913
-rw-r--r--dev-db/mysql-connector-c++-8.0.1113
-rw-r--r--dev-db/mysql-connector-c++/Manifest16
-rw-r--r--dev-db/mysql-connector-c++/files/8.0.11-fix-build.patch276
-rw-r--r--dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.3-fix-cmake.patch123
-rw-r--r--dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.5-fix-mariadb.patch45
-rw-r--r--dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.6-fix-cmake.patch23
-rw-r--r--dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.8-fix-mariadb.patch45
-rw-r--r--dev-db/mysql-connector-c++/metadata.xml12
-rw-r--r--dev-db/mysql-connector-c++/mysql-connector-c++-1.1.3.ebuild58
-rw-r--r--dev-db/mysql-connector-c++/mysql-connector-c++-1.1.6.ebuild61
-rw-r--r--dev-db/mysql-connector-c++/mysql-connector-c++-1.1.8.ebuild62
-rw-r--r--dev-db/mysql-connector-c++/mysql-connector-c++-1.1.9.ebuild62
-rw-r--r--dev-db/mysql-connector-c++/mysql-connector-c++-8.0.11.ebuild38
-rw-r--r--dev-db/mysql-connector-c-6.1.1113
-rw-r--r--dev-db/mysql-connector-c-6.1.11-r113
-rw-r--r--dev-db/mysql-connector-c/Manifest7
-rw-r--r--dev-db/mysql-connector-c/files/20028_all_mysql-5.6-gcc7.patch13
-rw-r--r--dev-db/mysql-connector-c/files/6.1.11-openssl-1.1.patch287
-rw-r--r--dev-db/mysql-connector-c/files/mysql_com.patch31
-rw-r--r--dev-db/mysql-connector-c/metadata.xml8
-rw-r--r--dev-db/mysql-connector-c/mysql-connector-c-6.1.11-r1.ebuild90
-rw-r--r--dev-db/mysql-connector-c/mysql-connector-c-6.1.11.ebuild82
-rw-r--r--dev-db/mysql-init-scripts-2.2-r311
-rw-r--r--dev-db/mysql-init-scripts/Manifest13
-rw-r--r--dev-db/mysql-init-scripts/files/conf.d-2.078
-rw-r--r--dev-db/mysql-init-scripts/files/init.d-2.2194
-rw-r--r--dev-db/mysql-init-scripts/files/init.d-s6-2.2163
-rw-r--r--dev-db/mysql-init-scripts/files/init.d-supervise180
-rw-r--r--dev-db/mysql-init-scripts/files/log-s611
-rw-r--r--dev-db/mysql-init-scripts/files/logrotate.mysql14
-rw-r--r--dev-db/mysql-init-scripts/files/mysql.conf1
-rw-r--r--dev-db/mysql-init-scripts/files/mysqld-v2.service47
-rw-r--r--dev-db/mysql-init-scripts/files/mysqld-wait-ready56
-rw-r--r--dev-db/mysql-init-scripts/files/mysqld_at-v2.service45
-rw-r--r--dev-db/mysql-init-scripts/files/run-s66
-rw-r--r--dev-db/mysql-init-scripts/metadata.xml8
-rw-r--r--dev-db/mysql-init-scripts/mysql-init-scripts-2.2-r3.ebuild64
-rw-r--r--dev-db/mysql-proxy-0.8.2-r113
-rw-r--r--dev-db/mysql-proxy/Manifest7
-rw-r--r--dev-db/mysql-proxy/files/mysql-proxy.cnf47
-rw-r--r--dev-db/mysql-proxy/files/mysql-proxy.confd12
-rw-r--r--dev-db/mysql-proxy/files/mysql-proxy.confd-0.8.0-r112
-rw-r--r--dev-db/mysql-proxy/files/mysql-proxy.initd22
-rw-r--r--dev-db/mysql-proxy/metadata.xml13
-rw-r--r--dev-db/mysql-proxy/mysql-proxy-0.8.2-r1.ebuild51
-rw-r--r--dev-db/mysql-super-smack-1.3-r314
-rw-r--r--dev-db/mysql-super-smack/Manifest8
-rw-r--r--dev-db/mysql-super-smack/files/mysql-super-smack-1.2.destdir.patch13
-rw-r--r--dev-db/mysql-super-smack/files/mysql-super-smack-1.3-automake-1.13.patch256
-rw-r--r--dev-db/mysql-super-smack/files/mysql-super-smack-1.3-gen-data.patch45
-rw-r--r--dev-db/mysql-super-smack/files/mysql-super-smack-1.3.amd64.patch20
-rw-r--r--dev-db/mysql-super-smack/files/mysql-super-smack-1.3.gcc4.3.patch9
-rw-r--r--dev-db/mysql-super-smack/metadata.xml9
-rw-r--r--dev-db/mysql-super-smack/mysql-super-smack-1.3-r3.ebuild58
-rw-r--r--dev-db/mysql-udf-base64-2001061812
-rw-r--r--dev-db/mysql-udf-base64/Manifest6
-rw-r--r--dev-db/mysql-udf-base64/files/mysql-udf-base64-signedness.patch29
-rw-r--r--dev-db/mysql-udf-base64/files/mysql-udf-base64.sql5
-rw-r--r--dev-db/mysql-udf-base64/metadata.xml5
-rw-r--r--dev-db/mysql-udf-base64/mysql-udf-base64-20010618.ebuild65
-rw-r--r--dev-db/mysql-udf-http-1.012
-rw-r--r--dev-db/mysql-udf-http/Manifest4
-rw-r--r--dev-db/mysql-udf-http/files/mysql-udf-http-stdlib.patch10
-rw-r--r--dev-db/mysql-udf-http/metadata.xml8
-rw-r--r--dev-db/mysql-udf-http/mysql-udf-http-1.0.ebuild59
-rw-r--r--dev-db/mysql-udf-ipv6-0.413
-rw-r--r--dev-db/mysql-udf-ipv6/Manifest4
-rw-r--r--dev-db/mysql-udf-ipv6/files/mysql-udf-ipv6-warnings.patch28
-rw-r--r--dev-db/mysql-udf-ipv6/metadata.xml8
-rw-r--r--dev-db/mysql-udf-ipv6/mysql-udf-ipv6-0.4.ebuild68
-rw-r--r--dev-db/mysql-workbench-6.3.1014
-rw-r--r--dev-db/mysql-workbench-6.3.4-r114
-rw-r--r--dev-db/mysql-workbench-6.3.4-r214
-rw-r--r--dev-db/mysql-workbench-6.3.914
-rw-r--r--dev-db/mysql-workbench/Manifest15
-rw-r--r--dev-db/mysql-workbench/files/mysql-workbench-6.2.3-CMakeLists.patch43
-rw-r--r--dev-db/mysql-workbench/files/mysql-workbench-6.2.5-wbcopytables.patch12
-rw-r--r--dev-db/mysql-workbench/files/mysql-workbench-6.3.3-mysql_options4.patch40
-rw-r--r--dev-db/mysql-workbench/files/mysql-workbench-6.3.4-cxx11.patch39
-rw-r--r--dev-db/mysql-workbench/files/mysql-workbench-6.3.4-gtk.patch38
-rw-r--r--dev-db/mysql-workbench/files/mysql-workbench-6.3.9-mariadb-json.patch55
-rw-r--r--dev-db/mysql-workbench/metadata.xml10
-rw-r--r--dev-db/mysql-workbench/mysql-workbench-6.3.10.ebuild105
-rw-r--r--dev-db/mysql-workbench/mysql-workbench-6.3.4-r1.ebuild107
-rw-r--r--dev-db/mysql-workbench/mysql-workbench-6.3.4-r2.ebuild106
-rw-r--r--dev-db/mysql-workbench/mysql-workbench-6.3.9.ebuild103
-rw-r--r--dev-db/mysql/Manifest20
-rw-r--r--dev-db/mysql/files/my.cnf-5.1144
-rw-r--r--dev-db/mysql/files/my.cnf-5.5147
-rw-r--r--dev-db/mysql/files/my.cnf-5.6139
-rw-r--r--dev-db/mysql/files/my.cnf-5.73
-rw-r--r--dev-db/mysql/files/my.cnf.distro-client21
-rw-r--r--dev-db/mysql/files/my.cnf.distro-server28
-rw-r--r--dev-db/mysql/metadata.xml32
-rw-r--r--dev-db/mysql/mysql-5.5.60.ebuild133
-rw-r--r--dev-db/mysql/mysql-5.6.38.ebuild192
-rw-r--r--dev-db/mysql/mysql-5.6.39.ebuild193
-rw-r--r--dev-db/mysql/mysql-5.6.40.ebuild193
-rw-r--r--dev-db/mysql/mysql-5.7.22.ebuild843
-rw-r--r--dev-db/mysqltuner-1.6.1810
-rw-r--r--dev-db/mysqltuner/Manifest3
-rw-r--r--dev-db/mysqltuner/metadata.xml9
-rw-r--r--dev-db/mysqltuner/mysqltuner-1.6.18.ebuild31
-rw-r--r--dev-db/mytop-1.6-r412
-rw-r--r--dev-db/mytop-1.9.112
-rw-r--r--dev-db/mytop/Manifest10
-rw-r--r--dev-db/mytop/files/mytop-1.6-getopt-long-2.38-fixup.patch14
-rw-r--r--dev-db/mytop/files/mytop-1.6-global-status.patch103
-rw-r--r--dev-db/mytop/files/mytop-1.6-queries-vs-questions-mysql-5.0.76.patch72
-rw-r--r--dev-db/mytop/files/mytop-1.9.1-global-status.patch94
-rw-r--r--dev-db/mytop/files/mytop-1.9.1-queries-vs-questions-mysql-5.0.76.patch73
-rw-r--r--dev-db/mytop/metadata.xml8
-rw-r--r--dev-db/mytop/mytop-1.6-r4.ebuild36
-rw-r--r--dev-db/mytop/mytop-1.9.1.ebuild35
-rw-r--r--dev-db/ocp-0.212
-rw-r--r--dev-db/ocp-999910
-rw-r--r--dev-db/ocp/Manifest4
-rw-r--r--dev-db/ocp/metadata.xml16
-rw-r--r--dev-db/ocp/ocp-0.2.ebuild41
-rw-r--r--dev-db/ocp/ocp-9999.ebuild34
-rw-r--r--dev-db/odbtp-1.1.411
-rw-r--r--dev-db/odbtp/Manifest4
-rw-r--r--dev-db/odbtp/files/odbtp-1.1.4-amd64.patch11
-rw-r--r--dev-db/odbtp/metadata.xml8
-rw-r--r--dev-db/odbtp/odbtp-1.1.4.ebuild40
-rw-r--r--dev-db/opendbx-1.4.5-r114
-rw-r--r--dev-db/opendbx-1.4.6-r114
-rw-r--r--dev-db/opendbx-1.5.0-r114
-rw-r--r--dev-db/opendbx/Manifest7
-rw-r--r--dev-db/opendbx/metadata.xml8
-rw-r--r--dev-db/opendbx/opendbx-1.4.5-r1.ebuild64
-rw-r--r--dev-db/opendbx/opendbx-1.4.6-r1.ebuild64
-rw-r--r--dev-db/opendbx/opendbx-1.5.0-r1.ebuild69
-rw-r--r--dev-db/oracle-instantclient-12.1.0.214
-rw-r--r--dev-db/oracle-instantclient-12.2.0.1_p214
-rw-r--r--dev-db/oracle-instantclient-basic-11.2.0.314
-rw-r--r--dev-db/oracle-instantclient-basic-11.2.0.414
-rw-r--r--dev-db/oracle-instantclient-basic-129
-rw-r--r--dev-db/oracle-instantclient-basic/Manifest14
-rw-r--r--dev-db/oracle-instantclient-basic/files/11.2.0.3-makefile.patch57
-rw-r--r--dev-db/oracle-instantclient-basic/files/tnsnames.ora.sample93
-rw-r--r--dev-db/oracle-instantclient-basic/metadata.xml8
-rw-r--r--dev-db/oracle-instantclient-basic/oracle-instantclient-basic-11.2.0.3.ebuild197
-rw-r--r--dev-db/oracle-instantclient-basic/oracle-instantclient-basic-11.2.0.4.ebuild199
-rw-r--r--dev-db/oracle-instantclient-basic/oracle-instantclient-basic-12.ebuild16
-rw-r--r--dev-db/oracle-instantclient-jdbc-11.2.0.314
-rw-r--r--dev-db/oracle-instantclient-jdbc-11.2.0.414
-rw-r--r--dev-db/oracle-instantclient-jdbc-129
-rw-r--r--dev-db/oracle-instantclient-jdbc/Manifest8
-rw-r--r--dev-db/oracle-instantclient-jdbc/metadata.xml8
-rw-r--r--dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-11.2.0.3.ebuild109
-rw-r--r--dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-11.2.0.4.ebuild92
-rw-r--r--dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-12.ebuild19
-rw-r--r--dev-db/oracle-instantclient-odbc-11.2.0.314
-rw-r--r--dev-db/oracle-instantclient-odbc-11.2.0.414
-rw-r--r--dev-db/oracle-instantclient-odbc-129
-rw-r--r--dev-db/oracle-instantclient-odbc/Manifest8
-rw-r--r--dev-db/oracle-instantclient-odbc/metadata.xml8
-rw-r--r--dev-db/oracle-instantclient-odbc/oracle-instantclient-odbc-11.2.0.3.ebuild116
-rw-r--r--dev-db/oracle-instantclient-odbc/oracle-instantclient-odbc-11.2.0.4.ebuild96
-rw-r--r--dev-db/oracle-instantclient-odbc/oracle-instantclient-odbc-12.ebuild19
-rw-r--r--dev-db/oracle-instantclient-sqlplus-11.2.0.313
-rw-r--r--dev-db/oracle-instantclient-sqlplus-11.2.0.3-r113
-rw-r--r--dev-db/oracle-instantclient-sqlplus-11.2.0.413
-rw-r--r--dev-db/oracle-instantclient-sqlplus-129
-rw-r--r--dev-db/oracle-instantclient-sqlplus/Manifest9
-rw-r--r--dev-db/oracle-instantclient-sqlplus/metadata.xml8
-rw-r--r--dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-11.2.0.3-r1.ebuild71
-rw-r--r--dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-11.2.0.3.ebuild69
-rw-r--r--dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-11.2.0.4.ebuild71
-rw-r--r--dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-12.ebuild19
-rw-r--r--dev-db/oracle-instantclient/Manifest29
-rw-r--r--dev-db/oracle-instantclient/files/12.1.0.2-makefile.patch57
-rw-r--r--dev-db/oracle-instantclient/files/tnsnames.ora.sample93
-rw-r--r--dev-db/oracle-instantclient/metadata.xml19
-rw-r--r--dev-db/oracle-instantclient/oracle-instantclient-12.1.0.2.ebuild303
-rw-r--r--dev-db/oracle-instantclient/oracle-instantclient-12.2.0.1_p2.ebuild315
-rw-r--r--dev-db/percona-server-5.6.39.83.116
-rw-r--r--dev-db/percona-server/Manifest5
-rw-r--r--dev-db/percona-server/files/my.cnf-5.6140
-rw-r--r--dev-db/percona-server/metadata.xml24
-rw-r--r--dev-db/percona-server/percona-server-5.6.39.83.1.ebuild243
-rw-r--r--dev-db/percona-toolkit-2.2.1112
-rw-r--r--dev-db/percona-toolkit-2.2.1712
-rw-r--r--dev-db/percona-toolkit-2.2.1912
-rw-r--r--dev-db/percona-toolkit-2.2.2012
-rw-r--r--dev-db/percona-toolkit-3.0.1012
-rw-r--r--dev-db/percona-toolkit-3.0.10-r112
-rw-r--r--dev-db/percona-toolkit-3.0.712
-rw-r--r--dev-db/percona-toolkit-3.0.812
-rw-r--r--dev-db/percona-toolkit-3.0.912
-rw-r--r--dev-db/percona-toolkit/Manifest25
-rw-r--r--dev-db/percona-toolkit/files/percona-toolkit-2.2.17-fix-package-name.patch35
-rw-r--r--dev-db/percona-toolkit/files/percona-toolkit-2.2.19-fix-package-name.patch13
-rw-r--r--dev-db/percona-toolkit/files/percona-toolkit-2.2.20-fix-package-name.patch13
-rw-r--r--dev-db/percona-toolkit/files/percona-toolkit-2.2.7-no-versioncheck.patch216
-rw-r--r--dev-db/percona-toolkit/files/percona-toolkit-3.0.10-slave-delay-fix.patch44
-rw-r--r--dev-db/percona-toolkit/files/percona-toolkit-3.0.7-fix-package-name.patch13
-rw-r--r--dev-db/percona-toolkit/files/percona-toolkit-3.0.7-no-versioncheck.patch216
-rw-r--r--dev-db/percona-toolkit/metadata.xml23
-rw-r--r--dev-db/percona-toolkit/percona-toolkit-2.2.11.ebuild47
-rw-r--r--dev-db/percona-toolkit/percona-toolkit-2.2.17.ebuild44
-rw-r--r--dev-db/percona-toolkit/percona-toolkit-2.2.19.ebuild44
-rw-r--r--dev-db/percona-toolkit/percona-toolkit-2.2.20.ebuild44
-rw-r--r--dev-db/percona-toolkit/percona-toolkit-3.0.10-r1.ebuild51
-rw-r--r--dev-db/percona-toolkit/percona-toolkit-3.0.10.ebuild49
-rw-r--r--dev-db/percona-toolkit/percona-toolkit-3.0.7.ebuild42
-rw-r--r--dev-db/percona-toolkit/percona-toolkit-3.0.8.ebuild49
-rw-r--r--dev-db/percona-toolkit/percona-toolkit-3.0.9.ebuild49
-rw-r--r--dev-db/percona-xtrabackup-2.4.1012
-rw-r--r--dev-db/percona-xtrabackup-2.4.1112
-rw-r--r--dev-db/percona-xtrabackup-2.4.1212
-rw-r--r--dev-db/percona-xtrabackup-2.4.912
-rw-r--r--dev-db/percona-xtrabackup-bin-2.4.1010
-rw-r--r--dev-db/percona-xtrabackup-bin-2.4.1110
-rw-r--r--dev-db/percona-xtrabackup-bin-2.4.910
-rw-r--r--dev-db/percona-xtrabackup-bin/Manifest10
-rw-r--r--dev-db/percona-xtrabackup-bin/metadata.xml8
-rw-r--r--dev-db/percona-xtrabackup-bin/percona-xtrabackup-bin-2.4.10.ebuild64
-rw-r--r--dev-db/percona-xtrabackup-bin/percona-xtrabackup-bin-2.4.11.ebuild64
-rw-r--r--dev-db/percona-xtrabackup-bin/percona-xtrabackup-bin-2.4.9.ebuild61
-rw-r--r--dev-db/percona-xtrabackup/Manifest13
-rw-r--r--dev-db/percona-xtrabackup/files/percona-xtrabackup-2.4.10-fix-gcc6-isystem.patch112
-rw-r--r--dev-db/percona-xtrabackup/files/percona-xtrabackup-2.4.11-fix-gcc6-isystem.patch113
-rw-r--r--dev-db/percona-xtrabackup/files/percona-xtrabackup-2.4.6-fix-gcc6-isystem.patch112
-rw-r--r--dev-db/percona-xtrabackup/files/percona-xtrabackup-2.4.6-remove-boost-version-check.patch19
-rw-r--r--dev-db/percona-xtrabackup/metadata.xml19
-rw-r--r--dev-db/percona-xtrabackup/percona-xtrabackup-2.4.10.ebuild86
-rw-r--r--dev-db/percona-xtrabackup/percona-xtrabackup-2.4.11.ebuild86
-rw-r--r--dev-db/percona-xtrabackup/percona-xtrabackup-2.4.12.ebuild86
-rw-r--r--dev-db/percona-xtrabackup/percona-xtrabackup-2.4.9.ebuild82
-rw-r--r--dev-db/pg_activity-1.2.014
-rw-r--r--dev-db/pg_activity/Manifest3
-rw-r--r--dev-db/pg_activity/metadata.xml11
-rw-r--r--dev-db/pg_activity/pg_activity-1.2.0.ebuild24
-rw-r--r--dev-db/pg_top-3.7.013
-rw-r--r--dev-db/pg_top/Manifest4
-rw-r--r--dev-db/pg_top/files/pg_top-3.7.0.patch29
-rw-r--r--dev-db/pg_top/metadata.xml12
-rw-r--r--dev-db/pg_top/pg_top-3.7.0.ebuild30
-rw-r--r--dev-db/pgadmin3-1.22.213
-rw-r--r--dev-db/pgadmin3/Manifest5
-rw-r--r--dev-db/pgadmin3/files/pgadmin3-desktop-r1.patch15
-rw-r--r--dev-db/pgadmin3/files/pgadmin3-gcc6-null-pointer.patch11
-rw-r--r--dev-db/pgadmin3/metadata.xml11
-rw-r--r--dev-db/pgadmin3/pgadmin3-1.22.2.ebuild45
-rw-r--r--dev-db/pgadmin4-2.0-r115
-rw-r--r--dev-db/pgadmin4-2.115
-rw-r--r--dev-db/pgadmin4-3.015
-rw-r--r--dev-db/pgadmin4/Manifest7
-rw-r--r--dev-db/pgadmin4/metadata.xml8
-rw-r--r--dev-db/pgadmin4/pgadmin4-2.0-r1.ebuild122
-rw-r--r--dev-db/pgadmin4/pgadmin4-2.1.ebuild122
-rw-r--r--dev-db/pgadmin4/pgadmin4-3.0.ebuild123
-rw-r--r--dev-db/pgagent-3.4.0-r312
-rw-r--r--dev-db/pgagent/Manifest10
-rw-r--r--dev-db/pgagent/files/add-log-timestamps.patch535
-rw-r--r--dev-db/pgagent/files/fix-dbconn-getlasterror-crash.patch32
-rw-r--r--dev-db/pgagent/files/fix-job-success-test.patch30
-rw-r--r--dev-db/pgagent/files/pgagent.confd22
-rw-r--r--dev-db/pgagent/files/pgagent.initd-r131
-rw-r--r--dev-db/pgagent/files/postgres-10-build-fix.patch52
-rw-r--r--dev-db/pgagent/files/save-stderr-jobstep-output.patch79
-rw-r--r--dev-db/pgagent/metadata.xml8
-rw-r--r--dev-db/pgagent/pgagent-3.4.0-r3.ebuild78
-rw-r--r--dev-db/pgbadger-9.212
-rw-r--r--dev-db/pgbadger/Manifest3
-rw-r--r--dev-db/pgbadger/metadata.xml12
-rw-r--r--dev-db/pgbadger/pgbadger-9.2.ebuild21
-rw-r--r--dev-db/pgbouncer-1.8.114
-rw-r--r--dev-db/pgbouncer/Manifest7
-rw-r--r--dev-db/pgbouncer/files/logrotate7
-rw-r--r--dev-db/pgbouncer/files/pgbouncer-1.8-dirs.patch32
-rw-r--r--dev-db/pgbouncer/files/pgbouncer.confd12
-rwxr-xr-xdev-db/pgbouncer/files/pgbouncer.initd-r183
-rw-r--r--dev-db/pgbouncer/metadata.xml17
-rw-r--r--dev-db/pgbouncer/pgbouncer-1.8.1.ebuild86
-rw-r--r--dev-db/pgmemcache-2.1.211
-rw-r--r--dev-db/pgmemcache-2.2.011
-rw-r--r--dev-db/pgmemcache-2.3.011
-rw-r--r--dev-db/pgmemcache/Manifest7
-rw-r--r--dev-db/pgmemcache/metadata.xml11
-rw-r--r--dev-db/pgmemcache/pgmemcache-2.1.2.ebuild19
-rw-r--r--dev-db/pgmemcache/pgmemcache-2.2.0.ebuild23
-rw-r--r--dev-db/pgmemcache/pgmemcache-2.3.0.ebuild23
-rw-r--r--dev-db/pgmodeler-0.9.113
-rw-r--r--dev-db/pgmodeler/Manifest3
-rw-r--r--dev-db/pgmodeler/metadata.xml8
-rw-r--r--dev-db/pgmodeler/pgmodeler-0.9.1.ebuild61
-rw-r--r--dev-db/pgpool2-3.7.013
-rw-r--r--dev-db/pgpool2-3.7.113
-rw-r--r--dev-db/pgpool2-3.7.313
-rw-r--r--dev-db/pgpool2-999911
-rw-r--r--dev-db/pgpool2/Manifest12
-rw-r--r--dev-db/pgpool2/files/pgpool2.confd17
-rw-r--r--dev-db/pgpool2/files/pgpool2.initd82
-rw-r--r--dev-db/pgpool2/files/pgpool_run_paths-3.6.5.patch268
-rw-r--r--dev-db/pgpool2/files/pgpool_run_paths-9999.patch274
-rw-r--r--dev-db/pgpool2/metadata.xml11
-rw-r--r--dev-db/pgpool2/pgpool2-3.7.0.ebuild98
-rw-r--r--dev-db/pgpool2/pgpool2-3.7.1.ebuild98
-rw-r--r--dev-db/pgpool2/pgpool2-3.7.3.ebuild98
-rw-r--r--dev-db/pgpool2/pgpool2-9999.ebuild97
-rw-r--r--dev-db/pgrouting-2.5.215
-rw-r--r--dev-db/pgrouting/Manifest3
-rw-r--r--dev-db/pgrouting/metadata.xml15
-rw-r--r--dev-db/pgrouting/pgrouting-2.5.2.ebuild64
-rw-r--r--dev-db/pgtap-0.98.013
-rw-r--r--dev-db/pgtap/Manifest3
-rw-r--r--dev-db/pgtap/metadata.xml16
-rw-r--r--dev-db/pgtap/pgtap-0.98.0.ebuild26
-rw-r--r--dev-db/pgxnclient-1.2-r114
-rw-r--r--dev-db/pgxnclient-1.2.114
-rw-r--r--dev-db/pgxnclient/Manifest5
-rw-r--r--dev-db/pgxnclient/metadata.xml15
-rw-r--r--dev-db/pgxnclient/pgxnclient-1.2-r1.ebuild29
-rw-r--r--dev-db/pgxnclient/pgxnclient-1.2.1.ebuild29
-rw-r--r--dev-db/phpmyadmin-4.7.013
-rw-r--r--dev-db/phpmyadmin-4.7.813
-rw-r--r--dev-db/phpmyadmin-4.8.213
-rw-r--r--dev-db/phpmyadmin/Manifest8
-rw-r--r--dev-db/phpmyadmin/files/postinstall-en-3.1.txt36
-rw-r--r--dev-db/phpmyadmin/metadata.xml23
-rw-r--r--dev-db/phpmyadmin/phpmyadmin-4.7.0.ebuild61
-rw-r--r--dev-db/phpmyadmin/phpmyadmin-4.7.8.ebuild61
-rw-r--r--dev-db/phpmyadmin/phpmyadmin-4.8.2.ebuild61
-rw-r--r--dev-db/plr-8.3.0.1714
-rw-r--r--dev-db/plr/Manifest3
-rw-r--r--dev-db/plr/metadata.xml23
-rw-r--r--dev-db/plr/plr-8.3.0.17.ebuild69
-rw-r--r--dev-db/postgis-2.4.215
-rw-r--r--dev-db/postgis-2.4.315
-rw-r--r--dev-db/postgis-999913
-rw-r--r--dev-db/postgis/Manifest8
-rw-r--r--dev-db/postgis/files/postgis-2.2.0-arflags.patch18
-rw-r--r--dev-db/postgis/files/postgis-2.4.2-jsonc_0.13.patch23
-rw-r--r--dev-db/postgis/metadata.xml26
-rw-r--r--dev-db/postgis/postgis-2.4.2.ebuild126
-rw-r--r--dev-db/postgis/postgis-2.4.3.ebuild126
-rw-r--r--dev-db/postgis/postgis-9999.ebuild114
-rw-r--r--dev-db/postgresql-10.314
-rw-r--r--dev-db/postgresql-10.414
-rw-r--r--dev-db/postgresql-11_beta114
-rw-r--r--dev-db/postgresql-9.3.2214
-rw-r--r--dev-db/postgresql-9.3.2314
-rw-r--r--dev-db/postgresql-9.4.1714
-rw-r--r--dev-db/postgresql-9.4.1814
-rw-r--r--dev-db/postgresql-9.5.1214
-rw-r--r--dev-db/postgresql-9.5.1314
-rw-r--r--dev-db/postgresql-9.6.814
-rw-r--r--dev-db/postgresql-9.6.914
-rw-r--r--dev-db/postgresql-999912
-rw-r--r--dev-db/postgresql/Manifest36
-rw-r--r--dev-db/postgresql/files/postgresql-10.2-no-server.patch147
-rw-r--r--dev-db/postgresql/files/postgresql-11_beta1-no-server.patch148
-rw-r--r--dev-db/postgresql/files/postgresql-9.3-no-server.patch148
-rw-r--r--dev-db/postgresql/files/postgresql-9.4.10-no-server.patch151
-rw-r--r--dev-db/postgresql/files/postgresql-9.5.5-no-server.patch151
-rw-r--r--dev-db/postgresql/files/postgresql-9.6.3-no-server.patch145
-rw-r--r--dev-db/postgresql/files/postgresql-check-db-dir35
-rw-r--r--dev-db/postgresql/files/postgresql.confd-9.365
-rwxr-xr-xdev-db/postgresql/files/postgresql.init-9.3-r1157
-rw-r--r--dev-db/postgresql/files/postgresql.service-9.251
-rw-r--r--dev-db/postgresql/files/postgresql.service-9.6-r152
-rw-r--r--dev-db/postgresql/files/postgresql.tmpfiles1
-rw-r--r--dev-db/postgresql/metadata.xml21
-rw-r--r--dev-db/postgresql/postgresql-10.3.ebuild460
-rw-r--r--dev-db/postgresql/postgresql-10.4.ebuild460
-rw-r--r--dev-db/postgresql/postgresql-11_beta1.ebuild449
-rw-r--r--dev-db/postgresql/postgresql-9.3.22.ebuild450
-rw-r--r--dev-db/postgresql/postgresql-9.3.23.ebuild450
-rw-r--r--dev-db/postgresql/postgresql-9.4.17.ebuild482
-rw-r--r--dev-db/postgresql/postgresql-9.4.18.ebuild482
-rw-r--r--dev-db/postgresql/postgresql-9.5.12.ebuild488
-rw-r--r--dev-db/postgresql/postgresql-9.5.13.ebuild488
-rw-r--r--dev-db/postgresql/postgresql-9.6.8.ebuild493
-rw-r--r--dev-db/postgresql/postgresql-9.6.9.ebuild493
-rw-r--r--dev-db/postgresql/postgresql-9999.ebuild439
-rw-r--r--dev-db/pspg-0.8.011
-rw-r--r--dev-db/pspg-0.9.211
-rw-r--r--dev-db/pspg-0.9.311
-rw-r--r--dev-db/pspg-1.1.011
-rw-r--r--dev-db/pspg/Manifest9
-rw-r--r--dev-db/pspg/metadata.xml8
-rw-r--r--dev-db/pspg/pspg-0.8.0.ebuild16
-rw-r--r--dev-db/pspg/pspg-0.9.2.ebuild16
-rw-r--r--dev-db/pspg/pspg-0.9.3.ebuild16
-rw-r--r--dev-db/pspg/pspg-1.1.0.ebuild16
-rw-r--r--dev-db/psqlodbc-10.01.000012
-rw-r--r--dev-db/psqlodbc/Manifest3
-rw-r--r--dev-db/psqlodbc/metadata.xml11
-rw-r--r--dev-db/psqlodbc/psqlodbc-10.01.0000.ebuild32
-rw-r--r--dev-db/qdbm-1.8.78-r213
-rw-r--r--dev-db/qdbm/Manifest7
-rw-r--r--dev-db/qdbm/files/qdbm-configure.patch108
-rw-r--r--dev-db/qdbm/files/qdbm-perl.patch34
-rw-r--r--dev-db/qdbm/files/qdbm-ruby19.patch373
-rw-r--r--dev-db/qdbm/files/qdbm-runpath.patch30
-rw-r--r--dev-db/qdbm/metadata.xml7
-rw-r--r--dev-db/qdbm/qdbm-1.8.78-r2.ebuild181
-rw-r--r--dev-db/qt5-sqlcipher-1.0.1-r312
-rw-r--r--dev-db/qt5-sqlcipher/Manifest5
-rw-r--r--dev-db/qt5-sqlcipher/files/qt5-sqlcipher-install-path.patch12
-rw-r--r--dev-db/qt5-sqlcipher/metadata.xml7
-rw-r--r--dev-db/qt5-sqlcipher/qt5-sqlcipher-1.0.1-r3.ebuild49
-rw-r--r--dev-db/redis-3.0.714
-rw-r--r--dev-db/redis-3.0.7-r114
-rw-r--r--dev-db/redis-3.2.1214
-rw-r--r--dev-db/redis-3.2.514
-rw-r--r--dev-db/redis-3.2.8-r214
-rw-r--r--dev-db/redis-3.2.8-r514
-rw-r--r--dev-db/redis-4.0.114
-rw-r--r--dev-db/redis-4.0.1-r114
-rw-r--r--dev-db/redis-4.0.1014
-rw-r--r--dev-db/redis-4.0.2-r114
-rw-r--r--dev-db/redis-4.0.614
-rw-r--r--dev-db/redis-4.0.714
-rw-r--r--dev-db/redis-4.0.814
-rw-r--r--dev-db/redis-4.0.914
-rw-r--r--dev-db/redis/Manifest46
-rw-r--r--dev-db/redis/files/configure.ac-2.258
-rw-r--r--dev-db/redis/files/configure.ac-3.266
-rw-r--r--dev-db/redis/files/redis-2.8.17-config.patch46
-rw-r--r--dev-db/redis/files/redis-2.8.3-shared.patch36
-rw-r--r--dev-db/redis/files/redis-3.0.0-sharedlua.patch44
-rw-r--r--dev-db/redis/files/redis-3.2.3-config.patch40
-rw-r--r--dev-db/redis/files/redis-3.2.3-sharedlua.patch60
-rw-r--r--dev-db/redis/files/redis-3.2.5-shared.patch30
-rw-r--r--dev-db/redis/files/redis-4.0.1-shared.patch32
-rw-r--r--dev-db/redis/files/redis-4.0.1-sharedlua.patch60
-rw-r--r--dev-db/redis/files/redis-sentinel-4.0.6-config.patch9
-rw-r--r--dev-db/redis/files/redis-sentinel.confd16
-rw-r--r--dev-db/redis/files/redis-sentinel.initd22
-rw-r--r--dev-db/redis/files/redis.confd20
-rw-r--r--dev-db/redis/files/redis.confd-r120
-rw-r--r--dev-db/redis/files/redis.initd-431
-rw-r--r--dev-db/redis/files/redis.initd-525
-rw-r--r--dev-db/redis/files/redis.logrotate6
-rw-r--r--dev-db/redis/files/redis.service-214
-rw-r--r--dev-db/redis/files/redis.tmpfiles2
-rw-r--r--dev-db/redis/metadata.xml18
-rw-r--r--dev-db/redis/redis-3.0.7-r1.ebuild115
-rw-r--r--dev-db/redis/redis-3.0.7.ebuild115
-rw-r--r--dev-db/redis/redis-3.2.12.ebuild131
-rw-r--r--dev-db/redis/redis-3.2.5.ebuild123
-rw-r--r--dev-db/redis/redis-3.2.8-r2.ebuild123
-rw-r--r--dev-db/redis/redis-3.2.8-r5.ebuild131
-rw-r--r--dev-db/redis/redis-4.0.1-r1.ebuild128
-rw-r--r--dev-db/redis/redis-4.0.1.ebuild122
-rw-r--r--dev-db/redis/redis-4.0.10.ebuild141
-rw-r--r--dev-db/redis/redis-4.0.2-r1.ebuild130
-rw-r--r--dev-db/redis/redis-4.0.6.ebuild141
-rw-r--r--dev-db/redis/redis-4.0.7.ebuild141
-rw-r--r--dev-db/redis/redis-4.0.8.ebuild141
-rw-r--r--dev-db/redis/redis-4.0.9.ebuild141
-rw-r--r--dev-db/repmgr-3.0.112
-rw-r--r--dev-db/repmgr-3.3.212
-rw-r--r--dev-db/repmgr/Manifest5
-rw-r--r--dev-db/repmgr/metadata.xml7
-rw-r--r--dev-db/repmgr/repmgr-3.0.1.ebuild40
-rw-r--r--dev-db/repmgr/repmgr-3.3.2.ebuild40
-rw-r--r--dev-db/rethinkdb-2.3.614
-rw-r--r--dev-db/rethinkdb/Manifest9
-rw-r--r--dev-db/rethinkdb/files/rethinkdb-2.3.5-gcc6.patch37
-rw-r--r--dev-db/rethinkdb/files/rethinkdb-2.3.5-libressl.patch162
-rw-r--r--dev-db/rethinkdb/files/rethinkdb.confd12
-rw-r--r--dev-db/rethinkdb/files/rethinkdb.initd49
-rw-r--r--dev-db/rethinkdb/files/rethinkdb.service13
-rw-r--r--dev-db/rethinkdb/files/rethinkdb.tmpfilesd1
-rw-r--r--dev-db/rethinkdb/metadata.xml19
-rw-r--r--dev-db/rethinkdb/rethinkdb-2.3.6.ebuild139
-rw-r--r--dev-db/rqlite-4.1.011
-rw-r--r--dev-db/rqlite-4.3.011
-rw-r--r--dev-db/rqlite/Manifest32
-rw-r--r--dev-db/rqlite/metadata.xml10
-rw-r--r--dev-db/rqlite/rqlite-4.1.0.ebuild48
-rw-r--r--dev-db/rqlite/rqlite-4.3.0.ebuild50
-rw-r--r--dev-db/sadisplay-0.4.814
-rw-r--r--dev-db/sadisplay/Manifest3
-rw-r--r--dev-db/sadisplay/metadata.xml21
-rw-r--r--dev-db/sadisplay/sadisplay-0.4.8.ebuild29
-rw-r--r--dev-db/slony1-2.2.614
-rw-r--r--dev-db/slony1/Manifest6
-rw-r--r--dev-db/slony1/files/slony1.conf11
-rw-r--r--dev-db/slony1/files/slony1.init36
-rw-r--r--dev-db/slony1/metadata.xml8
-rw-r--r--dev-db/slony1/slony1-2.2.6.ebuild64
-rw-r--r--dev-db/soci-3.2.313
-rw-r--r--dev-db/soci/Manifest3
-rw-r--r--dev-db/soci/metadata.xml11
-rw-r--r--dev-db/soci/soci-3.2.3.ebuild50
-rw-r--r--dev-db/spatialite-4.3.0-r113
-rw-r--r--dev-db/spatialite-4.3.0a13
-rw-r--r--dev-db/spatialite-tools-4.3.0-r112
-rw-r--r--dev-db/spatialite-tools/Manifest3
-rw-r--r--dev-db/spatialite-tools/metadata.xml8
-rw-r--r--dev-db/spatialite-tools/spatialite-tools-4.3.0-r1.ebuild33
-rw-r--r--dev-db/spatialite/Manifest5
-rw-r--r--dev-db/spatialite/metadata.xml13
-rw-r--r--dev-db/spatialite/spatialite-4.3.0-r1.ebuild49
-rw-r--r--dev-db/spatialite/spatialite-4.3.0a.ebuild49
-rw-r--r--dev-db/sqlcipher-3.4.114
-rw-r--r--dev-db/sqlcipher-3.4.214
-rw-r--r--dev-db/sqlcipher/Manifest6
-rw-r--r--dev-db/sqlcipher/files/sqlcipher-3.4.1-libressl.patch11
-rw-r--r--dev-db/sqlcipher/metadata.xml11
-rw-r--r--dev-db/sqlcipher/sqlcipher-3.4.1.ebuild59
-rw-r--r--dev-db/sqlcipher/sqlcipher-3.4.2.ebuild61
-rw-r--r--dev-db/sqlcl-bin-17.4.0.354.222411
-rw-r--r--dev-db/sqlcl-bin/Manifest3
-rw-r--r--dev-db/sqlcl-bin/metadata.xml16
-rw-r--r--dev-db/sqlcl-bin/sqlcl-bin-17.4.0.354.2224.ebuild48
-rw-r--r--dev-db/sqldeveloper-4.2.0.17.089.170914
-rw-r--r--dev-db/sqldeveloper/Manifest5
-rw-r--r--dev-db/sqldeveloper/files/sqldeveloper9
-rw-r--r--dev-db/sqldeveloper/files/sqldeveloper-r110
-rw-r--r--dev-db/sqldeveloper/metadata.xml6
-rw-r--r--dev-db/sqldeveloper/sqldeveloper-4.2.0.17.089.1709.ebuild97
-rw-r--r--dev-db/sqlite-3.23.113
-rw-r--r--dev-db/sqlite-3.24.013
-rw-r--r--dev-db/sqlite/Manifest17
-rw-r--r--dev-db/sqlite/files/sqlite-3.21.0-nonfull_archive-build.patch14
-rw-r--r--dev-db/sqlite/files/sqlite-3.23.0-full_archive-build.patch407
-rw-r--r--dev-db/sqlite/files/sqlite-3.23.1-full_archive-prohibit_bound_parameters_in_arguments_to_table-valued_functions_within_triggers.patch24
-rw-r--r--dev-db/sqlite/files/sqlite-3.23.1-full_archive-tests.patch224
-rw-r--r--dev-db/sqlite/files/sqlite-3.23.1-nonfull_archive-prohibit_bound_parameters_in_arguments_to_table-valued_functions_within_triggers.patch14
-rw-r--r--dev-db/sqlite/files/sqlite-3.24.0-full_archive-archive_command_paths_handling.patch14
-rw-r--r--dev-db/sqlite/files/sqlite-3.24.0-full_archive-build.patch407
-rw-r--r--dev-db/sqlite/files/sqlite-3.24.0-nonfull_archive-archive_command_paths_handling.patch14
-rw-r--r--dev-db/sqlite/metadata.xml19
-rw-r--r--dev-db/sqlite/sqlite-3.23.1.ebuild309
-rw-r--r--dev-db/sqlite/sqlite-3.24.0.ebuild308
-rw-r--r--dev-db/sqlitebrowser-3.10.113
-rw-r--r--dev-db/sqlitebrowser-3.9.1-r113
-rw-r--r--dev-db/sqlitebrowser/Manifest8
-rw-r--r--dev-db/sqlitebrowser/files/sqlitebrowser-3.10.1-unbundle.patch105
-rw-r--r--dev-db/sqlitebrowser/files/sqlitebrowser-3.7.0-unbundle.patch18
-rw-r--r--dev-db/sqlitebrowser/files/sqlitebrowser-3.9.1-cmake.patch24
-rw-r--r--dev-db/sqlitebrowser/metadata.xml18
-rw-r--r--dev-db/sqlitebrowser/sqlitebrowser-3.10.1.ebuild68
-rw-r--r--dev-db/sqlitebrowser/sqlitebrowser-3.9.1-r1.ebuild71
-rw-r--r--dev-db/sqliteman-1.2.2-r412
-rw-r--r--dev-db/sqliteman/Manifest5
-rw-r--r--dev-db/sqliteman/files/sqliteman-1.2.2-lpthread.patch19
-rw-r--r--dev-db/sqliteman/files/sqliteman-1.2.2-qt5.patch346
-rw-r--r--dev-db/sqliteman/metadata.xml11
-rw-r--r--dev-db/sqliteman/sqliteman-1.2.2-r4.ebuild45
-rw-r--r--dev-db/sqliteodbc-0.9612
-rw-r--r--dev-db/sqliteodbc-0.9912
-rw-r--r--dev-db/sqliteodbc/Manifest6
-rw-r--r--dev-db/sqliteodbc/files/sqliteodbc-0.93-respect_LDFLAGS.patch30
-rw-r--r--dev-db/sqliteodbc/metadata.xml5
-rw-r--r--dev-db/sqliteodbc/sqliteodbc-0.96.ebuild41
-rw-r--r--dev-db/sqliteodbc/sqliteodbc-0.99.ebuild41
-rw-r--r--dev-db/sqlitestudio-3.0.713
-rw-r--r--dev-db/sqlitestudio-3.1.113
-rw-r--r--dev-db/sqlitestudio/Manifest8
-rw-r--r--dev-db/sqlitestudio/files/sqlitestudio-3.0.6-portable.patch11
-rw-r--r--dev-db/sqlitestudio/files/sqlitestudio-3.0.6-qt5_5-QDataStream.patch30
-rw-r--r--dev-db/sqlitestudio/files/sqlitestudio-3.0.7-paths.patch22
-rw-r--r--dev-db/sqlitestudio/metadata.xml15
-rw-r--r--dev-db/sqlitestudio/sqlitestudio-3.0.7.ebuild130
-rw-r--r--dev-db/sqlitestudio/sqlitestudio-3.1.1.ebuild139
-rw-r--r--dev-db/textsearch_ja-9.0.011
-rw-r--r--dev-db/textsearch_ja/Manifest3
-rw-r--r--dev-db/textsearch_ja/metadata.xml8
-rw-r--r--dev-db/textsearch_ja/textsearch_ja-9.0.0.ebuild25
-rw-r--r--dev-db/tinycdb-0.77-r213
-rw-r--r--dev-db/tinycdb/Manifest6
-rw-r--r--dev-db/tinycdb/files/tinycdb-gentoo.patch28
-rw-r--r--dev-db/tinycdb/files/tinycdb-uclibc.patch15
-rw-r--r--dev-db/tinycdb/files/tinycdb-umask.patch11
-rw-r--r--dev-db/tinycdb/metadata.xml7
-rw-r--r--dev-db/tinycdb/tinycdb-0.77-r2.ebuild52
-rw-r--r--dev-db/tokumx-1.5.0-r214
-rw-r--r--dev-db/tokumx-2.0.2-r114
-rw-r--r--dev-db/tokumx/Manifest12
-rw-r--r--dev-db/tokumx/files/1.5.0-Werror.diff45
-rw-r--r--dev-db/tokumx/files/1.5.0-boost-57.diff11
-rw-r--r--dev-db/tokumx/files/tokumx-2.0.2-boost-57.patch22
-rw-r--r--dev-db/tokumx/files/tokumx-2.0.2-gcc-7.patch102
-rw-r--r--dev-db/tokumx/files/tokumx-2.0.2-no-werror.patch88
-rw-r--r--dev-db/tokumx/files/tokumx-2.0.2-undefined-reference.patch15
-rw-r--r--dev-db/tokumx/files/tokumx-disable-bundled-libs.patch11
-rw-r--r--dev-db/tokumx/metadata.xml15
-rw-r--r--dev-db/tokumx/tokumx-1.5.0-r2.ebuild77
-rw-r--r--dev-db/tokumx/tokumx-2.0.2-r1.ebuild79
-rw-r--r--dev-db/tokyocabinet-1.4.48-r113
-rw-r--r--dev-db/tokyocabinet/Manifest4
-rw-r--r--dev-db/tokyocabinet/files/fix_rpath.patch56
-rw-r--r--dev-db/tokyocabinet/metadata.xml8
-rw-r--r--dev-db/tokyocabinet/tokyocabinet-1.4.48-r1.ebuild60
-rw-r--r--dev-db/tora-3.2-r114
-rw-r--r--dev-db/tora-999912
-rw-r--r--dev-db/tora/Manifest6
-rw-r--r--dev-db/tora/files/tora-3.2-missing-header.patch21
-rw-r--r--dev-db/tora/files/tora-3.2-qt-5.11.0.patch69
-rw-r--r--dev-db/tora/metadata.xml25
-rw-r--r--dev-db/tora/tora-3.2-r1.ebuild96
-rw-r--r--dev-db/tora/tora-9999.ebuild91
-rw-r--r--dev-db/unixODBC-2.3.5-r113
-rw-r--r--dev-db/unixODBC-2.3.613
-rw-r--r--dev-db/unixODBC/Manifest6
-rw-r--r--dev-db/unixODBC/files/unixODBC-2.3.5-CVE-2018-7485.patch135
-rw-r--r--dev-db/unixODBC/metadata.xml8
-rw-r--r--dev-db/unixODBC/unixODBC-2.3.5-r1.ebuild65
-rw-r--r--dev-db/unixODBC/unixODBC-2.3.6.ebuild61
-rw-r--r--dev-db/vbisam-2.09
-rw-r--r--dev-db/vbisam/Manifest3
-rw-r--r--dev-db/vbisam/metadata.xml8
-rw-r--r--dev-db/vbisam/vbisam-2.0.ebuild22
-rw-r--r--dev-db/vsqlite++-0.3.13-r113
-rw-r--r--dev-db/vsqlite++/Manifest3
-rw-r--r--dev-db/vsqlite++/metadata.xml10
-rw-r--r--dev-db/vsqlite++/vsqlite++-0.3.13-r1.ebuild39
-rw-r--r--dev-db/wxsqlite3-3.2.1-r112
-rw-r--r--dev-db/wxsqlite3/Manifest4
-rw-r--r--dev-db/wxsqlite3/files/wxsqlite3-3.2.1.pc.in14
-rw-r--r--dev-db/wxsqlite3/metadata.xml11
-rw-r--r--dev-db/wxsqlite3/wxsqlite3-3.2.1-r1.ebuild55
-rw-r--r--dev-db/xbase-3.1.212
-rw-r--r--dev-db/xbase/Manifest13
-rw-r--r--dev-db/xbase/files/xbase-2.0.0-ppc.patch20
-rw-r--r--dev-db/xbase/files/xbase-3.1.2-fixconfig.patch12
-rw-r--r--dev-db/xbase/files/xbase-3.1.2-gcc-version.patch16
-rw-r--r--dev-db/xbase/files/xbase-3.1.2-gcc44.patch24
-rw-r--r--dev-db/xbase/files/xbase-3.1.2-gcc47.patch21
-rw-r--r--dev-db/xbase/files/xbase-3.1.2-gcc6.patch49
-rw-r--r--dev-db/xbase/files/xbase-3.1.2-gcc7.patch34
-rw-r--r--dev-db/xbase/files/xbase-3.1.2-lesserg.patch294
-rw-r--r--dev-db/xbase/files/xbase-3.1.2-outofsource.patch52
-rw-r--r--dev-db/xbase/files/xbase-3.1.2-xbnode.patch9
-rw-r--r--dev-db/xbase/metadata.xml8
-rw-r--r--dev-db/xbase/xbase-3.1.2.ebuild61
-rw-r--r--dev-db/xbsql-0.11-r213
-rw-r--r--dev-db/xbsql/Manifest7
-rw-r--r--dev-db/xbsql/files/xbsql-0.11-autotools.patch18
-rw-r--r--dev-db/xbsql/files/xbsql-0.11-bfr-overflow.patch79
-rw-r--r--dev-db/xbsql/files/xbsql-0.11-ncurses64.patch19
-rw-r--r--dev-db/xbsql/files/xbsql-0.11-xbase64.patch66
-rw-r--r--dev-db/xbsql/metadata.xml5
-rw-r--r--dev-db/xbsql/xbsql-0.11-r2.ebuild40
1141 files changed, 57925 insertions, 3860 deletions
diff --git a/dev-db/4store-1.1.5-r1 b/dev-db/4store-1.1.5-r1
deleted file mode 100644
index 22925b62a580..000000000000
--- a/dev-db/4store-1.1.5-r1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=install setup
-DEPEND=media-libs/raptor >=dev-libs/rasqal-0.9.18 dev-libs/glib dev-libs/libxml2 dev-libs/libpcre sys-libs/readline sys-libs/ncurses dev-libs/expat sys-libs/zlib
-DESCRIPTION=4store is an efficient, scalable and stable RDF database
-EAPI=5
-HOMEPAGE=https://4store.github.io/
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-3
-RDEPEND=media-libs/raptor >=dev-libs/rasqal-0.9.18 dev-libs/glib dev-libs/libxml2 dev-libs/libpcre sys-libs/readline sys-libs/ncurses dev-libs/expat sys-libs/zlib
-SLOT=0
-SRC_URI=https://4store.danielknoell.de/download/4store-v1.1.5.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=5eea34f7bbb8efc165ac0998b92f37b1
diff --git a/dev-db/4store/4store-1.1.5-r1.ebuild b/dev-db/4store/4store-1.1.5-r1.ebuild
new file mode 100644
index 000000000000..cbbefd39efa2
--- /dev/null
+++ b/dev-db/4store/4store-1.1.5-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils user
+
+DESCRIPTION="4store is an efficient, scalable and stable RDF database"
+HOMEPAGE="https://4store.github.io/"
+MY_P="${PN}-v${PV}"
+SRC_URI="https://4store.danielknoell.de/download/4store-v${PV}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# < http://4store.org/trac/wiki/Dependencies
+DEPEND="media-libs/raptor
+ >=dev-libs/rasqal-0.9.18
+ dev-libs/glib
+ dev-libs/libxml2
+ dev-libs/libpcre
+ sys-libs/readline
+ sys-libs/ncurses
+ dev-libs/expat
+ sys-libs/zlib"
+
+RDEPEND="${DEPEND}"
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ enewgroup fourstore
+ enewuser fourstore -1 -1 /var/lib/4store fourstore
+}
+
+src_install() {
+
+ # patch the Makefiles to use /usr/ instead of /usr/local/
+ find . -name "Makefile" -execdir sed -e "s#/usr/local/#/usr/#" -i {} \;
+
+ MAKEOPTS="-j1" emake DESTDIR="${D}" install || die "emake install failed"
+
+ dodir /var/log/4store
+ fowners fourstore:fourstore \
+ /var/lib/4store \
+ /var/log/4store
+
+ # fix 1777
+ fperms 755 /var/lib/4store
+
+ # fix 755
+ fperms 644 \
+ /usr/share/man/man1/4s-query.1 \
+ /usr/share/man/man1/4s-backend-setup.1 \
+ /usr/share/man/man1/4s-import.1 \
+ /usr/share/man/man1/4s-cluster-info.1 \
+ /usr/share/man/man1/4s-cluster-start.1 \
+ /usr/share/man/man1/4s-cluster-create.1 \
+ /usr/share/man/man1/4s-cluster-stop.1 \
+ /usr/share/man/man1/4s-cluster-destroy.1
+}
diff --git a/dev-db/4store/Manifest b/dev-db/4store/Manifest
new file mode 100644
index 000000000000..e95df85d4283
--- /dev/null
+++ b/dev-db/4store/Manifest
@@ -0,0 +1,3 @@
+DIST 4store-v1.1.5.tar.gz 5610204 BLAKE2B fefcad237a587e83bc58b8f89e9c40cbc19ba9e2b784ca2d96b7a502c79068bf60fa78d7f273589df4e110b3f14a77f9d901479902b640454ac1f0dfe6e028e7 SHA512 42a7431c7853e1b06a76ed15c205eebd7b334516c14e7dcfeddb2f9249f30f879f8256a1b454be71f79e71205b3efa95efab726fd88b4d455bb0fc4a8092bcf4
+EBUILD 4store-1.1.5-r1.ebuild 1472 BLAKE2B 8bae6d001048418fd72f0b73ebbea47db93f57b03d8a2f0603d1547a4333a04c7f9c22119158c175f88fabba5a9a5796cedf7b4efb40971533e38cb5d0f71d80 SHA512 5f61f30d75ad171078909e3a5ffb4bee4c001a546f49556b6b78a50287b5bdf9fc8f1fcec9ed86c43ab28e24d8ff66e35b6d863aad611ec57cad63379b97d2ad
+MISC metadata.xml 247 BLAKE2B 5a20af3c9732ef7dba68131a08988652f5c93a6d186a82c4deb1bb9c06dc3ae73152a0d241cc346637f7b11caf4676da43301ba596c67b66669535e71db0b03e SHA512 29cf52c16b0cce69899d9c2da8acd9144b7d760442aa323b854dceadb42459e009545193b1df7911ac2241b59f4819b4a6bb1d206d6f57953f770031433bb6b7
diff --git a/dev-db/4store/metadata.xml b/dev-db/4store/metadata.xml
new file mode 100644
index 000000000000..40aa45df2b01
--- /dev/null
+++ b/dev-db/4store/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-db/Manifest.gz b/dev-db/Manifest.gz
index d5c3208d5224..edd28515f2fe 100644
--- a/dev-db/Manifest.gz
+++ b/dev-db/Manifest.gz
Binary files differ
diff --git a/dev-db/SchemaSync-0.9.2-r1 b/dev-db/SchemaSync-0.9.2-r1
deleted file mode 100644
index 2f73fa2cec36..000000000000
--- a/dev-db/SchemaSync-0.9.2-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-python/setuptools[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] dev-python/mysql-python[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] dev-python/SchemaObject[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)]
-DESCRIPTION=MySQL Schema Versioning and Migration Utility
-EAPI=6
-HOMEPAGE=https://github.com/mmatuson/SchemaSync
-IUSE=python_targets_python2_7
-KEYWORDS=~amd64 ~x86
-LICENSE=Apache-2.0
-RDEPEND=dev-python/setuptools[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] dev-python/mysql-python[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] dev-python/SchemaObject[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)]
-REQUIRED_USE=|| ( python_targets_python2_7 )
-SLOT=0
-SRC_URI=mirror://gentoo/SchemaSync-0.9.2.tar.gz
-_eclasses_=distutils-r1 63fea93ca1cc4fdc5fa2247afc4e3a15 multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 python-r1 0b5829eb6369d7af3a834b6eed7b7107 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=9bb3dc21fa3a000650d6b2fb8d054f68
diff --git a/dev-db/SchemaSync-0.9.4 b/dev-db/SchemaSync-0.9.4
deleted file mode 100644
index b3f3e770a4cf..000000000000
--- a/dev-db/SchemaSync-0.9.4
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-python/setuptools[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] dev-python/mysql-python[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] dev-python/SchemaObject[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)]
-DESCRIPTION=MySQL Schema Versioning and Migration Utility
-EAPI=6
-HOMEPAGE=https://github.com/mmatuson/SchemaSync
-IUSE=python_targets_python2_7
-KEYWORDS=~amd64 ~x86
-LICENSE=Apache-2.0
-RDEPEND=dev-python/setuptools[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] dev-python/mysql-python[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] dev-python/SchemaObject[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)]
-REQUIRED_USE=|| ( python_targets_python2_7 )
-SLOT=0
-SRC_URI=mirror://pypi/S/SchemaSync/SchemaSync-0.9.4.tar.gz
-_eclasses_=distutils-r1 63fea93ca1cc4fdc5fa2247afc4e3a15 multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 python-r1 0b5829eb6369d7af3a834b6eed7b7107 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=5204b56864e6fa16f7e83c2cec680f78
diff --git a/dev-db/SchemaSync-0.9.5 b/dev-db/SchemaSync-0.9.5
deleted file mode 100644
index ea77366a42b7..000000000000
--- a/dev-db/SchemaSync-0.9.5
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-python/setuptools[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] dev-python/mysql-python[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] dev-python/SchemaObject[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)]
-DESCRIPTION=MySQL Schema Versioning and Migration Utility
-EAPI=6
-HOMEPAGE=https://github.com/mmatuson/SchemaSync
-IUSE=python_targets_python2_7
-KEYWORDS=~amd64 ~x86
-LICENSE=Apache-2.0
-RDEPEND=dev-python/setuptools[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] dev-python/mysql-python[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] dev-python/SchemaObject[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)]
-REQUIRED_USE=|| ( python_targets_python2_7 )
-SLOT=0
-SRC_URI=mirror://pypi/S/SchemaSync/SchemaSync-0.9.5.tar.gz
-_eclasses_=distutils-r1 63fea93ca1cc4fdc5fa2247afc4e3a15 multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 python-r1 0b5829eb6369d7af3a834b6eed7b7107 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=18b7043a70251f9f6e6da8a87358d4b0
diff --git a/dev-db/SchemaSync/Manifest b/dev-db/SchemaSync/Manifest
new file mode 100644
index 000000000000..d817b6637cc7
--- /dev/null
+++ b/dev-db/SchemaSync/Manifest
@@ -0,0 +1,7 @@
+DIST SchemaSync-0.9.2.tar.gz 12828 BLAKE2B 050a027376282816bef34d6a7e146e590c5ebc279649f03d65129d33b9941c08aeb7bb58a302b9a77a62c8b7820b8dcbd6bc783c2405a25a4baca863baa53d3e SHA512 4f2522c05e3cf0957fe0d51cc48f3a45fd8eaeb341801bfdeb32bb7e959e8a250a84a162b80853f2010a99a932ef7d1b556579f7c77971f0e9a3e0fa87531599
+DIST SchemaSync-0.9.4.tar.gz 13824 BLAKE2B d98cd5cc0d6275ac5e4bb0272f4ab2879f4639b0e2986c175297ab3cc60930f63c3288cc2c3194784078958749c8e95a9e9ecdf660e071a61caac37b9659f2e3 SHA512 0087f5f634d2374def5e1dd2dd8d6d57d3fca9322bba23aee461487053233dba30ce889a87747ce2c11bd9a7e08418d619e9fd8b910ea303987b57bac7609248
+DIST SchemaSync-0.9.5.tar.gz 13973 BLAKE2B e76dd4e2e69875dedafed44214b6e30db6e71f4ee62a4bcd1cf1592c6727ae9d6f70190aa288559594d278b3962f8cb91eeb3d4b4b9014737be8b6b37acc9e84 SHA512 8ee37c099de8e3627d3d708c5642e4e0b7304306002bfa82d24cd2a733539bd0d5144d6afd18dd06e229a87b05ee569fe2febc727785a085bb32169581805934
+EBUILD SchemaSync-0.9.2-r1.ebuild 568 BLAKE2B a88730eb8d9f71df54ab1f617f1166f638ed530dbe168d7439409e614c968054939e3f5dbf7b212977250baf384d05f23cdba82023d2f64cd24360bfee03a9ce SHA512 6c7501e38ab17d0bfe24f78338e525415aac6f81bce0423e6db1dc2787ef43f82f8788f61cdd6de6d9916348332ca9d9fc4743b1fa15f16903ef6cb63acd84c8
+EBUILD SchemaSync-0.9.4.ebuild 550 BLAKE2B 550326591dcea19d82af7373fc5a1bd13356054bf679b1d01ee57ca05fd9b04989f0b24d07aacb879c5f475f2b8eedd0e3520fd5d1b14345caca7a16d5f24bb4 SHA512 620a7eecfdb121ef9d9076e7978921d07766e2fe3b54b02d2947fa6803be81c1dffcbcf73d9a8a66270320d538ec4194aead79af1d02f1c74d61cf1eb06c490b
+EBUILD SchemaSync-0.9.5.ebuild 550 BLAKE2B aeb421fbd4f55f0c0afd1ad5bb3c600d455413fcb56d1a953874653689c9c3b9010360b7f13bf299013a141917b69521c91b836c9fc23b1efa04ec7001786796 SHA512 252e8d0e8b3cac03f0a3f180f3adc3633dd77c5e4562f7f7ec4f8a84236e2ed2492c573e0849f4cf10c0e0eaaf1df30c18bb999984fd3cb4280736a10f3df49a
+MISC metadata.xml 384 BLAKE2B 124298e3a428e69e9fd9b204453ddc37d5e283bc9c5fdb2565c7c876b2b1f95fb9bf0c3485089b971f0f486d74b4d2674647098ed0bc6803266067964bd9cc75 SHA512 8b370f82a807086da710e4af1e39a5e6e9b2cc06e89171c91d2516ad96fd5e5f8f96ff745943123368bf9773a0408f6563a5eee38ec36fab38e872ad08120960
diff --git a/dev-db/SchemaSync/SchemaSync-0.9.2-r1.ebuild b/dev-db/SchemaSync/SchemaSync-0.9.2-r1.ebuild
new file mode 100644
index 000000000000..cd2e1b2955e8
--- /dev/null
+++ b/dev-db/SchemaSync/SchemaSync-0.9.2-r1.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="MySQL Schema Versioning and Migration Utility"
+HOMEPAGE="https://github.com/mmatuson/SchemaSync"
+# old download location is down
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ dev-python/mysql-python[${PYTHON_USEDEP}]
+ dev-python/SchemaObject[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}"
diff --git a/dev-db/SchemaSync/SchemaSync-0.9.4.ebuild b/dev-db/SchemaSync/SchemaSync-0.9.4.ebuild
new file mode 100644
index 000000000000..f11cb9686919
--- /dev/null
+++ b/dev-db/SchemaSync/SchemaSync-0.9.4.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="MySQL Schema Versioning and Migration Utility"
+HOMEPAGE="https://github.com/mmatuson/SchemaSync"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ dev-python/mysql-python[${PYTHON_USEDEP}]
+ dev-python/SchemaObject[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}"
diff --git a/dev-db/SchemaSync/SchemaSync-0.9.5.ebuild b/dev-db/SchemaSync/SchemaSync-0.9.5.ebuild
new file mode 100644
index 000000000000..77f6e927f299
--- /dev/null
+++ b/dev-db/SchemaSync/SchemaSync-0.9.5.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="MySQL Schema Versioning and Migration Utility"
+HOMEPAGE="https://github.com/mmatuson/SchemaSync"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ dev-python/mysql-python[${PYTHON_USEDEP}]
+ dev-python/SchemaObject[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}"
diff --git a/dev-db/SchemaSync/metadata.xml b/dev-db/SchemaSync/metadata.xml
new file mode 100644
index 000000000000..5cddb3363d44
--- /dev/null
+++ b/dev-db/SchemaSync/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">mmatuson/SchemaSync</remote-id>
+ <remote-id type="pypi">SchemaSync</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/aerospike-server-community-3.13.0.9 b/dev-db/aerospike-server-community-3.13.0.9
deleted file mode 100644
index e7603d00fd16..000000000000
--- a/dev-db/aerospike-server-community-3.13.0.9
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=install prepare setup
-DEPEND=sys-libs/readline:0 sys-libs/zlib dev-libs/openssl:0
-DESCRIPTION=Flash-optimized, in-memory, nosql database
-EAPI=5
-HOMEPAGE=http://www.aerospike.com
-KEYWORDS=~amd64
-LICENSE=Apache-2.0
-RDEPEND=sys-libs/readline:0 sys-libs/zlib dev-libs/openssl:0
-SLOT=0
-SRC_URI=http://www.aerospike.com/artifacts/aerospike-server-community/3.13.0.9/aerospike-server-community-3.13.0.9-debian7.tgz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=5b88c6b6e22054f85335fc8c827f25fc
diff --git a/dev-db/aerospike-server-community-3.14.1.8 b/dev-db/aerospike-server-community-3.14.1.8
deleted file mode 100644
index 40b5c3a0478a..000000000000
--- a/dev-db/aerospike-server-community-3.14.1.8
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=install prepare setup
-DEPEND=sys-libs/readline:0 sys-libs/zlib dev-libs/openssl:0
-DESCRIPTION=Flash-optimized, in-memory, nosql database
-EAPI=5
-HOMEPAGE=http://www.aerospike.com
-KEYWORDS=~amd64
-LICENSE=Apache-2.0
-RDEPEND=sys-libs/readline:0 sys-libs/zlib dev-libs/openssl:0
-SLOT=0
-SRC_URI=http://www.aerospike.com/artifacts/aerospike-server-community/3.14.1.8/aerospike-server-community-3.14.1.8-debian7.tgz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=5b88c6b6e22054f85335fc8c827f25fc
diff --git a/dev-db/aerospike-server-community-3.15.1.4 b/dev-db/aerospike-server-community-3.15.1.4
deleted file mode 100644
index a21e8d3efc29..000000000000
--- a/dev-db/aerospike-server-community-3.15.1.4
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=install prepare setup
-DEPEND=sys-libs/readline:0 sys-libs/zlib dev-libs/openssl:0
-DESCRIPTION=Flash-optimized, in-memory, nosql database
-EAPI=5
-HOMEPAGE=http://www.aerospike.com
-KEYWORDS=~amd64
-LICENSE=Apache-2.0
-RDEPEND=sys-libs/readline:0 sys-libs/zlib dev-libs/openssl:0
-SLOT=0
-SRC_URI=http://www.aerospike.com/artifacts/aerospike-server-community/3.15.1.4/aerospike-server-community-3.15.1.4-debian7.tgz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=0770fb13f48a1876b77e917e9b69a31b
diff --git a/dev-db/aerospike-server-community-3.16.0.6 b/dev-db/aerospike-server-community-3.16.0.6
deleted file mode 100644
index 4cb4389538cd..000000000000
--- a/dev-db/aerospike-server-community-3.16.0.6
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=install prepare setup
-DEPEND=sys-libs/readline:0 sys-libs/zlib dev-libs/openssl:0
-DESCRIPTION=Flash-optimized, in-memory, nosql database
-EAPI=5
-HOMEPAGE=http://www.aerospike.com
-KEYWORDS=~amd64
-LICENSE=Apache-2.0
-RDEPEND=sys-libs/readline:0 sys-libs/zlib dev-libs/openssl:0
-SLOT=0
-SRC_URI=http://www.aerospike.com/artifacts/aerospike-server-community/3.16.0.6/aerospike-server-community-3.16.0.6-debian7.tgz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=566b2918ad5230bea201b3aa0249171b
diff --git a/dev-db/aerospike-server-community-4.0.0.1 b/dev-db/aerospike-server-community-4.0.0.1
deleted file mode 100644
index 2a49c241a9bd..000000000000
--- a/dev-db/aerospike-server-community-4.0.0.1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=install prepare setup
-DEPEND=sys-libs/readline:0 sys-libs/zlib dev-libs/openssl:0
-DESCRIPTION=Flash-optimized, in-memory, nosql database
-EAPI=5
-HOMEPAGE=http://www.aerospike.com
-KEYWORDS=~amd64
-LICENSE=Apache-2.0
-RDEPEND=sys-libs/readline:0 sys-libs/zlib dev-libs/openssl:0
-SLOT=0
-SRC_URI=http://www.aerospike.com/artifacts/aerospike-server-community/4.0.0.1/aerospike-server-community-4.0.0.1-debian7.tgz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=46b431657340c3c7afeecc2d61fad1cf
diff --git a/dev-db/aerospike-server-community-4.0.0.4 b/dev-db/aerospike-server-community-4.0.0.4
deleted file mode 100644
index f32aa1d9bed8..000000000000
--- a/dev-db/aerospike-server-community-4.0.0.4
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=install prepare setup
-DEPEND=sys-libs/readline:0 sys-libs/zlib dev-libs/openssl:0
-DESCRIPTION=Flash-optimized, in-memory, nosql database
-EAPI=5
-HOMEPAGE=http://www.aerospike.com
-KEYWORDS=~amd64
-LICENSE=Apache-2.0
-RDEPEND=sys-libs/readline:0 sys-libs/zlib dev-libs/openssl:0
-SLOT=0
-SRC_URI=http://www.aerospike.com/artifacts/aerospike-server-community/4.0.0.4/aerospike-server-community-4.0.0.4-debian7.tgz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=46b431657340c3c7afeecc2d61fad1cf
diff --git a/dev-db/aerospike-server-community-4.1.0.1 b/dev-db/aerospike-server-community-4.1.0.1
deleted file mode 100644
index 07f931526821..000000000000
--- a/dev-db/aerospike-server-community-4.1.0.1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=install prepare setup
-DEPEND=sys-libs/readline:0 sys-libs/zlib dev-libs/openssl:0
-DESCRIPTION=Flash-optimized, in-memory, nosql database
-EAPI=5
-HOMEPAGE=http://www.aerospike.com
-KEYWORDS=~amd64
-LICENSE=Apache-2.0
-RDEPEND=sys-libs/readline:0 sys-libs/zlib dev-libs/openssl:0
-SLOT=0
-SRC_URI=http://www.aerospike.com/artifacts/aerospike-server-community/4.1.0.1/aerospike-server-community-4.1.0.1-debian7.tgz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=56edbd9b6d9cf7ca96d8b28b43799e2a
diff --git a/dev-db/aerospike-server-community-9999 b/dev-db/aerospike-server-community-9999
deleted file mode 100644
index 9afee6dbb15d..000000000000
--- a/dev-db/aerospike-server-community-9999
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=install prepare setup unpack
-DEPEND=app-crypt/gcr dev-libs/jansson dev-libs/jemalloc >=dev-vcs/git-1.8.2.1[curl] virtual/pkgconfig
-DESCRIPTION=Flash-optimized, in-memory, nosql database
-EAPI=5
-HOMEPAGE=http://www.aerospike.com
-IUSE=+tools
-LICENSE=AGPL-3
-RDEPEND=app-crypt/gcr dev-libs/jansson dev-libs/jemalloc
-SLOT=0
-_eclasses_=git-r3 8f6de46b0aa318aea0e8cac62ece098b multilib 97f470f374f2e94ccab04a2fb21d811e systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81
-_md5_=587f5d413353cf5dc3f74762c5011310
diff --git a/dev-db/aerospike-server-community/Manifest b/dev-db/aerospike-server-community/Manifest
new file mode 100644
index 000000000000..cab83d5e5bb1
--- /dev/null
+++ b/dev-db/aerospike-server-community/Manifest
@@ -0,0 +1,22 @@
+AUX 3.5.8-use-system-libs.patch 1755 BLAKE2B fd16e094db29fcce9ed327cc02c730bef8bca486500c80b956d2e2d8e708053982fc39d2ba5e5b9fad141a042bd4eb5b2559a80d1bd59f3f497176afce56374e SHA512 9124fc14481bc1390a743d2365aa51723445e90db428607aa76d7d59e2c73bc4236da4d1a57c765d4484895147f06254bb269f80b0ff9f7029fcb2f782a418a4
+AUX aerospike.conf 1265 BLAKE2B 2851f1a2dcec6b9514ce82b68c832aff55a9d06e4b1127505c377cf18ba118fafaa6b7edea75997142b1c3919d8c55db2edb8b180ded90ca3d1ceeedfef30ff9 SHA512 5d2b2a368bb31e8230d2f88073befbf5f1aa33aecc628b669e5714cfde71e83d53143b28c0ee95b52f13e84027283413927abd97470a97e36946cc05605b15ed
+AUX aerospike.init 1194 BLAKE2B d21f481882027c748de84a01f599a0f3e17f7a14c14c1b7b5e9427399d1e01b9339f6061a77ca2eaba71c2950db1fb92af09e49dfa7b20a0a9f40d85f6c3603c SHA512 c8d5db18225aa031d152337981430bef413fc30592d162776fab6c1d1c8ea2876233feba7c73f103fc35091255ef7f31da602c6dcb302d9dcac2ce9a67c97837
+AUX aerospike.logrotate 196 BLAKE2B e52b68100c48c2ea47d28583a80fbc8da44d866884ef159520315641f8e5261f0e8561cf53460a23fe0daa12133023a5a2c8bc4a8efa81bf89f2b17735ff4bc3 SHA512 2810df72e5a570be0d3118b0c3244fb13ae7bb98684219d681f02a1ec1499191e1f7e3455da818a8ca36d36a7d194cf85ee1985930bf6fe63b1723060af05cba
+AUX aerospike_mesh.conf 1476 BLAKE2B 76dd16b34f024faec1cbbad526b72dfc389f5ba875928a71147e2a21e1f5cec3754c2bd821d2a329cea475ec5f12b6f4c355d15e0a6092733959a4f6131b5a12 SHA512 a7d5e52738a3153b649cc81d8a9b635b70fe21335802f5c2f348fe71f3b7087ea85aaf926c4ad3ce71514fa1b479f98bc27aadb95995a5bbb8808219bcbe28c4
+AUX aerospike_ssd.conf 1341 BLAKE2B 70720ac3bf9c7b41eb595a4ef2ff16d559abbd2f8c64b09159ea6ad7068513040ac0b036eb4dcd77252b454002935b7e8255c79e6a4ebf06850d3acc325100df SHA512 0382842d4e7b20caaa4c39d999da0cd2b67c24bdd9fad6e5d2d393758b6f788decf0039ae9a262a4db7e89b358cbb9954efd082a15549d12e3e244b2c51675c9
+DIST aerospike-server-community-3.13.0.9-debian7.tgz 10657823 BLAKE2B a4f88eb24e91e54abb70358e027ff68de48dd4e0c6f919ce0b8d31b27aaaf3cf5894fe876d092247a5adedec39461426195a220cbcb93fe2bbcb648a5d16d332 SHA512 e7a25377970121bbf453b79d5d6504b054c82b9c3e0dbd43dc665aebfe32a8f5319a9654f98d8c89443b493c0ba44babf38e55138ea356c14619fa5b138d19d9
+DIST aerospike-server-community-3.14.1.8-debian7.tgz 14017262 BLAKE2B a02e516e690c84cd5df973bfc08ba019511f685fc20b303a9ff1548a92bf2dbf4b5be9f5bdd0bb94a5586e49eb368b02457dbf4ac40901fb2b601114f5e9b636 SHA512 867b3c90bd56b1eca0ed17ed97004130310ee74cf24d48e52d47fdd926aea536fad8781c43fe0ae37ea2e2dc1864ca64335fefa6b67d3d89b78393f4035b528b
+DIST aerospike-server-community-3.15.1.4-debian7.tgz 9775381 BLAKE2B 4f7fe86d99cb0cdc74d0bacdcdaea8112e105b6daa870fee12a0137447118ba73adc580b4e4a47f9e1338bc393aeb32787b067a75415bf5c1c6d76cf4ee94d7c SHA512 2b77622ea4eb35de9eb26b33f0cf47fc8d29a70fe75848b81245842b2f3c728d6b2d3ebe72369b91ef0d53be168cea04086ae469ad69124ab2010f48f3005fd5
+DIST aerospike-server-community-3.16.0.6-debian7.tgz 11106496 BLAKE2B b4d9e4856e7d30f537685ed6f924bae8ba953e8aab363f0fa0ba1e5522719f4a521f757944693c46af2933f9ce4e7f10d60808ef76cb78523347cac38cd0608b SHA512 0e32c73881f29d634b67f1c46cdd608ad306fb164753ae3a113761adc806dba72fbd8d8022f7c5fb1b84171f145113b6659092a23e283e147d292931c5befde7
+DIST aerospike-server-community-4.0.0.1-debian7.tgz 16352955 BLAKE2B e6dd6295a71b4c6edf13a52c4f1be9e8fcea0c94078559b13be456ca714c9c38952a96385003391484bf7d24e3d52745806935c249f0f3cc96a154264a10c2a3 SHA512 896783c0cbe4b136605f17601317c6d62e8791adac6c6bebb8f80be1d33cf2f425a431af7e3fe8e5e7771a196bd4baa9db32dc11b030850c1eb3db755767934a
+DIST aerospike-server-community-4.0.0.4-debian7.tgz 16355017 BLAKE2B ad88330e7cc2a3b6c13a8a5ac2c1aa1bd7cf68ed4c9c2669e366cda153aca7b0bdfce35df47269b42222ec5699e06bafbb9f7098abae9b83d259c1c259da2c1a SHA512 b3ca3e882d543dfb5fd6293c6d6e95689c31f3c5e8cd77b3611d36c6981f3350b771eebc41d536b0a1e272bd16614354979d7d6a04c10004dd80bb5973b4c6be
+DIST aerospike-server-community-4.1.0.1-debian7.tgz 16538371 BLAKE2B b879fa134d932dd5c5f3432abd6902e3a1bfd071b7753a78b4d2fdd1cc58e6b875c6793285dbfa18612f9ccd98af4f8ae3a16e7178a30d03715a4d38dc369b1c SHA512 f3954f209a3aab446c193b07fe6c045de89af115f29815a886c99b5648da1e3ff1b348cb1ec4299ce772d7619918e2340de6c25393e04c3bf4b9f1760646625d
+EBUILD aerospike-server-community-3.13.0.9.ebuild 1638 BLAKE2B 67efcc3e85ebeb249e9929d815c48b8f98930879e4341ef2382bd22d95a24ec83dae61624a28132b9373f8a5caf2cca30e76cb20e38a2b8baf4c5ca98c76146f SHA512 875b7394d88e1e6a50924202ff71fbbb3af14fdcfdc15c27125ce323d56fee3ffc5773ee796bde1b6990acbeeef421666408299f225016d33e34d515a1c5a5e9
+EBUILD aerospike-server-community-3.14.1.8.ebuild 1638 BLAKE2B 67efcc3e85ebeb249e9929d815c48b8f98930879e4341ef2382bd22d95a24ec83dae61624a28132b9373f8a5caf2cca30e76cb20e38a2b8baf4c5ca98c76146f SHA512 875b7394d88e1e6a50924202ff71fbbb3af14fdcfdc15c27125ce323d56fee3ffc5773ee796bde1b6990acbeeef421666408299f225016d33e34d515a1c5a5e9
+EBUILD aerospike-server-community-3.15.1.4.ebuild 1638 BLAKE2B 3d082543b0a601e6620e41790b2eca111cb68fff04916bbfcee461c4e6611f309e64c33d623a0048f422e8bb4f96158b53220e21a8959a96d278a35c20fc5c36 SHA512 def3d4526e089225dee5d3a96a692536ca0611ca6dd0d1476e6ce55b18cc215464dc35fd52f0a2fd3a21776999ccf714435515b6f7a9f30b1da9d1f160a66a8f
+EBUILD aerospike-server-community-3.16.0.6.ebuild 1638 BLAKE2B 1ce48fbefbc7b5232ab2449042ca013200b2da2c083fadbab5e12bc42b3d052fe15078886359b133248a39ec0350e9902a6bf54c08402905f1d7212432e6f398 SHA512 935895faaad66c0051cc9945862e0c54f6427e6b59fc664c921c06fa59f529f63e6cbc46514cd73ffe5dbfb2fb160a3a191e5fcee5db60b7b570cf12f36d0198
+EBUILD aerospike-server-community-4.0.0.1.ebuild 1638 BLAKE2B 7572376d50c39edcb444d35b3b006c3f79d41c1138cd22d221182ccdf549dabf26c7ae876c0128dda245fbeb2c3ca6a2d96672d816147a591ce60b4d9ace09b4 SHA512 8e3ccb10b5daf85fab5e23412884cbcfc4db93a0cf2e49d55f5948c59dfabfeafba61f3e8f8aa82603764bc7a3f232458a96147b2987c33a767d0ce9f29f26ac
+EBUILD aerospike-server-community-4.0.0.4.ebuild 1638 BLAKE2B 7572376d50c39edcb444d35b3b006c3f79d41c1138cd22d221182ccdf549dabf26c7ae876c0128dda245fbeb2c3ca6a2d96672d816147a591ce60b4d9ace09b4 SHA512 8e3ccb10b5daf85fab5e23412884cbcfc4db93a0cf2e49d55f5948c59dfabfeafba61f3e8f8aa82603764bc7a3f232458a96147b2987c33a767d0ce9f29f26ac
+EBUILD aerospike-server-community-4.1.0.1.ebuild 1638 BLAKE2B 751741ae79b6700d6233106c6d47daab9ed2d998fafa1162ad19612a4e2ad6865d7a06f698d56aaf52f61ad06203bd6551657a68c0c6d7dd6c027f3a8cd0fd96 SHA512 44c44e9aa4781b43d74d2a2e397c724916ee02da62899525436d6b8eb0b2ac20a9507f3cb2b24cadcf4168859a3b61b6e1dc78ed2c9b9c3bf104f17f10c359c3
+EBUILD aerospike-server-community-9999.ebuild 1937 BLAKE2B c94acd0bacf3d04f0cfe679ebd53202e65cbd85b3874c8f91fa06b761f4b8318e1e21760fc4651e10b06d07df63094df5ee16b6594519c62bae9d608ef60ecfe SHA512 5eb93fafa4380da81697360accd88c4c6c5c40588b5ee7fee41b678dbefada15aa518e7f80ccc4da9c98e98f5715c46011cf4a300733b1212300d7a3b683cb1c
+MISC metadata.xml 281 BLAKE2B c83365afa5d87cf5b8d65ed299e16797d54a0c5f8632ad69c7449edcd52b32f150bc7f933a9e3662d45c37fc64dfcd97b09b3d265a328cdc3ca6cc609a2311f2 SHA512 d3a33c339bb7409528ddca6187790b842150e273bd7630a610c0be08be50e26278ed7b4d42305bfd1a796544c6be251301c938b15d70e609b9d91bd22161aee6
diff --git a/dev-db/aerospike-server-community/aerospike-server-community-3.13.0.9.ebuild b/dev-db/aerospike-server-community/aerospike-server-community-3.13.0.9.ebuild
new file mode 100644
index 000000000000..ba571f1a2bec
--- /dev/null
+++ b/dev-db/aerospike-server-community/aerospike-server-community-3.13.0.9.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils user
+
+DESCRIPTION="Flash-optimized, in-memory, nosql database"
+HOMEPAGE="http://www.aerospike.com"
+SRC_URI="http://www.aerospike.com/artifacts/${PN}/${PV}/${P}-debian7.tgz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="sys-libs/readline:0
+ sys-libs/zlib
+ dev-libs/openssl:0
+ "
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${P}-debian7"
+
+pkg_setup() {
+ enewgroup aerospike
+ enewuser aerospike -1 /bin/bash /opt/aerospike aerospike
+}
+
+src_prepare() {
+ local server_deb="${P}.debian7.x86_64.deb"
+ local tools_deb="aerospike-tools-3.13.0.1.debian7.x86_64.deb"
+
+ ar x "${server_deb}" || die
+ tar xzf data.tar.gz && rm data.tar.gz || die
+
+ ar x "${tools_deb}" || die
+ tar xzf data.tar.gz && rm data.tar.gz || die
+
+ rm *.deb asinstall control.tar.gz debian-binary LICENSE SHA256SUMS
+ rm usr/bin/{asfixownership,asmigrate2to3}
+}
+
+src_install() {
+ insinto /opt/
+ doins -r opt/aerospike
+
+ fperms +x -R /opt/aerospike/bin/
+ fperms +x -R /opt/aerospike/lib/python/
+
+ for dir in '/etc' '/var/log'; do
+ keepdir "${dir}/aerospike"
+ done
+
+ insinto /etc/aerospike
+ for conf in 'aerospike.conf' 'aerospike_mesh.conf' 'aerospike_ssd.conf'; do
+ doins "${FILESDIR}/${conf}"
+ done
+
+ insinto /usr/bin
+ doins usr/bin/*
+ fperms +x -R /usr/bin/asd
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/aerospike.logrotate aerospike
+
+ newinitd "${FILESDIR}"/aerospike.init aerospike
+
+ fowners -R aerospike:aerospike /opt/aerospike/
+ fowners aerospike:aerospike /usr/bin/asd
+ fowners -R aerospike:aerospike /var/log/aerospike
+}
diff --git a/dev-db/aerospike-server-community/aerospike-server-community-3.14.1.8.ebuild b/dev-db/aerospike-server-community/aerospike-server-community-3.14.1.8.ebuild
new file mode 100644
index 000000000000..ba571f1a2bec
--- /dev/null
+++ b/dev-db/aerospike-server-community/aerospike-server-community-3.14.1.8.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils user
+
+DESCRIPTION="Flash-optimized, in-memory, nosql database"
+HOMEPAGE="http://www.aerospike.com"
+SRC_URI="http://www.aerospike.com/artifacts/${PN}/${PV}/${P}-debian7.tgz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="sys-libs/readline:0
+ sys-libs/zlib
+ dev-libs/openssl:0
+ "
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${P}-debian7"
+
+pkg_setup() {
+ enewgroup aerospike
+ enewuser aerospike -1 /bin/bash /opt/aerospike aerospike
+}
+
+src_prepare() {
+ local server_deb="${P}.debian7.x86_64.deb"
+ local tools_deb="aerospike-tools-3.13.0.1.debian7.x86_64.deb"
+
+ ar x "${server_deb}" || die
+ tar xzf data.tar.gz && rm data.tar.gz || die
+
+ ar x "${tools_deb}" || die
+ tar xzf data.tar.gz && rm data.tar.gz || die
+
+ rm *.deb asinstall control.tar.gz debian-binary LICENSE SHA256SUMS
+ rm usr/bin/{asfixownership,asmigrate2to3}
+}
+
+src_install() {
+ insinto /opt/
+ doins -r opt/aerospike
+
+ fperms +x -R /opt/aerospike/bin/
+ fperms +x -R /opt/aerospike/lib/python/
+
+ for dir in '/etc' '/var/log'; do
+ keepdir "${dir}/aerospike"
+ done
+
+ insinto /etc/aerospike
+ for conf in 'aerospike.conf' 'aerospike_mesh.conf' 'aerospike_ssd.conf'; do
+ doins "${FILESDIR}/${conf}"
+ done
+
+ insinto /usr/bin
+ doins usr/bin/*
+ fperms +x -R /usr/bin/asd
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/aerospike.logrotate aerospike
+
+ newinitd "${FILESDIR}"/aerospike.init aerospike
+
+ fowners -R aerospike:aerospike /opt/aerospike/
+ fowners aerospike:aerospike /usr/bin/asd
+ fowners -R aerospike:aerospike /var/log/aerospike
+}
diff --git a/dev-db/aerospike-server-community/aerospike-server-community-3.15.1.4.ebuild b/dev-db/aerospike-server-community/aerospike-server-community-3.15.1.4.ebuild
new file mode 100644
index 000000000000..fe0f879e87c6
--- /dev/null
+++ b/dev-db/aerospike-server-community/aerospike-server-community-3.15.1.4.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils user
+
+DESCRIPTION="Flash-optimized, in-memory, nosql database"
+HOMEPAGE="http://www.aerospike.com"
+SRC_URI="http://www.aerospike.com/artifacts/${PN}/${PV}/${P}-debian7.tgz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="sys-libs/readline:0
+ sys-libs/zlib
+ dev-libs/openssl:0
+ "
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${P}-debian7"
+
+pkg_setup() {
+ enewgroup aerospike
+ enewuser aerospike -1 /bin/bash /opt/aerospike aerospike
+}
+
+src_prepare() {
+ local server_deb="${P}.debian7.x86_64.deb"
+ local tools_deb="aerospike-tools-3.15.1.2.debian7.x86_64.deb"
+
+ ar x "${server_deb}" || die
+ tar xzf data.tar.gz && rm data.tar.gz || die
+
+ ar x "${tools_deb}" || die
+ tar xzf data.tar.gz && rm data.tar.gz || die
+
+ rm *.deb asinstall control.tar.gz debian-binary LICENSE SHA256SUMS
+ rm usr/bin/{asfixownership,asmigrate2to3}
+}
+
+src_install() {
+ insinto /opt/
+ doins -r opt/aerospike
+
+ fperms +x -R /opt/aerospike/bin/
+ fperms +x -R /opt/aerospike/lib/python/
+
+ for dir in '/etc' '/var/log'; do
+ keepdir "${dir}/aerospike"
+ done
+
+ insinto /etc/aerospike
+ for conf in 'aerospike.conf' 'aerospike_mesh.conf' 'aerospike_ssd.conf'; do
+ doins "${FILESDIR}/${conf}"
+ done
+
+ insinto /usr/bin
+ doins usr/bin/*
+ fperms +x -R /usr/bin/asd
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/aerospike.logrotate aerospike
+
+ newinitd "${FILESDIR}"/aerospike.init aerospike
+
+ fowners -R aerospike:aerospike /opt/aerospike/
+ fowners aerospike:aerospike /usr/bin/asd
+ fowners -R aerospike:aerospike /var/log/aerospike
+}
diff --git a/dev-db/aerospike-server-community/aerospike-server-community-3.16.0.6.ebuild b/dev-db/aerospike-server-community/aerospike-server-community-3.16.0.6.ebuild
new file mode 100644
index 000000000000..d69e7847e7e0
--- /dev/null
+++ b/dev-db/aerospike-server-community/aerospike-server-community-3.16.0.6.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils user
+
+DESCRIPTION="Flash-optimized, in-memory, nosql database"
+HOMEPAGE="http://www.aerospike.com"
+SRC_URI="http://www.aerospike.com/artifacts/${PN}/${PV}/${P}-debian7.tgz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="sys-libs/readline:0
+ sys-libs/zlib
+ dev-libs/openssl:0
+ "
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${P}-debian7"
+
+pkg_setup() {
+ enewgroup aerospike
+ enewuser aerospike -1 /bin/bash /opt/aerospike aerospike
+}
+
+src_prepare() {
+ local server_deb="${P}.debian7.x86_64.deb"
+ local tools_deb="aerospike-tools-3.15.2.1.debian7.x86_64.deb"
+
+ ar x "${server_deb}" || die
+ tar xzf data.tar.gz && rm data.tar.gz || die
+
+ ar x "${tools_deb}" || die
+ tar xzf data.tar.gz && rm data.tar.gz || die
+
+ rm *.deb asinstall control.tar.gz debian-binary LICENSE SHA256SUMS
+ rm usr/bin/{asfixownership,asmigrate2to3}
+}
+
+src_install() {
+ insinto /opt/
+ doins -r opt/aerospike
+
+ fperms +x -R /opt/aerospike/bin/
+ fperms +x -R /opt/aerospike/lib/python/
+
+ for dir in '/etc' '/var/log'; do
+ keepdir "${dir}/aerospike"
+ done
+
+ insinto /etc/aerospike
+ for conf in 'aerospike.conf' 'aerospike_mesh.conf' 'aerospike_ssd.conf'; do
+ doins "${FILESDIR}/${conf}"
+ done
+
+ insinto /usr/bin
+ doins usr/bin/*
+ fperms +x -R /usr/bin/asd
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/aerospike.logrotate aerospike
+
+ newinitd "${FILESDIR}"/aerospike.init aerospike
+
+ fowners -R aerospike:aerospike /opt/aerospike/
+ fowners aerospike:aerospike /usr/bin/asd
+ fowners -R aerospike:aerospike /var/log/aerospike
+}
diff --git a/dev-db/aerospike-server-community/aerospike-server-community-4.0.0.1.ebuild b/dev-db/aerospike-server-community/aerospike-server-community-4.0.0.1.ebuild
new file mode 100644
index 000000000000..83946c562c0d
--- /dev/null
+++ b/dev-db/aerospike-server-community/aerospike-server-community-4.0.0.1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils user
+
+DESCRIPTION="Flash-optimized, in-memory, nosql database"
+HOMEPAGE="http://www.aerospike.com"
+SRC_URI="http://www.aerospike.com/artifacts/${PN}/${PV}/${P}-debian7.tgz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="sys-libs/readline:0
+ sys-libs/zlib
+ dev-libs/openssl:0
+ "
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${P}-debian7"
+
+pkg_setup() {
+ enewgroup aerospike
+ enewuser aerospike -1 /bin/bash /opt/aerospike aerospike
+}
+
+src_prepare() {
+ local server_deb="${P}.debian7.x86_64.deb"
+ local tools_deb="aerospike-tools-3.15.3.2.debian7.x86_64.deb"
+
+ ar x "${server_deb}" || die
+ tar xzf data.tar.gz && rm data.tar.gz || die
+
+ ar x "${tools_deb}" || die
+ tar xzf data.tar.gz && rm data.tar.gz || die
+
+ rm *.deb asinstall control.tar.gz debian-binary LICENSE SHA256SUMS
+ rm usr/bin/{asfixownership,asmigrate2to3}
+}
+
+src_install() {
+ insinto /opt/
+ doins -r opt/aerospike
+
+ fperms +x -R /opt/aerospike/bin/
+ fperms +x -R /opt/aerospike/lib/python/
+
+ for dir in '/etc' '/var/log'; do
+ keepdir "${dir}/aerospike"
+ done
+
+ insinto /etc/aerospike
+ for conf in 'aerospike.conf' 'aerospike_mesh.conf' 'aerospike_ssd.conf'; do
+ doins "${FILESDIR}/${conf}"
+ done
+
+ insinto /usr/bin
+ doins usr/bin/*
+ fperms +x -R /usr/bin/asd
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/aerospike.logrotate aerospike
+
+ newinitd "${FILESDIR}"/aerospike.init aerospike
+
+ fowners -R aerospike:aerospike /opt/aerospike/
+ fowners aerospike:aerospike /usr/bin/asd
+ fowners -R aerospike:aerospike /var/log/aerospike
+}
diff --git a/dev-db/aerospike-server-community/aerospike-server-community-4.0.0.4.ebuild b/dev-db/aerospike-server-community/aerospike-server-community-4.0.0.4.ebuild
new file mode 100644
index 000000000000..83946c562c0d
--- /dev/null
+++ b/dev-db/aerospike-server-community/aerospike-server-community-4.0.0.4.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils user
+
+DESCRIPTION="Flash-optimized, in-memory, nosql database"
+HOMEPAGE="http://www.aerospike.com"
+SRC_URI="http://www.aerospike.com/artifacts/${PN}/${PV}/${P}-debian7.tgz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="sys-libs/readline:0
+ sys-libs/zlib
+ dev-libs/openssl:0
+ "
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${P}-debian7"
+
+pkg_setup() {
+ enewgroup aerospike
+ enewuser aerospike -1 /bin/bash /opt/aerospike aerospike
+}
+
+src_prepare() {
+ local server_deb="${P}.debian7.x86_64.deb"
+ local tools_deb="aerospike-tools-3.15.3.2.debian7.x86_64.deb"
+
+ ar x "${server_deb}" || die
+ tar xzf data.tar.gz && rm data.tar.gz || die
+
+ ar x "${tools_deb}" || die
+ tar xzf data.tar.gz && rm data.tar.gz || die
+
+ rm *.deb asinstall control.tar.gz debian-binary LICENSE SHA256SUMS
+ rm usr/bin/{asfixownership,asmigrate2to3}
+}
+
+src_install() {
+ insinto /opt/
+ doins -r opt/aerospike
+
+ fperms +x -R /opt/aerospike/bin/
+ fperms +x -R /opt/aerospike/lib/python/
+
+ for dir in '/etc' '/var/log'; do
+ keepdir "${dir}/aerospike"
+ done
+
+ insinto /etc/aerospike
+ for conf in 'aerospike.conf' 'aerospike_mesh.conf' 'aerospike_ssd.conf'; do
+ doins "${FILESDIR}/${conf}"
+ done
+
+ insinto /usr/bin
+ doins usr/bin/*
+ fperms +x -R /usr/bin/asd
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/aerospike.logrotate aerospike
+
+ newinitd "${FILESDIR}"/aerospike.init aerospike
+
+ fowners -R aerospike:aerospike /opt/aerospike/
+ fowners aerospike:aerospike /usr/bin/asd
+ fowners -R aerospike:aerospike /var/log/aerospike
+}
diff --git a/dev-db/aerospike-server-community/aerospike-server-community-4.1.0.1.ebuild b/dev-db/aerospike-server-community/aerospike-server-community-4.1.0.1.ebuild
new file mode 100644
index 000000000000..a69846b1bc8b
--- /dev/null
+++ b/dev-db/aerospike-server-community/aerospike-server-community-4.1.0.1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils user
+
+DESCRIPTION="Flash-optimized, in-memory, nosql database"
+HOMEPAGE="http://www.aerospike.com"
+SRC_URI="http://www.aerospike.com/artifacts/${PN}/${PV}/${P}-debian7.tgz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="sys-libs/readline:0
+ sys-libs/zlib
+ dev-libs/openssl:0
+ "
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${P}-debian7"
+
+pkg_setup() {
+ enewgroup aerospike
+ enewuser aerospike -1 /bin/bash /opt/aerospike aerospike
+}
+
+src_prepare() {
+ local server_deb="${P}.debian7.x86_64.deb"
+ local tools_deb="aerospike-tools-3.15.3.6.debian7.x86_64.deb"
+
+ ar x "${server_deb}" || die
+ tar xzf data.tar.gz && rm data.tar.gz || die
+
+ ar x "${tools_deb}" || die
+ tar xzf data.tar.gz && rm data.tar.gz || die
+
+ rm *.deb asinstall control.tar.gz debian-binary LICENSE SHA256SUMS
+ rm usr/bin/{asfixownership,asmigrate2to3}
+}
+
+src_install() {
+ insinto /opt/
+ doins -r opt/aerospike
+
+ fperms +x -R /opt/aerospike/bin/
+ fperms +x -R /opt/aerospike/lib/python/
+
+ for dir in '/etc' '/var/log'; do
+ keepdir "${dir}/aerospike"
+ done
+
+ insinto /etc/aerospike
+ for conf in 'aerospike.conf' 'aerospike_mesh.conf' 'aerospike_ssd.conf'; do
+ doins "${FILESDIR}/${conf}"
+ done
+
+ insinto /usr/bin
+ doins usr/bin/*
+ fperms +x -R /usr/bin/asd
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/aerospike.logrotate aerospike
+
+ newinitd "${FILESDIR}"/aerospike.init aerospike
+
+ fowners -R aerospike:aerospike /opt/aerospike/
+ fowners aerospike:aerospike /usr/bin/asd
+ fowners -R aerospike:aerospike /var/log/aerospike
+}
diff --git a/dev-db/aerospike-server-community/aerospike-server-community-9999.ebuild b/dev-db/aerospike-server-community/aerospike-server-community-9999.ebuild
new file mode 100644
index 000000000000..4c485634ff5c
--- /dev/null
+++ b/dev-db/aerospike-server-community/aerospike-server-community-9999.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit git-r3 systemd user
+
+DESCRIPTION="Flash-optimized, in-memory, nosql database"
+HOMEPAGE="http://www.aerospike.com"
+EGIT_REPO_URI="https://github.com/aerospike/aerospike-server.git"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS=""
+IUSE="+tools"
+
+RDEPEND="app-crypt/gcr
+ dev-libs/jansson
+ dev-libs/jemalloc"
+DEPEND="${RDEPEND}"
+
+DOCS=(
+ README.md
+)
+
+PATCHES=(
+ "${FILESDIR}"/3.5.8-use-system-libs.patch
+)
+
+pkg_setup() {
+ enewgroup aerospike
+ enewuser aerospike -1 /bin/bash /opt/aerospike aerospike
+}
+
+src_prepare() {
+ base_src_prepare
+
+ git submodule update --init
+
+ sed \
+ -e 's/USE_SYSTEM_JEM = 0/USE_SYSTEM_JEM = 1/g' \
+ -e 's/USE_SYSTEM_JANSSON = 0/USE_SYSTEM_JANSSON = 1/g' \
+ -e 's/LD_CRYPTO = static/LD_CRYPTO = dynamic/g' \
+ -e 's/LD_JANSSON = static/LD_JANSSON = dynamic/g' \
+ -e 's/LD_JEM = static/LD_JEM = dynamic/g' \
+ -i make_in/Makefile.vars || die
+
+ rm -rf modules/jansson
+ rm -rf modules/jemalloc
+}
+
+src_install() {
+ base_src_install_docs
+
+ dobin target/Linux-x86_64/bin/asd
+
+ insinto /opt/aerospike/sys/udf/lua
+ doins -r modules/lua-core/src/*
+
+ if use tools; then
+ insinto /opt/aerospike/bin
+ doins tools/afterburner/afterburner.sh
+ fperms +x /opt/aerospike/bin/afterburner.sh
+ fi
+
+ keepdir /opt/aerospike/usr/udf/lua
+ keepdir /var/log/aerospike
+
+ insinto /etc/aerospike
+ for conf in aerospike.conf aerospike_mesh.conf aerospike_ssd.conf; do
+ sed -e "s@/var/run/aerospike/asd.pid@/run/aerospike/aerospike.pid@g" -i as/etc/"${conf}" || die
+ doins as/etc/"${conf}"
+ done
+
+ insinto /etc/logrotate.d
+ newins as/etc/logrotate_asd aerospike
+
+ newinitd "${FILESDIR}"/aerospike.init aerospike
+ systemd_newunit as/etc/aerospike-server.service aerospike.service
+
+ fowners -R aerospike:aerospike /opt/aerospike/
+ fowners aerospike:aerospike /usr/bin/asd
+ fowners -R aerospike:aerospike /var/log/aerospike
+}
diff --git a/dev-db/aerospike-server-community/files/3.5.8-use-system-libs.patch b/dev-db/aerospike-server-community/files/3.5.8-use-system-libs.patch
new file mode 100644
index 000000000000..eb69f5ff2e51
--- /dev/null
+++ b/dev-db/aerospike-server-community/files/3.5.8-use-system-libs.patch
@@ -0,0 +1,63 @@
+diff --git a/Makefile b/Makefile
+index d4ce8ac..26271fd 100644
+--- a/Makefile
++++ b/Makefile
+@@ -54,12 +54,16 @@ ifeq ($(USE_ASM),1)
+ $(MAKE) -C $(ASMALLOC) jem SRCDIR=src
+ endif
+ ifeq ($(USE_JEM),1)
++ifeq ($(USE_SYSTEM_JEM),0)
+ $(MAKE) -C $(JEMALLOC)
+ endif
++endif
+ ifeq ($(USE_LUAJIT),1)
+ $(MAKE) -C $(LUAJIT) Q= TARGET_SONAME=libluajit.so CCDEBUG=-g
+ endif
++ifeq ($(USE_SYSTEM_JANSSON),0)
+ $(MAKE) -C $(JANSSON)
++endif
+ $(MAKE) -C $(COMMON) CF=$(CF) EXT_CFLAGS="$(EXT_CFLAGS)"
+ $(MAKE) -C $(CF)
+ $(MAKE) -C $(MOD_LUA) CF=$(CF) COMMON=$(COMMON) LUA_CORE=$(LUA_CORE) EXT_CFLAGS="$(EXT_CFLAGS)" USE_LUAJIT=$(USE_LUAJIT) LUAJIT=$(LUAJIT)
+@@ -174,16 +178,24 @@ mexp2: mexp1
+ $(MAKE) MEXP_PHASE=2 SRCDIR=$(realpath $(MEXP_DIR))/
+
+ $(JANSSON)/configure:
++ifeq ($(USE_SYSTEM_JANSSON),0)
+ cd $(JANSSON) && autoreconf -i
++endif
+
+ $(JANSSON)/Makefile: $(JANSSON)/configure
++ifeq ($(USE_SYSTEM_JANSSON),0)
+ cd $(JANSSON) && ./configure $(JANSSON_CONFIG_OPT)
++endif
+
+ $(JEMALLOC)/configure:
++ifeq ($(USE_SYSTEM_JEM),0)
+ cd $(JEMALLOC) && autoconf
++endif
+
+ $(JEMALLOC)/Makefile: $(JEMALLOC)/configure
++ifeq ($(USE_SYSTEM_JEM),0)
+ cd $(JEMALLOC) && ./configure $(JEM_CONFIG_OPT)
++endif
+
+ $(LUAJIT)/src/luaconf.h: $(LUAJIT)/src/luaconf.h.orig
+ ln -s $(notdir $<) $@
+diff --git a/make_in/Makefile.vars b/make_in/Makefile.vars
+index efe3226..0b54701 100644
+--- a/make_in/Makefile.vars
++++ b/make_in/Makefile.vars
+@@ -31,6 +31,12 @@ ifeq ($(USE_ASM),1)
+ EXT_CFLAGS += -DUSE_ASM
+ endif
+
++# Use the system provided JEMalloc memory allocator? [By default, no.]
++USE_SYSTEM_JEM = 0
++
++# Use the system provided Jansson JSON API Library? [By default, no.]
++USE_SYSTEM_JANSSON = 0
++
+ # Use the JEMalloc memory allocator? [By default, yes.]
+ USE_JEM = 1
+
diff --git a/dev-db/aerospike-server-community/files/aerospike.conf b/dev-db/aerospike-server-community/files/aerospike.conf
new file mode 100644
index 000000000000..842873bd3e8e
--- /dev/null
+++ b/dev-db/aerospike-server-community/files/aerospike.conf
@@ -0,0 +1,70 @@
+# Aerospike database configuration file.
+
+service {
+ user root
+ group root
+ paxos-single-replica-limit 1 # Number of nodes where the replica count is automatically reduced to 1.
+ pidfile /run/aerospike/aerospike.pid
+ service-threads 4
+ transaction-queues 4
+ transaction-threads-per-queue 4
+ proto-fd-max 15000
+}
+
+logging {
+ # Log file must be an absolute path.
+ file /var/log/aerospike/aerospike.log {
+ context any info
+ }
+}
+
+network {
+ service {
+ address any
+ port 3000
+ }
+
+ heartbeat {
+ mode multicast
+ address 239.1.99.222
+ port 9918
+
+ # To use unicast-mesh heartbeats, remove the 3 lines above, and see
+ # aerospike_mesh.conf for alternative.
+
+ interval 150
+ timeout 10
+ }
+
+ fabric {
+ port 3001
+ }
+
+ info {
+ port 3003
+ }
+}
+
+namespace test {
+ replication-factor 2
+ memory-size 4G
+ default-ttl 30d # 30 days, use 0 to never expire/evict.
+
+ storage-engine memory
+}
+
+namespace bar {
+ replication-factor 2
+ memory-size 4G
+ default-ttl 30d # 30 days, use 0 to never expire/evict.
+
+ storage-engine memory
+
+ # To use file storage backing, comment out the line above and use the
+ # following lines instead.
+# storage-engine device {
+# file /opt/aerospike/data/bar.dat
+# filesize 16G
+# data-in-memory true # Store data in memory in addition to file.
+# }
+}
diff --git a/dev-db/aerospike-server-community/files/aerospike.init b/dev-db/aerospike-server-community/files/aerospike.init
new file mode 100644
index 000000000000..b1dac8078d6d
--- /dev/null
+++ b/dev-db/aerospike-server-community/files/aerospike.init
@@ -0,0 +1,53 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+config_file=${config_file:-/etc/aerospike/${SVCNAME}.conf}
+run_dir=${run_dir:-/run/aerospike}
+
+command="/usr/bin/asd"
+command_args="--config-file ${config_file}"
+command_background="false"
+pidfile=${run_dir}/${SVCNAME}.pid
+user=${user:-aerospike}
+group=${group:-aerospike}
+start_stop_daemon_args="--user ${user} --group ${group}"
+required_files="${config_file}"
+
+depend() {
+ use net
+}
+
+set_shmall() {
+ mem=`/sbin/sysctl -n kernel.shmall`
+ min=4294967296
+ if [ ${#mem} -le ${#min} ]; then
+ if [ $mem -lt $min ]; then
+ ewarn "kernel.shmall too low, setting to 4G pages = 16TB"
+ /sbin/sysctl -w kernel.shmall=$min
+ fi
+ fi
+}
+
+set_shmmax() {
+ mem=`/sbin/sysctl -n kernel.shmmax`
+ min=1073741824
+ if [ ${#mem} -le ${#min} ]; then
+ if [ $mem -lt $min ]; then
+ ewarn "kernel.shmmax too low, setting to 1GB"
+ /sbin/sysctl -w kernel.shmmax=$min
+ fi
+ fi
+}
+
+start_pre() {
+ checkpath -d -m 0755 -o "${user}":"${group}" "${run_dir}"
+ set_shmall
+ set_shmmax
+ ulimit -n 100000
+ if [ -n $LD_PRELOAD ]; then export LD_PRELOAD; fi
+}
+
+start_post() {
+ ewaitfile 60 "${pidfile}"
+}
diff --git a/dev-db/aerospike-server-community/files/aerospike.logrotate b/dev-db/aerospike-server-community/files/aerospike.logrotate
new file mode 100644
index 000000000000..04aabc4a6017
--- /dev/null
+++ b/dev-db/aerospike-server-community/files/aerospike.logrotate
@@ -0,0 +1,10 @@
+/var/log/aerospike/aerospike.log {
+ daily
+ rotate 90
+ dateext
+ compress
+ olddir /var/log/aerospike/
+ postrotate
+ kill -HUP `cat /var/run/aerospike/aerospike.pid`
+ endscript
+}
diff --git a/dev-db/aerospike-server-community/files/aerospike_mesh.conf b/dev-db/aerospike-server-community/files/aerospike_mesh.conf
new file mode 100644
index 000000000000..26274f310ed0
--- /dev/null
+++ b/dev-db/aerospike-server-community/files/aerospike_mesh.conf
@@ -0,0 +1,73 @@
+# Aerospike database configuration file for deployments using mesh heartbeats.
+
+service {
+ user root
+ group root
+ paxos-single-replica-limit 1 # Number of nodes where the replica count is automatically reduced to 1.
+ pidfile /run/aerospike/aerospike.pid
+ service-threads 4
+ transaction-queues 4
+ transaction-threads-per-queue 4
+ proto-fd-max 15000
+}
+
+logging {
+ # Log file must be an absolute path.
+ file /var/log/aerospike/aerospike.log {
+ context any info
+ }
+}
+
+network {
+ service {
+ address any
+ port 3000
+ }
+
+ heartbeat {
+ mode mesh
+ port 3002 # Heartbeat port for this node.
+
+ # List one or more other nodes, one ip-address & port per line:
+ mesh-seed-address-port 10.10.10.10 3002
+# mesh-seed-address-port 10.10.10.11 3002
+# mesh-seed-address-port 10.10.10.12 3002
+# mesh-seed-address-port 10.10.10.13 3002
+# mesh-seed-address-port 10.10.10.14 3002
+
+ interval 250
+ timeout 10
+ }
+
+ fabric {
+ port 3001
+ }
+
+ info {
+ port 3003
+ }
+}
+
+namespace test {
+ replication-factor 2
+ memory-size 4G
+ default-ttl 30d # 30 days, use 0 to never expire/evict.
+
+ storage-engine memory
+}
+
+namespace bar {
+ replication-factor 2
+ memory-size 4G
+ default-ttl 30d # 30 days, use 0 to never expire/evict.
+
+ storage-engine memory
+
+ # To use file storage backing, comment out the line above and use the
+ # following lines instead.
+# storage-engine device {
+# file /opt/aerospike/data/bar.dat
+# filesize 16G
+# data-in-memory true # Store data in memory in addition to file.
+# }
+}
diff --git a/dev-db/aerospike-server-community/files/aerospike_ssd.conf b/dev-db/aerospike-server-community/files/aerospike_ssd.conf
new file mode 100644
index 000000000000..3d75bd6f7d91
--- /dev/null
+++ b/dev-db/aerospike-server-community/files/aerospike_ssd.conf
@@ -0,0 +1,68 @@
+# Aerospike database configuration file for deployments using raw storage.
+
+service {
+ user root
+ group root
+ paxos-single-replica-limit 1 # Number of nodes where the replica count is automatically reduced to 1.
+ pidfile /run/aerospike/aerospike.pid
+ service-threads 8
+ transaction-queues 8
+ transaction-threads-per-queue 8
+ proto-fd-max 15000
+}
+
+logging {
+ # Log file must be an absolute path.
+ file /var/log/aerospike/aerospike.log {
+ context any info
+ }
+}
+
+network {
+ service {
+ address any
+ port 3000
+ }
+
+ heartbeat {
+ mode multicast
+ address 239.1.99.222
+ port 9918
+
+ # To use unicast-mesh heartbeats, remove the 3 lines above, and see
+ # aerospike_mesh.conf for alternative.
+
+ interval 150
+ timeout 10
+ }
+
+ fabric {
+ port 3001
+ }
+
+ info {
+ port 3003
+ }
+}
+
+namespace test {
+ replication-factor 2
+ memory-size 4G
+ default-ttl 30d # 30 days, use 0 to never expire/evict.
+
+ # Warning - legacy data in defined raw partition devices will be erased.
+ # These partitions must not be mounted by the file system.
+ storage-engine device {
+ # Use one or more lines like those below with actual device paths.
+# device /dev/sdb
+# device /dev/sdc
+
+ # The 2 lines below optimize for SSD.
+ scheduler-mode noop
+ write-block-size 128K
+
+ # Use the line below to store data in memory in addition to devices.
+# data-in-memory true
+ }
+}
+
diff --git a/dev-db/aerospike-server-community/metadata.xml b/dev-db/aerospike-server-community/metadata.xml
new file mode 100644
index 000000000000..647069390b01
--- /dev/null
+++ b/dev-db/aerospike-server-community/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>patrick@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="tools">Install extra tools</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-db/apgdiff-1.4 b/dev-db/apgdiff-1.4
deleted file mode 100644
index b21da5037a33..000000000000
--- a/dev-db/apgdiff-1.4
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare setup test
-DEPEND=>=virtual/jdk-1.5 >=dev-java/ant-core-1.7.0:0 >=dev-java/ant-junit-1.7.0:0 app-arch/zip:0 test? ( dev-java/hamcrest-core:0 >=dev-java/junit-4.4:4 ) >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip ) >=dev-java/ant-core-1.8.2:0 >=dev-java/javatoolkit-0.3.0-r2
-DESCRIPTION=A simple PostgreSQL diff tool that is useful for schema upgrades
-EAPI=5
-HOMEPAGE=https://www.apgdiff.com/
-IUSE=test elibc_FreeBSD doc source elibc_FreeBSD
-KEYWORDS=~amd64 ~x86
-LICENSE=MIT
-RDEPEND=>=virtual/jre-1.5 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip )
-SLOT=0
-SRC_URI=mirror://sourceforge/apgdiff/apgdiff-1.4-src.zip
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-ant-2 ea15ab9e838d1062abd6b53de2045d50 java-pkg-2 c4e6af2574fd1dc79b43a6e27af4b5fb java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=0672156d6f13fce15933b099b7c2d4e6
diff --git a/dev-db/apgdiff-2.2.1 b/dev-db/apgdiff-2.2.1
deleted file mode 100644
index 43ad4638e292..000000000000
--- a/dev-db/apgdiff-2.2.1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare setup test
-DEPEND=>=virtual/jdk-1.6 >=dev-java/ant-core-1.7.0:0 >=dev-java/ant-junit-1.7.0:0 app-arch/zip:0 test? ( dev-java/hamcrest-core:1.3 >=dev-java/junit-4.4:4 ) >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip ) >=dev-java/ant-core-1.8.2:0 >=dev-java/javatoolkit-0.3.0-r2
-DESCRIPTION=A simple PostgreSQL diff tool that is useful for schema upgrades
-EAPI=5
-HOMEPAGE=https://apgdiff.com
-IUSE=test elibc_FreeBSD doc source elibc_FreeBSD
-KEYWORDS=~amd64 ~x86
-LICENSE=MIT
-RDEPEND=>=virtual/jre-1.6 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip )
-SLOT=0
-SRC_URI=https://apgdiff.com/download/apgdiff-2.2.1-src.zip
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-ant-2 ea15ab9e838d1062abd6b53de2045d50 java-pkg-2 c4e6af2574fd1dc79b43a6e27af4b5fb java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=6621ad0633c9dbdc9fcba1de0fbe4f01
diff --git a/dev-db/apgdiff-2.2.2 b/dev-db/apgdiff-2.2.2
deleted file mode 100644
index d72a7e6e5eaf..000000000000
--- a/dev-db/apgdiff-2.2.2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare setup test
-DEPEND=>=virtual/jdk-1.6 >=dev-java/ant-core-1.7.0:0 >=dev-java/ant-junit-1.7.0:0 app-arch/zip:0 test? ( dev-java/hamcrest-core:0 >=dev-java/junit-4.4:4 ) >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip ) >=dev-java/ant-core-1.8.2:0 >=dev-java/javatoolkit-0.3.0-r2
-DESCRIPTION=A simple PostgreSQL diff tool that is useful for schema upgrades
-EAPI=5
-HOMEPAGE=https://apgdiff.com
-IUSE=test elibc_FreeBSD doc source elibc_FreeBSD
-KEYWORDS=~amd64 ~x86
-LICENSE=MIT
-RDEPEND=>=virtual/jre-1.6 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip )
-SLOT=0
-SRC_URI=https://apgdiff.com/download/apgdiff-2.2.2-src.zip
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-ant-2 ea15ab9e838d1062abd6b53de2045d50 java-pkg-2 c4e6af2574fd1dc79b43a6e27af4b5fb java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=f3ae0355a16d9a2f5d637963cc3bbc1b
diff --git a/dev-db/apgdiff-2.3 b/dev-db/apgdiff-2.3
deleted file mode 100644
index f8e8031b14f7..000000000000
--- a/dev-db/apgdiff-2.3
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare setup test
-DEPEND=>=virtual/jdk-1.6 >=dev-java/ant-core-1.7.0:0 >=dev-java/ant-junit-1.7.0:0 app-arch/zip:0 test? ( dev-java/hamcrest-core:0 >=dev-java/junit-4.4:4 ) >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip ) >=dev-java/ant-core-1.8.2:0 >=dev-java/javatoolkit-0.3.0-r2
-DESCRIPTION=A simple PostgreSQL diff tool that is useful for schema upgrades
-EAPI=5
-HOMEPAGE=https://apgdiff.com
-IUSE=test elibc_FreeBSD doc source elibc_FreeBSD
-KEYWORDS=~amd64 ~x86
-LICENSE=MIT
-RDEPEND=>=virtual/jre-1.6 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip )
-SLOT=0
-SRC_URI=https://apgdiff.com/download/apgdiff-2.3-src.zip
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-ant-2 ea15ab9e838d1062abd6b53de2045d50 java-pkg-2 c4e6af2574fd1dc79b43a6e27af4b5fb java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=f3ae0355a16d9a2f5d637963cc3bbc1b
diff --git a/dev-db/apgdiff-2.4 b/dev-db/apgdiff-2.4
deleted file mode 100644
index e890391841ec..000000000000
--- a/dev-db/apgdiff-2.4
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare setup test
-DEPEND=>=virtual/jdk-1.6 >=dev-java/ant-core-1.7.0:0 >=dev-java/ant-junit-1.7.0:0 app-arch/zip:0 test? ( dev-java/hamcrest-core:0 >=dev-java/junit-4.4:4 ) >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip ) >=dev-java/ant-core-1.8.2:0 >=dev-java/javatoolkit-0.3.0-r2
-DESCRIPTION=A simple PostgreSQL diff tool that is useful for schema upgrades
-EAPI=5
-HOMEPAGE=https://apgdiff.com
-IUSE=test elibc_FreeBSD doc source elibc_FreeBSD
-KEYWORDS=~amd64 ~x86
-LICENSE=MIT
-RDEPEND=>=virtual/jre-1.6 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip )
-SLOT=0
-SRC_URI=https://apgdiff.com/download/apgdiff-2.4-src.zip
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-ant-2 ea15ab9e838d1062abd6b53de2045d50 java-pkg-2 c4e6af2574fd1dc79b43a6e27af4b5fb java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=f3ae0355a16d9a2f5d637963cc3bbc1b
diff --git a/dev-db/apgdiff/Manifest b/dev-db/apgdiff/Manifest
new file mode 100644
index 000000000000..9647390e319e
--- /dev/null
+++ b/dev-db/apgdiff/Manifest
@@ -0,0 +1,11 @@
+DIST apgdiff-1.4-src.zip 178608 BLAKE2B 5ea0c4ea151a4bb60711b90ecd27a42b02ab08f16034d194646a8b3d3b22fc7d98862b4629a4411127ba6a2898d25264311287d9299cd801969d5d8d04ffd036 SHA512 c1dcd3f39e931f90e65a439a610d5b264b790419a59b2c90f6d9107c1b5151c602887588f378110a2e9420428414fc333c7919e2137e2dc35168654ceb3ae8d0
+DIST apgdiff-2.2.1-src.zip 194305 BLAKE2B 9c4d5eb7639038b591d31a6059efa0c78cdd1e21826ab5992a236abc492d3ef9e8712b0a7516253903bb88055d8594e83a1f5892e6fae90336e76258eecee4bd SHA512 cab6b2349d5822ca579c1e021ea7f02f5ddf39d56559f841d0cadfdccc1c1c61399c494302ea5909984b9a8a6d91cf08868f012dd3487a8633f65e3bbd28f19c
+DIST apgdiff-2.2.2-src.zip 198814 BLAKE2B b044f16475576fd714b6196da55ec1b744255aeb3cdccc2fd654500235cd0b500b8188e7d06962bb8fd28dc1a77e3526cf39550eb89da101d6255b1b6b9fe59d SHA512 273ba473b5b4ccfe2ae1b3f34ce2c2b825e446fad166f28a4575528190c20922e6794563ae3e5b2918ade5a3292a792ea363e9e5ec0900e924332d8771548c0b
+DIST apgdiff-2.3-src.zip 215881 BLAKE2B 05482ec11e278f5408305e16ee57bef99eb3e362ebdc5055781017ff40890a56936b515dd9973b557ad64d4a7e934b1bb5886207a9d9a9e0365d0e41f3fe008c SHA512 e716143ff4378fc27c4781076c51826583c2ad9dab17f4364acbfed0f9a0958dca0de9a72171816bbce41653ad33834158cb9277dd8790649da4bd24e013bbb5
+DIST apgdiff-2.4-src.zip 227714 BLAKE2B 1c62c94592b28a7caf5a56f4ef4206cc2655f2da278d5a71e165f409587d1573dd44b62261817f0b994ed95a398555190dee6a2873fe493f695e91c6cf9dd22c SHA512 f37e0f86ff8a8bc53a43cac1748ab3a2c96ab6c972b37ee63f281ee397b31a7b48986cbc963d89ea773f1bb7b10b798de74a4c88a03f2db7672501b93355261b
+EBUILD apgdiff-1.4.ebuild 1077 BLAKE2B 7937af4e236eb070ddf078245d5eb160df71ec732041f6de22c0c013b50ebb86f5a88151fbede492e0fd9a8f0202396a8d35664b57d52eb79235c17dc8d83beb SHA512 1600b4fe5690a827b7b8d8ece56ab8b925887458435907a8df957f1112282a5e5a9981b1adccbd11b4bff67a7c8ed9d3de63d1cb05862ea392fe8cb67ba657a8
+EBUILD apgdiff-2.2.1.ebuild 1080 BLAKE2B 81e47a54877baa6b0088a798e521bf66e3db0168801afe0af095c6124188ffd2d006d2bc01e9e2a2ebadcda1a5c0fdf1fee5eddc217d9e1d2528c40e6b43b22a SHA512 438d60ab64e85540b8840417c2e820a91108678f28042e13293ff2d6d6505141da0cd925fa875e7a81f986ec156fcaa11d8935ae409b67370ee8a4721afc4b7a
+EBUILD apgdiff-2.2.2.ebuild 1074 BLAKE2B b4ead10a2ebc772d822dd99c3a47edfae86fb5f41e0f5ac65107c9bc2fe0d6fbdb3e711c858ac6c71c6d2ed613e54f92e57ee85de6a2cfe0805a87dd262e9bb3 SHA512 954aa73ef60cbbf982ac6bdd22a0f8194c39070557264c7572ea508c79a7b8eb30badf7ae021c00b958a94a1dcac240b04d0b38600e645fcd4e97ff4c6fe010f
+EBUILD apgdiff-2.3.ebuild 1074 BLAKE2B b4ead10a2ebc772d822dd99c3a47edfae86fb5f41e0f5ac65107c9bc2fe0d6fbdb3e711c858ac6c71c6d2ed613e54f92e57ee85de6a2cfe0805a87dd262e9bb3 SHA512 954aa73ef60cbbf982ac6bdd22a0f8194c39070557264c7572ea508c79a7b8eb30badf7ae021c00b958a94a1dcac240b04d0b38600e645fcd4e97ff4c6fe010f
+EBUILD apgdiff-2.4.ebuild 1074 BLAKE2B b4ead10a2ebc772d822dd99c3a47edfae86fb5f41e0f5ac65107c9bc2fe0d6fbdb3e711c858ac6c71c6d2ed613e54f92e57ee85de6a2cfe0805a87dd262e9bb3 SHA512 954aa73ef60cbbf982ac6bdd22a0f8194c39070557264c7572ea508c79a7b8eb30badf7ae021c00b958a94a1dcac240b04d0b38600e645fcd4e97ff4c6fe010f
+MISC metadata.xml 301 BLAKE2B f760bd727a4a0cc9572e5ff436dd66ef64d8f734e8605ce15599645a6ccfaef3b0d17348d916894171e99e6920ba60b0e4a13917f9445562473dbd5949ce6f55 SHA512 c38dc6bf13779d6e575526c42fc108080b160b9a7127aaea7f93b8a7ca46dbee5d349e95bfbc8a598c745ba0d2c8ce8ce6ea65a475854ad4d5a85e3620166552
diff --git a/dev-db/apgdiff/apgdiff-1.4.ebuild b/dev-db/apgdiff/apgdiff-1.4.ebuild
new file mode 100644
index 000000000000..1899250f7990
--- /dev/null
+++ b/dev-db/apgdiff/apgdiff-1.4.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+JAVA_PKG_IUSE="doc source"
+inherit eutils java-pkg-2 java-ant-2
+
+DESCRIPTION="A simple PostgreSQL diff tool that is useful for schema upgrades"
+HOMEPAGE="https://www.apgdiff.com/"
+SRC_URI="mirror://sourceforge/${PN}/${P}-src.zip"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+DEPEND=">=virtual/jdk-1.5
+ >=dev-java/ant-core-1.7.0:0
+ >=dev-java/ant-junit-1.7.0:0
+ app-arch/zip:0
+ test? (
+ dev-java/hamcrest-core:0
+ >=dev-java/junit-4.4:4
+ )"
+
+RDEPEND=">=virtual/jre-1.5"
+
+java_prepare() {
+ mkdir "${S}"/lib
+ cd "${S}"/lib
+ if use test ; then
+ java-pkg_jar-from --build-only hamcrest-core
+ java-pkg_jar-from --build-only junit-4
+ fi
+}
+
+src_compile() {
+ eant -Dnoget=true jar $(use_doc)
+}
+
+src_install() {
+ java-pkg_newjar dist/${P}.jar ${PN}.jar
+ java-pkg_dolauncher apgdiff --jar ${PN}.jar
+
+ use doc && java-pkg_dojavadoc dist/javadoc
+ use source && java-pkg_dosrc src/main/java/*
+}
+
+src_test() {
+ ANT_TASKS="ant-junit" eant -Dnoget=true test
+}
diff --git a/dev-db/apgdiff/apgdiff-2.2.1.ebuild b/dev-db/apgdiff/apgdiff-2.2.1.ebuild
new file mode 100644
index 000000000000..b52222f6cf74
--- /dev/null
+++ b/dev-db/apgdiff/apgdiff-2.2.1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+JAVA_PKG_IUSE="doc source"
+inherit eutils java-pkg-2 java-ant-2
+
+DESCRIPTION="A simple PostgreSQL diff tool that is useful for schema upgrades"
+HOMEPAGE="https://apgdiff.com"
+SRC_URI="https://apgdiff.com/download/${P}-src.zip"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+DEPEND=">=virtual/jdk-1.6
+ >=dev-java/ant-core-1.7.0:0
+ >=dev-java/ant-junit-1.7.0:0
+ app-arch/zip:0
+ test? (
+ dev-java/hamcrest-core:1.3
+ >=dev-java/junit-4.4:4
+ )"
+
+RDEPEND=">=virtual/jre-1.6"
+
+java_prepare() {
+ mkdir "${S}"/lib
+ cd "${S}"/lib
+ if use test ; then
+ java-pkg_jar-from --build-only hamcrest-core-1.3
+ java-pkg_jar-from --build-only junit-4
+ fi
+}
+
+src_compile() {
+ eant -Dnoget=true jar $(use_doc)
+}
+
+src_install() {
+ java-pkg_newjar dist/${P}.jar ${PN}.jar
+ java-pkg_dolauncher apgdiff --jar ${PN}.jar
+
+ use doc && java-pkg_dojavadoc dist/javadoc
+ use source && java-pkg_dosrc src/main/java/*
+}
+
+src_test() {
+ ANT_TASKS="ant-junit" eant -Dnoget=true test
+}
diff --git a/dev-db/apgdiff/apgdiff-2.2.2.ebuild b/dev-db/apgdiff/apgdiff-2.2.2.ebuild
new file mode 100644
index 000000000000..fd930739b116
--- /dev/null
+++ b/dev-db/apgdiff/apgdiff-2.2.2.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+JAVA_PKG_IUSE="doc source"
+inherit eutils java-pkg-2 java-ant-2
+
+DESCRIPTION="A simple PostgreSQL diff tool that is useful for schema upgrades"
+HOMEPAGE="https://apgdiff.com"
+SRC_URI="https://apgdiff.com/download/${P}-src.zip"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+DEPEND=">=virtual/jdk-1.6
+ >=dev-java/ant-core-1.7.0:0
+ >=dev-java/ant-junit-1.7.0:0
+ app-arch/zip:0
+ test? (
+ dev-java/hamcrest-core:0
+ >=dev-java/junit-4.4:4
+ )"
+
+RDEPEND=">=virtual/jre-1.6"
+
+java_prepare() {
+ mkdir "${S}"/lib
+ cd "${S}"/lib
+ if use test ; then
+ java-pkg_jar-from --build-only hamcrest-core
+ java-pkg_jar-from --build-only junit-4
+ fi
+}
+
+src_compile() {
+ eant -Dnoget=true jar $(use_doc)
+}
+
+src_install() {
+ java-pkg_newjar dist/${P}.jar ${PN}.jar
+ java-pkg_dolauncher apgdiff --jar ${PN}.jar
+
+ use doc && java-pkg_dojavadoc dist/javadoc
+ use source && java-pkg_dosrc src/main/java/*
+}
+
+src_test() {
+ ANT_TASKS="ant-junit" eant -Dnoget=true test
+}
diff --git a/dev-db/apgdiff/apgdiff-2.3.ebuild b/dev-db/apgdiff/apgdiff-2.3.ebuild
new file mode 100644
index 000000000000..fd930739b116
--- /dev/null
+++ b/dev-db/apgdiff/apgdiff-2.3.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+JAVA_PKG_IUSE="doc source"
+inherit eutils java-pkg-2 java-ant-2
+
+DESCRIPTION="A simple PostgreSQL diff tool that is useful for schema upgrades"
+HOMEPAGE="https://apgdiff.com"
+SRC_URI="https://apgdiff.com/download/${P}-src.zip"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+DEPEND=">=virtual/jdk-1.6
+ >=dev-java/ant-core-1.7.0:0
+ >=dev-java/ant-junit-1.7.0:0
+ app-arch/zip:0
+ test? (
+ dev-java/hamcrest-core:0
+ >=dev-java/junit-4.4:4
+ )"
+
+RDEPEND=">=virtual/jre-1.6"
+
+java_prepare() {
+ mkdir "${S}"/lib
+ cd "${S}"/lib
+ if use test ; then
+ java-pkg_jar-from --build-only hamcrest-core
+ java-pkg_jar-from --build-only junit-4
+ fi
+}
+
+src_compile() {
+ eant -Dnoget=true jar $(use_doc)
+}
+
+src_install() {
+ java-pkg_newjar dist/${P}.jar ${PN}.jar
+ java-pkg_dolauncher apgdiff --jar ${PN}.jar
+
+ use doc && java-pkg_dojavadoc dist/javadoc
+ use source && java-pkg_dosrc src/main/java/*
+}
+
+src_test() {
+ ANT_TASKS="ant-junit" eant -Dnoget=true test
+}
diff --git a/dev-db/apgdiff/apgdiff-2.4.ebuild b/dev-db/apgdiff/apgdiff-2.4.ebuild
new file mode 100644
index 000000000000..fd930739b116
--- /dev/null
+++ b/dev-db/apgdiff/apgdiff-2.4.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+JAVA_PKG_IUSE="doc source"
+inherit eutils java-pkg-2 java-ant-2
+
+DESCRIPTION="A simple PostgreSQL diff tool that is useful for schema upgrades"
+HOMEPAGE="https://apgdiff.com"
+SRC_URI="https://apgdiff.com/download/${P}-src.zip"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+DEPEND=">=virtual/jdk-1.6
+ >=dev-java/ant-core-1.7.0:0
+ >=dev-java/ant-junit-1.7.0:0
+ app-arch/zip:0
+ test? (
+ dev-java/hamcrest-core:0
+ >=dev-java/junit-4.4:4
+ )"
+
+RDEPEND=">=virtual/jre-1.6"
+
+java_prepare() {
+ mkdir "${S}"/lib
+ cd "${S}"/lib
+ if use test ; then
+ java-pkg_jar-from --build-only hamcrest-core
+ java-pkg_jar-from --build-only junit-4
+ fi
+}
+
+src_compile() {
+ eant -Dnoget=true jar $(use_doc)
+}
+
+src_install() {
+ java-pkg_newjar dist/${P}.jar ${PN}.jar
+ java-pkg_dolauncher apgdiff --jar ${PN}.jar
+
+ use doc && java-pkg_dojavadoc dist/javadoc
+ use source && java-pkg_dosrc src/main/java/*
+}
+
+src_test() {
+ ANT_TASKS="ant-junit" eant -Dnoget=true test
+}
diff --git a/dev-db/apgdiff/metadata.xml b/dev-db/apgdiff/metadata.xml
new file mode 100644
index 000000000000..1013bce99e8f
--- /dev/null
+++ b/dev-db/apgdiff/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>java@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">apgdiff</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/barman-2.1 b/dev-db/barman-2.1
deleted file mode 100644
index 53248c3d9a2e..000000000000
--- a/dev-db/barman-2.1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)]
-DESCRIPTION=Administration tool for disaster recovery of PostgreSQL servers
-EAPI=5
-HOMEPAGE=http://www.pgbarman.org
-IUSE=python_targets_python2_7
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-3
-RDEPEND=dev-python/argh[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] >=dev-python/psycopg-2[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] dev-python/python-dateutil[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] dev-python/argcomplete[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] net-misc/rsync dev-db/postgresql[server] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)]
-REQUIRED_USE=|| ( python_targets_python2_7 )
-SLOT=0
-SRC_URI=http://downloads.sourceforge.net/project/pgbarman/2.1/barman-2.1.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 distutils-r1 63fea93ca1cc4fdc5fa2247afc4e3a15 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 preserve-libs ef207dc62baddfddfd39a164d9797648 python-r1 0b5829eb6369d7af3a834b6eed7b7107 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=9da696368ecd6d1eb1d3cae71720942c
diff --git a/dev-db/barman-2.3 b/dev-db/barman-2.3
deleted file mode 100644
index 55d3cf07f4e8..000000000000
--- a/dev-db/barman-2.3
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)]
-DESCRIPTION=Administration tool for disaster recovery of PostgreSQL servers
-EAPI=5
-HOMEPAGE=http://www.pgbarman.org
-IUSE=python_targets_python2_7
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-3
-RDEPEND=dev-python/argh[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] >=dev-python/psycopg-2[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] dev-python/python-dateutil[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] dev-python/argcomplete[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] net-misc/rsync dev-db/postgresql[server] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)]
-REQUIRED_USE=|| ( python_targets_python2_7 )
-SLOT=0
-SRC_URI=http://downloads.sourceforge.net/project/pgbarman/2.3/barman-2.3.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 distutils-r1 63fea93ca1cc4fdc5fa2247afc4e3a15 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 preserve-libs ef207dc62baddfddfd39a164d9797648 python-r1 0b5829eb6369d7af3a834b6eed7b7107 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=9da696368ecd6d1eb1d3cae71720942c
diff --git a/dev-db/barman-2.4 b/dev-db/barman-2.4
deleted file mode 100644
index 4e896afffcd9..000000000000
--- a/dev-db/barman-2.4
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_targets_python3_4? ( dev-lang/python:3.4 ) python_targets_python3_5? ( dev-lang/python:3.5 ) python_targets_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)]
-DESCRIPTION=Administration tool for disaster recovery of PostgreSQL servers
-EAPI=6
-HOMEPAGE=http://www.pgbarman.org
-IUSE=python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 python_targets_python3_6
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-3
-RDEPEND=dev-python/argh[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] >=dev-python/psycopg-2[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] dev-python/python-dateutil[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] dev-python/argcomplete[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] net-misc/rsync dev-db/postgresql[server] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_targets_python3_4? ( dev-lang/python:3.4 ) python_targets_python3_5? ( dev-lang/python:3.5 ) python_targets_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)]
-REQUIRED_USE=|| ( python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 python_targets_python3_6 )
-SLOT=0
-SRC_URI=http://downloads.sourceforge.net/project/pgbarman/2.4/barman-2.4.tar.gz
-_eclasses_=distutils-r1 63fea93ca1cc4fdc5fa2247afc4e3a15 multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 python-r1 0b5829eb6369d7af3a834b6eed7b7107 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=359934cb55ee4a73d28445af4b8e7d8f
diff --git a/dev-db/barman/Manifest b/dev-db/barman/Manifest
new file mode 100644
index 000000000000..7a43e9440e34
--- /dev/null
+++ b/dev-db/barman/Manifest
@@ -0,0 +1,7 @@
+DIST barman-2.1.tar.gz 240437 BLAKE2B 6981049812b520c2605c49e5c7baed5cf350eb386114bf80f3ca2d1cd3abdc9b7d55329f4b8de42b6a47acd7d7e7f925b2c3cf7da1e95393ba3d3c7df938f262 SHA512 385e74c8dcd20d6ad46f6a5a0520cfa47a597395acd433a570ca062ee2834a8b75101fc9a04b19dd312373e4a0b017c90826f7fbeb4f32d8c59313d8b79af1e1
+DIST barman-2.3.tar.gz 255500 BLAKE2B ae84ceade48faf6c65b1d056a7a5b635e5af53f6fa17d6165676e486286effe144125078f84fe6861d948f5b6d568d547ac3258612c95f5cfd5a5e3160197c5c SHA512 c7885ae4940fc990e3368bc654bfe6924fe36f66e6549d3f263a2f23ead2743b2a9ececf55e393ef3105cdf7fc2f38e491895d8e6135e95372eff9eb0d0bfa69
+DIST barman-2.4.tar.gz 997651 BLAKE2B 34c412752d6f0a8bcaa11e3d4538b6116d980f8c3c04bfd9c6ef997f496c4f9497175349b0d0574673a91c14ffab1469d8a988077c7198a2405af680c8205ca6 SHA512 ef316de7cae7f41d95894892b260e1cc67f62866c6feaf03acd96391ab07d9eb27ea7fd6cb472743cbd56658dde24718ac0892ba2280706098f4bdd14b5674d1
+EBUILD barman-2.1.ebuild 643 BLAKE2B 0e3d0ce0899f8cd31c4e73e7b00331d3b8b32ab59e17b3532dcf40a457037c3d1e8fdbd690a8f629c8d9058bac5cf1d887d443d9ca2a31719edf2f102d77b053 SHA512 b3d6eaa4b329cc5fad38eb34d4e96bd65c57f7deba8ca5cd53aacb6b03b57b91752c5c0fda10cf14149904481200b979906d3066496b09de0889ff803684e9bd
+EBUILD barman-2.3.ebuild 643 BLAKE2B 0e3d0ce0899f8cd31c4e73e7b00331d3b8b32ab59e17b3532dcf40a457037c3d1e8fdbd690a8f629c8d9058bac5cf1d887d443d9ca2a31719edf2f102d77b053 SHA512 b3d6eaa4b329cc5fad38eb34d4e96bd65c57f7deba8ca5cd53aacb6b03b57b91752c5c0fda10cf14149904481200b979906d3066496b09de0889ff803684e9bd
+EBUILD barman-2.4.ebuild 658 BLAKE2B 574b4ccc4a4c4bc66777e4b25030eed521d627dc02605efd7083b1ff0e1766ece23e0a5d039e77c0d78c57728ab1384cf656b7f20d606e77bcd4ecc9d3343d9c SHA512 bde0befc55a846395a71e0966e6a0a290707c71d169b26299f155c4037d9785c74ab91592666c0da0098b207d8d8575c6ef23725c9299c4b1b73fc73f2058003
+MISC metadata.xml 326 BLAKE2B e34e2bc75606ca796fde6cb82ddcc8993aa093c76a95cd36d1b5ecea0109f301636f5ff5217da2216f029e4891d95a23225f8a5d7ac3fd63c36a3876c70ebd89 SHA512 c0fd87ba5960595461b98161bc9debc37bd5f9665461486845900929854a9b27954020d234688abd9c4589a4066d0185bd11ad53a96551b5399f0025acde4ed1
diff --git a/dev-db/barman/barman-2.1.ebuild b/dev-db/barman/barman-2.1.ebuild
new file mode 100644
index 000000000000..f41587cacf79
--- /dev/null
+++ b/dev-db/barman/barman-2.1.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7)
+
+inherit distutils-r1
+
+DESCRIPTION="Administration tool for disaster recovery of PostgreSQL servers"
+
+HOMEPAGE="http://www.pgbarman.org"
+SRC_URI="http://downloads.sourceforge.net/project/pgbarman/${PV}/${P}.tar.gz"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE=""
+
+RDEPEND="dev-python/argh[${PYTHON_USEDEP}]
+ >=dev-python/psycopg-2[${PYTHON_USEDEP}]
+ dev-python/python-dateutil[${PYTHON_USEDEP}]
+ dev-python/argcomplete[${PYTHON_USEDEP}]
+ net-misc/rsync
+ dev-db/postgresql[server]"
+DEPEND=""
diff --git a/dev-db/barman/barman-2.3.ebuild b/dev-db/barman/barman-2.3.ebuild
new file mode 100644
index 000000000000..f41587cacf79
--- /dev/null
+++ b/dev-db/barman/barman-2.3.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7)
+
+inherit distutils-r1
+
+DESCRIPTION="Administration tool for disaster recovery of PostgreSQL servers"
+
+HOMEPAGE="http://www.pgbarman.org"
+SRC_URI="http://downloads.sourceforge.net/project/pgbarman/${PV}/${P}.tar.gz"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE=""
+
+RDEPEND="dev-python/argh[${PYTHON_USEDEP}]
+ >=dev-python/psycopg-2[${PYTHON_USEDEP}]
+ dev-python/python-dateutil[${PYTHON_USEDEP}]
+ dev-python/argcomplete[${PYTHON_USEDEP}]
+ net-misc/rsync
+ dev-db/postgresql[server]"
+DEPEND=""
diff --git a/dev-db/barman/barman-2.4.ebuild b/dev-db/barman/barman-2.4.ebuild
new file mode 100644
index 000000000000..f4ffbef2a9cb
--- /dev/null
+++ b/dev-db/barman/barman-2.4.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+
+inherit distutils-r1
+
+DESCRIPTION="Administration tool for disaster recovery of PostgreSQL servers"
+
+HOMEPAGE="http://www.pgbarman.org"
+SRC_URI="http://downloads.sourceforge.net/project/pgbarman/${PV}/${P}.tar.gz"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE=""
+
+RDEPEND="dev-python/argh[${PYTHON_USEDEP}]
+ >=dev-python/psycopg-2[${PYTHON_USEDEP}]
+ dev-python/python-dateutil[${PYTHON_USEDEP}]
+ dev-python/argcomplete[${PYTHON_USEDEP}]
+ net-misc/rsync
+ dev-db/postgresql[server]"
+DEPEND=""
diff --git a/dev-db/barman/metadata.xml b/dev-db/barman/metadata.xml
new file mode 100644
index 000000000000..37e0d90ffaf5
--- /dev/null
+++ b/dev-db/barman/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">downloads</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/bucardo-5.4.1 b/dev-db/bucardo-5.4.1
deleted file mode 100644
index 3bb9bd3ef4c8..000000000000
--- a/dev-db/bucardo-5.4.1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test unpack
-DEPEND=dev-perl/DBIx-Safe dev-perl/DBD-Pg dev-lang/perl:=[-build(-)]
-DESCRIPTION=An asynchronous PostgreSQL replication system
-EAPI=5
-HOMEPAGE=http://bucardo.org/wiki/Bucardo
-KEYWORDS=amd64 x86
-LICENSE=BSD
-RDEPEND=dev-perl/DBIx-Safe dev-lang/perl:=[-build(-)]
-RESTRICT=test
-SLOT=0
-SRC_URI=http://bucardo.org/downloads/Bucardo-5.4.1.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 perl-functions 01e8c68d5a528bbcda4d3c60205983df perl-module 863b35d127db98823d439f8d73c2d011 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=b73bab92ca8470a8b0dd6fd2aed6a446
diff --git a/dev-db/bucardo/Manifest b/dev-db/bucardo/Manifest
new file mode 100644
index 000000000000..8a9968a10323
--- /dev/null
+++ b/dev-db/bucardo/Manifest
@@ -0,0 +1,3 @@
+DIST Bucardo-5.4.1.tar.gz 327848 BLAKE2B d6fccd311c2e0ba99ef5614eff70caa4e69e0cb1ed983e601c32e238c60e2401a96b5bb27fb67dd5d926003d673a0078cd4f9e9b018308d0bb91811d4165df45 SHA512 b669d62a588db41e69b81ede8dc9398ad2a4eb4fcb8839993bceb5b3f3251509304e5a30373ef48ba7d75befc87758f371d3db9125127da7b068fef2a0c49e1f
+EBUILD bucardo-5.4.1.ebuild 636 BLAKE2B b4a48c2f55fcfc1264b0679e681b792d147608fc6b54b949788e0c77c12eaf925d95ca20816d89a790a3bff91ca260e03af116320b9c59177f18f707ee208e7c SHA512 cebf113c165c6af7f520e6e317136bc504fd6bd5d0d5d6effa798c7ea606c39f7e33feac0c59d3ea9393672d449658d104d680588738a5cc90071bd4abcf0a81
+MISC metadata.xml 280 BLAKE2B 75bfaba3095bd67dfa80654885579e51053fd130ae4e3ad61ac75192eebad9fe8d08cbdf63773dad3837ef2805e0594d0823655966fde8876ba5919e01f0e698 SHA512 efb5fb6652ac8cd75fff4eea8b2b044a2c9201cce2faf3bbe13a97565d150e64f9ba0dd8bb691a44a1b6726455306ea8b6c1b121678a721a82e7ea8b6589c94f
diff --git a/dev-db/bucardo/bucardo-5.4.1.ebuild b/dev-db/bucardo/bucardo-5.4.1.ebuild
new file mode 100644
index 000000000000..f70a7753f02a
--- /dev/null
+++ b/dev-db/bucardo/bucardo-5.4.1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+RESTRICT="test"
+
+inherit perl-module
+
+MY_PN="Bucardo"
+
+DESCRIPTION="An asynchronous PostgreSQL replication system"
+HOMEPAGE="http://bucardo.org/wiki/Bucardo"
+SRC_URI="http://bucardo.org/downloads/${MY_PN}-${PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+#IUSE="test" doesn't work without extra data
+IUSE=""
+
+DEPEND="dev-perl/DBIx-Safe
+ dev-perl/DBD-Pg"
+RDEPEND="dev-perl/DBIx-Safe"
+
+S=${WORKDIR}/${MY_PN}-${PV}
+
+src_install() {
+ emake DESTDIR="${D}" INSTALL_BASE="${D}" install -j1
+ keepdir /var/run/bucardo
+}
diff --git a/dev-db/bucardo/metadata.xml b/dev-db/bucardo/metadata.xml
new file mode 100644
index 000000000000..711734ad7566
--- /dev/null
+++ b/dev-db/bucardo/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>pgsql-bugs@gentoo.org</email>
+ <name>PostgreSQL and Related Package Development</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-db/cdb-0.75-r4 b/dev-db/cdb-0.75-r4
deleted file mode 100644
index 63159d182c10..000000000000
--- a/dev-db/cdb-0.75-r4
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=configure install prepare
-DEPEND=>=sys-apps/sed-4 !dev-db/tinycdb
-DESCRIPTION=Fast, reliable, simple package for creating and reading constant databases
-EAPI=5
-HOMEPAGE=http://cr.yp.to/cdb.html
-KEYWORDS=alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos
-LICENSE=public-domain
-RDEPEND=>=sys-apps/sed-4 !dev-db/tinycdb
-SLOT=0
-SRC_URI=http://cr.yp.to/cdb/cdb-0.75.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=b42fce75c8d9aa8cad9959f4aa0b5fdb
diff --git a/dev-db/cdb/Manifest b/dev-db/cdb/Manifest
new file mode 100644
index 000000000000..b45728960314
--- /dev/null
+++ b/dev-db/cdb/Manifest
@@ -0,0 +1,5 @@
+AUX cdb-0.75-errno.diff 243 BLAKE2B e0b2433529e8ade1c4802353017948fd709f47843f339d8e1f77f9c665ece80721613d2dce8c9e67b595ee03f9b7298b04f927a26ad0bf8b5e38a10836799c81 SHA512 03c64d2ab185c16d88f51aaa12d1ca06102444c3eed9d712fcd53e6b8eaeeeacbdf525d91c7fc3eb28bf88be776de4748157d596103b9fc7776a5bde05eef4c4
+AUX cdb-0.75-stdint.diff 11423 BLAKE2B 85f0c3d1b2908c001ebdb055ebe4d7a79bf16a61d1d3ce8295e17cc9c0d5f1d7859465e3dba377a2857741ef082efb621c0cb77179bc6208b35120d390b71f53 SHA512 0308d25c6f9ee3b8fc49e75a2e69c7cdbf8cca7dbf165b3a107d5e2717051f6c68df04a962456295c56e6dde97ee0777944cf406c3eb48f4b7f39ecfaf56f877
+DIST cdb-0.75.tar.gz 54162 BLAKE2B 7b488bf330b2aac88a1cca82a6a49e24d0fd953c77935231a31bd72cc0936a37628736b5b22ea0d58aaa77cd118976ab8aa82ccc080f99e190e3f1db5d51b622 SHA512 6faeab91a77457348b58f685e81000b83fb609691317198a06284c5c62dee1e4d6138f90be1e727021f279d740169c175a21b23c96adb39a654e3f7fafdf36c0
+EBUILD cdb-0.75-r4.ebuild 1501 BLAKE2B c902dc285bd0ece506899636df6008a2a56653812c25344624f5eef7f1bff8b60d674173fdd8f5bda7723e554e841658f81639cff7aca282f035007fedcb968a SHA512 ab8e65b45cd1de6533f61e69d79cb26f84c18545e644c8d62c49d69bf99cfc945be9f1a53ae67c17f21a5e595189c722427382b92af2d33b404a3ea1a750a75d
+MISC metadata.xml 166 BLAKE2B c254f1fb642881aba57637be14fb0a89b10384f91a128feaec3a8c870d76efc2cbacb92caccc0dee2dd19a5ac5eaf8643080dafa05c4e2ac96a68568927e5afd SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84
diff --git a/dev-db/cdb/cdb-0.75-r4.ebuild b/dev-db/cdb/cdb-0.75-r4.ebuild
new file mode 100644
index 000000000000..2c365e5f26c9
--- /dev/null
+++ b/dev-db/cdb/cdb-0.75-r4.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils multilib toolchain-funcs
+
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
+
+DESCRIPTION="Fast, reliable, simple package for creating and reading constant databases"
+HOMEPAGE="http://cr.yp.to/cdb.html"
+SRC_URI="http://cr.yp.to/cdb/${P}.tar.gz"
+LICENSE="public-domain"
+SLOT="0"
+IUSE=""
+
+DEPEND=">=sys-apps/sed-4
+ !dev-db/tinycdb"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-errno.diff
+ epatch "${FILESDIR}"/${P}-stdint.diff
+
+ sed -i -e 's/head -1/head -n 1/g' Makefile \
+ || die "sed Makefile failed"
+}
+
+src_configure() {
+ echo "$(tc-getCC) ${CFLAGS} -fPIC" > conf-cc
+ echo "$(tc-getCC) ${LDFLAGS}" > conf-ld
+ echo "${EPREFIX}/usr" > conf-home
+}
+
+src_install() {
+ dobin cdbdump cdbget cdbmake cdbmake-12 cdbmake-sv cdbstats cdbtest \
+ || die "dobin failed"
+
+ # ok so ... first off, some automakes fail at finding
+ # cdb.a, so install that now
+ dolib *.a || die "dolib failed"
+
+ # then do this pretty little symlinking to solve the somewhat
+ # cosmetic library issue at hand
+ dosym cdb.a /usr/$(get_libdir)/libcdb.a || die "dosym failed"
+
+ # uint32.h needs installation too, otherwise compiles depending
+ # on it will fail
+ insinto /usr/include/cdb
+ doins cdb*.h buffer.h alloc.h uint32.h || die "doins failed"
+
+ dodoc CHANGES FILES README SYSDEPS TODO VERSION
+}
diff --git a/dev-db/cdb/files/cdb-0.75-errno.diff b/dev-db/cdb/files/cdb-0.75-errno.diff
new file mode 100644
index 000000000000..5f6ac20c59c6
--- /dev/null
+++ b/dev-db/cdb/files/cdb-0.75-errno.diff
@@ -0,0 +1,11 @@
+--- error.h.orig 2003-03-29 04:18:26.000000000 -0800
++++ error.h 2003-03-29 04:19:00.000000000 -0800
+@@ -1,7 +1,7 @@
+ #ifndef ERROR_H
+ #define ERROR_H
+
+-extern int errno;
++#include <errno.h>
+
+ extern int error_intr;
+ extern int error_nomem;
diff --git a/dev-db/cdb/files/cdb-0.75-stdint.diff b/dev-db/cdb/files/cdb-0.75-stdint.diff
new file mode 100644
index 000000000000..eb564512075e
--- /dev/null
+++ b/dev-db/cdb/files/cdb-0.75-stdint.diff
@@ -0,0 +1,436 @@
+diff -Naur cdb-0.75-orig/cdb.c cdb-0.75/cdb.c
+--- cdb-0.75-orig/cdb.c 2009-01-16 19:38:41.000000000 +0100
++++ cdb-0.75/cdb.c 2009-01-16 19:46:17.000000000 +0100
+@@ -41,7 +41,7 @@
+ }
+ }
+
+-int cdb_read(struct cdb *c,char *buf,unsigned int len,uint32 pos)
++int cdb_read(struct cdb *c,char *buf,unsigned int len,uint32_t pos)
+ {
+ if (c->map) {
+ if ((pos > c->size) || (c->size - pos < len)) goto FORMAT;
+@@ -67,7 +67,7 @@
+ return -1;
+ }
+
+-static int match(struct cdb *c,char *key,unsigned int len,uint32 pos)
++static int match(struct cdb *c,char *key,unsigned int len,uint32_t pos)
+ {
+ char buf[32];
+ int n;
+@@ -87,8 +87,8 @@
+ int cdb_findnext(struct cdb *c,char *key,unsigned int len)
+ {
+ char buf[8];
+- uint32 pos;
+- uint32 u;
++ uint32_t pos;
++ uint32_t u;
+
+ if (!c->loop) {
+ u = cdb_hash(key,len);
+diff -Naur cdb-0.75-orig/cdbdump.c cdb-0.75/cdbdump.c
+--- cdb-0.75-orig/cdbdump.c 2009-01-16 19:38:41.000000000 +0100
++++ cdb-0.75/cdbdump.c 2009-01-16 19:46:17.000000000 +0100
+@@ -18,7 +18,7 @@
+ if (buffer_flush(buffer_1) == -1) die_write();
+ }
+
+-uint32 pos = 0;
++uint32_t pos = 0;
+
+ void get(char *buf,unsigned int len)
+ {
+@@ -37,7 +37,7 @@
+
+ char buf[512];
+
+-void copy(uint32 len)
++void copy(uint32_t len)
+ {
+ unsigned int x;
+
+@@ -50,7 +50,7 @@
+ }
+ }
+
+-void getnum(uint32 *num)
++void getnum(uint32_t *num)
+ {
+ get(buf,4);
+ uint32_unpack(buf,num);
+@@ -60,9 +60,9 @@
+
+ main()
+ {
+- uint32 eod;
+- uint32 klen;
+- uint32 dlen;
++ uint32_t eod;
++ uint32_t klen;
++ uint32_t dlen;
+
+ getnum(&eod);
+ while (pos < 2048) getnum(&dlen);
+diff -Naur cdb-0.75-orig/cdbget.c cdb-0.75/cdbget.c
+--- cdb-0.75-orig/cdbget.c 2009-01-16 19:38:41.000000000 +0100
++++ cdb-0.75/cdbget.c 2009-01-16 19:46:17.000000000 +0100
+@@ -27,8 +27,8 @@
+ {
+ char *key;
+ int r;
+- uint32 pos;
+- uint32 len;
++ uint32_t pos;
++ uint32_t len;
+ unsigned long u = 0;
+
+ if (!*argv) die_usage();
+diff -Naur cdb-0.75-orig/cdb.h cdb-0.75/cdb.h
+--- cdb-0.75-orig/cdb.h 2009-01-16 19:38:41.000000000 +0100
++++ cdb-0.75/cdb.h 2009-01-16 19:46:17.000000000 +0100
+@@ -6,26 +6,26 @@
+ #include "uint32.h"
+
+ #define CDB_HASHSTART 5381
+-extern uint32 cdb_hashadd(uint32,unsigned char);
+-extern uint32 cdb_hash(char *,unsigned int);
++extern uint32_t cdb_hashadd(uint32_t,unsigned char);
++extern uint32_t cdb_hash(char *,unsigned int);
+
+ struct cdb {
+ char *map; /* 0 if no map is available */
+ int fd;
+- uint32 size; /* initialized if map is nonzero */
+- uint32 loop; /* number of hash slots searched under this key */
+- uint32 khash; /* initialized if loop is nonzero */
+- uint32 kpos; /* initialized if loop is nonzero */
+- uint32 hpos; /* initialized if loop is nonzero */
+- uint32 hslots; /* initialized if loop is nonzero */
+- uint32 dpos; /* initialized if cdb_findnext() returns 1 */
+- uint32 dlen; /* initialized if cdb_findnext() returns 1 */
++ uint32_t size; /* initialized if map is nonzero */
++ uint32_t loop; /* number of hash slots searched under this key */
++ uint32_t khash; /* initialized if loop is nonzero */
++ uint32_t kpos; /* initialized if loop is nonzero */
++ uint32_t hpos; /* initialized if loop is nonzero */
++ uint32_t hslots; /* initialized if loop is nonzero */
++ uint32_t dpos; /* initialized if cdb_findnext() returns 1 */
++ uint32_t dlen; /* initialized if cdb_findnext() returns 1 */
+ } ;
+
+ extern void cdb_free(struct cdb *);
+ extern void cdb_init(struct cdb *,int fd);
+
+-extern int cdb_read(struct cdb *,char *,unsigned int,uint32);
++extern int cdb_read(struct cdb *,char *,unsigned int,uint32_t);
+
+ extern void cdb_findstart(struct cdb *);
+ extern int cdb_findnext(struct cdb *,char *,unsigned int);
+diff -Naur cdb-0.75-orig/cdb_hash.c cdb-0.75/cdb_hash.c
+--- cdb-0.75-orig/cdb_hash.c 2009-01-16 19:38:41.000000000 +0100
++++ cdb-0.75/cdb_hash.c 2009-01-16 19:46:17.000000000 +0100
+@@ -2,15 +2,15 @@
+
+ #include "cdb.h"
+
+-uint32 cdb_hashadd(uint32 h,unsigned char c)
++uint32_t cdb_hashadd(uint32_t h,unsigned char c)
+ {
+ h += (h << 5);
+ return h ^ c;
+ }
+
+-uint32 cdb_hash(char *buf,unsigned int len)
++uint32_t cdb_hash(char *buf,unsigned int len)
+ {
+- uint32 h;
++ uint32_t h;
+
+ h = CDB_HASHSTART;
+ while (len) {
+diff -Naur cdb-0.75-orig/cdb_make.c cdb-0.75/cdb_make.c
+--- cdb-0.75-orig/cdb_make.c 2009-01-16 19:38:41.000000000 +0100
++++ cdb-0.75/cdb_make.c 2009-01-16 19:51:05.000000000 +0100
+@@ -19,15 +19,15 @@
+ return seek_set(fd,c->pos);
+ }
+
+-static int posplus(struct cdb_make *c,uint32 len)
++static int posplus(struct cdb_make *c,uint32_t len)
+ {
+- uint32 newpos = c->pos + len;
++ uint32_t newpos = c->pos + len;
+ if (newpos < len) { errno = error_nomem; return -1; }
+ c->pos = newpos;
+ return 0;
+ }
+
+-int cdb_make_addend(struct cdb_make *c,unsigned int keylen,unsigned int datalen,uint32 h)
++int cdb_make_addend(struct cdb_make *c,unsigned int keylen,unsigned int datalen,uint32_t h)
+ {
+ struct cdb_hplist *head;
+
+@@ -74,11 +74,11 @@
+ {
+ char buf[8];
+ int i;
+- uint32 len;
+- uint32 u;
+- uint32 memsize;
+- uint32 count;
+- uint32 where;
++ uint32_t len;
++ uint32_t u;
++ uint32_t memsize;
++ uint32_t count;
++ uint32_t where;
+ struct cdb_hplist *x;
+ struct cdb_hp *hp;
+
+@@ -99,7 +99,7 @@
+ }
+
+ memsize += c->numentries; /* no overflow possible up to now */
+- u = (uint32) 0 - (uint32) 1;
++ u = UINT32_MAX;
+ u /= sizeof(struct cdb_hp);
+ if (memsize > u) { errno = error_nomem; return -1; }
+
+diff -Naur cdb-0.75-orig/cdbmake.c cdb-0.75/cdbmake.c
+--- cdb-0.75-orig/cdbmake.c 2009-01-16 19:38:41.000000000 +0100
++++ cdb-0.75/cdbmake.c 2009-01-16 19:46:17.000000000 +0100
+@@ -41,7 +41,7 @@
+ unsigned int klen;
+ unsigned int dlen;
+ unsigned int i;
+- uint32 h;
++ uint32_t h;
+ int fd;
+ char ch;
+
+diff -Naur cdb-0.75-orig/cdb_make.h cdb-0.75/cdb_make.h
+--- cdb-0.75-orig/cdb_make.h 2009-01-16 19:38:41.000000000 +0100
++++ cdb-0.75/cdb_make.h 2009-01-16 19:46:17.000000000 +0100
+@@ -8,7 +8,7 @@
+
+ #define CDB_HPLIST 1000
+
+-struct cdb_hp { uint32 h; uint32 p; } ;
++struct cdb_hp { uint32_t h; uint32_t p; } ;
+
+ struct cdb_hplist {
+ struct cdb_hp hp[CDB_HPLIST];
+@@ -19,20 +19,20 @@
+ struct cdb_make {
+ char bspace[8192];
+ char final[2048];
+- uint32 count[256];
+- uint32 start[256];
++ uint32_t count[256];
++ uint32_t start[256];
+ struct cdb_hplist *head;
+ struct cdb_hp *split; /* includes space for hash */
+ struct cdb_hp *hash;
+- uint32 numentries;
++ uint32_t numentries;
+ buffer b;
+- uint32 pos;
++ uint32_t pos;
+ int fd;
+ } ;
+
+ extern int cdb_make_start(struct cdb_make *,int);
+ extern int cdb_make_addbegin(struct cdb_make *,unsigned int,unsigned int);
+-extern int cdb_make_addend(struct cdb_make *,unsigned int,unsigned int,uint32);
++extern int cdb_make_addend(struct cdb_make *,unsigned int,unsigned int,uint32_t);
+ extern int cdb_make_add(struct cdb_make *,char *,unsigned int,char *,unsigned int);
+ extern int cdb_make_finish(struct cdb_make *);
+
+diff -Naur cdb-0.75-orig/cdbstats.c cdb-0.75/cdbstats.c
+--- cdb-0.75-orig/cdbstats.c 2009-01-16 19:38:41.000000000 +0100
++++ cdb-0.75/cdbstats.c 2009-01-16 19:46:17.000000000 +0100
+@@ -28,7 +28,7 @@
+ if (buffer_flush(buffer_1small) == -1) die_write();
+ }
+
+-uint32 pos = 0;
++uint32_t pos = 0;
+
+ void get(char *buf,unsigned int len)
+ {
+@@ -43,7 +43,7 @@
+ }
+ }
+
+-void getnum(uint32 *num)
++void getnum(uint32_t *num)
+ {
+ char buf[4];
+ get(buf,4);
+@@ -70,9 +70,9 @@
+
+ main()
+ {
+- uint32 eod;
+- uint32 klen;
+- uint32 dlen;
++ uint32_t eod;
++ uint32_t klen;
++ uint32_t dlen;
+ seek_pos rest;
+ int r;
+
+diff -Naur cdb-0.75-orig/cdbtest.c cdb-0.75/cdbtest.c
+--- cdb-0.75-orig/cdbtest.c 2009-01-16 19:38:41.000000000 +0100
++++ cdb-0.75/cdbtest.c 2009-01-16 19:46:17.000000000 +0100
+@@ -24,7 +24,7 @@
+ if (buffer_flush(buffer_1small) == -1) die_write();
+ }
+
+-uint32 pos = 0;
++uint32_t pos = 0;
+
+ void get(char *buf,unsigned int len)
+ {
+@@ -40,7 +40,7 @@
+ }
+ }
+
+-void getnum(uint32 *num)
++void getnum(uint32_t *num)
+ {
+ char buf[4];
+ get(buf,4);
+@@ -68,9 +68,9 @@
+
+ main()
+ {
+- uint32 eod;
+- uint32 klen;
+- uint32 dlen;
++ uint32_t eod;
++ uint32_t klen;
++ uint32_t dlen;
+ seek_pos rest;
+ int r;
+
+diff -Naur cdb-0.75-orig/Makefile cdb-0.75/Makefile
+--- cdb-0.75-orig/Makefile 2009-01-16 19:38:41.000000000 +0100
++++ cdb-0.75/Makefile 2009-01-16 19:46:17.000000000 +0100
+@@ -298,13 +298,6 @@
+ uint32.h
+ ./compile testzero.c
+
+-uint32.h: \
+-tryulong32.c compile load uint32.h1 uint32.h2
+- ( ( ./compile tryulong32.c && ./load tryulong32 && \
+- ./tryulong32 ) >/dev/null 2>&1 \
+- && cat uint32.h2 || cat uint32.h1 ) > uint32.h
+- rm -f tryulong32.o tryulong32
+-
+ uint32_pack.o: \
+ compile uint32_pack.c uint32.h
+ ./compile uint32_pack.c
+diff -Naur cdb-0.75-orig/TARGETS cdb-0.75/TARGETS
+--- cdb-0.75-orig/TARGETS 2009-01-16 19:38:41.000000000 +0100
++++ cdb-0.75/TARGETS 2009-01-16 19:52:06.000000000 +0100
+@@ -1,6 +1,5 @@
+ load
+ compile
+-uint32.h
+ cdbget.o
+ systype
+ makelib
+diff -Naur cdb-0.75-orig/uint32.h cdb-0.75/uint32.h
+--- cdb-0.75-orig/uint32.h 1970-01-01 01:00:00.000000000 +0100
++++ cdb-0.75/uint32.h 2009-01-16 19:46:17.000000000 +0100
+@@ -0,0 +1,11 @@
++#ifndef UINT32_H
++#define UINT32_H
++
++#include <stdint.h>
++
++extern void uint32_pack(char *,uint32_t);
++extern void uint32_pack_big(char *,uint32_t);
++extern void uint32_unpack(char *,uint32_t *);
++extern void uint32_unpack_big(char *,uint32_t *);
++
++#endif
+diff -Naur cdb-0.75-orig/uint32.h1 cdb-0.75/uint32.h1
+--- cdb-0.75-orig/uint32.h1 2009-01-16 19:38:41.000000000 +0100
++++ cdb-0.75/uint32.h1 1970-01-01 01:00:00.000000000 +0100
+@@ -1,11 +0,0 @@
+-#ifndef UINT32_H
+-#define UINT32_H
+-
+-typedef unsigned int uint32;
+-
+-extern void uint32_pack(char *,uint32);
+-extern void uint32_pack_big(char *,uint32);
+-extern void uint32_unpack(char *,uint32 *);
+-extern void uint32_unpack_big(char *,uint32 *);
+-
+-#endif
+diff -Naur cdb-0.75-orig/uint32.h2 cdb-0.75/uint32.h2
+--- cdb-0.75-orig/uint32.h2 2009-01-16 19:38:41.000000000 +0100
++++ cdb-0.75/uint32.h2 1970-01-01 01:00:00.000000000 +0100
+@@ -1,11 +0,0 @@
+-#ifndef UINT32_H
+-#define UINT32_H
+-
+-typedef unsigned long uint32;
+-
+-extern void uint32_pack(char *,uint32);
+-extern void uint32_pack_big(char *,uint32);
+-extern void uint32_unpack(char *,uint32 *);
+-extern void uint32_unpack_big(char *,uint32 *);
+-
+-#endif
+diff -Naur cdb-0.75-orig/uint32_pack.c cdb-0.75/uint32_pack.c
+--- cdb-0.75-orig/uint32_pack.c 2009-01-16 19:38:41.000000000 +0100
++++ cdb-0.75/uint32_pack.c 2009-01-16 19:46:17.000000000 +0100
+@@ -1,6 +1,6 @@
+ #include "uint32.h"
+
+-void uint32_pack(char s[4],uint32 u)
++void uint32_pack(char s[4],uint32_t u)
+ {
+ s[0] = u & 255;
+ u >>= 8;
+@@ -10,7 +10,7 @@
+ s[3] = u >> 8;
+ }
+
+-void uint32_pack_big(char s[4],uint32 u)
++void uint32_pack_big(char s[4],uint32_t u)
+ {
+ s[3] = u & 255;
+ u >>= 8;
+diff -Naur cdb-0.75-orig/uint32_unpack.c cdb-0.75/uint32_unpack.c
+--- cdb-0.75-orig/uint32_unpack.c 2009-01-16 19:38:41.000000000 +0100
++++ cdb-0.75/uint32_unpack.c 2009-01-16 19:46:17.000000000 +0100
+@@ -1,8 +1,8 @@
+ #include "uint32.h"
+
+-void uint32_unpack(char s[4],uint32 *u)
++void uint32_unpack(char s[4],uint32_t *u)
+ {
+- uint32 result;
++ uint32_t result;
+
+ result = (unsigned char) s[3];
+ result <<= 8;
+@@ -15,9 +15,9 @@
+ *u = result;
+ }
+
+-void uint32_unpack_big(char s[4],uint32 *u)
++void uint32_unpack_big(char s[4],uint32_t *u)
+ {
+- uint32 result;
++ uint32_t result;
+
+ result = (unsigned char) s[0];
+ result <<= 8;
diff --git a/dev-db/cdb/metadata.xml b/dev-db/cdb/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/dev-db/cdb/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/dev-db/clickhouse-1.1.54390 b/dev-db/clickhouse-1.1.54390
deleted file mode 100644
index e0508f317b9b..000000000000
--- a/dev-db/clickhouse-1.1.54390
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare pretend test unpack
-DEPEND=dev-libs/re2:0= !static? ( >=app-arch/lz4-1.8.0:= >=app-arch/zstd-1.3.4:= client? ( sys-libs/ncurses:0= sys-libs/readline:0= ) dev-libs/double-conversion dev-libs/capnproto dev-libs/libltdl:0 sys-libs/libunwind:7 sys-libs/zlib || ( dev-db/unixODBC dev-libs/poco[odbc] ) dev-libs/icu:= dev-libs/glib dev-libs/boost:= dev-libs/openssl:0= dev-libs/zookeeper-c kafka? ( dev-libs/librdkafka:= ) mysql? ( virtual/libmysqlclient ) ) >=dev-libs/poco-1.9.0 dev-libs/libpcre doc? ( >=dev-python/mkdocs-0.17.3 ) static? ( >=app-arch/lz4-1.8.0[static-libs] >=app-arch/zstd-1.3.4[static-libs] client? ( sys-libs/ncurses:0=[static-libs] sys-libs/readline:0=[static-libs] ) dev-libs/double-conversion[static-libs] dev-libs/capnproto[static-libs] dev-libs/libltdl[static-libs] sys-libs/libunwind:7[static-libs] sys-libs/zlib[static-libs] || ( dev-db/unixODBC[static-libs] dev-libs/poco[odbc] ) dev-libs/icu[static-libs] dev-libs/glib[static-libs] dev-libs/boost[static-libs] dev-libs/openssl[static-libs] dev-libs/zookeeper-c[static-libs] virtual/libmysqlclient[static-libs] kafka? ( dev-libs/librdkafka[static-libs] ) ) sys-libs/libtermcap-compat dev-util/patchelf || ( >=sys-devel/gcc-7.0 >=sys-devel/clang-6.0 ) dev-util/ninja >=dev-util/cmake-3.9.6 virtual/pkgconfig
-DESCRIPTION=An OSS column-oriented database management system for real-time data analysis
-EAPI=6
-HOMEPAGE=https://clickhouse.yandex
-IUSE=+client cpu_flags_x86_sse4_2 +server debug doc kafka mongodb mysql static test tools zookeeper
-KEYWORDS=~amd64
-LICENSE=Apache-2.0
-RDEPEND=dev-libs/re2:0= !static? ( >=app-arch/lz4-1.8.0:= >=app-arch/zstd-1.3.4:= client? ( sys-libs/ncurses:0= sys-libs/readline:0= ) dev-libs/double-conversion dev-libs/capnproto dev-libs/libltdl:0 sys-libs/libunwind:7 sys-libs/zlib || ( dev-db/unixODBC dev-libs/poco[odbc] ) dev-libs/icu:= dev-libs/glib dev-libs/boost:= dev-libs/openssl:0= dev-libs/zookeeper-c kafka? ( dev-libs/librdkafka:= ) mysql? ( virtual/libmysqlclient ) ) >=dev-libs/poco-1.9.0 dev-libs/libpcre
-REQUIRED_USE=server? ( cpu_flags_x86_sse4_2 ) static? ( client server tools )
-SLOT=0/stable
-SRC_URI=https://github.com/yandex/ClickHouse/archive/v1.1.54390-stable.tar.gz -> clickhouse-1.1.54390.tar.gz https://github.com/google/cctz/archive/4f9776a.tar.gz -> cctz-4f9776a.tar.gz
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=108bfa434edf413db2eb8577e43f8ecc
diff --git a/dev-db/clickhouse/Manifest b/dev-db/clickhouse/Manifest
new file mode 100644
index 000000000000..bf42a52abd48
--- /dev/null
+++ b/dev-db/clickhouse/Manifest
@@ -0,0 +1,6 @@
+AUX clickhouse-server.initd 452 BLAKE2B d083713e917c2e436316a42adccf8698159c268b4deeca8ce04548e0fb71de2db43a4f4ad3a0ca9b74c3e677cc006386b07a5099d8ae6247da246912ec009545 SHA512 553c4f59c5210c30b219507320debc5b1f9e33b777bc04a37a8598d433a34642e4e653dc74bdd11573e99f20ae9d869c8772d3f36a8e962eb76775695bee2ff7
+AUX clickhouse-server.service 307 BLAKE2B 1f443f68db97408cb2b0a8e9007195cdc5d6e29f54e55b3bd2b023cfbcb9d3ee4c1083503f83a42cfd18bca3320dfa86571434fe89612fb0a1f5a9e178eb706b SHA512 185db8aed69b178540225fa41f623a78af09e30d2dd1e033baf4d7c80451e702f5d6b9ce5240f7f6fb6d63a4ebed5af4d483515c7e6fe019e7fd44334df4ab37
+DIST cctz-4f9776a.tar.gz 290009 BLAKE2B 532eb7d590f9814c05cc7fdd3c75efe0a6b3f81d85201b14163a9600dd858c4fbac592270d0afccd7d5eef0080d7e70e9d716023bdb60d55479585e2cd3d3f59 SHA512 ba0dfc404cc70f03ef2be29fa3b0c70ea881c92a92525ea4ba1b5bcfc9e45df1b62a5eec180f498293e64bdd5cb9b41f97361cbb7e8baf299dcfdcd1557ca205
+DIST clickhouse-1.1.54390.tar.gz 5619103 BLAKE2B dac861ee2a4c1326485f5d98b0f6d7b41b32ea43f7b45e5cccf54761c5de72b6805324d1a18f3aa4eea655c055e87cbba6ad39bc55087d6c5ed1d7d9564f27a4 SHA512 09c7a87291555f85534f5560add9dc702a98f38f2679e2c9642607c6f2c25801b1865625d4fa2109fe94873bfa5fd992f7a4d70fb19a03e5e1cb8289c124ac5e
+EBUILD clickhouse-1.1.54390.ebuild 4861 BLAKE2B 995066910402ae02ae29184dba607e78f5779eac862957d20995bb50e14159781fa15443a907f61f19b06e5d2182c74a7bf755e6866e0c3c42e4a5faf5333230 SHA512 f06f580c2b99d0db506c50af514ee8bab4bdaef27efb4e474850bd5dd01305e6615a2a2f2821fc882e4a1919b43f5bd5f6a7b68c50192a2c00671fb460d28e3b
+MISC metadata.xml 738 BLAKE2B 861f40f506964d64cf646f043406945dc54950f48e27d4eb28b6fc0f96bf0ceb093520a0b60d813460fbe8b99ba4858f0a49d30abcb25567f44411c78a02f6e7 SHA512 6d87cc967c081b5a5e60136f5928d7b17c65c3a1c26aa1e45a50e74d5383bb665682a8b0cb5cce0496bebcac1f5e27aace8a8373253c031acc3c166c382e0056
diff --git a/dev-db/clickhouse/clickhouse-1.1.54390.ebuild b/dev-db/clickhouse/clickhouse-1.1.54390.ebuild
new file mode 100644
index 000000000000..643b68fe3dc4
--- /dev/null
+++ b/dev-db/clickhouse/clickhouse-1.1.54390.ebuild
@@ -0,0 +1,199 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+CMAKE_MAKEFILE_GENERATOR="ninja"
+
+inherit cmake-utils systemd toolchain-funcs user
+
+DESCRIPTION="An OSS column-oriented database management system for real-time data analysis"
+HOMEPAGE="https://clickhouse.yandex"
+LICENSE="Apache-2.0"
+
+MY_PN="ClickHouse"
+TYPE="stable"
+
+CCTZ_COMMIT="4f9776a"
+ZSTD_COMMIT="2555975"
+SRC_URI="https://github.com/yandex/${MY_PN}/archive/v${PV}-${TYPE}.tar.gz -> ${P}.tar.gz
+ https://github.com/google/cctz/archive/${CCTZ_COMMIT}.tar.gz -> cctz-${CCTZ_COMMIT}.tar.gz
+"
+
+SLOT="0/${TYPE}"
+IUSE="+client cpu_flags_x86_sse4_2 +server debug doc kafka mongodb mysql static test tools zookeeper"
+KEYWORDS="~amd64"
+
+REQUIRED_USE="
+ server? ( cpu_flags_x86_sse4_2 )
+ static? ( client server tools )
+"
+
+RDEPEND="
+ dev-libs/re2:0=
+ !static? (
+ >=app-arch/lz4-1.8.0:=
+ >=app-arch/zstd-1.3.4:=
+ client? (
+ sys-libs/ncurses:0=
+ sys-libs/readline:0=
+ )
+
+ dev-libs/double-conversion
+ dev-libs/capnproto
+ dev-libs/libltdl:0
+ sys-libs/libunwind:7
+ sys-libs/zlib
+ || (
+ dev-db/unixODBC
+ dev-libs/poco[odbc]
+ )
+ dev-libs/icu:=
+ dev-libs/glib
+ dev-libs/boost:=
+ dev-libs/openssl:0=
+ dev-libs/zookeeper-c
+ kafka? ( dev-libs/librdkafka:= )
+ mysql? ( virtual/libmysqlclient )
+ )
+
+ >=dev-libs/poco-1.9.0
+ dev-libs/libpcre
+"
+
+DEPEND="${RDEPEND}
+ doc? ( >=dev-python/mkdocs-0.17.3 )
+ static? (
+ >=app-arch/lz4-1.8.0[static-libs]
+ >=app-arch/zstd-1.3.4[static-libs]
+ client? (
+ sys-libs/ncurses:0=[static-libs]
+ sys-libs/readline:0=[static-libs]
+ )
+ dev-libs/double-conversion[static-libs]
+ dev-libs/capnproto[static-libs]
+ dev-libs/libltdl[static-libs]
+ sys-libs/libunwind:7[static-libs]
+ sys-libs/zlib[static-libs]
+ || (
+ dev-db/unixODBC[static-libs]
+ dev-libs/poco[odbc]
+ )
+ dev-libs/icu[static-libs]
+ dev-libs/glib[static-libs]
+ dev-libs/boost[static-libs]
+ dev-libs/openssl[static-libs]
+ dev-libs/zookeeper-c[static-libs]
+ virtual/libmysqlclient[static-libs]
+ kafka? ( dev-libs/librdkafka[static-libs] )
+ )
+
+ sys-libs/libtermcap-compat
+ dev-util/patchelf
+ || (
+ >=sys-devel/gcc-7.0
+ >=sys-devel/clang-6.0
+ )
+"
+
+S="${WORKDIR}/${MY_PN}-${PV}-${TYPE}"
+
+_clang_fullversion() {
+ local ver="$1"; shift
+ set -- $($(tc-getCPP "$@") -E -P - <<<"__clang_major__ __clang_minor__ __clang_patchlevel__")
+ eval echo "$ver"
+}
+
+clang-fullversion() {
+ _clang_fullversion '$1.$2.$3' "$@"
+}
+
+clang-version() {
+ _clang_fullversion '$1.$2' "$@"
+}
+
+clang-major-version() {
+ _clang_fullversion '$1' "$@"
+}
+
+clang-minor-version() {
+ _clang_fullversion '$2' "$@"
+}
+
+clang-micro-version() {
+ _clang_fullversion '$3' "$@"
+}
+
+pkg_pretend() {
+ if [[ $(tc-getCC) == clang ]]; then
+ if [[ $(clang-major-version) -lt 6 ]]; then
+ eerror "Compilation with clang older than 6.0 is not supported"
+ die "Too old clang found"
+ fi
+ :
+ elif [[ $(gcc-major-version) -lt 7 ]] && [[$(gcc-minor-version) -lt 2 ]]; then
+ eerror "Compilation with gcc older than 7.2 is not supported"
+ die "Too old gcc found"
+ fi
+}
+
+src_unpack() {
+ default_src_unpack
+ [[ ${PV} == 9999 ]] && return 0
+ cd "${S}/contrib" || die "failed to cd to contrib"
+ mkdir -p cctz zookeeper zstd || die "failed to create directories"
+ tar --strip-components=1 -C cctz -xf "${DISTDIR}/cctz-${CCTZ_COMMIT}.tar.gz" || die "failed to unpack cctz"
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_POCO_MONGODB="$(usex mongodb)"
+ -DENABLE_RDKAFKA="$(usex kafka)"
+ -DENABLE_TESTS="$(usex test)"
+ -DUSE_STATIC_LIBRARIES="$(usex static)"
+ -DMAKE_STATIC_LIBRARIES="$(usex static)"
+ -DUSE_MYSQL="$(usex mysql)"
+ -DENABLE_CLICKHOUSE_SERVER="$(usex server)"
+ -DENABLE_CLICKHOUSE_CLIENT="$(usex client)"
+ -DENABLE_CLICKHOUSE_LOCAL="$(usex tools)"
+ -DENABLE_CLICKHOUSE_BENCHMARK="$(usex tools)"
+ -DENABLE_CLICKHOUSE_PERFORMANCE="$(usex tools)"
+ -DENABLE_CLICKHOUSE_EXTRACT_FROM_CONFIG="$(usex tools)"
+ -DENABLE_CLICKHOUSE_COMPRESSOR="$(usex tools)"
+ -DENABLE_CLICKHOUSE_COPIER="$(usex tools)"
+ -DENABLE_CLICKHOUSE_COPIER="$(usex tools)"
+ -DENABLE_CLICKHOUSE_ALL=OFF
+ -DUSE_INTERNAL_CITYHASH_LIBRARY=ON # Clickhouse explicitly requires bundled patched cityhash
+ -DUNBUNDLED=ON
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if ! use test; then
+ rm -rf "${D}/usr/share/clickhouse-test" || die "failed to remove tests"
+ fi
+
+ if use doc; then
+ pushd "${S}/docs" || die "Failed to enter docs build directory"
+ ./build.sh || die "Failed to build docs"
+ popd || die "Failed to exit docs build directory"
+
+ dodoc -r "${S}/docs/build/docs"
+ fi
+
+ if use server; then
+ newinitd "${FILESDIR}"/clickhouse-server.initd clickhouse-server
+ systemd_dounit "${FILESDIR}"/clickhouse-server.service
+ fi
+}
+
+pkg_preinst() {
+ if use server; then
+ enewgroup clickhouse
+ enewuser clickhouse -1 -1 /var/lib/clickhouse clickhouse
+ fi
+}
diff --git a/dev-db/clickhouse/files/clickhouse-server.initd b/dev-db/clickhouse/files/clickhouse-server.initd
new file mode 100644
index 000000000000..57c91cd2389c
--- /dev/null
+++ b/dev-db/clickhouse/files/clickhouse-server.initd
@@ -0,0 +1,17 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+pidfile="/run/clickhouse-server.pid"
+command_background=1
+command="/usr/bin/clickhouse-server"
+start_stop_daemon_args="--user clickhouse --group clickhouse \
+ --chdir /etc/clickhouse-server \
+ -1 /var/log/clickhouse-server/stdout.log \
+ -2 /var/log/clickhouse-server/stderr.log"
+
+depend() {
+ need net
+ after mongodb
+}
diff --git a/dev-db/clickhouse/files/clickhouse-server.service b/dev-db/clickhouse/files/clickhouse-server.service
new file mode 100644
index 000000000000..64d2cbacf6ec
--- /dev/null
+++ b/dev-db/clickhouse/files/clickhouse-server.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=ClickHouse Server (analytic DBMS for big data)
+
+[Service]
+Type=simple
+User=clickhouse
+Group=clickhouse
+Restart=always
+RestartSec=30
+ExecStart=/usr/bin/clickhouse-server --config=/etc/clickhouse-server/config.xml
+LimitCORE=infinity
+LimitNOFILE=500000
+
+[Install]
+WantedBy=multi-user.target
diff --git a/dev-db/clickhouse/metadata.xml b/dev-db/clickhouse/metadata.xml
new file mode 100644
index 000000000000..0583e43c96a1
--- /dev/null
+++ b/dev-db/clickhouse/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>civil@gentoo.org</email>
+ <name>Vladimir Smirnov</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">yandex/Clickhouse</remote-id>
+ </upstream>
+ <use>
+ <flag name="client">Build CLI client.</flag>
+ <flag name="server">Build server.</flag>
+ <flag name="kafka">Enables support for kafka consumer.</flag>
+ <flag name="mongodb">Enabled support for MongoDB-based dictionaries</flag>
+ <flag name="tools">Build various tools, like benchmark, copier, etc.</flag>
+ <flag name="zookeeper">Enable support for clustering (based on Zookeeper).</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-db/cockroach-1.0 b/dev-db/cockroach-1.0
deleted file mode 100644
index 8b5303d3fd82..000000000000
--- a/dev-db/cockroach-1.0
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile install pretend setup
-DEPEND=>=app-arch/xz-utils-5.2.3 >=dev-lang/go-1.8.1 >=dev-util/cmake-3.8.1
-DESCRIPTION=open source database for building cloud services
-EAPI=6
-HOMEPAGE=https://www.cockroachlabs.com
-KEYWORDS=~amd64
-LICENSE=Cockroach Apache-2.0
-SLOT=0
-SRC_URI=https://binaries.cockroachdb.com/cockroach-v1.0.src.tgz
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81
-_md5_=4a2d3f118c991d179524a7ddbedcc3be
diff --git a/dev-db/cockroach-1.0-r1 b/dev-db/cockroach-1.0-r1
deleted file mode 100644
index cccdd766d314..000000000000
--- a/dev-db/cockroach-1.0-r1
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile install pretend setup
-DEPEND=>=app-arch/xz-utils-5.2.3 >=dev-lang/go-1.8.1 >=dev-util/cmake-3.8.1
-DESCRIPTION=open source database for building cloud services
-EAPI=6
-HOMEPAGE=https://www.cockroachlabs.com
-KEYWORDS=~amd64
-LICENSE=Cockroach Apache-2.0
-SLOT=0
-SRC_URI=https://binaries.cockroachdb.com/cockroach-v1.0.src.tgz
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81
-_md5_=e669a87fc1ac3309c0de1f0ed08104f3
diff --git a/dev-db/cockroach-1.0.1 b/dev-db/cockroach-1.0.1
deleted file mode 100644
index 67cdf6139434..000000000000
--- a/dev-db/cockroach-1.0.1
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile install pretend setup
-DEPEND=>=app-arch/xz-utils-5.2.3 >=dev-lang/go-1.8.1 >=dev-util/cmake-3.8.1
-DESCRIPTION=open source database for building cloud services
-EAPI=6
-HOMEPAGE=https://www.cockroachlabs.com
-KEYWORDS=~amd64
-LICENSE=Cockroach Apache-2.0
-SLOT=0
-SRC_URI=https://binaries.cockroachdb.com/cockroach-v1.0.1.src.tgz
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81
-_md5_=f910e84358cf1a773a67b4abe37dcf9d
diff --git a/dev-db/cockroach-1.0.3 b/dev-db/cockroach-1.0.3
deleted file mode 100644
index 41d44fd7e959..000000000000
--- a/dev-db/cockroach-1.0.3
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile install pretend setup
-DEPEND=>=app-arch/xz-utils-5.2.3 >=dev-lang/go-1.8.3 >=dev-util/cmake-3.8.1
-DESCRIPTION=open source database for building cloud services
-EAPI=6
-HOMEPAGE=https://www.cockroachlabs.com
-KEYWORDS=~amd64
-LICENSE=Cockroach Apache-2.0
-SLOT=0
-SRC_URI=https://binaries.cockroachdb.com/cockroach-v1.0.3.src.tgz
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81
-_md5_=b66f17f924f4b106dcbb05617b644e0b
diff --git a/dev-db/cockroach-1.0_rc1 b/dev-db/cockroach-1.0_rc1
deleted file mode 100644
index 88231627016b..000000000000
--- a/dev-db/cockroach-1.0_rc1
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile install pretend setup
-DEPEND=>=dev-lang/go-1.8.1
-DESCRIPTION=open source database for building cloud services
-EAPI=6
-HOMEPAGE=https://www.cockroachlabs.com
-KEYWORDS=~amd64
-LICENSE=Cockroach Apache-2.0
-SLOT=0
-SRC_URI=https://binaries.cockroachdb.com/cockroach-v1.0-rc.1.src.tgz
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81
-_md5_=0fa477e8a908f61872ba8e0f6f2c8788
diff --git a/dev-db/cockroach-1.1.2 b/dev-db/cockroach-1.1.2
deleted file mode 100644
index 3de3613e3fe2..000000000000
--- a/dev-db/cockroach-1.1.2
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile install pretend setup
-DEPEND=>=app-arch/xz-utils-5.2.3 >=dev-lang/go-1.8.3 >=dev-util/cmake-3.8.1
-DESCRIPTION=open source database for building cloud services
-EAPI=6
-HOMEPAGE=https://www.cockroachlabs.com
-KEYWORDS=~amd64
-LICENSE=Cockroach Apache-2.0
-SLOT=0
-SRC_URI=https://binaries.cockroachdb.com/cockroach-v1.1.2.src.tgz
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81
-_md5_=b66f17f924f4b106dcbb05617b644e0b
diff --git a/dev-db/cockroach-1.1.3 b/dev-db/cockroach-1.1.3
deleted file mode 100644
index 4f96c3dda1eb..000000000000
--- a/dev-db/cockroach-1.1.3
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile install pretend setup
-DEPEND=>=app-arch/xz-utils-5.2.3 >=dev-lang/go-1.8.3 >=dev-util/cmake-3.8.1
-DESCRIPTION=open source database for building cloud services
-EAPI=6
-HOMEPAGE=https://www.cockroachlabs.com
-KEYWORDS=~amd64
-LICENSE=Cockroach Apache-2.0
-SLOT=0
-SRC_URI=https://binaries.cockroachdb.com/cockroach-v1.1.3.src.tgz
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81
-_md5_=2904d3a0df549651a09eb1c4fdd69756
diff --git a/dev-db/cockroach-2.0.1 b/dev-db/cockroach-2.0.1
deleted file mode 100644
index 197a5733dd30..000000000000
--- a/dev-db/cockroach-2.0.1
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile install pretend setup
-DEPEND=>=app-arch/xz-utils-5.2.3 >=dev-lang/go-1.8.3 >=dev-util/cmake-3.8.1
-DESCRIPTION=open source database for building cloud services
-EAPI=6
-HOMEPAGE=https://www.cockroachlabs.com
-KEYWORDS=~amd64
-LICENSE=Cockroach Apache-2.0
-SLOT=0
-SRC_URI=https://binaries.cockroachdb.com/cockroach-v2.0.1.src.tgz
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81
-_md5_=bdd2ab2d768c42287bda4d4d1d9ddfee
diff --git a/dev-db/cockroach/Manifest b/dev-db/cockroach/Manifest
new file mode 100644
index 000000000000..d754aca3fc5a
--- /dev/null
+++ b/dev-db/cockroach/Manifest
@@ -0,0 +1,22 @@
+AUX cockroach-limits.conf 136 BLAKE2B 78020250f472fd810a27bd22f9f76e531c09d6748db9d808e5c7fe731bd8d8f4db983eb374220fa1a6224866f116f9c0e7e53023078b94b7b880bd70d8b32b0b SHA512 c8c68263967f0d25eaf29dc3023046edeaf9e36f23f6f296d7e1dd7b2126a0b4f431af60e34fcb5c075855260f19d7ffc0516d6ef68ff852b3c95a2632cdd6ae
+AUX cockroach.confd 521 BLAKE2B 58fbe1b859cfd2c988c55a2f3aa067bab60ca30da67e85dbf99ae603c08abb646045285dd1931651945bf45100d46e61a6da5bc5ff424366dbf8e492c871283a SHA512 81efbc65e1e6dbcc4f98ab0f9ca201c9dd299140ee31cc04bfab82c7d33215a69cad15b3c190c23eb0e4a11b9050bc588b5d1097630bf2ebee4f3f14d53f3183
+AUX cockroach.confd-1.0 1324 BLAKE2B 8a906ce78a86b2b95c2b6d5777ea116462e5d6ad47b3ba72e88637e227d34f0d411af557dc8e049706740d62d9fc724b432d99d5bab1502b5e05b0af1d860eb3 SHA512 538042bb5484acfdb31c5a750be73d5e6efeb03a3b243d5bc204db9266a7b02daf7ea9d4687fd3a5223dc6d493a1672c1b581e4527599cb3e7c31e11ec2742fd
+AUX cockroach.initd 542 BLAKE2B c59d584d90442ee97bd6b2e4a564bd348073680efc09e22cde650e365487de91025413cdd0feaac2f42e752aa4debba2da9bda15634e7464cf53cf5550e74fba SHA512 86684b238413812b6787bf0841dc34302f80b9ad2c25a47a349100503b37f61ec8851870c29bb4fe697216443a39ad5e2decbcedea90664adb3b7316c440e345
+AUX cockroach.initd-1.0 1676 BLAKE2B f74872fe73a571ad29e4c85193c35f1c139ce316b951dd25b695f220269f582597635216feac04e7d5d00aab6d8ed459e93c543fe7ee86fe804e9ce33dce7280 SHA512 5f0b6ade2b25372cfc7d810d9dbe10e9732e79527c0ad73eec0cdbbad894a773bfd4aaffb958d3c0e0e7ecb636a07214be494cfdd5e69f4faacc30849f7e3eb9
+AUX cockroach.initd-1.0.1 1820 BLAKE2B f3080961c251e23a01c1e5664a0112d5cab809278bfb4d1d2dbb388bb483c519e08f87e528c2c3b35519b3781890815a574442828b93913de80c5459a79454e6 SHA512 df0c06bb6ee97c3f531250486ca1fe3d2333c1e280e2d0acb24c9aa061bd6ba35358504e29bf934a382e0a677c812e6dd474e78fcab1cd5188e93e8082748e04
+DIST cockroach-v1.0-rc.1.src.tgz 68784067 BLAKE2B 5f5ed18ee535d30e004f2170b20ac96ed801e5fa9dee55ddbda7543e24d35ed940711d2e7b307b5a76383637f9e113eec3ac1fa28eb08751068cf94627c08f3b SHA512 c68fc712068cbfce167d98008cdcb46270a8fa772624281da23a70d0492c7990c9ce8513334fedc31d7dde5176087fa6211a4e90d77741ed0079f9568c71e0ff
+DIST cockroach-v1.0.1.src.tgz 69116931 BLAKE2B a1abc0353fc815eb5432a327969d48d4ea893484d5488161972ce84fa24aaa06203481cc381ba3918cdf87ad6ebe846e407918bc0b3e5e4abd6a6d4c3ac5014a SHA512 d388d84c09f1318420f859c964c46b78e5237685fbc2b1a8d55fad2ce1dabc89461ad5eaa6d95283dda4551542f33e5df2feda4afd7129e1f850e469e0d17e69
+DIST cockroach-v1.0.3.src.tgz 69127502 BLAKE2B 803f88e19a6128f18024748610c1af3e912f6f4fbc8af9216b212aacf58422382d5c5b5f61453b7373bc680e7894d6b57f4f47040581f9981002be7cbce42975 SHA512 2bae99faba0f56774ab964d920f8628afc6af61ce53bc3e99f1b360c0606e0777b90dd93cbd6844109c3224867fc4180fb42e6dacc75e4eb4db8a4f93f586577
+DIST cockroach-v1.0.src.tgz 68753479 BLAKE2B 6377614e9fee896a0115909b02d8a191a7aabe8da341c98547c0ac496d2e8fcce801e35f93a8a126c9d65c1106e0217359b161825a11597da1db113ca6a51216 SHA512 d74ad9546908535f9a7ad4172a04a5f86f5ed22698bbb005aec7478a52632e0497a966b859fd68b40894eb7ee68bfa80dc4188d198f2f23725b9cadd50a55191
+DIST cockroach-v1.1.2.src.tgz 79607942 BLAKE2B 39ce9db2ada1c9a5727431438d4d8fe0d5a31af3161816ee7af672c69909aa6b4681edabdfabc332c00ba3b0a142ea7d700851c8833b80947fdbcc88b7fa2c7e SHA512 385e33ec30c23d84403938420a2fcd66edff02a5c4b9d6220ce3683d833f065010953fd78ee57120c24f2947509b2fd29eeee2a45fd3ad47c16a6c8d779534d2
+DIST cockroach-v1.1.3.src.tgz 79615899 BLAKE2B 86d9a63a5e5e8f21114dda500f30a007bf64769b76322fae282d06fa9eb63eb8a965bf990378c624ccac66124efadf1a0dfdebbc8dc8c6f04173e20334341e89 SHA512 f6dc4178e91fd47aec1fce658c9d621183f0bdcdc6101b87f8187757ab9b965c27e48d0d628dd9c10a386bc1a2f184d9d03270243baf0ec4758c812caac5fda1
+DIST cockroach-v2.0.1.src.tgz 45511681 BLAKE2B 9d0828e5e6bd41bb5590e58f0e18b8a07169335b9ff1284daf89b48dae6eea3cdb683bf8af703b5bac46978e8c37b4a092c53a3d7e18de626acc2095a7daf2a2 SHA512 ad7c64dc70cde6bbd10cabafe595ce35deeda9284880bebde75e41a4b1355aa85f01fb8c6b6ff0bae498b4b04a8d7d60bafc986c49875cff9ccf0ead0bc481a7
+EBUILD cockroach-1.0-r1.ebuild 1703 BLAKE2B 263b32177c96e6c5f4512c6eb60cbef7310fdbac297f5219f3e3d8ba708befe6ccc7a0eb43467c6dbc4c01542e5eddd899b01d61b0b6aa67fa3950d38b879767 SHA512 f9d54c7b9395e8ef6552211535641b9241df50d922f6c2e8c74c1782538ea25953c8c15fd89bf6ab17c6264b75bcfd23b5fd27ea9b4054f6579a2753b81c9eb3
+EBUILD cockroach-1.0.1.ebuild 1701 BLAKE2B e011a698cd2493fe26d24112a8ae8b9184ff66c7a1bcf25f6933c19374f036781ff093f7d84048c4df219aa93b66b4f3879af68b6835f9c02e62c503d8597841 SHA512 61ded57cbd28008a27b3b8a2e048a89a70be76317d350c29554ac0450de8932c275aedb63f6d032997013abb63b8a29aff4dae107bccf7876d7afe7ed14149df
+EBUILD cockroach-1.0.3.ebuild 1701 BLAKE2B f9e7fb748c2495586fc600dec992a0272cb89a39a48131ae687a469d1ffcda0b6fe5bad83751b514d8f3906c9f6defdfadb3175db34dbf0c9317143865c7cdbb SHA512 b1a0a2adb8555a227bdb9caff6a91efba4c010a82372b5ad446ab2feb9b68a98456b5b60c14513e5aeebae290a56fd936a8c17194821d12f2b910e8e0f3d1979
+EBUILD cockroach-1.0.ebuild 1689 BLAKE2B 1a9afdfb31ac9142f4a21cda3274eea404593ec8f529d01828da009a1c93f2dfe52fd5a467971dbb6f132b9e79aaf54d53720cdee3dd4b25c9768a12fafbd8ad SHA512 66a6c94d7804cdb62eaa66083961d40b2e2fb8d4bde08a084fedf4b57ac67eadb28d97dfd0087b3e5cefd6ab9d1ddf4ec7a05b5e7413d803a5cfbcc2ba0a733b
+EBUILD cockroach-1.0_rc1.ebuild 1593 BLAKE2B 511ff8271f507e055d792d98f12f1adce3eba73b15d198e4adf33d7ac1ba61eefa5c9a436ae8b1b474aac802e961205a49195187067f53320ffe038308a8df13 SHA512 6f273468fd5b869144d474027dd644a9031c18f1b18525c89775c9d8eacdeb59d64b195216189ebe6a2251973abc500b2f3047fc88af7d97aa9798c0db8fa16a
+EBUILD cockroach-1.1.2.ebuild 1701 BLAKE2B f9e7fb748c2495586fc600dec992a0272cb89a39a48131ae687a469d1ffcda0b6fe5bad83751b514d8f3906c9f6defdfadb3175db34dbf0c9317143865c7cdbb SHA512 b1a0a2adb8555a227bdb9caff6a91efba4c010a82372b5ad446ab2feb9b68a98456b5b60c14513e5aeebae290a56fd936a8c17194821d12f2b910e8e0f3d1979
+EBUILD cockroach-1.1.3.ebuild 1784 BLAKE2B a23a4d6971c40d68bd280917159ef280c534da3339a48ff1d60351ed63f78be331e323a2d311b3a051db072f4dac88dadf7cc460cd2a2f7f59d19dbc7656176d SHA512 48e34da012ea4ffe51278e2d921a6a93e444b9e4a07855664e468d966f867c341c478afa9ea1f41fb31fcb8f6f94e373811e6bea879a4042a3d23f05d24d220b
+EBUILD cockroach-2.0.1.ebuild 1820 BLAKE2B b16dd86cb9bb805db65d47c36bcab1942443942473b96c74c95a53ee55a1878e61247dc58945119bd6a09a1a0ac3bdc5cb9f9ec6fd28db2ab8acdea55b540ca2 SHA512 e8d4fac1f1463ea4643630662d92d187207fcd299bce5c92532ca184fdbf73981e98f07ce5ea56044f255f70a579a46bbfcd202f35a5b1563c0c7b842fddaca2
+MISC metadata.xml 409 BLAKE2B 0fa2933efa8102fa19917f3268b4424257f26efdd94698d22253ed62b562dddc53e09a9312069a9bcf817ccd3f6a0b4423c04c8d8dcbe387e7b30d727e8bdd0c SHA512 e4494324632e55e32fdfe7c1d1b25301b8f7cff3f7475efaf7c6c59d435777eab7245bb200b39b90121babce4e1573038fb0f42e586854a820e1489c1afddd19
diff --git a/dev-db/cockroach/cockroach-1.0-r1.ebuild b/dev-db/cockroach/cockroach-1.0-r1.ebuild
new file mode 100644
index 000000000000..4b19589a461b
--- /dev/null
+++ b/dev-db/cockroach/cockroach-1.0-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+MY_PV=v${PV}
+CHECKREQS_MEMORY="2G"
+
+inherit check-reqs toolchain-funcs user
+
+DESCRIPTION="open source database for building cloud services"
+HOMEPAGE="https://www.cockroachlabs.com"
+SRC_URI="https://binaries.cockroachdb.com/cockroach-${MY_PV}.src.tgz"
+
+LICENSE="Cockroach Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=">=app-arch/xz-utils-5.2.3
+ >=dev-lang/go-1.8.1
+ >=dev-util/cmake-3.8.1"
+
+S="${WORKDIR}/cockroach-${MY_PV}"
+
+pkg_pretend() {
+ check-reqs_pkg_pretend
+ if [[ ${MERGE_TYPE} != binary && $(gcc-major-version) -lt 6 ]]; then
+ eerror "Cockroach cannot be built with this version of gcc."
+ eerror "You need at least gcc-6.0"
+ die "Your C compiler is too old for this package."
+ fi
+}
+
+pkg_setup() {
+ check-reqs_pkg_setup
+ enewgroup cockroach
+ enewuser cockroach -1 /bin/sh /var/lib/cockroach cockroach
+}
+
+src_compile() {
+ emake GOPATH="${S}" build
+}
+
+src_install() {
+ dobin src/github.com/cockroachdb/cockroach/cockroach
+insinto /etc/security/limits.d
+newins "${FILESDIR}"/cockroach-limits.conf cockroach.conf
+newconfd "${FILESDIR}"/cockroach.confd-${PV} cockroach
+newinitd "${FILESDIR}"/cockroach.initd-${PV} cockroach
+dodir /var/log/cockroach
+fowners cockroach:cockroach /var/log/cockroach
+if [[ -z ${REPLACING_VERSIONS} ]]; then
+ ewarn "The default setup is for the first node of an insecure"
+ ewarn "cluster that only listens on localhost."
+ ewarn "Please read the cockroach manual at the following url"
+ ewarn "and configure /etc/conf.d/cockroach correctly if you"
+ ewarn "plan to use it in production."
+ ewarn
+ ewarn "http://cockroachlabs.com/docs"
+ fi
+}
diff --git a/dev-db/cockroach/cockroach-1.0.1.ebuild b/dev-db/cockroach/cockroach-1.0.1.ebuild
new file mode 100644
index 000000000000..212bede14658
--- /dev/null
+++ b/dev-db/cockroach/cockroach-1.0.1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+MY_PV=v${PV}
+CHECKREQS_MEMORY="2G"
+
+inherit check-reqs toolchain-funcs user
+
+DESCRIPTION="open source database for building cloud services"
+HOMEPAGE="https://www.cockroachlabs.com"
+SRC_URI="https://binaries.cockroachdb.com/cockroach-${MY_PV}.src.tgz"
+
+LICENSE="Cockroach Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=">=app-arch/xz-utils-5.2.3
+ >=dev-lang/go-1.8.1
+ >=dev-util/cmake-3.8.1"
+
+S="${WORKDIR}/cockroach-${MY_PV}"
+
+pkg_pretend() {
+ check-reqs_pkg_pretend
+ if [[ ${MERGE_TYPE} != binary && $(gcc-major-version) -lt 6 ]]; then
+ eerror "Cockroach cannot be built with this version of gcc."
+ eerror "You need at least gcc-6.0"
+ die "Your C compiler is too old for this package."
+ fi
+}
+
+pkg_setup() {
+ check-reqs_pkg_setup
+ enewgroup cockroach
+ enewuser cockroach -1 /bin/sh /var/lib/cockroach cockroach
+}
+
+src_compile() {
+ emake GOPATH="${S}" build
+}
+
+src_install() {
+ dobin src/github.com/cockroachdb/cockroach/cockroach
+insinto /etc/security/limits.d
+newins "${FILESDIR}"/cockroach-limits.conf cockroach.conf
+newconfd "${FILESDIR}"/cockroach.confd-1.0 cockroach
+newinitd "${FILESDIR}"/cockroach.initd-${PV} cockroach
+dodir /var/log/cockroach
+fowners cockroach:cockroach /var/log/cockroach
+if [[ -z ${REPLACING_VERSIONS} ]]; then
+ ewarn "The default setup is for the first node of an insecure"
+ ewarn "cluster that only listens on localhost."
+ ewarn "Please read the cockroach manual at the following url"
+ ewarn "and configure /etc/conf.d/cockroach correctly if you"
+ ewarn "plan to use it in production."
+ ewarn
+ ewarn "http://cockroachlabs.com/docs"
+ fi
+}
diff --git a/dev-db/cockroach/cockroach-1.0.3.ebuild b/dev-db/cockroach/cockroach-1.0.3.ebuild
new file mode 100644
index 000000000000..0b0e1d9f89d0
--- /dev/null
+++ b/dev-db/cockroach/cockroach-1.0.3.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+MY_PV=v${PV}
+CHECKREQS_MEMORY="2G"
+
+inherit check-reqs toolchain-funcs user
+
+DESCRIPTION="open source database for building cloud services"
+HOMEPAGE="https://www.cockroachlabs.com"
+SRC_URI="https://binaries.cockroachdb.com/cockroach-${MY_PV}.src.tgz"
+
+LICENSE="Cockroach Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=">=app-arch/xz-utils-5.2.3
+ >=dev-lang/go-1.8.3
+ >=dev-util/cmake-3.8.1"
+
+S="${WORKDIR}/cockroach-${MY_PV}"
+
+pkg_pretend() {
+ check-reqs_pkg_pretend
+ if [[ ${MERGE_TYPE} != binary && $(gcc-major-version) -lt 6 ]]; then
+ eerror "Cockroach cannot be built with this version of gcc."
+ eerror "You need at least gcc-6.0"
+ die "Your C compiler is too old for this package."
+ fi
+}
+
+pkg_setup() {
+ check-reqs_pkg_setup
+ enewgroup cockroach
+ enewuser cockroach -1 /bin/sh /var/lib/cockroach cockroach
+}
+
+src_compile() {
+ emake GOPATH="${S}" build
+}
+
+src_install() {
+ dobin src/github.com/cockroachdb/cockroach/cockroach
+insinto /etc/security/limits.d
+newins "${FILESDIR}"/cockroach-limits.conf cockroach.conf
+newconfd "${FILESDIR}"/cockroach.confd-1.0 cockroach
+newinitd "${FILESDIR}"/cockroach.initd-1.0.1 cockroach
+dodir /var/log/cockroach
+fowners cockroach:cockroach /var/log/cockroach
+if [[ -z ${REPLACING_VERSIONS} ]]; then
+ ewarn "The default setup is for the first node of an insecure"
+ ewarn "cluster that only listens on localhost."
+ ewarn "Please read the cockroach manual at the following url"
+ ewarn "and configure /etc/conf.d/cockroach correctly if you"
+ ewarn "plan to use it in production."
+ ewarn
+ ewarn "http://cockroachlabs.com/docs"
+ fi
+}
diff --git a/dev-db/cockroach/cockroach-1.0.ebuild b/dev-db/cockroach/cockroach-1.0.ebuild
new file mode 100644
index 000000000000..c7253935686f
--- /dev/null
+++ b/dev-db/cockroach/cockroach-1.0.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+MY_PV=v${PV}
+CHECKREQS_MEMORY="2G"
+
+inherit check-reqs toolchain-funcs user
+
+DESCRIPTION="open source database for building cloud services"
+HOMEPAGE="https://www.cockroachlabs.com"
+SRC_URI="https://binaries.cockroachdb.com/cockroach-${MY_PV}.src.tgz"
+
+LICENSE="Cockroach Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=">=app-arch/xz-utils-5.2.3
+ >=dev-lang/go-1.8.1
+ >=dev-util/cmake-3.8.1"
+
+S="${WORKDIR}/cockroach-${MY_PV}"
+
+pkg_pretend() {
+ check-reqs_pkg_pretend
+ if [[ ${MERGE_TYPE} != binary && $(gcc-major-version) -lt 6 ]]; then
+ eerror "Cockroach cannot be built with this version of gcc."
+ eerror "You need at least gcc-6.0"
+ die "Your C compiler is too old for this package."
+ fi
+}
+
+pkg_setup() {
+ check-reqs_pkg_setup
+ enewgroup cockroach
+ enewuser cockroach -1 /bin/sh /var/lib/cockroach cockroach
+}
+
+src_compile() {
+ emake GOPATH="${S}" build
+}
+
+src_install() {
+ dobin src/github.com/cockroachdb/cockroach/cockroach
+insinto /etc/security/limits.d
+newins "${FILESDIR}"/cockroach-limits.conf cockroach.conf
+newconfd "${FILESDIR}"/cockroach.confd cockroach
+newinitd "${FILESDIR}"/cockroach.initd cockroach
+dodir /var/log/cockroach
+fowners cockroach:cockroach /var/log/cockroach
+if [[ -z ${REPLACING_VERSIONS} ]]; then
+ ewarn "The default setup is for the first node of an insecure"
+ ewarn "cluster that only listens on localhost."
+ ewarn "Please read the cockroach manual at the following url"
+ ewarn "and configure /etc/conf.d/cockroach correctly if you"
+ ewarn "plan to use it in production."
+ elog
+ elog "http://cockroachlabs.com/docs"
+ fi
+}
diff --git a/dev-db/cockroach/cockroach-1.0_rc1.ebuild b/dev-db/cockroach/cockroach-1.0_rc1.ebuild
new file mode 100644
index 000000000000..7ce069fb3180
--- /dev/null
+++ b/dev-db/cockroach/cockroach-1.0_rc1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+MY_PV=v1.0-rc.1
+CHECKREQS_MEMORY="2G"
+
+inherit check-reqs toolchain-funcs user
+
+DESCRIPTION="open source database for building cloud services"
+HOMEPAGE="https://www.cockroachlabs.com"
+SRC_URI="https://binaries.cockroachdb.com/cockroach-${MY_PV}.src.tgz"
+
+LICENSE="Cockroach Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=">=dev-lang/go-1.8.1"
+
+S="${WORKDIR}/cockroach-${MY_PV}"
+
+pkg_pretend() {
+ check-reqs_pkg_pretend
+ if [[ ${MERGE_TYPE} != binary && $(gcc-major-version) -lt 6 ]]; then
+ eerror "Cockroach cannot be built with this version of gcc."
+ eerror "You need at least gcc-6.0"
+ die "Your C compiler is too old for this package."
+ fi
+}
+
+pkg_setup() {
+ check-reqs_pkg_setup
+ enewgroup cockroach
+ enewuser cockroach -1 /bin/sh /var/lib/cockroach cockroach
+}
+
+src_compile() {
+ emake GOPATH="${S}" build || die
+}
+
+src_install() {
+ emake GOPATH="${S}" install || die
+dobin bin/*
+insinto /etc/security/limits.d
+newins "${FILESDIR}"/cockroach-limits.conf cockroach.conf
+newinitd "${FILESDIR}"/cockroach.initd cockroach
+dodir /var/log/cockroach
+fowners cockroach:cockroach /var/log/cockroach
+if [[ -z ${REPLACING_VERSIONS} ]]; then
+ ewarn "The default setup is for the first node of an insecure"
+ ewarn "cluster that only listens on localhost."
+ ewarn "Please read the cockroach manual at the following url"
+ ewarn "and configure /etc/conf.d/cockroach correctly if you"
+ ewarn "plan to use it in production."
+ elog
+ elog "http://cockroachlabs.com/docs"
+ fi
+}
diff --git a/dev-db/cockroach/cockroach-1.1.2.ebuild b/dev-db/cockroach/cockroach-1.1.2.ebuild
new file mode 100644
index 000000000000..0b0e1d9f89d0
--- /dev/null
+++ b/dev-db/cockroach/cockroach-1.1.2.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+MY_PV=v${PV}
+CHECKREQS_MEMORY="2G"
+
+inherit check-reqs toolchain-funcs user
+
+DESCRIPTION="open source database for building cloud services"
+HOMEPAGE="https://www.cockroachlabs.com"
+SRC_URI="https://binaries.cockroachdb.com/cockroach-${MY_PV}.src.tgz"
+
+LICENSE="Cockroach Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=">=app-arch/xz-utils-5.2.3
+ >=dev-lang/go-1.8.3
+ >=dev-util/cmake-3.8.1"
+
+S="${WORKDIR}/cockroach-${MY_PV}"
+
+pkg_pretend() {
+ check-reqs_pkg_pretend
+ if [[ ${MERGE_TYPE} != binary && $(gcc-major-version) -lt 6 ]]; then
+ eerror "Cockroach cannot be built with this version of gcc."
+ eerror "You need at least gcc-6.0"
+ die "Your C compiler is too old for this package."
+ fi
+}
+
+pkg_setup() {
+ check-reqs_pkg_setup
+ enewgroup cockroach
+ enewuser cockroach -1 /bin/sh /var/lib/cockroach cockroach
+}
+
+src_compile() {
+ emake GOPATH="${S}" build
+}
+
+src_install() {
+ dobin src/github.com/cockroachdb/cockroach/cockroach
+insinto /etc/security/limits.d
+newins "${FILESDIR}"/cockroach-limits.conf cockroach.conf
+newconfd "${FILESDIR}"/cockroach.confd-1.0 cockroach
+newinitd "${FILESDIR}"/cockroach.initd-1.0.1 cockroach
+dodir /var/log/cockroach
+fowners cockroach:cockroach /var/log/cockroach
+if [[ -z ${REPLACING_VERSIONS} ]]; then
+ ewarn "The default setup is for the first node of an insecure"
+ ewarn "cluster that only listens on localhost."
+ ewarn "Please read the cockroach manual at the following url"
+ ewarn "and configure /etc/conf.d/cockroach correctly if you"
+ ewarn "plan to use it in production."
+ ewarn
+ ewarn "http://cockroachlabs.com/docs"
+ fi
+}
diff --git a/dev-db/cockroach/cockroach-1.1.3.ebuild b/dev-db/cockroach/cockroach-1.1.3.ebuild
new file mode 100644
index 000000000000..f2e69031d86f
--- /dev/null
+++ b/dev-db/cockroach/cockroach-1.1.3.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+MY_PV=v${PV}
+CHECKREQS_MEMORY="2G"
+
+inherit check-reqs toolchain-funcs user
+
+DESCRIPTION="open source database for building cloud services"
+HOMEPAGE="https://www.cockroachlabs.com"
+SRC_URI="https://binaries.cockroachdb.com/cockroach-${MY_PV}.src.tgz"
+
+LICENSE="Cockroach Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=">=app-arch/xz-utils-5.2.3
+ >=dev-lang/go-1.8.3
+ >=dev-util/cmake-3.8.1"
+
+S="${WORKDIR}/cockroach-${MY_PV}"
+
+pkg_pretend() {
+ check-reqs_pkg_pretend
+ if [[ ${MERGE_TYPE} != binary && $(gcc-major-version) -lt 6 ]]; then
+ eerror "Cockroach cannot be built with this version of gcc."
+ eerror "You need at least gcc-6.0"
+ die "Your C compiler is too old for this package."
+ fi
+}
+
+pkg_setup() {
+ check-reqs_pkg_setup
+ enewgroup cockroach
+ enewuser cockroach -1 /bin/sh /var/lib/cockroach cockroach
+}
+
+src_compile() {
+ # workaround for https://github.com/cockroachdb/cockroach/issues/20596
+ unset CMAKE_MODULE_PATH
+ emake build
+}
+
+src_install() {
+ dobin src/github.com/cockroachdb/cockroach/cockroach
+insinto /etc/security/limits.d
+newins "${FILESDIR}"/cockroach-limits.conf cockroach.conf
+newconfd "${FILESDIR}"/cockroach.confd-1.0 cockroach
+newinitd "${FILESDIR}"/cockroach.initd-1.0.1 cockroach
+dodir /var/log/cockroach
+fowners cockroach:cockroach /var/log/cockroach
+if [[ -z ${REPLACING_VERSIONS} ]]; then
+ ewarn "The default setup is for the first node of an insecure"
+ ewarn "cluster that only listens on localhost."
+ ewarn "Please read the cockroach manual at the following url"
+ ewarn "and configure /etc/conf.d/cockroach correctly if you"
+ ewarn "plan to use it in production."
+ ewarn
+ ewarn "http://cockroachlabs.com/docs"
+ fi
+}
diff --git a/dev-db/cockroach/cockroach-2.0.1.ebuild b/dev-db/cockroach/cockroach-2.0.1.ebuild
new file mode 100644
index 000000000000..6549c0aea3b0
--- /dev/null
+++ b/dev-db/cockroach/cockroach-2.0.1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+MY_PV=v${PV}
+CHECKREQS_MEMORY="2G"
+
+inherit check-reqs toolchain-funcs user
+
+DESCRIPTION="open source database for building cloud services"
+HOMEPAGE="https://www.cockroachlabs.com"
+SRC_URI="https://binaries.cockroachdb.com/cockroach-${MY_PV}.src.tgz"
+
+LICENSE="Cockroach Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=">=app-arch/xz-utils-5.2.3
+ >=dev-lang/go-1.8.3
+ >=dev-util/cmake-3.8.1"
+
+S="${WORKDIR}/cockroach-${MY_PV}"
+
+QA_EXECSTACK="usr/bin/cockroach"
+
+pkg_pretend() {
+ check-reqs_pkg_pretend
+ if [[ ${MERGE_TYPE} != binary && $(gcc-major-version) -lt 6 ]]; then
+ eerror "Cockroach cannot be built with this version of gcc."
+ eerror "You need at least gcc-6.0"
+ die "Your C compiler is too old for this package."
+ fi
+}
+
+pkg_setup() {
+ check-reqs_pkg_setup
+ enewgroup cockroach
+ enewuser cockroach -1 /bin/sh /var/lib/cockroach cockroach
+}
+
+src_compile() {
+ # workaround for https://github.com/cockroachdb/cockroach/issues/20596
+ unset CMAKE_MODULE_PATH
+ emake build
+}
+
+src_install() {
+ dobin src/github.com/cockroachdb/cockroach/cockroach
+insinto /etc/security/limits.d
+newins "${FILESDIR}"/cockroach-limits.conf cockroach.conf
+newconfd "${FILESDIR}"/cockroach.confd-1.0 cockroach
+newinitd "${FILESDIR}"/cockroach.initd-1.0.1 cockroach
+keepdir /var/log/cockroach
+fowners cockroach:cockroach /var/log/cockroach
+if [[ -z ${REPLACING_VERSIONS} ]]; then
+ ewarn "The default setup is for the first node of an insecure"
+ ewarn "cluster that only listens on localhost."
+ ewarn "Please read the cockroach manual at the following url"
+ ewarn "and configure /etc/conf.d/cockroach correctly if you"
+ ewarn "plan to use it in production."
+ ewarn
+ ewarn "http://cockroachlabs.com/docs"
+ fi
+}
diff --git a/dev-db/cockroach/files/cockroach-limits.conf b/dev-db/cockroach/files/cockroach-limits.conf
new file mode 100644
index 000000000000..2014a5d508cb
--- /dev/null
+++ b/dev-db/cockroach/files/cockroach-limits.conf
@@ -0,0 +1,4 @@
+# This is needed because cockroach can open a high number of file
+# descriptors
+cockroach soft nofile 35000
+cockroach hard nofile 35000
diff --git a/dev-db/cockroach/files/cockroach.confd b/dev-db/cockroach/files/cockroach.confd
new file mode 100644
index 000000000000..37593e217c71
--- /dev/null
+++ b/dev-db/cockroach/files/cockroach.confd
@@ -0,0 +1,14 @@
+# The default setup is for the first node of an insecure cluster that only
+# listens on localhost.
+# Please read the cockroach manual at the following url and configure
+# the start_args and stop_args correctly if you plan to use cockroach in
+# production.
+#
+# http://cockroachlabs.com/docs
+#
+# arguments to use when starting the database
+start_args="--http-host=localhost --host=localhost --insecure
+--store=/var/lib/cockroach/data"
+#
+# arguments to use when stopping the database
+stop_args="--host localhost --insecure"
diff --git a/dev-db/cockroach/files/cockroach.confd-1.0 b/dev-db/cockroach/files/cockroach.confd-1.0
new file mode 100644
index 000000000000..7874cc1cab23
--- /dev/null
+++ b/dev-db/cockroach/files/cockroach.confd-1.0
@@ -0,0 +1,45 @@
+# The default setup is for the first node of an insecure cluster that only
+# listens on localhost.
+#
+# Please read the cockroach manual at the following url and configure
+# this file correctly if you plan to use cockroach in production.
+#
+# http://cockroachlabs.com/docs
+#
+#For more information about what the arguments mean, run
+#"cockroach start --help" or "cockroach quit --help".
+#
+#These values are passed to the appropriate arguments when starting or
+#stopping the cockroach database.
+#Leaving these commented accepts the cockroach defaults with the
+#exceptions of host, http_host, insecure and log_path.
+#
+#The default for host and http_host is localhost instead of the catch-all
+#address. If you want to use the catch-all address for either of these,
+#please use
+# "all" for the setting. #
+#
+# The default for insecure is yes which passes the --insecure argument to
+# cockroach. If you want a secure connection, set insecure=no and set
+# certs_path to the location of your certificates.
+#
+#log_path defaults to /var/log/${RC_SVCNAME}.
+#
+#attrs=""
+#cache=""
+#certs_path=""
+#host=""
+#http_host=""
+#http_port=""
+#insecure=""
+#join=""
+#locality=""
+#log_path=""
+#port=""
+#store=""
+#
+# extra arguments to use when starting the database
+# start_args=""
+#
+# extra arguments to use when stopping the database
+# stop_args=""
diff --git a/dev-db/cockroach/files/cockroach.initd b/dev-db/cockroach/files/cockroach.initd
new file mode 100644
index 000000000000..3629cb6605fa
--- /dev/null
+++ b/dev-db/cockroach/files/cockroach.initd
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command="/usr/bin/cockroach"
+pidfile=/run/cockroach/cockroach.pid
+command_args="start --background --log-dir=/var/log/cockroach
+ --pid-file=\"${pidfile}\" ${start_args}"
+start_stop_daemon_args="--quiet --user cockroach"
+
+depend() {
+ use net
+}
+
+start_pre() {
+ checkpath -d -m 0755 -o cockroach:cockroach $(dirname ${pidfile})
+}
+
+stop() {
+ebegin "bringing down ${RC_SVCNAME}"
+"${command}" quit ${stop_args}
+eend $?
+}
diff --git a/dev-db/cockroach/files/cockroach.initd-1.0 b/dev-db/cockroach/files/cockroach.initd-1.0
new file mode 100644
index 000000000000..b2b4f6a0884f
--- /dev/null
+++ b/dev-db/cockroach/files/cockroach.initd-1.0
@@ -0,0 +1,60 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command=/usr/bin/cockroach
+pidfile=/run/${RC_SVCNAME}/cockroach.pid
+start_stop_daemon_args="--quiet --user cockroach"
+[ -n "${attrs}" ] && attrs_arg="--attrs=${attrs}"
+[ -n "${cache}" ] && cache_arg="--cache=${cache}"
+[ -n "${certs_path}" ] && certs_dir_arg="--certs-dir=${certs_path}"
+[ "${host}" != all ] && host_arg="--host=${host:-localhost}"
+[ "$http_host" != all ] && http_host_arg="--http-host=${http_host:-localhost}"
+[ -n "${http_port}" ] && http_port_arg="--http-port=${http_port}"
+yesno "${insecure:-yes}" && insecure_arg="--insecure"
+[ -n "${join}" ] && join_arg="--join=${join}"
+[ -n "${locality}" ] && locality_arg="--locality=\"${locality}\""
+log_path="${log_path:-/var/log/${RC_SVCNAME}}"
+[ -n "${log_path}" ] && log_dir_arg="--log-dir=${log_path}"
+ pidfile_arg="--pid-file=${pidfile}"
+[ -n "${port}" ] && port_arg="--port=${port}"
+store_arg="--store=${store:-/var/lib/cockroach/data}"
+command_args="start --background
+ ${attrs_arg}
+ ${cache_arg}
+ ${certs_dir_arg}
+ ${host_arg}
+ ${http_host_arg}
+ ${http_port_arg}
+ ${insecure_arg}
+ ${join_arg}
+ ${locality_arg}
+ ${log_dir_arg}
+ ${pidfile_arg}
+ ${port_arg}
+ ${store_arg}
+ ${start_args}"
+quit_args="
+ ${certs_dir_arg}
+ ${host_arg}
+ ${insecure_arg}
+ ${port_arg}
+ "
+
+depend() {
+ use net
+}
+
+start_pre() {
+ if [ -n "${log_path}" ]; then
+ checkpath -d -m 0755 -o cockroach:cockroach "${log_path}" ||
+ return 1
+ fi
+ checkpath -d -m 0755 -o cockroach:cockroach "$(dirname ${pidfile})"
+}
+
+stop() {
+ebegin "bringing down ${RC_SVCNAME}"
+eval ${command} quit ${quit_args} ${stop_args}
+eend $?
+}
diff --git a/dev-db/cockroach/files/cockroach.initd-1.0.1 b/dev-db/cockroach/files/cockroach.initd-1.0.1
new file mode 100644
index 000000000000..252fc6bf7bb8
--- /dev/null
+++ b/dev-db/cockroach/files/cockroach.initd-1.0.1
@@ -0,0 +1,70 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command=/usr/bin/cockroach
+pidfile=/run/${RC_SVCNAME}/cockroach.pid
+start_stop_daemon_args="--quiet --user cockroach"
+[ -n "${attrs}" ] && attrs_arg="--attrs=${attrs}"
+[ -n "${cache}" ] && cache_arg="--cache=${cache}"
+[ -n "${certs_path}" ] && certs_dir_arg="--certs-dir=${certs_path}"
+[ "${host}" != all ] && host_arg="--host=${host:-localhost}"
+[ "$http_host" != all ] && http_host_arg="--http-host=${http_host:-localhost}"
+[ -n "${http_port}" ] && http_port_arg="--http-port=${http_port}"
+yesno "${insecure:-yes}" && insecure_arg="--insecure"
+[ -n "${join}" ] && join_arg="--join=${join}"
+[ -n "${locality}" ] && locality_arg="--locality=\"${locality}\""
+log_path="${log_path:-/var/log/${RC_SVCNAME}}"
+[ -n "${log_path}" ] && log_dir_arg="--log-dir=${log_path}"
+ pidfile_arg="--pid-file=${pidfile}"
+[ -n "${port}" ] && port_arg="--port=${port}"
+store_arg="--store=${store:-/var/lib/cockroach/data}"
+command_args="start --background
+ ${attrs_arg}
+ ${cache_arg}
+ ${certs_dir_arg}
+ ${host_arg}
+ ${http_host_arg}
+ ${http_port_arg}
+ ${insecure_arg}
+ ${join_arg}
+ ${locality_arg}
+ ${log_dir_arg}
+ ${pidfile_arg}
+ ${port_arg}
+ ${store_arg}
+ ${start_args}"
+quit_args="
+ ${certs_dir_arg}
+ ${host_arg}
+ ${insecure_arg}
+ ${port_arg}
+ "
+
+depend() {
+ use net
+}
+
+start_pre() {
+ if [ -n "${log_path}" ]; then
+ checkpath -d -m 0755 -o cockroach:cockroach "${log_path}" ||
+ return 1
+ fi
+ checkpath -d -m 0755 -o cockroach:cockroach "$(dirname ${pidfile})"
+}
+
+stop() {
+ebegin "bringing down ${RC_SVCNAME}"
+eval ${command} quit ${quit_args} ${stop_args}
+eend $?
+}
+
+stop_post() {
+ local cr_pid
+ read -r cr_pid < "${pidfile}"
+ while [ -d /proc/"${cr_pid}" ]; do
+ sleep 1
+ done
+ rm -f "${pidfile}"
+ return 0
+}
diff --git a/dev-db/cockroach/metadata.xml b/dev-db/cockroach/metadata.xml
new file mode 100644
index 000000000000..b02140041af5
--- /dev/null
+++ b/dev-db/cockroach/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>williamh@gentoo.org</email>
+ <name>William Hubbs</name>
+ </maintainer>
+ <longdescription lang="en">
+ CockroachDB is an open source database for building global, scalable
+ cloud services that survive disasters.
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-db/couchdb-1.7.1 b/dev-db/couchdb-1.7.1
deleted file mode 100644
index c1bf68da0db4..000000000000
--- a/dev-db/couchdb-1.7.1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup test
-DEPEND=>=dev-libs/icu-4.3.1:= <dev-lang/erlang-21.0[ssl] !libressl? ( >=dev-libs/openssl-0.9.8j:0 ) libressl? ( dev-libs/libressl ) >=net-misc/curl-7.18.2 <dev-lang/spidermonkey-1.8.7 selinux? ( sec-policy/selinux-couchdb ) sys-devel/autoconf-archive >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=Distributed, fault-tolerant and schema-free document-oriented database
-EAPI=5
-HOMEPAGE=https://couchdb.apache.org/
-IUSE=libressl selinux test
-KEYWORDS=amd64 ppc x86
-LICENSE=Apache-2.0
-RDEPEND=>=dev-libs/icu-4.3.1:= <dev-lang/erlang-21.0[ssl] !libressl? ( >=dev-libs/openssl-0.9.8j:0 ) libressl? ( dev-libs/libressl ) >=net-misc/curl-7.18.2 <dev-lang/spidermonkey-1.8.7 selinux? ( sec-policy/selinux-couchdb )
-RESTRICT=test
-SLOT=0
-SRC_URI=mirror://apache/couchdb/source/1.7.1/apache-couchdb-1.7.1.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=fe2711490397999bab5fca188c35f61b
diff --git a/dev-db/couchdb-1.7.2 b/dev-db/couchdb-1.7.2
deleted file mode 100644
index 900f0756ad58..000000000000
--- a/dev-db/couchdb-1.7.2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup test
-DEPEND=>=dev-libs/icu-4.3.1:= <dev-lang/erlang-21.0[ssl] !libressl? ( >=dev-libs/openssl-0.9.8j:0 ) libressl? ( dev-libs/libressl ) >=net-misc/curl-7.18.2 <dev-lang/spidermonkey-1.8.7 selinux? ( sec-policy/selinux-couchdb ) sys-devel/autoconf-archive >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=Distributed, fault-tolerant and schema-free document-oriented database
-EAPI=5
-HOMEPAGE=https://couchdb.apache.org/
-IUSE=libressl selinux test
-KEYWORDS=~amd64 ~ppc ~x86
-LICENSE=Apache-2.0
-RDEPEND=>=dev-libs/icu-4.3.1:= <dev-lang/erlang-21.0[ssl] !libressl? ( >=dev-libs/openssl-0.9.8j:0 ) libressl? ( dev-libs/libressl ) >=net-misc/curl-7.18.2 <dev-lang/spidermonkey-1.8.7 selinux? ( sec-policy/selinux-couchdb )
-RESTRICT=test
-SLOT=0
-SRC_URI=mirror://apache/couchdb/source/1.7.2/apache-couchdb-1.7.2.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=5ce0f1f59ffd4ef5b79b0d65f1992f97
diff --git a/dev-db/couchdb/Manifest b/dev-db/couchdb/Manifest
new file mode 100644
index 000000000000..a0ef35d17ac9
--- /dev/null
+++ b/dev-db/couchdb/Manifest
@@ -0,0 +1,7 @@
+AUX couchdb.conf-2 234 BLAKE2B ced08a5fc870703da6ab1e743cb421e7f1d5e8831923dc9115e708c728b27955650e69e323567bf6ad0041eca968f6cf152e097b962d496450ac90fd3d4f6d38 SHA512 5c40927957362a7431be6980be3a239e4ee0ca47d28f1b4d4fb3014b307e459eb429f5b50e0c8aa58b3e9f2285371616a58f06207e272feae1bed33f8c32d836
+AUX couchdb.init-4 439 BLAKE2B 4b334d42238616a1bfef41f915e7e42038457b6e52b713af698aa625dcf8364008d2e0763b1b5c90bd01121778447a86646730836bacc4cafe3477bec99b77f7 SHA512 a1e0a9403082e1c336454584d78d15e5d76861b3b3d0e56fcfb25ab50c0dbbdcf658e251e25f22e2a58dc72f38ec16ce82759bf9c7b5330a569ffb5fab912999
+DIST apache-couchdb-1.7.1.tar.gz 9963069 BLAKE2B 69a3f835f6a7b5752e4707b02edfa726cfdb76813e36e570566641b999eea556ff788b0ca8ce1e66beb819119d90e387beab3bba8618e3b7a606870794307fef SHA512 cd7417ef4b1eaeb1fe4251b559d904238fd25881c542f1498e6e9f1c4a55a79e34e06e711f90ce39e5e65fcac8be9c611943b8ed57d4a7465859b5811ac0a21f
+DIST apache-couchdb-1.7.2.tar.gz 10009424 BLAKE2B 3d3b4922fe5b2c55e4851e48993442ba23369753fb17d5cafba936947624af0d3dac70e0a23d0c22c79e7e2776a3a441d5b1020a4a420b7d9a621fb59aad48d9 SHA512 507a35a7f1e826b1562eec86146cc6fcff3c65fa7762f9742e6e8fdacfca735473105772757624183778f7a532c742f6644b301677607bb81c1f3f0ceb742867
+EBUILD couchdb-1.7.1.ebuild 1833 BLAKE2B 40ee843a46d254f64cf4b7de9927db335f2c928f8ceca249b8cdfc3e45dc5051a28da81a8bbd286f9a0e45ece27b0a21872067f59c5fff50ecf9792fec795b83 SHA512 48561428b5da0cf6afc118c782e9d627dc82208e7bc9825cdf186e51c746d0bca6040dac52586b56d42f4ecb01d08fb7b12c431641a23de47cd814a2648372f0
+EBUILD couchdb-1.7.2.ebuild 1836 BLAKE2B c81914a8a268c5eb31dcfe749ed7c7358c8c16271a3123c6277532ae5879808753c7e987c9f8e2ae43cfc72f6cd3d2f9a5933228f1b9906166efb7be79e6e409 SHA512 6bcec0fbccbf094fba27136fd9931a584905952b8752bedcdd56cb2d52c46da3ee3884bbf25bc15390f8cf68f39a36f2441d7a6a2a337393a0efeab32de0f41d
+MISC metadata.xml 212 BLAKE2B 99a9c24bc730c412eb431bd6853c25ac91329aa9be6e6db58f56e4831aa66fd93d779c08f3569ec7c5b45940bc23d0cb90c508605d27e502d2b9a70ca436d7ba SHA512 e4f4b6dbbf6bf039ff5c19bb6a209ad4e0b1286f8cf7cc0cbafcc04fcf93fb92766c8cae06ff19f980a069c7fe9a1686437ab215f84ce10e301275ae107d00bd
diff --git a/dev-db/couchdb/couchdb-1.7.1.ebuild b/dev-db/couchdb/couchdb-1.7.1.ebuild
new file mode 100644
index 000000000000..a86f1de84856
--- /dev/null
+++ b/dev-db/couchdb/couchdb-1.7.1.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils multilib pax-utils user
+
+DESCRIPTION="Distributed, fault-tolerant and schema-free document-oriented database"
+HOMEPAGE="https://couchdb.apache.org/"
+SRC_URI="mirror://apache/couchdb/source/${PV}/apache-${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="libressl selinux test"
+
+RDEPEND=">=dev-libs/icu-4.3.1:=
+ <dev-lang/erlang-21.0[ssl]
+ !libressl? ( >=dev-libs/openssl-0.9.8j:0 )
+ libressl? ( dev-libs/libressl )
+ >=net-misc/curl-7.18.2
+ <dev-lang/spidermonkey-1.8.7
+ selinux? ( sec-policy/selinux-couchdb )"
+
+DEPEND="${RDEPEND}
+ sys-devel/autoconf-archive"
+RESTRICT=test
+
+S="${WORKDIR}/apache-${P}"
+
+pkg_setup() {
+ enewgroup couchdb
+ enewuser couchdb -1 -1 /var/lib/couchdb couchdb
+}
+
+src_prepare() {
+ sed -i ./src/couchdb/priv/Makefile.* -e 's|-Werror||g'
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --with-erlang="${EPREFIX}"/usr/$(get_libdir)/erlang/usr/include \
+ --localstatedir="${EPREFIX}"/var \
+ --with-js-lib="${EPREFIX}"/usr/$(get_libdir)
+ # bug 296609, upstream bug #COUCHDB-621
+ sed -e "s#localdocdir = /usr/share/doc/couchdb#localdocdir = "${EPREFIX}"/usr/share/doc/${PF}#" -i Makefile || die "sed failed"
+}
+
+src_compile() {
+ emake
+ # bug 442616
+ pax-mark mr src/couchdb/priv/couchjs
+}
+
+src_test() {
+ emake distcheck
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ fowners couchdb:couchdb \
+ /var/lib/couchdb \
+ /var/log/couchdb
+
+ for f in "${ED}"/etc/couchdb/*.ini ; do
+ fowners root:couchdb "${f#${ED}}"
+ fperms 660 "${f#${ED}}"
+ done
+ fperms 664 /etc/couchdb/default.ini
+
+ newinitd "${FILESDIR}/couchdb.init-4" couchdb
+ newconfd "${FILESDIR}/couchdb.conf-2" couchdb
+
+ sed -i -e "s:LIBDIR:$(get_libdir):" "${ED}/etc/conf.d/couchdb"
+}
diff --git a/dev-db/couchdb/couchdb-1.7.2.ebuild b/dev-db/couchdb/couchdb-1.7.2.ebuild
new file mode 100644
index 000000000000..b429e0313ae9
--- /dev/null
+++ b/dev-db/couchdb/couchdb-1.7.2.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils multilib pax-utils user
+
+DESCRIPTION="Distributed, fault-tolerant and schema-free document-oriented database"
+HOMEPAGE="https://couchdb.apache.org/"
+SRC_URI="mirror://apache/couchdb/source/${PV}/apache-${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="libressl selinux test"
+
+RDEPEND=">=dev-libs/icu-4.3.1:=
+ <dev-lang/erlang-21.0[ssl]
+ !libressl? ( >=dev-libs/openssl-0.9.8j:0 )
+ libressl? ( dev-libs/libressl )
+ >=net-misc/curl-7.18.2
+ <dev-lang/spidermonkey-1.8.7
+ selinux? ( sec-policy/selinux-couchdb )"
+
+DEPEND="${RDEPEND}
+ sys-devel/autoconf-archive"
+RESTRICT=test
+
+S="${WORKDIR}/apache-${P}"
+
+pkg_setup() {
+ enewgroup couchdb
+ enewuser couchdb -1 -1 /var/lib/couchdb couchdb
+}
+
+src_prepare() {
+ sed -i ./src/couchdb/priv/Makefile.* -e 's|-Werror||g'
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --with-erlang="${EPREFIX}"/usr/$(get_libdir)/erlang/usr/include \
+ --localstatedir="${EPREFIX}"/var \
+ --with-js-lib="${EPREFIX}"/usr/$(get_libdir)
+ # bug 296609, upstream bug #COUCHDB-621
+ sed -e "s#localdocdir = /usr/share/doc/couchdb#localdocdir = "${EPREFIX}"/usr/share/doc/${PF}#" -i Makefile || die "sed failed"
+}
+
+src_compile() {
+ emake
+ # bug 442616
+ pax-mark mr src/couchdb/priv/couchjs
+}
+
+src_test() {
+ emake distcheck
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ fowners couchdb:couchdb \
+ /var/lib/couchdb \
+ /var/log/couchdb
+
+ for f in "${ED}"/etc/couchdb/*.ini ; do
+ fowners root:couchdb "${f#${ED}}"
+ fperms 660 "${f#${ED}}"
+ done
+ fperms 664 /etc/couchdb/default.ini
+
+ newinitd "${FILESDIR}/couchdb.init-4" couchdb
+ newconfd "${FILESDIR}/couchdb.conf-2" couchdb
+
+ sed -i -e "s:LIBDIR:$(get_libdir):" "${ED}/etc/conf.d/couchdb"
+}
diff --git a/dev-db/couchdb/files/couchdb.conf-2 b/dev-db/couchdb/files/couchdb.conf-2
new file mode 100644
index 000000000000..94d50b35f33d
--- /dev/null
+++ b/dev-db/couchdb/files/couchdb.conf-2
@@ -0,0 +1,9 @@
+# Options for CouchDB
+
+EXEC="/usr/bin/couchdb"
+COUCHDB_USER="couchdb:couchdb"
+COUCHDB_PID_FILE="/var/run/couchdb/couchdb.pid"
+COUCHDB_STDOUT_FILE="/dev/null"
+COUCHDB_STDERR_FILE="/dev/null"
+#COUCHDB_RESPAWN_TIMEOUT=
+#COUCHDB_OPTIONS=
diff --git a/dev-db/couchdb/files/couchdb.init-4 b/dev-db/couchdb/files/couchdb.init-4
new file mode 100644
index 000000000000..aab1757d3cf4
--- /dev/null
+++ b/dev-db/couchdb/files/couchdb.init-4
@@ -0,0 +1,17 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 Dirkjan Ochtman
+# Distributed under the terms of the Apache License, Version 2.0
+
+pidfile=${COUCHDB_PID_FILE}
+command=${EXEC:-/usr/bin/couchdb}
+command_args="-b -o ${COUCHDB_STDOUT_FILE} -e ${COUCHDB_STDERR_FILE} -p ${pidfile} ${COUCHDB_OPTIONS}"
+
+start_stop_daemon_args="--user ${COUCHDB_USER}"
+
+depend() {
+ need net
+}
+
+start_pre() {
+ checkpath -q -d -m 0755 -o ${COUCHDB_USER} /var/run/couchdb
+}
diff --git a/dev-db/couchdb/metadata.xml b/dev-db/couchdb/metadata.xml
new file mode 100644
index 000000000000..37f6a3033902
--- /dev/null
+++ b/dev-db/couchdb/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>djc@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-db/cpp-driver-2.8.1 b/dev-db/cpp-driver-2.8.1
deleted file mode 100644
index b2b0e2608742..000000000000
--- a/dev-db/cpp-driver-2.8.1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-libs/libuv:= ssl? ( !libressl? ( dev-libs/openssl:0= ) libressl? ( dev-libs/libressl:0= ) ) sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=DataStax C/C++ Driver for Cassandra
-EAPI=6
-HOMEPAGE=http://datastax.github.io/cpp-driver/
-IUSE=ssl libressl
-KEYWORDS=~amd64 ~x86
-LICENSE=Apache-2.0
-RDEPEND=dev-libs/libuv:= ssl? ( !libressl? ( dev-libs/openssl:0= ) libressl? ( dev-libs/libressl:0= ) )
-SLOT=0
-SRC_URI=https://github.com/datastax/cpp-driver/archive/2.8.1.tar.gz -> cpp-driver-2.8.1.tar.gz
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=4bc0b14ae7434187b2b055d85025efee
diff --git a/dev-db/cpp-driver/Manifest b/dev-db/cpp-driver/Manifest
new file mode 100644
index 000000000000..0a5e7fa051b8
--- /dev/null
+++ b/dev-db/cpp-driver/Manifest
@@ -0,0 +1,3 @@
+DIST cpp-driver-2.8.1.tar.gz 1526453 BLAKE2B 8ab4332f00a1da9f35be6fa8651ace54d71fbac76223c1665089096376dcfd6f5976beb83c25094f531786a4aa628aa4e288540ef7bcb8cc5221625dcd1ccf78 SHA512 1b303e874d6b24cb429ec92d6030880ad7d7b28b167a25c62060626c206f623863ecf58eab33e89b0efea4a474ca9500e1701b719ac203c76b0875c2b5d0a1c8
+EBUILD cpp-driver-2.8.1.ebuild 627 BLAKE2B 212092960beee408c49866469a4e45ec48535feba75ef2c3ed176bb281145ce24cd5b2ee340878d7557cd1e14f0fc8c6707e668597909bb92623f5f32bdd7240 SHA512 f423cd87d8fa5e1f42a94222b054bbba1ba2855369fe17aaa94a480515a5b3a200697a8a5570f41d7ac032ec985c370e025786cacee9b2e63e87100750a09e53
+MISC metadata.xml 553 BLAKE2B 9cbe9ca09b891555c6f22e2a6da3fc24d938e5bfd30950c3f58e3e028f36a6784a0062c042b30c8215552191f9ccbb629693a059258a067effb97cd594e65fcb SHA512 7e02ca90a667319bd669dc10dbba7abc1018a1c4941fc213af728bd6b7afe48e5fca888f3f6d19798937f6fa5d8188cd784cd37f0ff690bc2295abab8ae408f8
diff --git a/dev-db/cpp-driver/cpp-driver-2.8.1.ebuild b/dev-db/cpp-driver/cpp-driver-2.8.1.ebuild
new file mode 100644
index 000000000000..454caab7dba4
--- /dev/null
+++ b/dev-db/cpp-driver/cpp-driver-2.8.1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils
+
+DESCRIPTION="DataStax C/C++ Driver for Cassandra"
+HOMEPAGE="http://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 libressl"
+
+RDEPEND="
+ dev-libs/libuv:=
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ local mycmakeargs=( -DCASS_USE_OPENSSL=$(usex ssl) )
+ cmake-utils_src_configure
+}
diff --git a/dev-db/cpp-driver/metadata.xml b/dev-db/cpp-driver/metadata.xml
new file mode 100644
index 000000000000..40d0b15e5721
--- /dev/null
+++ b/dev-db/cpp-driver/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <longdescription lang="en">
+ DataStax Cassandra C/C++ driver for Apache Cassandra or Scilla
+ </longdescription>
+ <maintainer type="person">
+ <email>geaaru@gmail.com</email>
+ <name>Geaaru</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">datastax/cpp-driver</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/cppdb-0.3.1-r1 b/dev-db/cppdb-0.3.1-r1
deleted file mode 100644
index 19c194586dda..000000000000
--- a/dev-db/cppdb-0.3.1-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=mysql? ( virtual/mysql ) odbc? ( dev-db/unixODBC ) postgres? ( dev-db/postgresql ) sqlite? ( dev-db/sqlite:3 ) sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=An SQL connectivity library for platform and database independent connectivity
-EAPI=5
-HOMEPAGE=http://cppcms.com/sql/cppdb/
-IUSE=doc examples mysql mysql_internal odbc odbc_internal postgres postgres_internal sqlite sqlite_internal
-KEYWORDS=~amd64 ~x86
-LICENSE=|| ( Boost-1.0 MIT )
-RDEPEND=mysql? ( virtual/mysql ) odbc? ( dev-db/unixODBC ) postgres? ( dev-db/postgresql ) sqlite? ( dev-db/sqlite:3 )
-SLOT=0
-SRC_URI=mirror://sourceforge/cppcms/cppdb-0.3.1.tar.bz2
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=74278e2c88e025410b48bd00548c709b
diff --git a/dev-db/cppdb/Manifest b/dev-db/cppdb/Manifest
new file mode 100644
index 000000000000..381f67da2d0e
--- /dev/null
+++ b/dev-db/cppdb/Manifest
@@ -0,0 +1,3 @@
+DIST cppdb-0.3.1.tar.bz2 251449 BLAKE2B 13a59b50b53e276c3714c35a11dee09054d3017d4c60335028c1e41dece749e6b13e94cd6ca4ad40e8bd47c5530ff3310c5735b373ee7289afe657f31c6186de SHA512 19e60becbffef7a252eda5fdd5821b44c2eeb5d69e84cf46e89ed6af3cea315f3cfe7b2cc4f62fbe154be8abdad3363761dd0252f94671421010273eeae65678
+EBUILD cppdb-0.3.1-r1.ebuild 1353 BLAKE2B 5ed160a4f5dbd555bd7885e77302a04b47f0cfe6b36ad0b44e5c069596a19b4ec71484a867cda55992f41a339b3fc06a969a80639f961a95a38c37ef06f34a49 SHA512 bb1a2d18a3ec7843f519c788d59697b53cfc10c321b4caa1dba4910b764246f542794fae49f1b4971d6521d7ef191573cf45c9c161254ede6871f147af60c4bb
+MISC metadata.xml 767 BLAKE2B 6012059a499f2c722e9eaac433a605eb8473f047f1f78543da7a08d6fb816bc3e83726e53285303dd1c14a09c2955d8d03e6fff9a617e2cc2ead27d329eb5c9e SHA512 930b662cc22169de50ef67af931799380b229c09a0b9b82c1ace9fa0abe75a685a3c3793c02cb85ac3d8f18f6450ea178e1a097e42e4d84c024286da9cbc085a
diff --git a/dev-db/cppdb/cppdb-0.3.1-r1.ebuild b/dev-db/cppdb/cppdb-0.3.1-r1.ebuild
new file mode 100644
index 000000000000..bcc4bd16cdc4
--- /dev/null
+++ b/dev-db/cppdb/cppdb-0.3.1-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit cmake-utils multilib
+
+DESCRIPTION="An SQL connectivity library for platform and database independent connectivity"
+HOMEPAGE="http://cppcms.com/sql/cppdb/"
+SRC_URI="mirror://sourceforge/cppcms/${P}.tar.bz2"
+
+LICENSE="|| ( Boost-1.0 MIT )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples mysql mysql_internal odbc odbc_internal postgres postgres_internal sqlite sqlite_internal"
+
+DEPEND="
+ mysql? ( virtual/mysql )
+ odbc? ( dev-db/unixODBC )
+ postgres? ( dev-db/postgresql )
+ sqlite? ( dev-db/sqlite:3 )"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ local mycmakeargs="
+ $(cmake-utils_use_disable mysql MYSQL)
+ $(cmake-utils_use mysql_internal MYSQL_BACKEND_INTERNAL)
+ $(cmake-utils_use_disable odbc ODBC)
+ $(cmake-utils_use odbc_internal ODBC_BACKEND_INTERNAL)
+ $(cmake-utils_use_disable postgres PQ)
+ $(cmake-utils_use postgres_internal PQ_BACKEND_INTERNAL)
+ $(cmake-utils_use_disable sqlite SQLITE)
+ $(cmake-utils_use sqlite_internal SQLITE_BACKEND_INTERNAL)
+ -DLIBDIR=$(get_libdir)"
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ if use doc; then
+ rm docs/build.txt || die
+ dodoc -r docs/*
+ dohtml -r html/*
+ fi
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+}
diff --git a/dev-db/cppdb/metadata.xml b/dev-db/cppdb/metadata.xml
new file mode 100644
index 000000000000..b4e431927502
--- /dev/null
+++ b/dev-db/cppdb/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <use>
+ <flag name="mysql_internal">Don't build a separate mysql loadable module but rather build it into the cppdb library itself</flag>
+ <flag name="odbc_internal">Don't build a separate postgresql loadable module but rather build it into the cppdb library itself</flag>
+ <flag name="postgres_internal">Don't build a separate odbc loadable module but rather build it into the cppdb library itself</flag>
+ <flag name="sqlite_internal">Don't build a separate sqlite3 loadable module but rather build it into the cppdb library itself</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">cppcms</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/datadraw-3.1.1 b/dev-db/datadraw-3.1.1
deleted file mode 100644
index acb07877bd38..000000000000
--- a/dev-db/datadraw-3.1.1
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=install prepare
-DESCRIPTION=feature rich database generator for high performance C applications
-EAPI=4
-HOMEPAGE=http://datadraw.sourceforge.net/
-IUSE=doc examples
-KEYWORDS=~amd64 ~x86
-LICENSE=LGPL-2
-SLOT=0
-SRC_URI=mirror://sourceforge/datadraw/datadraw/datadraw3.1.1/datadraw3.1.1.tar.gz
-_eclasses_=multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=81846d11ce0c98be41c19af9ae6a1b99
diff --git a/dev-db/datadraw/Manifest b/dev-db/datadraw/Manifest
new file mode 100644
index 000000000000..ec21700e9f44
--- /dev/null
+++ b/dev-db/datadraw/Manifest
@@ -0,0 +1,3 @@
+DIST datadraw3.1.1.tar.gz 607914 BLAKE2B ec4f6bafce924edda39a19f4e29ec7ac5c52dafbb0e8412280fd232e91b2bdf525fc931518249857f5b35a2f76c40a5fb28493db6220dacd86113361f780d38d SHA512 64773b984cb9d6928ec486833ee03f07c6c5f21dcfcc446e21fe90eb432b7a09459ea65e24c46df70bc6b791dfc640caf16b6f6cdd8a35319969bb8ec7e65009
+EBUILD datadraw-3.1.1.ebuild 1002 BLAKE2B 47f1d82234b8e2548d0c3420a5fe40121d0d39530bb2c05d09ad442fc2a778b036566e7ac79df6ab6f86a3729fe0fd123576d4afaa4435873145e8850351ad84 SHA512 5ba2c3d348ce7533dff173a3ed5bbf710ef55f7a3dcadc5360581704a3ceae4857ab773ca74165c81faa1a84226d5d706a9996df16db80ea22d2837a602e545d
+MISC metadata.xml 683 BLAKE2B fe18d49ff4beb4a5a0a7948b29ced47e7fac6dfd32f9f01e9381d4f38ef4ddd227a46e0e1310c8aac05d52a5af50802bbb9af42ecbc1c90fd12399705f23e42b SHA512 cf47cf89f8b79929d9fa0b74c1e6a924c17b7f5e51d6b831593b12c7ab802eb6cb77a96cbbb0bd96c76922cfecb88c8e0e9def477a93a1cca7489cd7b34d2af2
diff --git a/dev-db/datadraw/datadraw-3.1.1.ebuild b/dev-db/datadraw/datadraw-3.1.1.ebuild
new file mode 100644
index 000000000000..608c45988c11
--- /dev/null
+++ b/dev-db/datadraw/datadraw-3.1.1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit multilib toolchain-funcs
+
+DESCRIPTION="feature rich database generator for high performance C applications"
+HOMEPAGE="http://datadraw.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}/${PN}${PV}/${PN}${PV}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples"
+
+DEPEND=""
+RDEPEND=""
+
+S=${WORKDIR}/${PN}${PV}
+
+src_prepare() {
+ tc-export CC
+ sed -e "/^CFLAGS=/s:-g -Wall:${CFLAGS}:" \
+ -i configure \
+ -i dataview/configure \
+ -i util/configure || die
+
+ sed -e '/^datadraw:/,+2s:\\$(CFLAGS):\\$(CFLAGS) \\$(LDFLAGS):' \
+ -i configure || die
+}
+
+src_install() {
+ dobin ${PN}
+
+ insinto /usr/$(get_libdir)
+ for lib in util/*.a ; do
+ newins ${lib} lib$(basename ${lib})
+ done
+ insinto /usr/include
+
+ doins util/*.h
+
+ dodoc README
+ if use doc ; then
+ dodoc manual.pdf
+ dohtml -r www/index.html www/images
+ fi
+ use examples && dodoc -r examples
+}
diff --git a/dev-db/datadraw/metadata.xml b/dev-db/datadraw/metadata.xml
new file mode 100644
index 000000000000..48833abaadc8
--- /dev/null
+++ b/dev-db/datadraw/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+</maintainer>
+<maintainer type="project">
+ <email>sci-electronics@gentoo.org</email>
+ <name>Gentoo Electronics Project</name>
+</maintainer>
+<upstream>
+ <remote-id type="sourceforge">datadraw</remote-id>
+</upstream>
+<longdescription lang="en">
+DataDraw is a feature rich database generator for high performance C applications. DataDraw gives your C application a high performance object-oriented framework at speeds that beat hand coded C.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-db/db-je-3.3.75 b/dev-db/db-je-3.3.75
deleted file mode 100644
index 2bfe7cdcd1ee..000000000000
--- a/dev-db/db-je-3.3.75
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install preinst setup unpack
-DEPEND=>=virtual/jdk-1.5 >=dev-java/java-config-2.2.0-r3 >=sys-apps/portage-2.1.2.7 source? ( app-arch/zip ) >=dev-java/ant-core-1.8.2 >=sys-apps/portage-2.1.2.7 >=dev-java/javatoolkit-0.3.0-r2
-DESCRIPTION=A high performance, transactional storage engine written entirely in Java
-EAPI=0
-HOMEPAGE=http://www.oracle.com/database/berkeley-db/je/index.html
-IUSE=elibc_FreeBSD doc source elibc_FreeBSD
-KEYWORDS=amd64 x86
-LICENSE=Sleepycat BSD
-RDEPEND=>=virtual/jre-1.5 >=dev-java/java-config-2.2.0-r3 >=sys-apps/portage-2.1.2.7 source? ( app-arch/zip )
-SLOT=3.3
-SRC_URI=http://download.oracle.com/berkeley-db/je-3.3.75.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-ant-2 ea15ab9e838d1062abd6b53de2045d50 java-pkg-2 c4e6af2574fd1dc79b43a6e27af4b5fb java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=3fbecbade7ac717cf39125b968d1cb24
diff --git a/dev-db/db-je/Manifest b/dev-db/db-je/Manifest
new file mode 100644
index 000000000000..315d81bcc9b0
--- /dev/null
+++ b/dev-db/db-je/Manifest
@@ -0,0 +1,4 @@
+AUX db-je-3.3.75-optional-test.patch 1791 BLAKE2B 40c45dd4b65121a06fe180e6c9c23e2494438b504e108bc5b015cfadb21dc34c0b3e90eff3c17abf549d62ecfd595186d228f2bec65d44846d65b9d4059b95bc SHA512 a33e2ae28fa121c68990b44f5441685d50b025db784d07ee6fb78ae9a19ec8c10ee1ec91fb0296507a94792fca86b9a54b5a3e8fd1c0e076f5dc6c0c28cceb1a
+DIST je-3.3.75.tar.gz 5179709 BLAKE2B 9bc8382ad2bf54efd1a235115972761ecc38e2f641a6722623c7d2806e6eb2e2dbe65bf91e899844641365fb144fe73e021d70c02f12343e6dccb998426c229e SHA512 e28648459a3a7dcf98e8865e6859544c656c3b58688b244df568cc8c006a74dda79aadfbfb279e099c1376914cca064734da490998a864c1bd2cc3209bc64ae4
+EBUILD db-je-3.3.75.ebuild 922 BLAKE2B 4d374d1a6f714af9556b2e3545e548dd5c3c11058271581577d24d2b83d80bd54852604059f6f3e654d9fe03d9dd53eba37eb0d411ce1ef9d68b55bcf6226a4d SHA512 dcf25942c326705a46b0d1e6dd2d35d0a6367d9782fd3c14636753a5cad0942c8e3a49141a12c4a6d2dddc10e3e235e36af2969b40f715209b525bfd11719518
+MISC metadata.xml 352 BLAKE2B 8390000455654697f473905c14903172230b9667fd16c4db74dd32643b096cb7c8efa21f8614b30d676fb32e052a76c613298e2a28c362d6135f61a4fe27c242 SHA512 a3c6ce3cd97b39644238700277dd416e1ee79df975184de3429810ca4d77f7160112adef6a9b56f77243a003187f6642798b278cf8501d55da766ccfbaa861cf
diff --git a/dev-db/db-je/db-je-3.3.75.ebuild b/dev-db/db-je/db-je-3.3.75.ebuild
new file mode 100644
index 000000000000..fed1f010b3cf
--- /dev/null
+++ b/dev-db/db-je/db-je-3.3.75.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=0
+
+JAVA_PKG_IUSE="doc source"
+
+inherit java-pkg-2 java-ant-2
+
+DESCRIPTION="A high performance, transactional storage engine written entirely in Java"
+HOMEPAGE="http://www.oracle.com/database/berkeley-db/je/index.html"
+SRC_URI="http://download.oracle.com/berkeley-db/${P/db-/}.tar.gz"
+
+LICENSE="Sleepycat BSD"
+SLOT="3.3"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND=">=virtual/jdk-1.5"
+RDEPEND=">=virtual/jre-1.5"
+S=${WORKDIR}/${P/db-/}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}" || die
+ epatch "${FILESDIR}"/${P}-optional-test.patch
+ rm -rf docs
+ cd lib || die
+ rm -v *jar || die
+ java-pkg_jar-from --build-only ant-core ant.jar
+}
+
+EANT_DOC_TARGET="javadoc-all"
+EANT_EXTRA_ARGS="-Dnotest=true"
+
+src_install() {
+ java-pkg_dojar build/lib/je.jar
+ use doc && java-pkg_dojavadoc docs
+ use source && java-pkg_dosrc src/com
+}
diff --git a/dev-db/db-je/files/db-je-3.3.75-optional-test.patch b/dev-db/db-je/files/db-je-3.3.75-optional-test.patch
new file mode 100644
index 000000000000..e8f7600398e2
--- /dev/null
+++ b/dev-db/db-je/files/db-je-3.3.75-optional-test.patch
@@ -0,0 +1,45 @@
+--- build.xml 2008-06-11 05:25:20.000000000 +0200
++++ build.xml.new 2008-08-22 15:59:53.000000000 +0200
+@@ -102,6 +102,7 @@
+ <path id="empty.classpath"/>
+
+ <path id="class.path">
++ <fileset dir="lib" includes="*.jar"/>
+ <pathelement location="${specificjar}"/>
+ <pathelement location="."/>
+ </path>
+@@ -487,14 +488,14 @@
+ <!-- JUnit unit tests -->
+ <!-- ============================================================ -->
+
+- <target name="init-unittest" depends="init">
++ <target name="init-unittest" depends="init" unless="notest">
+ <delete dir="${unittest.datadir}"/>
+ <delete dir="${unittest.reportsdir}"/>
+ <mkdir dir="${unittest.datadir}"/>
+ <mkdir dir="${unittest.reportsdir}"/>
+ </target>
+
+- <target name="clean-unittest" depends="init-unittest">
++ <target name="clean-unittest" depends="init-unittest" unless="notest">
+ <delete dir="${unittest.destdir}"/>
+ <mkdir dir="${unittest.destdir}"/>
+ <delete dir="${unittest.testserialdir}"/>
+@@ -503,7 +504,7 @@
+ <mkdir dir="${unittest.testevolvedir}"/>
+ </target>
+
+- <target name="compile-unittest" depends="compile-src">
++ <target name="compile-unittest" depends="compile-src" unless="notest">
+ <ant antfile="ant/compile.xml" dir="." inheritall="false">
+ <property name="srcdir" value="${unittest.srcdir}"/>
+ <property name="destdir" value="${unittest.destdir}"/>
+@@ -597,7 +598,7 @@
+ </path>
+
+ <target name="test"
+- depends="compile-unittest, init-unittest, jar">
++ depends="compile-unittest, init-unittest, jar" unless="notest">
+
+ <!-- Determine which tests to run. -->
+ <condition property="alltests">
diff --git a/dev-db/db-je/metadata.xml b/dev-db/db-je/metadata.xml
new file mode 100644
index 000000000000..bc74090b9d62
--- /dev/null
+++ b/dev-db/db-je/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>tommy@gentoo.org</email>
+ <name>Thomas Sachau (Tommy[D])</name>
+ </maintainer>
+<maintainer type="project">
+ <email>java@gentoo.org</email>
+ <name>Java</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-db/etcd-3.2.22 b/dev-db/etcd-3.2.22
deleted file mode 100644
index 9de57ac200bc..000000000000
--- a/dev-db/etcd-3.2.22
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install prepare setup test unpack
-DEPEND=>=dev-lang/go-1.8:= virtual/pkgconfig >=dev-lang/go-1.9
-DESCRIPTION=Highly-available key value store for shared configuration and service discovery
-EAPI=6
-HOMEPAGE=https://github.com/coreos/etcd
-IUSE=doc
-KEYWORDS=~amd64
-LICENSE=Apache-2.0
-RDEPEND=!dev-db/etcdctl
-SLOT=0
-SRC_URI=https://github.com/coreos/etcd/archive/v3.2.22.tar.gz -> etcd-3.2.22.tar.gz
-_eclasses_=golang-base d4e3a3f895016e5c9d7afb1a33e7cf3c golang-vcs-snapshot 913580335becddd3ebecefe852e47536 multilib 97f470f374f2e94ccab04a2fb21d811e systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81
-_md5_=a7e9bc1848cba8c0b59489ab05158782
diff --git a/dev-db/etcd-3.3.5 b/dev-db/etcd-3.3.5
deleted file mode 100644
index 16d446f934fc..000000000000
--- a/dev-db/etcd-3.3.5
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install prepare setup test unpack
-DEPEND=>=dev-lang/go-1.9:= virtual/pkgconfig >=dev-lang/go-1.9
-DESCRIPTION=Highly-available key value store for shared configuration and service discovery
-EAPI=6
-HOMEPAGE=https://github.com/coreos/etcd
-IUSE=doc +server
-KEYWORDS=~amd64
-LICENSE=Apache-2.0
-RDEPEND=!dev-db/etcdctl
-SLOT=0
-SRC_URI=https://github.com/coreos/etcd/archive/v3.3.5.tar.gz -> etcd-3.3.5.tar.gz
-_eclasses_=golang-base d4e3a3f895016e5c9d7afb1a33e7cf3c golang-vcs-snapshot 913580335becddd3ebecefe852e47536 multilib 97f470f374f2e94ccab04a2fb21d811e systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81
-_md5_=c704622a9bd1aecc273e42ab8ac9a802
diff --git a/dev-db/etcd-3.3.7 b/dev-db/etcd-3.3.7
deleted file mode 100644
index 690391022968..000000000000
--- a/dev-db/etcd-3.3.7
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install prepare setup test unpack
-DEPEND=>=dev-lang/go-1.9:= virtual/pkgconfig >=dev-lang/go-1.9
-DESCRIPTION=Highly-available key value store for shared configuration and service discovery
-EAPI=6
-HOMEPAGE=https://github.com/coreos/etcd
-IUSE=doc +server
-KEYWORDS=~amd64
-LICENSE=Apache-2.0
-RDEPEND=!dev-db/etcdctl
-SLOT=0
-SRC_URI=https://github.com/coreos/etcd/archive/v3.3.7.tar.gz -> etcd-3.3.7.tar.gz
-_eclasses_=golang-base d4e3a3f895016e5c9d7afb1a33e7cf3c golang-vcs-snapshot 913580335becddd3ebecefe852e47536 multilib 97f470f374f2e94ccab04a2fb21d811e systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81
-_md5_=c704622a9bd1aecc273e42ab8ac9a802
diff --git a/dev-db/etcd-3.3.8 b/dev-db/etcd-3.3.8
deleted file mode 100644
index 58edd6f8022e..000000000000
--- a/dev-db/etcd-3.3.8
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install prepare setup test unpack
-DEPEND=>=dev-lang/go-1.9:= virtual/pkgconfig >=dev-lang/go-1.9
-DESCRIPTION=Highly-available key value store for shared configuration and service discovery
-EAPI=6
-HOMEPAGE=https://github.com/coreos/etcd
-IUSE=doc +server
-KEYWORDS=~amd64
-LICENSE=Apache-2.0
-RDEPEND=!dev-db/etcdctl
-SLOT=0
-SRC_URI=https://github.com/coreos/etcd/archive/v3.3.8.tar.gz -> etcd-3.3.8.tar.gz
-_eclasses_=golang-base d4e3a3f895016e5c9d7afb1a33e7cf3c golang-vcs-snapshot 913580335becddd3ebecefe852e47536 multilib 97f470f374f2e94ccab04a2fb21d811e systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81
-_md5_=c704622a9bd1aecc273e42ab8ac9a802
diff --git a/dev-db/etcd/Manifest b/dev-db/etcd/Manifest
new file mode 100644
index 000000000000..e127c462aa7b
--- /dev/null
+++ b/dev-db/etcd/Manifest
@@ -0,0 +1,15 @@
+AUX etcd.conf 978 BLAKE2B 2aaecc5c7b3d0b7a44f8de65d8362333bdcf9616de55a2c4fa1551eca91d80061c146165f1bf077c1d93e6874b4444384889875b3fe81299e46e10fd6e24d8ec SHA512 3b543104df93ebd6013b5e50c1e17b947e089bf27ba976859574f9fa57f2ed0ba16342984d12a68a00ff6745f37d229b1fe3206df7d713805e289d029774be0d
+AUX etcd.confd 129 BLAKE2B 1d7aff8c57e4dc0f4348a5de4bfff0a1552e8b4d228ee0f0ba2eb6eb944daefae1b5b55ba6b5416697b923e9144884d0828612403a11e627f8f7e82fa7444f68 SHA512 a08b1c1701370dc23ebd86db915d1e65747dc4ca57ce44d8cba6cf8434d5711786ac96725eed3285f4ba7cdde25ea25a51539d6cd74fc2f4b713f48cda15c4c3
+AUX etcd.initd 813 BLAKE2B 3d63e753f2a04b1cba20ddfdbc7d67acd2be14caff08de74d498e8819cc54680693e832658ed83ab8bfc4c93498daf90b1a9b7bcb541f16cf06a608b003d005f SHA512 f86df57fc91e98310f00803b29d149a8a2850028b2a349eebfe7fb4059e97f8232fd137a6eeaa3a8edf29922e2552c6a4af10ed40696f0775b65645ac2c57859
+AUX etcd.logrotated 104 BLAKE2B 3126c99db171af177d6d6368e7e53f3e5e07b9ae2926ff12cb0ff7fb877527df33a91dedcaa4bbbffa190b4f9c2f53868aeca093b93e9cad50718a23eb5fdd46 SHA512 64d3181a936f8bab635a17f90679041c2d70a712307928feae03a517ad02252fc37e25738979bc1ccd0657ef70439e65cb0306759bec3939e940ec382a02d94f
+AUX etcd.service 304 BLAKE2B ecffe9889f9530bf7172638a0273736abba2b3ea5c5540b5452d26fbaec17ab9c138db86b543c3c88fd3d16ce79487eb2c31ad7bbfb0c5b9cd11eede9b99bd2d SHA512 0074f77a17afe2bb4145f12a6eb312caa3e08cfe8bf35856b79d091ad8786c4223bd91c0a865e789ee9ba180f2672b31721742bb32efd0cd383bc747eb926961
+AUX etcd.tmpfiles.d.conf 76 BLAKE2B e5aa0ca42dd579e9c2ac8c6bdfce83f87ec79ce64d10e20b61ab3df45918747f588b9246085fec925bb39b772e061628aadd030a23a59b65a2fc2243eca1a7f9 SHA512 7324b74dcfe050dd7fbc318ca3ce9b5d58bce8fa2ce2d2d771664ef981c834375f7cbfebcb630cd61dab2a3f6bf6c3733ad04f752beadf7bb6fedcc80ff682ce
+DIST etcd-3.2.22.tar.gz 3243190 BLAKE2B 165eff928f5f5419d02ef07aebb5160ac5473721a1e27ee1eb2a6b1e5ff775f2f7254ddfc20dec14c28cd2de68966e7b8521fb29c7242a420fa61d226e16b3ba SHA512 7a32dce894ca643f0c51267edc0fba2524c197f0ac3185c6acd22879cd58236f6bcc9c3825d9b8f196255c8bf6aed1b893e1a62124c946f95b4832b409a6b4c0
+DIST etcd-3.3.5.tar.gz 3514955 BLAKE2B 394b6563f27a1a73aa553dc4db440d803721d001ab3d53c045df826c527c87232a6c1b83aed5fc9e4011f2480b456f0ae2a7a34bc173df90478d1704fd5c392d SHA512 e4495a02f1e2a08cc70a055528edbc118f50e4fe68b51afeb82908a7c2387de1e457adfb8078befec6829daeace61b95501da9f8b3fa49e0aecc9710ece470a4
+DIST etcd-3.3.7.tar.gz 3517632 BLAKE2B 4fcec3e90e819961e1bfc53a45d71a95ad87f82a3a974f14fc940ff216f8314339f3522ac4992567543a99afbef722f75f4b8ab98604aeca38d1bb697a207d0f SHA512 12ea79aca94f2ad68baf4d324176d4cb2e27d11e3b7c018b69a1c2a1028d9e42d734bd3a814618eb41d7b0b07716d5df9bd9161bf52b061445ca7727579ee276
+DIST etcd-3.3.8.tar.gz 3518826 BLAKE2B 4d8ac66022c63250e37871a40041a799a21361f005f5ff259711ea7a0557acbe7f3920815ff0b5193499177e42c306ff8383192e7d4c31c94439d9461dea979f SHA512 c3a3f9ffb614e383854bf5a8819e3dcad8f02b267d74197685b546c856e983c92f8c459185c327adf7ba3d0326e2058fb34caac0896d78494cde86c3f7e04ac7
+EBUILD etcd-3.2.22.ebuild 1475 BLAKE2B 4cbf762bd7dc082d11b4ef984e27673921a5a44e7cec9f8284d1feda234662352497512edc84c2ba9c29b743b481a9f06fe8b32b14695273d8fa97956e460e76 SHA512 dc2cab07f90c4c181b0453b7a15b66df3c270c63872843317838d29b985a0c9a0905b7ce0a054df2015991337bccdee7bfc920e599b17142e231f0a0aa8d9f5c
+EBUILD etcd-3.3.5.ebuild 1603 BLAKE2B ecc2eb8cd86fb1ca37d6fd7eecde005fcc3c633bc7569ce54acc5daf947b4be2cc88e596ada2c1e8a7b3d40d44273a143f80b26a2cbb8e851ad8d36b6fcb4beb SHA512 83a23179d8381a126fde6d9e9c521170b3148b78773421893175a81fb48d8b980e93309cc5c40d8993b9039fadc7d75a2ecc03fdc5186d5ba84ac71826dfe68d
+EBUILD etcd-3.3.7.ebuild 1603 BLAKE2B ecc2eb8cd86fb1ca37d6fd7eecde005fcc3c633bc7569ce54acc5daf947b4be2cc88e596ada2c1e8a7b3d40d44273a143f80b26a2cbb8e851ad8d36b6fcb4beb SHA512 83a23179d8381a126fde6d9e9c521170b3148b78773421893175a81fb48d8b980e93309cc5c40d8993b9039fadc7d75a2ecc03fdc5186d5ba84ac71826dfe68d
+EBUILD etcd-3.3.8.ebuild 1603 BLAKE2B ecc2eb8cd86fb1ca37d6fd7eecde005fcc3c633bc7569ce54acc5daf947b4be2cc88e596ada2c1e8a7b3d40d44273a143f80b26a2cbb8e851ad8d36b6fcb4beb SHA512 83a23179d8381a126fde6d9e9c521170b3148b78773421893175a81fb48d8b980e93309cc5c40d8993b9039fadc7d75a2ecc03fdc5186d5ba84ac71826dfe68d
+MISC metadata.xml 679 BLAKE2B 7374379a18107011df792be631428834334ad8e6da5cfe404f18555e8c168d3fc716a1c8d6cb5cf1d9ccd173737aecf93a165f846865dbb6ba4a76bd4669b446 SHA512 8070d8b51dd3319e8b159072db237dcc5299361c2f74fa086fc4cbc174cc6a5c8f7659310332b54b2275e2bc3d028323c4dfa5775e21693a339f54312582d2f0
diff --git a/dev-db/etcd/etcd-3.2.22.ebuild b/dev-db/etcd/etcd-3.2.22.ebuild
new file mode 100644
index 000000000000..34692b679e18
--- /dev/null
+++ b/dev-db/etcd/etcd-3.2.22.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit user systemd golang-vcs-snapshot
+
+KEYWORDS="~amd64"
+EGO_PN="github.com/coreos/etcd"
+DESCRIPTION="Highly-available key value store for shared configuration and service discovery"
+HOMEPAGE="https://github.com/coreos/etcd"
+SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="doc"
+DEPEND=">=dev-lang/go-1.8:="
+RDEPEND="!dev-db/etcdctl"
+
+src_prepare() {
+ default
+ sed -e 's|GIT_SHA=.*|GIT_SHA=v${PV}|'\
+ -i "${S}"/src/${EGO_PN}/build || die
+}
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 /var/lib/${PN} ${PN}
+}
+
+src_compile() {
+ export GOPATH=${S}
+ pushd src/${EGO_PN} || die
+ ./build || die
+ popd || die
+}
+
+src_install() {
+ pushd src/${EGO_PN} || die
+ insinto /etc/${PN}
+ doins "${FILESDIR}/${PN}.conf"
+ dobin bin/*
+ dodoc README.md
+ use doc && dodoc -r Documentation
+ systemd_dounit "${FILESDIR}/${PN}.service"
+ systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles.d.conf" ${PN}.conf
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotated" "${PN}"
+ dodir /var/lib/${PN}
+ fowners ${PN}:${PN} /var/lib/${PN}
+ fperms 0700 /var/lib/${PN}
+ dodir /var/log/${PN}
+ fowners ${PN}:${PN} /var/log/${PN}
+ fperms 755 /var/log/${PN}
+ popd || die
+}
+
+src_test() {
+ pushd src/${EGO_PN} || die
+ ./test || die
+ popd || die
+}
diff --git a/dev-db/etcd/etcd-3.3.5.ebuild b/dev-db/etcd/etcd-3.3.5.ebuild
new file mode 100644
index 000000000000..88b1e478fe0a
--- /dev/null
+++ b/dev-db/etcd/etcd-3.3.5.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit user systemd golang-vcs-snapshot
+
+KEYWORDS="~amd64"
+EGO_PN="github.com/coreos/etcd"
+MY_PV="${PV/_rc/-rc.}"
+DESCRIPTION="Highly-available key value store for shared configuration and service discovery"
+HOMEPAGE="https://github.com/coreos/etcd"
+SRC_URI="https://${EGO_PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="doc +server"
+DEPEND=">=dev-lang/go-1.9:="
+RDEPEND="!dev-db/etcdctl"
+
+src_prepare() {
+ default
+ sed -e 's|GIT_SHA=.*|GIT_SHA=v${PV}|'\
+ -i "${S}"/src/${EGO_PN}/build || die
+}
+
+pkg_setup() {
+ if use server; then
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 /var/lib/${PN} ${PN}
+ fi
+}
+
+src_compile() {
+ export GOPATH=${S}
+ pushd src/${EGO_PN} || die
+ ./build || die
+ popd || die
+}
+
+src_install() {
+ pushd src/${EGO_PN} || die
+ dobin bin/etcdctl
+ use doc && dodoc -r Documentation
+ if use server; then
+ insinto /etc/${PN}
+ doins "${FILESDIR}/${PN}.conf"
+ dobin bin/etcd
+ dodoc README.md
+ systemd_dounit "${FILESDIR}/${PN}.service"
+ systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles.d.conf" ${PN}.conf
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotated" "${PN}"
+ keepdir /var/lib/${PN}
+ fowners ${PN}:${PN} /var/lib/${PN}
+ fperms 0700 /var/lib/${PN}
+ keepdir /var/log/${PN}
+ fowners ${PN}:${PN} /var/log/${PN}
+ fperms 755 /var/log/${PN}
+ fi
+ popd || die
+}
+
+src_test() {
+ pushd src/${EGO_PN} || die
+ ./test || die
+ popd || die
+}
diff --git a/dev-db/etcd/etcd-3.3.7.ebuild b/dev-db/etcd/etcd-3.3.7.ebuild
new file mode 100644
index 000000000000..88b1e478fe0a
--- /dev/null
+++ b/dev-db/etcd/etcd-3.3.7.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit user systemd golang-vcs-snapshot
+
+KEYWORDS="~amd64"
+EGO_PN="github.com/coreos/etcd"
+MY_PV="${PV/_rc/-rc.}"
+DESCRIPTION="Highly-available key value store for shared configuration and service discovery"
+HOMEPAGE="https://github.com/coreos/etcd"
+SRC_URI="https://${EGO_PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="doc +server"
+DEPEND=">=dev-lang/go-1.9:="
+RDEPEND="!dev-db/etcdctl"
+
+src_prepare() {
+ default
+ sed -e 's|GIT_SHA=.*|GIT_SHA=v${PV}|'\
+ -i "${S}"/src/${EGO_PN}/build || die
+}
+
+pkg_setup() {
+ if use server; then
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 /var/lib/${PN} ${PN}
+ fi
+}
+
+src_compile() {
+ export GOPATH=${S}
+ pushd src/${EGO_PN} || die
+ ./build || die
+ popd || die
+}
+
+src_install() {
+ pushd src/${EGO_PN} || die
+ dobin bin/etcdctl
+ use doc && dodoc -r Documentation
+ if use server; then
+ insinto /etc/${PN}
+ doins "${FILESDIR}/${PN}.conf"
+ dobin bin/etcd
+ dodoc README.md
+ systemd_dounit "${FILESDIR}/${PN}.service"
+ systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles.d.conf" ${PN}.conf
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotated" "${PN}"
+ keepdir /var/lib/${PN}
+ fowners ${PN}:${PN} /var/lib/${PN}
+ fperms 0700 /var/lib/${PN}
+ keepdir /var/log/${PN}
+ fowners ${PN}:${PN} /var/log/${PN}
+ fperms 755 /var/log/${PN}
+ fi
+ popd || die
+}
+
+src_test() {
+ pushd src/${EGO_PN} || die
+ ./test || die
+ popd || die
+}
diff --git a/dev-db/etcd/etcd-3.3.8.ebuild b/dev-db/etcd/etcd-3.3.8.ebuild
new file mode 100644
index 000000000000..88b1e478fe0a
--- /dev/null
+++ b/dev-db/etcd/etcd-3.3.8.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit user systemd golang-vcs-snapshot
+
+KEYWORDS="~amd64"
+EGO_PN="github.com/coreos/etcd"
+MY_PV="${PV/_rc/-rc.}"
+DESCRIPTION="Highly-available key value store for shared configuration and service discovery"
+HOMEPAGE="https://github.com/coreos/etcd"
+SRC_URI="https://${EGO_PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="doc +server"
+DEPEND=">=dev-lang/go-1.9:="
+RDEPEND="!dev-db/etcdctl"
+
+src_prepare() {
+ default
+ sed -e 's|GIT_SHA=.*|GIT_SHA=v${PV}|'\
+ -i "${S}"/src/${EGO_PN}/build || die
+}
+
+pkg_setup() {
+ if use server; then
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 /var/lib/${PN} ${PN}
+ fi
+}
+
+src_compile() {
+ export GOPATH=${S}
+ pushd src/${EGO_PN} || die
+ ./build || die
+ popd || die
+}
+
+src_install() {
+ pushd src/${EGO_PN} || die
+ dobin bin/etcdctl
+ use doc && dodoc -r Documentation
+ if use server; then
+ insinto /etc/${PN}
+ doins "${FILESDIR}/${PN}.conf"
+ dobin bin/etcd
+ dodoc README.md
+ systemd_dounit "${FILESDIR}/${PN}.service"
+ systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles.d.conf" ${PN}.conf
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotated" "${PN}"
+ keepdir /var/lib/${PN}
+ fowners ${PN}:${PN} /var/lib/${PN}
+ fperms 0700 /var/lib/${PN}
+ keepdir /var/log/${PN}
+ fowners ${PN}:${PN} /var/log/${PN}
+ fperms 755 /var/log/${PN}
+ fi
+ popd || die
+}
+
+src_test() {
+ pushd src/${EGO_PN} || die
+ ./test || die
+ popd || die
+}
diff --git a/dev-db/etcd/files/etcd.conf b/dev-db/etcd/files/etcd.conf
new file mode 100644
index 000000000000..3f34434e8e7c
--- /dev/null
+++ b/dev-db/etcd/files/etcd.conf
@@ -0,0 +1,39 @@
+# For an explanation of the options please see:
+# https://github.com/coreos/etcd/blob/master/Documentation/configuration.md#etcd-configuration
+#
+# The directory to store log and snapshot.
+# If you change this you have to make sure the directory exists at
+# the new path and has the correct permissions.
+# data_dir = "/var/lib/etcd"
+
+# name = "default-name"
+# addr = "127.0.0.1:4001"
+# bind_addr = "127.0.0.1:4001"
+# ca_file = ""
+# cert_file = ""
+# cors = []
+# cpu_profile_file = ""
+# discovery = "http://etcd.local:4001/v2/keys/_etcd/registry/examplecluster"
+# http_read_timeout = 10
+# http_write_timeout = 10
+# key_file = ""
+# peers = []
+# peers_file = ""
+# max_cluster_size = 9
+# max_result_buffer = 1024
+# max_retry_attempts = 3
+# snapshot = true
+# verbose = false
+# very_verbose = false
+
+[peer]
+addr = "127.0.0.1:7001"
+bind_addr = "127.0.0.1:7001"
+# ca_file = ""
+# cert_file = ""
+# key_file = ""
+
+#[cluster]
+# active_size = 9
+# remove_delay = 1800.0
+# sync_interval = 5.0
diff --git a/dev-db/etcd/files/etcd.confd b/dev-db/etcd/files/etcd.confd
new file mode 100644
index 000000000000..4592dac08d56
--- /dev/null
+++ b/dev-db/etcd/files/etcd.confd
@@ -0,0 +1,7 @@
+# Name of this node in the etcd cluster.
+ETCD_NAME=etcd
+
+# Path to the data directory.
+ETCD_DATA_DIR=/var/lib/etcd
+
+ETCD_OPTS=""
diff --git a/dev-db/etcd/files/etcd.initd b/dev-db/etcd/files/etcd.initd
new file mode 100644
index 000000000000..c9caecf7ff69
--- /dev/null
+++ b/dev-db/etcd/files/etcd.initd
@@ -0,0 +1,35 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+pidfile=/run/${RC_SVCNAME}.pid
+LOGPATH=/var/log/${RC_SVCNAME}
+DATADIR=/var/lib/${RC_SVCNAME}
+command_user=${RC_SVCNAME}
+command=/usr/bin/etcd
+command_args="
+ -name=${ETCD_NAME}
+ -data-dir=${ETCD_DATA_DIR}
+ ${ETCD_OPTS}"
+command_background=true
+start_stop_daemon_args="
+ --chdir ${ETCD_DATA_DIR}
+ -1 ${LOGPATH}/${RC_SVCNAME}.log
+ -2 ${LOGPATH}/${RC_SVCNAME}.err"
+
+depend() {
+ need net
+ need localmount
+ after bootmisc
+}
+
+start_pre() {
+ if [ ! -d "${LOGPATH}" ] ; then
+ mkdir -p "${LOGPATH}"
+ chown "${command_user}:${command_user}" "${LOGPATH}"
+ fi
+ if [ ! -d "${ETCD_DATA_DIR}" ] ; then
+ mkdir -p "${ETCD_DATA_DIR}"
+ chown "${command_user}:${command_user}" "${ETCD_DATA_DIR}"
+ fi
+}
diff --git a/dev-db/etcd/files/etcd.logrotated b/dev-db/etcd/files/etcd.logrotated
new file mode 100644
index 000000000000..8c79bff297b5
--- /dev/null
+++ b/dev-db/etcd/files/etcd.logrotated
@@ -0,0 +1,7 @@
+/var/log/etcd/etcd.log /var/log/etcd/etcd.err {
+ missingok
+ size 5M
+ rotate 3
+ compress
+ copytruncate
+}
diff --git a/dev-db/etcd/files/etcd.service b/dev-db/etcd/files/etcd.service
new file mode 100644
index 000000000000..6823777066d6
--- /dev/null
+++ b/dev-db/etcd/files/etcd.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=Etcd Server
+After=network.target
+
+[Service]
+Type=notify
+PermissionsStartOnly=true
+Environment=ETCD_DATA_DIR=/var/lib/etcd
+Environment=ETCD_NAME=%m
+WorkingDirectory=/var/lib/etcd/
+User=etcd
+ExecStart=/usr/bin/etcd
+Restart=on-failure
+LimitNOFILE=65536
+
+[Install]
+WantedBy=default.target
diff --git a/dev-db/etcd/files/etcd.tmpfiles.d.conf b/dev-db/etcd/files/etcd.tmpfiles.d.conf
new file mode 100644
index 000000000000..721e9c9161a3
--- /dev/null
+++ b/dev-db/etcd/files/etcd.tmpfiles.d.conf
@@ -0,0 +1,2 @@
+d /var/lib/etcd 0755 etcd etcd - -
+d /var/run/etcd 0755 etcd etcd - -
diff --git a/dev-db/etcd/metadata.xml b/dev-db/etcd/metadata.xml
new file mode 100644
index 000000000000..f48ad8fcc96f
--- /dev/null
+++ b/dev-db/etcd/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <upstream>
+ <bugs-to>https://github.com/coreos/etcd/issues</bugs-to>
+ <changelog>https://raw.githubusercontent.com/coreos/etcd/master/CHANGELOG</changelog>
+ <doc>https://github.com/coreos/etcd/blob/master/README.md/</doc>
+ <remote-id type="github">coreos/etcd</remote-id>
+ </upstream>
+ <use>
+ <flag name="server">Installs etcd daemon</flag>
+ </use>
+ <maintainer type="person">
+ <email>zmedico@gentoo.org</email>
+ </maintainer>
+ <maintainer type="person">
+ <name>Manuel Rüger</name>
+ <email>mrueg@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-db/firebird-3.0.2.32703.0-r2 b/dev-db/firebird-3.0.2.32703.0-r2
deleted file mode 100644
index 20901fcce24c..000000000000
--- a/dev-db/firebird-3.0.2.32703.0-r2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=configure install prepare pretend setup unpack
-DEPEND=dev-libs/libtommath dev-libs/icu:= dev-libs/libedit >=dev-util/btyacc-3.0-r2 doc? ( app-arch/unzip ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=Relational database offering many ANSI SQL:2003 and some SQL:2008 features
-EAPI=6
-HOMEPAGE=https://www.firebirdsql.org/
-IUSE=doc examples +server xinetd
-KEYWORDS=~amd64 ~x86
-LICENSE=IDPL Interbase-1.0
-RDEPEND=dev-libs/libtommath dev-libs/icu:= dev-libs/libedit xinetd? ( virtual/inetd ) !sys-cluster/ganglia
-SLOT=0
-SRC_URI=mirror://sourceforge/firebird/Firebird-3.0.2.32703-0.tar.bz2 doc? ( ftp://ftpc.inprise.com/pub/interbase/techpubs/ib_b60_doc.zip )
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=59a75858ac24436ed4afa321feda6074
diff --git a/dev-db/firebird/Manifest b/dev-db/firebird/Manifest
new file mode 100644
index 000000000000..2e956af20077
--- /dev/null
+++ b/dev-db/firebird/Manifest
@@ -0,0 +1,10 @@
+AUX firebird-3.0.2.32703.0-cloop-compiler.patch 349 BLAKE2B 6906993819f5aa68c39522d82bb7fb57b910f8f311d173a326147a98e983d8cd95ca90dbb538a5caa696ce4337305ece744306bf88f608cc8639bdda198e4576 SHA512 1d57f26ada2023d8bd04d73dd0f55951cef6b373710c8cf73b6bea0b4d54f879d689644d26541b2366bd1071b08eda2e1b531f3779a88b8fb52d3c9312f0c091
+AUX firebird-3.0.2.32703.0-gcc6.patch 806 BLAKE2B 85109e33f130582110e37188ef99cec5e5f0f3f95c481580df3a8c8a97215cd8e070e3febe47e46659e025b8a0c138fd0b271a5fd4b4aa67ca52419cef88db04 SHA512 184f754c4c23b7917acfabf1a5024069b8f35f58e667112a203a02e906560f2f5fea711b12975dafb3adcbe5159999e40fa459898a41d88e6de9b3499d8eaa67
+AUX firebird-3.0.2.32703.0-unbundle.patch 1786 BLAKE2B 660af04975ecfdac0ae12a1ee89e0a4d97d321ac7de7e17ba53484a909962584828c18d1f119ecc1af63c1cb2b93f451b847c9363a25831630a807b89ad13bc8 SHA512 bb0f8cb283ee230f9128a9da16da21933a1709615b34bbfac117a0563e2451a07381b52ffc1fed665e74688ff8e2c2548f86c1413427665914cb3df8500543c5
+AUX firebird.init.d.3.0 642 BLAKE2B 70f9b07a69c01e391ea8b1f1747a35eb303ff43a4923d65f76064257bfe5178601fa0b06dbf332b6a3529df30ddbe3e3c58e170ca33acfeb06a32474f1806938 SHA512 0805311d7e4ceb9cd5266be88fe61fb7d2d7cf5bf3c9482841c6431767cba9960d4f38418629519b23cdf64893173ebd01641056123ddc7f24c1f1bbf969812b
+AUX firebird.logrotate 169 BLAKE2B e73e2ff85882cda144f969a9a20426f2e5bfbaf2ce894e4e7adf67a33eb4cb5f1bc2039385437dcc60436145b0d29bd1b9311d8328f68ad7870aea50b8e5402d SHA512 f99edc010272af28f18e2b89e420aabc204feda918a1181e477edb56612b6af97ca6bab2e39989db401eb8296e3233a64853f824af437329e117f09aa9868823
+AUX firebird.xinetd.3.0 193 BLAKE2B 34017b978344bc2b05cfe7b92eafd56ba20dd78d1fa21dfb5455d7972325cedae9a6ac25b4fa491899b19cb3bbe2949b8ca78626467100661767f6c944b01c20 SHA512 e02c011b55c1d6823b051d14dbfabef6d034db32ee8046adc796fdf393c837b995c270e0efdcb97950f6fead82cd73773099a247dc29961b0e8f6c4f6c0723ae
+DIST Firebird-3.0.2.32703-0.tar.bz2 9536416 BLAKE2B 58afbdb430adb5f9aafe33d5459fb4fe8607e9440b6b114291777e43d447a7a5b5696c9f5903a10b63217a15836ce6386569e636369e37bf83195ec0b96e4fc6 SHA512 5950d1689c77fbcda22f1bd8015321d887dec3c7ef39665428a8bda9122838e767b168442ce7d8fb3b9b80cbd1206725b0f54bd215c5c9eb1d322b546cb042e6
+DIST ib_b60_doc.zip 10530848 BLAKE2B b4008b3e8b0416014d024cbbc9ac2e648ad671c71b91b7aeb0eedf0f8479aef80e22aff7105c5e7417e88bcf57f2cdacbc2d5f51a2ef7fb870f9d361c5f0ed6d SHA512 59eccf1d6b1f0410eddbc5967fd77a3d00e09749640b3f81e2f8b624f5a45461dffad4af5ec61488e941fb3d3af266fe86c0b56e6b7e023239537cb6557a145a
+EBUILD firebird-3.0.2.32703.0-r2.ebuild 6156 BLAKE2B 7894504d0d0b888a7c735538e6e262b3e0bde8c2b5c1b7a7de39dc9374187ebb81781390be9ca8d98c612da32138ffe71714815b1bf0a8793ee19e3c92e98b25 SHA512 b02a546183c0d704c8f40bac27e2185d8b3abdd58ef92f1d3eacf76261490a652540ac2998411a8492960cd2ebdb4b104d0797cfb296e19dea1f81f603955e9f
+MISC metadata.xml 837 BLAKE2B 91e52f426cd9364da97ed6969369c3fa14a37e195f79192357d245e2e1ff90e20ada790e0a1904b05c4e9e0cdf25dec55aa4dbe14e2db32feb83bd5d465846a0 SHA512 98379c40f675f7b53e90e5327b76e554c17bda1ef7484165785b3d04884dd92fc3034c6b3f0f93667c456e7b23dc83f5143a8ec358759e2a0218c94e96127912
diff --git a/dev-db/firebird/files/firebird-3.0.2.32703.0-cloop-compiler.patch b/dev-db/firebird/files/firebird-3.0.2.32703.0-cloop-compiler.patch
new file mode 100644
index 000000000000..363602bed8f4
--- /dev/null
+++ b/dev-db/firebird/files/firebird-3.0.2.32703.0-cloop-compiler.patch
@@ -0,0 +1,15 @@
+Source: LibreOffice git master
+
+
+diff -ur firebird.org/extern/cloop/Makefile firebird/extern/cloop/Makefile
+--- firebird.org/extern/cloop/Makefile 2016-08-17 18:32:59.078044357 +0200
++++ firebird/extern/cloop/Makefile 2016-08-17 18:33:14.430518561 +0200
+@@ -4,8 +4,6 @@
+
+ TARGET := release
+
+-CC := gcc
+-CXX := g++
+ LD := $(CXX)
+
+ SRC_DIR := src
diff --git a/dev-db/firebird/files/firebird-3.0.2.32703.0-gcc6.patch b/dev-db/firebird/files/firebird-3.0.2.32703.0-gcc6.patch
new file mode 100644
index 000000000000..e1361415c03b
--- /dev/null
+++ b/dev-db/firebird/files/firebird-3.0.2.32703.0-gcc6.patch
@@ -0,0 +1,19 @@
+commit 3618aa2171674babf79ef935aa049c40a3db1321
+Author: asfernandes <asfernandes@users.sourceforge.net>
+Date: Sat Mar 5 03:39:36 2016 +0000
+
+ Make the generated code compatible with gcc 6 in C++-14 mode.
+
+diff --git a/src/gpre/c_cxx.cpp b/src/gpre/c_cxx.cpp
+index 2af96c6..2dcffd6 100644
+--- a/src/gpre/c_cxx.cpp
++++ b/src/gpre/c_cxx.cpp
+@@ -2820,7 +2820,7 @@ static void gen_request(const gpre_req* request)
+ printa(0, "static %sshort\n isc_%dl = %d;",
+ (request->req_flags & REQ_extend_dpb) ? "" : CONST_STR,
+ request->req_ident, request->req_length);
+- printa(0, "static %schar\n isc_%d [] = {", CONST_STR, request->req_ident);
++ printa(0, "static %sunsigned char\n isc_%d [] = {", CONST_STR, request->req_ident);
+
+ const TEXT* string_type = "blr";
+ if (gpreGlob.sw_raw)
diff --git a/dev-db/firebird/files/firebird-3.0.2.32703.0-unbundle.patch b/dev-db/firebird/files/firebird-3.0.2.32703.0-unbundle.patch
new file mode 100644
index 000000000000..6fdd657223d4
--- /dev/null
+++ b/dev-db/firebird/files/firebird-3.0.2.32703.0-unbundle.patch
@@ -0,0 +1,51 @@
+diff -ruN Firebird-3.0.2.32703-0.orig/builds/posix/Makefile.in Firebird-3.0.2.32703-0/builds/posix/Makefile.in
+--- Firebird-3.0.2.32703-0.orig/builds/posix/Makefile.in 2017-03-21 10:11:35.000000000 +0100
++++ Firebird-3.0.2.32703-0/builds/posix/Makefile.in 2017-05-14 01:32:34.032241679 +0200
+@@ -123,7 +123,6 @@
+ #
+
+ extern:
+- $(MAKE) -C $(ROOT)/extern/btyacc
+ $(MAKE) -C $(ROOT)/extern/cloop TARGET=release WITH_FPC=0 BUILD_DIR=$(TMP_ROOT)/cloop OUT_DIR=$(GEN_ROOT)/$(TARGET)/cloop
+
+ ifeq ($(TOMBUILD_FLG),Y)
+@@ -648,7 +647,7 @@
+ # various cleaning
+ #
+ .PHONY: clean clean_objects clean_dependancies clean_extern_objects clean_build \
+- clean_gpre_gen clean_icu clean_dbs clean_examples clean_makefiles \
++ clean_gpre_gen clean_dbs clean_examples clean_makefiles \
+ clean_editline clean_all
+
+
+@@ -669,8 +668,6 @@
+ $(RM) $(ROOT)/libtool
+ $(RM_R) $(ROOT)/autom4te.cache
+ -$(MAKE) -C $(ROOT)/extern/editline distclean
+-# -$(MAKE) -C $(ROOT)/extern/icu/source distclean
+- -$(MAKE) -C $(ROOT)/extern/btyacc distclean
+
+ clean_dbs:
+ $(RM) *.fdb *.FDB msg.timestamp
+@@ -687,9 +684,6 @@
+ clean_editline:
+ -$(MAKE) -C $(ROOT)/extern/editline clean
+
+-#clean_icu:
+-# -$(MAKE) -C $(ROOT)/extern/icu/source clean
+-
+ clean_tommath:
+ -$(MAKE) -C $(ROOT)/extern/libtommath clean
+
+diff -ruN Firebird-3.0.2.32703-0.orig/builds/posix/make.defaults Firebird-3.0.2.32703-0/builds/posix/make.defaults
+--- Firebird-3.0.2.32703-0.orig/builds/posix/make.defaults 2017-03-21 10:11:35.000000000 +0100
++++ Firebird-3.0.2.32703-0/builds/posix/make.defaults 2017-05-14 01:29:54.590235045 +0200
+@@ -155,7 +155,7 @@
+ AR= ar @AR_OPTIONS@
+ LN= @LN_S@
+ RANLIB= @RANLIB@
+-BTYACC=$(ROOT)/extern/btyacc/btyacc
++BTYACC=/usr/bin/btyacc
+ CLOOP=$(GEN_ROOT)/$(TARGET)/cloop/release/bin/cloop
+
+ CC = @CC@
diff --git a/dev-db/firebird/files/firebird.init.d.3.0 b/dev-db/firebird/files/firebird.init.d.3.0
new file mode 100644
index 000000000000..9fd4f8504769
--- /dev/null
+++ b/dev-db/firebird/files/firebird.init.d.3.0
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+name=${RC_SVCNAME}
+
+fbhomedir="/var/run/firebird"
+fblogdir="/var/log/firebird"
+pidfile="${fbhomedir}/firebird.pid"
+command="/usr/sbin/fbguard"
+command_args="-forever -daemon -pidfile $pidfile"
+
+start_stop_daemon_args="-p ${pidfile} -u ${FBUSER:-firebird}:${FBGROUP:-firebird}"
+
+depend() {
+ need net
+}
+
+start_pre() {
+ checkpath -q -d -m 0770 -o ${FBUSER:-firebird}:${FBGROUP:-firebird} ${fbhomedir} || return 1
+ checkpath -q -d -m 0770 -o ${FBUSER:-firebird}:${FBGROUP:-firebird} ${fblogdir} || return 1
+}
diff --git a/dev-db/firebird/files/firebird.logrotate b/dev-db/firebird/files/firebird.logrotate
new file mode 100644
index 000000000000..c87cd43f30f8
--- /dev/null
+++ b/dev-db/firebird/files/firebird.logrotate
@@ -0,0 +1,10 @@
+/var/log/firebird/firebird.log {
+ compress
+ weekly
+ missingok
+ rotate 52
+ size=+1024k
+ delaycompress
+ notifempty
+ create 644 firebird
+ }
diff --git a/dev-db/firebird/files/firebird.xinetd.3.0 b/dev-db/firebird/files/firebird.xinetd.3.0
new file mode 100644
index 000000000000..4e094bdf0627
--- /dev/null
+++ b/dev-db/firebird/files/firebird.xinetd.3.0
@@ -0,0 +1,11 @@
+service gds_db
+{
+ flags = REUSE
+ socket_type = stream
+ wait = no
+ user = firebird
+ log_on_success += USERID
+ log_on_failure += USERID
+ server = /usr/bin/firebird
+ disable = yes
+}
diff --git a/dev-db/firebird/firebird-3.0.2.32703.0-r2.ebuild b/dev-db/firebird/firebird-3.0.2.32703.0-r2.ebuild
new file mode 100644
index 000000000000..8ab5dd6952cf
--- /dev/null
+++ b/dev-db/firebird/firebird-3.0.2.32703.0-r2.ebuild
@@ -0,0 +1,235 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools flag-o-matic user versionator
+
+MY_P=${PN/f/F}-$(replace_version_separator 4 -)
+
+DESCRIPTION="Relational database offering many ANSI SQL:2003 and some SQL:2008 features"
+HOMEPAGE="https://www.firebirdsql.org/"
+SRC_URI="
+ mirror://sourceforge/firebird/${MY_P}.tar.bz2
+ doc? ( ftp://ftpc.inprise.com/pub/interbase/techpubs/ib_b60_doc.zip )"
+
+LICENSE="IDPL Interbase-1.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="doc examples +server xinetd"
+
+# FIXME: cloop?
+CDEPEND="
+ dev-libs/libtommath
+ dev-libs/icu:=
+ dev-libs/libedit
+"
+DEPEND="${CDEPEND}
+ >=dev-util/btyacc-3.0-r2
+ doc? ( app-arch/unzip )
+"
+RDEPEND="${CDEPEND}
+ xinetd? ( virtual/inetd )
+ !sys-cluster/ganglia
+"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/${P}"-unbundle.patch
+ "${FILESDIR}/${P}"-gcc6.patch
+ "${FILESDIR}/${P}"-cloop-compiler.patch
+)
+
+pkg_pretend() {
+ if [[ -e /var/run/${PN}/${PN}.pid ]] ; then
+ ewarn
+ ewarn "The presence of server connections may prevent isql or gsec"
+ ewarn "from establishing an embedded connection. Accordingly,"
+ ewarn "creating employee.fdb or security3.fdb could fail."
+ ewarn "It is more secure to stop the firebird daemon before running emerge."
+ ewarn
+ fi
+}
+
+pkg_setup() {
+ enewgroup firebird 450
+ enewuser firebird 450 /bin/sh /usr/$(get_libdir)/firebird firebird
+}
+
+check_sed() {
+ MSG="sed of $3, required $2 line(s) modified $1"
+ einfo "${MSG}"
+ [[ $1 -ge $2 ]] || die "${MSG}"
+}
+
+src_unpack() {
+ unpack "${MY_P}.tar.bz2"
+ if use doc; then
+ # Unpack docs
+ mkdir "manuals" || die
+ cd "manuals" || die
+ unpack ib_b60_doc.zip
+ fi
+}
+
+src_prepare() {
+ default
+
+ # Rename references to isql to fbsql
+ # sed vs patch for portability and addtional location changes
+ check_sed "$(sed -i -e 's:"isql :"fbsql :w /dev/stdout' \
+ src/isql/isql.epp | wc -l)" "1" "src/isql/isql.epp" # 1 line
+ check_sed "$(sed -i -e 's:isql :fbsql :w /dev/stdout' \
+ src/msgs/history2.sql | wc -l)" "4" "src/msgs/history2.sql" # 4 lines
+ check_sed "$(sed -i -e 's:--- ISQL:--- FBSQL:w /dev/stdout' \
+ -e 's:isql :fbsql :w /dev/stdout' \
+ -e 's:ISQL :FBSQL :w /dev/stdout' \
+ src/msgs/messages2.sql | wc -l)" "6" "src/msgs/messages2.sql" # 6 lines
+
+ find . -name \*.sh -exec chmod +x {} + || die
+ rm -r extern/{btyacc,editline,icu} || die
+
+ eautoreconf
+}
+
+src_configure() {
+ filter-flags -fprefetch-loop-arrays
+ filter-mfpmath sse
+
+ # otherwise this doesnt build with gcc-6
+ # http://tracker.firebirdsql.org/browse/CORE-5099
+ append-cflags -fno-sized-deallocation -fno-delete-null-pointer-checks
+ append-cxxflags -fno-sized-deallocation -fno-delete-null-pointer-checks -std=c++11
+
+ econf \
+ --prefix=/usr/$(get_libdir)/firebird \
+ --with-editline \
+ --with-system-editline \
+ --with-fbbin=/usr/bin \
+ --with-fbsbin=/usr/sbin \
+ --with-fbconf=/etc/${PN} \
+ --with-fblib=/usr/$(get_libdir) \
+ --with-fbinclude=/usr/include \
+ --with-fbdoc=/usr/share/doc/${PF} \
+ --with-fbudf=/usr/$(get_libdir)/${PN}/UDF \
+ --with-fbsample=/usr/share/doc/${PF}/examples \
+ --with-fbsample-db=/usr/share/doc/${PF}/examples/db \
+ --with-fbhelp=/usr/$(get_libdir)/${PN}/help \
+ --with-fbintl=/usr/$(get_libdir)/${PN}/intl \
+ --with-fbmisc=/usr/share/${PN} \
+ --with-fbsecure-db=/etc/${PN} \
+ --with-fbmsg=/usr/$(get_libdir)/${PN} \
+ --with-fblog=/var/log/${PN}/ \
+ --with-fbglock=/var/run/${PN} \
+ --with-fbplugins=/usr/$(get_libdir)/${PN}/plugins \
+ --with-gnu-ld \
+ ${myconf}
+}
+
+# from linux underground, merging into this here
+src_install() {
+ if use doc; then
+ dodoc -r doc
+ find "${WORKDIR}"/manuals -type f -iname "*.pdf" -exec dodoc '{}' + || die
+ fi
+
+ cd "${S}/gen/Release/${PN}" || die
+
+ doheader include/*
+ dolib.so lib/*.so*
+
+ # links for backwards compatibility
+ insinto /usr/$(get_libdir)
+ dosym libfbclient.so /usr/$(get_libdir)/libgds.so
+ dosym libfbclient.so /usr/$(get_libdir)/libgds.so.0
+ dosym libfbclient.so /usr/$(get_libdir)/libfbclient.so.1
+
+ insinto /usr/share/${PN}/msg
+ doins *.msg
+
+ use server || return
+
+ einfo "Renaming isql -> fbsql"
+ mv bin/isql bin/fbsql || die "failed to rename isql -> fbsql"
+
+ dobin bin/{fb_config,fbsql,fbsvcmgr,fbtracemgr,gbak,gfix,gpre,gsec,gsplit,gstat,nbackup,qli}
+ dosbin bin/{firebird,fbguard,fb_lock_print}
+
+ insinto /usr/share/${PN}/help
+ # why???
+ insopts -m0660 -o firebird -g firebird
+ doins help/help.fdb
+
+ exeinto /usr/$(get_libdir)/${PN}/intl
+ doexe intl/libfbintl.so
+ dosym libfbintl.so /usr/$(get_libdir)/${PN}/intl/fbintl.so
+
+ insinto /usr/$(get_libdir)/${PN}/intl
+ insopts -m0644 -o root -g root
+ doins intl/fbintl.conf
+
+ # plugins
+ exeinto /usr/$(get_libdir)/${PN}/plugins
+ doexe plugins/*.so
+ exeinto /usr/$(get_libdir)/${PN}/plugins/udr
+ doexe plugins/udr/*.so
+
+ exeinto /usr/$(get_libdir)/${PN}/UDF
+ doexe UDF/*.so
+
+ # logging (do we really need the perms?)
+ diropts -m 755 -o firebird -g firebird
+ dodir /var/log/${PN}
+ keepdir /var/log/${PN}
+
+ # logrotate
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ # configuration files
+ insinto /etc/${PN}/plugins
+ doins plugins/udr_engine.conf
+ insinto /etc/${PN}
+ doins {databases,fbtrace,firebird,plugins}.conf
+
+ # install secutity3.fdb
+ insopts -m0660 -o firebird -g firebird
+ doins security3.fdb
+
+ if use xinetd; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}/${PN}.xinetd.3.0" ${PN}
+ else
+ newinitd "${FILESDIR}/${PN}.init.d.3.0" ${PN}
+ fi
+
+ if use examples; then
+ cd examples
+ insinto /usr/share/${PN}/examples
+ insopts -m0644 -o root -g root
+ doins -r api
+ doins -r dbcrypt
+ doins -r include
+ doins -r interfaces
+ doins -r package
+ doins -r stat
+ doins -r udf
+ doins -r udr
+ doins CMakeLists.txt
+ doins functions.c
+ doins README
+ insinto /usr/share/${PN}/examples/empbuild
+ insopts -m0660 -o firebird -g firebird
+ doins empbuild/employee.fdb
+ fi
+
+ einfo
+ elog "Starting with version 3, server mode is set in firebird.conf"
+ elog "The default setting is superserver."
+ einfo
+ elog "If you're using UDFs, please remember to move them to /usr/$(get_libdir)/firebird/UDF"
+ einfo
+ ewarn "${CATEGORY}/${PF} is still a tad experimental. Please test and file bugs!"
+}
diff --git a/dev-db/firebird/metadata.xml b/dev-db/firebird/metadata.xml
new file mode 100644
index 000000000000..dfb6ac14ceca
--- /dev/null
+++ b/dev-db/firebird/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <longdescription>
+ Firebird is a relational database offering many ANSI SQL standard
+ features that runs on Linux, Windows, and a variety of Unix platforms.
+ Firebird offers excellent concurrency, high performance, and powerful
+ language support for stored procedures and triggers. It has been used
+ in production systems, under a variety of names, since 1981.
+ </longdescription>
+ <use>
+ <flag name="server">Install the server components of Firebird, not just the client</flag>
+ <flag name="xinetd">Install ClassicServer</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">firebird</remote-id>
+ </upstream>
+ <maintainer type="project">
+ <email>office@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-db/freetds-1.00.341 b/dev-db/freetds-1.00.341
deleted file mode 100644
index bfb5c6183808..000000000000
--- a/dev-db/freetds-1.00.341
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=configure
-DEPEND=sys-apps/sed sys-apps/grep virtual/awk gnutls? ( net-libs/gnutls ) iconv? ( virtual/libiconv ) iodbc? ( dev-db/libiodbc ) kerberos? ( virtual/krb5 ) odbc? ( dev-db/unixODBC ) ssl? ( !libressl? ( dev-libs/openssl:0 ) libressl? ( dev-libs/libressl ) )
-DESCRIPTION=Tabular Datastream Library
-EAPI=6
-HOMEPAGE=http://www.freetds.org/
-IUSE=gnutls iconv kerberos libressl mssql iodbc odbc ssl
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos
-LICENSE=GPL-2
-RDEPEND=sys-apps/sed sys-apps/grep virtual/awk gnutls? ( net-libs/gnutls ) iconv? ( virtual/libiconv ) iodbc? ( dev-db/libiodbc ) kerberos? ( virtual/krb5 ) odbc? ( dev-db/unixODBC ) ssl? ( !libressl? ( dev-libs/openssl:0 ) libressl? ( dev-libs/libressl ) ) sys-devel/binutils net-dns/bind-tools
-REQUIRED_USE=?? ( iodbc odbc )
-RESTRICT=test
-SLOT=0
-SRC_URI=ftp://ftp.freetds.org/pub/freetds/current/freetds-dev.1.00.341.tar.gz
-_md5_=d2cf458cc3211e7d9b8e5d28eb53c20e
diff --git a/dev-db/freetds-1.00.41 b/dev-db/freetds-1.00.41
deleted file mode 100644
index 387bfa3e0b82..000000000000
--- a/dev-db/freetds-1.00.41
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=configure prepare
-DEPEND=gnutls? ( net-libs/gnutls ) iconv? ( virtual/libiconv ) iodbc? ( dev-db/libiodbc ) kerberos? ( virtual/krb5 ) odbc? ( dev-db/unixODBC ) ssl? ( !libressl? ( dev-libs/openssl:0 ) libressl? ( dev-libs/libressl ) ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=Tabular Datastream Library
-EAPI=6
-HOMEPAGE=http://www.freetds.org/
-IUSE=gnutls iconv kerberos libressl mssql iodbc odbc ssl
-KEYWORDS=alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos
-LICENSE=GPL-2
-RDEPEND=gnutls? ( net-libs/gnutls ) iconv? ( virtual/libiconv ) iodbc? ( dev-db/libiodbc ) kerberos? ( virtual/krb5 ) odbc? ( dev-db/unixODBC ) ssl? ( !libressl? ( dev-libs/openssl:0 ) libressl? ( dev-libs/libressl ) ) net-dns/bind-tools sys-apps/grep sys-apps/sed virtual/awk
-RESTRICT=test
-SLOT=0
-SRC_URI=ftp://ftp.freetds.org/pub/freetds/stable/freetds-1.00.41.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 libtool 0081a71a261724730ec4c248494f044d multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=9d0321e0dc8584e2470fbbebc3f07043
diff --git a/dev-db/freetds-1.00.54-r1 b/dev-db/freetds-1.00.54-r1
deleted file mode 100644
index 7f3737f78565..000000000000
--- a/dev-db/freetds-1.00.54-r1
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=configure prepare
-DEPEND=sys-apps/sed sys-apps/grep virtual/awk gnutls? ( net-libs/gnutls ) iconv? ( virtual/libiconv ) iodbc? ( dev-db/libiodbc ) kerberos? ( virtual/krb5 ) odbc? ( dev-db/unixODBC ) ssl? ( !libressl? ( dev-libs/openssl:0 ) libressl? ( dev-libs/libressl ) ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=Tabular Datastream Library
-EAPI=6
-HOMEPAGE=http://www.freetds.org/
-IUSE=gnutls iconv kerberos libressl mssql iodbc odbc ssl
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos
-LICENSE=GPL-2
-RDEPEND=sys-apps/sed sys-apps/grep virtual/awk gnutls? ( net-libs/gnutls ) iconv? ( virtual/libiconv ) iodbc? ( dev-db/libiodbc ) kerberos? ( virtual/krb5 ) odbc? ( dev-db/unixODBC ) ssl? ( !libressl? ( dev-libs/openssl:0 ) libressl? ( dev-libs/libressl ) ) sys-devel/binutils net-dns/bind-tools
-REQUIRED_USE=?? ( iodbc odbc )
-RESTRICT=test
-SLOT=0
-SRC_URI=ftp://ftp.freetds.org/pub/freetds/stable/freetds-1.00.54.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 libtool 0081a71a261724730ec4c248494f044d multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=1c1966dbace46da231f7453d11b848ca
diff --git a/dev-db/freetds-9999 b/dev-db/freetds-9999
deleted file mode 100644
index 56cc59b3ee16..000000000000
--- a/dev-db/freetds-9999
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=configure prepare unpack
-DEPEND=sys-apps/sed sys-apps/grep virtual/awk gnutls? ( net-libs/gnutls ) iconv? ( virtual/libiconv ) iodbc? ( dev-db/libiodbc ) kerberos? ( virtual/krb5 ) odbc? ( dev-db/unixODBC ) ssl? ( !libressl? ( dev-libs/openssl:0 ) libressl? ( dev-libs/libressl ) ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 >=dev-vcs/git-1.8.2.1[curl]
-DESCRIPTION=Tabular Datastream Library
-EAPI=6
-HOMEPAGE=http://www.freetds.org/
-IUSE=gnutls iconv kerberos libressl mssql iodbc odbc ssl
-LICENSE=GPL-2
-RDEPEND=sys-apps/sed sys-apps/grep virtual/awk gnutls? ( net-libs/gnutls ) iconv? ( virtual/libiconv ) iodbc? ( dev-db/libiodbc ) kerberos? ( virtual/krb5 ) odbc? ( dev-db/unixODBC ) ssl? ( !libressl? ( dev-libs/openssl:0 ) libressl? ( dev-libs/libressl ) ) sys-devel/binutils net-dns/bind-tools
-REQUIRED_USE=?? ( iodbc odbc )
-RESTRICT=test
-SLOT=0
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 git-r3 8f6de46b0aa318aea0e8cac62ece098b libtool 0081a71a261724730ec4c248494f044d multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=6dcd4117089f9e8ef8d126b77e15c809
diff --git a/dev-db/freetds/Manifest b/dev-db/freetds/Manifest
new file mode 100644
index 000000000000..aad44179f26b
--- /dev/null
+++ b/dev-db/freetds/Manifest
@@ -0,0 +1,9 @@
+AUX without-flags.patch 1859 BLAKE2B 846c177b9773c27b329a23f54592a2b789b0d8d123a80b0b990b8938fed8a27c2ad5eac33eeb5e9caf5d12a59943048092c277ab45a34948bf19a3605d036ded SHA512 b981dd2ddab06e4c163d847de9a1086515775abacbbcf10be5d67388ce5502a37a23bb6c94eaf36082dc36d30060ff12a38fd9ceb6b93e3f8116d2de7ddcb2e7
+DIST freetds-1.00.41.tar.gz 2904915 BLAKE2B d92789c9a08dc9f7f04e8efc828841c3cace0e5a3affd11d8751a785db70db79fedffb3745a681b960d30a11efbb4fa457805eb4f72444eecc20eb65d46e2d82 SHA512 dec3197a6478fc59b7386f9a7a562df8b581bba7184210c42f26827e957b9746e6820d687a9c6cbcd7c825fc5d4f556547c0483d06c786a064d5c4859db4daa1
+DIST freetds-1.00.54.tar.gz 2907015 BLAKE2B 332888565c2890657ca6440e4bbe92e0324daf6c6e67f3fa2243bd2d5746e7e9aa100a7838d33cc8fa93e71e5d6a650976ce5164317f3147b192ceb915362534 SHA512 a2a5034705fe06ee38b085f980f6ddf086789abc9485331fdaf829e7243f7ba95a5f0c612d7e3ec9e10f28a5c8b3a3fd8e7853d66f67110bd860afce949c798c
+DIST freetds-dev.1.00.341.tar.gz 3002134 BLAKE2B c9396c1f205e13c9f3449bef19830cf3b6c2fa72539555ebd6bc1532c014472c862ba2ac7f495bee8f53d640d628c6b15bb50183585d43cf3dbbea4e314636d2 SHA512 fd691535dfa5c97463ff72056cfa5721557b71e41b6186ffcb08e193e51214cf966a33ee55b8e538a6f035aeeef14ac5b15fe8758f1afea9e1252a3b8951ba58
+EBUILD freetds-1.00.341.ebuild 1856 BLAKE2B 8cf069020ba0fa8a06b2b4af9e760a0cc46ce5a7fdd4a48ec5286f1550ceb316cfa096a0281e4e6f115d8f83a1535bfb51015b79eea7c86c202d6ab3758b8a42 SHA512 08a74242a8df775fc7360e7dac588713acce0abb1cdeee06219aeb051083622992fdaa94369fed37cefb1afac911af3d3b59f2cf35e8362e77f63ad0c43c5e32
+EBUILD freetds-1.00.41.ebuild 1988 BLAKE2B 58e5b9ecc1ec5196c3e4e50cfccefa6ca44510ba344b1d024f1280667e47d4351ce1946dea1f963cc3feb0a8a5382812e046173579fd961d522b3155ad422261 SHA512 a48ffe06b8303885d2e795d9cfe756979652460da4912de33dde0a06b635c3466f3abebfdad17ef7aa8cc35fb5f79eeca8457f18c2999108b13367eb2a8d7e02
+EBUILD freetds-1.00.54-r1.ebuild 2064 BLAKE2B 6ec6575c86163e8678fbf841fbe8aa85e5fc7fd6e1839ff423dc542718e8ef88c2ef19e178bc7f76493e78b8e6edbbcfec87af85ebad2ca1153e07cdbb15e664 SHA512 48931c5f0e49cdd9f07e413339a0e647a4b48eec562cfe337a6c57243d11a99d47977d8987902a6ecafa3930a94a1102912c57359e146f155f6fcf6ee5753ce0
+EBUILD freetds-9999.ebuild 1603 BLAKE2B 4a6149df3ad684b7246fed4f19c457f8a74c12a6ad89114d04890a86f9a41a02f7023c07dc55c139865091aed89a70accf993dc77bae4ffdc1f0bb3ff1698794 SHA512 264144b12f57bd34d1ace56458e4ea2cda0f4f5fd9f789373d8e7b4695cdf910562441359218b0c7c8bac446c8fa5673c56a37d0cfef444fc6d11fe57f2121b9
+MISC metadata.xml 166 BLAKE2B c254f1fb642881aba57637be14fb0a89b10384f91a128feaec3a8c870d76efc2cbacb92caccc0dee2dd19a5ac5eaf8643080dafa05c4e2ac96a68568927e5afd SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84
diff --git a/dev-db/freetds/files/without-flags.patch b/dev-db/freetds/files/without-flags.patch
new file mode 100644
index 000000000000..1f04a90ac6af
--- /dev/null
+++ b/dev-db/freetds/files/without-flags.patch
@@ -0,0 +1,48 @@
+From c4b9d766e009273c70d8953767ef2fcb95f65314 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 11 Aug 2017 16:45:15 -0400
+Subject: [PATCH] configure.ac: support "without" versions of three ./configure
+ flags.
+
+The --with-iodbc, --with-unixodbc, and --with-odbc-nodm flags all use
+the standard AC_ARG_WITH macro. The resulting ./configure script
+accepts e.g. --without-iodbc to indicate that the user does not want
+to enable iODBC, and in place of a path the word "no" is placed into
+the $with_iodbc variable. The current configure.ac doesn't handle that
+and instead treats "no" as a path. This commit updates configure.ac to
+ignore "no" as the value of those three flags.
+---
+ configure.ac | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4f41033ae..9dfe12bb7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -546,7 +546,7 @@ esac
+
+ AC_ARG_WITH(iodbc,
+ AS_HELP_STRING([--with-iodbc=DIR], [build odbc driver against iODBC in DIR]))
+-if test "$with_iodbc"; then
++if test "x$with_iodbc" != "x" -a "x$with_iodbc" != "xno"; then
+ if echo "$with_iodbc" | grep -v '^/'; then
+ with_iodbc="$PWD/$with_iodbc"
+ fi
+@@ -563,7 +563,7 @@ fi
+
+ AC_ARG_WITH(unixodbc,
+ AS_HELP_STRING([--with-unixodbc=DIR], [build odbc driver against unixODBC in DIR]))
+-if test "$with_unixodbc"; then
++if test "x$with_unixodbc" != "x" -a "x$with_unixodbc" != "xno"; then
+ if echo "$with_unixodbc" | grep -v '^/'; then
+ with_unixodbc="$PWD/$with_unixodbc"
+ fi
+@@ -588,7 +588,7 @@ fi
+
+ AC_ARG_WITH(odbc_nodm,
+ AS_HELP_STRING([--with-odbc-nodm=DIR], [build odbc using headers in DIR/include]))
+-if test "$with_odbc_nodm"; then
++if test "x$with_odbc_nodm" != "x" -a "x$with_odbc_nodm" != "xno"; then
+ if echo "$with_odbc_nodm" | grep -v '^/'; then
+ with_odbc_nodm="$PWD/$with_odbc_nodm"
+ fi
diff --git a/dev-db/freetds/freetds-1.00.341.ebuild b/dev-db/freetds/freetds-1.00.341.ebuild
new file mode 100644
index 000000000000..f975c08fe565
--- /dev/null
+++ b/dev-db/freetds/freetds-1.00.341.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# This is from the "current" release series, because the "stable" series
+# is a little too stable for us (missing bug fixes, and so on).
+MY_PN="${PN}-dev"
+
+DESCRIPTION="Tabular Datastream Library"
+HOMEPAGE="http://www.freetds.org/"
+SRC_URI="ftp://ftp.freetds.org/pub/${PN}/current/${MY_PN}.${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64
+ ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos"
+IUSE="gnutls iconv kerberos libressl mssql iodbc odbc ssl"
+RESTRICT="test"
+
+# sed, grep, and awk are used by the build system and the osql script.
+COMMON_DEPEND="sys-apps/sed
+ sys-apps/grep
+ virtual/awk
+ gnutls? ( net-libs/gnutls )
+ iconv? ( virtual/libiconv )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ odbc? ( dev-db/unixODBC )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )"
+
+DEPEND="${COMMON_DEPEND}"
+
+# bind-tools is needed because the osql script calls "host".
+# binutils is for "strings".
+RDEPEND="${COMMON_DEPEND}
+ sys-devel/binutils
+ net-dns/bind-tools"
+
+# iODBC and unixODBC are mutually-exclusive choices for
+# the ODBC driver manager. Future versions of FreeTDS
+# will throw an error if you specify both.
+REQUIRED_USE="?? ( iodbc odbc )"
+
+S="${WORKDIR}/${MY_PN}.${PV}"
+
+src_configure() {
+ local myconf=( $(use_with iodbc) )
+ myconf+=( $(use_with odbc unixodbc "${EPREFIX}/usr") )
+ myconf+=( $(use_enable iconv libiconv) )
+ myconf+=( $(use_with iconv libiconv-prefix "${EPREFIX}/usr") )
+ myconf+=( $(use_enable kerberos krb5) )
+ myconf+=( $(use_enable mssql msdblib) )
+ myconf+=( $(use_with gnutls) )
+ myconf+=( $(use_with ssl openssl "${EPREFIX}/usr") )
+ myconf+=( --docdir="/usr/share/doc/${PF}" )
+
+ econf "${myconf[@]}"
+}
diff --git a/dev-db/freetds/freetds-1.00.41.ebuild b/dev-db/freetds/freetds-1.00.41.ebuild
new file mode 100644
index 000000000000..a68dba1cf161
--- /dev/null
+++ b/dev-db/freetds/freetds-1.00.41.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools
+
+DESCRIPTION="Tabular Datastream Library"
+HOMEPAGE="http://www.freetds.org/"
+SRC_URI="ftp://ftp.freetds.org/pub/freetds/stable/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos"
+IUSE="gnutls iconv kerberos libressl mssql iodbc odbc ssl"
+RESTRICT="test"
+
+DEPEND="
+ gnutls? ( net-libs/gnutls )
+ iconv? ( virtual/libiconv )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ odbc? ( dev-db/unixODBC )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )"
+
+# bind-tools is needed because the osql script calls "host".
+RDEPEND="${DEPEND}
+ net-dns/bind-tools
+ sys-apps/grep
+ sys-apps/sed
+ virtual/awk"
+
+src_prepare() {
+ default
+ # Fix the iodbc include path in the configure script. Otherwise, it
+ # can't find isql.h.
+ sed -ie 's:with_iodbc/include":with_iodbc/include/iodbc":' \
+ configure.ac \
+ || die "failed to fix the iodbc include path in configure.ac"
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=( --with-tdsver=7.4 )
+
+ # The configure script doesn't support --without-{i,unix}odbc and
+ # it will still search for the associated headers if you try that
+ # Instead, to disable {i,unix}odbc, you just have to omit the
+ # --with-{i,unix}odbc line.
+ if use iodbc ; then
+ myconf+=( --enable-odbc --with-iodbc="${EPREFIX}/usr" )
+ fi
+
+ if use odbc ; then
+ myconf+=( --enable-odbc --with-unixodbc="${EPREFIX}/usr" )
+ fi
+
+ myconf+=( $(use_enable iconv libiconv) )
+ use iconv && myconf+=( --with-libiconv-prefix="${EPREFIX}/usr" )
+ myconf+=( $(use_enable kerberos krb5) )
+ myconf+=( $(use_enable mssql msdblib) )
+ myconf+=( $(use_with gnutls) )
+ myconf+=( $(use_with ssl openssl "${EPREFIX}/usr") )
+
+ # The docdir doesn't contain ${PV} without this
+ myconf+=( --docdir="/usr/share/doc/${PF}" )
+
+ econf "${myconf[@]}"
+}
diff --git a/dev-db/freetds/freetds-1.00.54-r1.ebuild b/dev-db/freetds/freetds-1.00.54-r1.ebuild
new file mode 100644
index 000000000000..0032727f6bf8
--- /dev/null
+++ b/dev-db/freetds/freetds-1.00.54-r1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools
+
+DESCRIPTION="Tabular Datastream Library"
+HOMEPAGE="http://www.freetds.org/"
+SRC_URI="ftp://ftp.freetds.org/pub/freetds/stable/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos"
+IUSE="gnutls iconv kerberos libressl mssql iodbc odbc ssl"
+RESTRICT="test"
+
+# sed, grep, and awk are used by the build system and the osql script.
+COMMON_DEPEND="sys-apps/sed
+ sys-apps/grep
+ virtual/awk
+ gnutls? ( net-libs/gnutls )
+ iconv? ( virtual/libiconv )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ odbc? ( dev-db/unixODBC )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )"
+
+DEPEND="${COMMON_DEPEND}"
+
+# bind-tools is needed because the osql script calls "host".
+# binutils is for "strings".
+RDEPEND="${COMMON_DEPEND}
+ sys-devel/binutils
+ net-dns/bind-tools"
+
+# iODBC and unixODBC are mutually-exclusive choices for
+# the ODBC driver manager. Future versions of FreeTDS
+# will throw an error if you specify both.
+REQUIRED_USE="?? ( iodbc odbc )"
+
+# Won't be necessary in the next release.
+PATCHES=( "${FILESDIR}/without-flags.patch" )
+
+src_prepare() {
+ default
+
+ # Fix the iodbc include path in the configure script. Otherwise, it
+ # can't find isql.h.
+ sed -ie 's:with_iodbc/include":with_iodbc/include/iodbc":' \
+ configure.ac \
+ || die "failed to fix the iodbc include path in configure.ac"
+
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=( $(use_with iodbc iodbc "${EPREFIX}/usr") )
+ myconf+=( $(use_with odbc unixodbc "${EPREFIX}/usr") )
+ myconf+=( $(use_enable iconv libiconv) )
+ myconf+=( $(use_with iconv libiconv-prefix "${EPREFIX}/usr") )
+ myconf+=( $(use_enable kerberos krb5) )
+ myconf+=( $(use_enable mssql msdblib) )
+ myconf+=( $(use_with gnutls) )
+ myconf+=( $(use_with ssl openssl "${EPREFIX}/usr") )
+ myconf+=( --docdir="/usr/share/doc/${PF}" )
+
+ econf "${myconf[@]}"
+}
diff --git a/dev-db/freetds/freetds-9999.ebuild b/dev-db/freetds/freetds-9999.ebuild
new file mode 100644
index 000000000000..ec6e2cf418f3
--- /dev/null
+++ b/dev-db/freetds/freetds-9999.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools git-r3
+
+DESCRIPTION="Tabular Datastream Library"
+HOMEPAGE="http://www.freetds.org/"
+EGIT_REPO_URI="https://github.com/FreeTDS/${PN}.git"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="gnutls iconv kerberos libressl mssql iodbc odbc ssl"
+RESTRICT="test"
+
+# sed, grep, and awk are used by the build system and the osql script.
+COMMON_DEPEND="sys-apps/sed
+ sys-apps/grep
+ virtual/awk
+ gnutls? ( net-libs/gnutls )
+ iconv? ( virtual/libiconv )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ odbc? ( dev-db/unixODBC )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )"
+
+DEPEND="${COMMON_DEPEND}"
+
+# bind-tools is needed because the osql script calls "host".
+# binutils is for "strings".
+RDEPEND="${COMMON_DEPEND}
+ sys-devel/binutils
+ net-dns/bind-tools"
+
+# iODBC and unixODBC are mutually-exclusive choices for
+# the ODBC driver manager. Future versions of FreeTDS
+# will throw an error if you specify both.
+REQUIRED_USE="?? ( iodbc odbc )"
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=( $(use_with iodbc) )
+ myconf+=( $(use_with odbc unixodbc "${EPREFIX}/usr") )
+ myconf+=( $(use_enable iconv libiconv) )
+ myconf+=( $(use_with iconv libiconv-prefix "${EPREFIX}/usr") )
+ myconf+=( $(use_enable kerberos krb5) )
+ myconf+=( $(use_enable mssql msdblib) )
+ myconf+=( $(use_with gnutls) )
+ myconf+=( $(use_with ssl openssl "${EPREFIX}/usr") )
+ myconf+=( --docdir="/usr/share/doc/${PF}" )
+
+ econf "${myconf[@]}"
+}
diff --git a/dev-db/freetds/metadata.xml b/dev-db/freetds/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/dev-db/freetds/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/dev-db/gigabase-3.83-r2 b/dev-db/gigabase-3.83-r2
deleted file mode 100644
index 4db2dbbd0f0c..000000000000
--- a/dev-db/gigabase-3.83-r2
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile configure install postinst test
-DEPEND=doc? ( app-doc/doxygen )
-DESCRIPTION=OO-DBMS with interfaces for C/C++/Java/PHP/Perl
-EAPI=6
-HOMEPAGE=http://www.garret.ru/~knizhnik/gigabase.html
-IUSE=doc static-libs
-KEYWORDS=~amd64 ~x86
-LICENSE=MIT
-SLOT=0
-SRC_URI=mirror://sourceforge/gigabase/gigabase-3.83.tar.gz
-_md5_=27d01a92ce8d4864bbe399c1ab41b241
diff --git a/dev-db/gigabase/Manifest b/dev-db/gigabase/Manifest
new file mode 100644
index 000000000000..6ed28db46608
--- /dev/null
+++ b/dev-db/gigabase/Manifest
@@ -0,0 +1,6 @@
+AUX gigabase-3.83-cpp14.patch 978 BLAKE2B 652c9d72e54a984e4ae2531be8b31d2ac279b95590d7756869ed2e915e0ebd500a9acf68f74c9ac8439cf1195a04d8546f7b0915333c0ac0dec514cc3480e7d3 SHA512 93a4ca2af7161af11c6b05af9a608884ca3991bf1615866a1c12271ad4cbf7748fae05dd7ad82dc2dc69fc36423039115242f38688dcdddb166d4e1c8d53b305
+AUX gigabase-3.83-fix-build-system.patch 2139 BLAKE2B b93b6d0dac817905a8d77476ab6abf8985155e429c47c527f8c909b1ec453ce1c9498b01811ade562c3d376bd6893cd545fb0452fa599b0378bffa0b5ad2a980 SHA512 a1f80fbf4a06f7646c617dc572066bf73255c2040512407d2440d5196d7a551f62df1cdfc276d890632c6567a11951bf42b20c82c91604696dc1414420bbf0df
+AUX gigabase-3.83-fix-dereferencing.patch 5947 BLAKE2B f10c92dcb5c2f48768b581e1f1359abb2c47b365fee214e4867791e059101ef9db1aced22c0cdaafebe99e65ee41ca1cb4fecb03dc02f7a3a43126865a36433a SHA512 7603024ce9eded76a36317a52cf49783fe37bc5cc0642648031f9f2c216d6a7234cdd49a019605b7a169f4d4277a052675adb809efc161160b3e9d847ddec522
+DIST gigabase-3.83.tar.gz 1746301 BLAKE2B f9168a7182f2a152a36a9bda12c91f3f2507f17a28e3cac9a58ed25795fdee73e397021ef46f3ad75dffb2f76b81c47d3d8d4cc900b1345619939e450daa6e9a SHA512 df2eab9b8ceae831c24a25f010cf06ebdd38fdf2f7478116b0d769092d6e4575c5c95222562410752df462a8bf3cc2f205c05d3adfaeb1634e82f443529957e5
+EBUILD gigabase-3.83-r2.ebuild 1164 BLAKE2B 6711fc6b21a32aad33e2178441ada39f1f72872d5888ef723fa31af498b8f7091fc78019f68dbed4746ff11ba78f00a1f31b36f25e44baa7e5149e954109775a SHA512 bb2ffc6bf438f919e0a8afb3815e0dc1056b285cd0d5d26cb43afe5433a67c7d2b79c6a07945d1901c78dfb0a16d94c3cb1eb58094328b0f41ca8675fc392622
+MISC metadata.xml 1528 BLAKE2B bd59a6efb4ae6eb108992929bb590318a5d4f1266bcb5da81675679eb3c305398464aba74657d6fed0e391cd2baf79901423065f04cd00c5980706b6342738d8 SHA512 3361591956fa707cf0607695ec180eb011f832519dd8147406ea2c065f7809758b145b007ad177cc5e15b5ca7416c91eaaae49ed3a6a3bd028e4c153fd12851c
diff --git a/dev-db/gigabase/files/gigabase-3.83-cpp14.patch b/dev-db/gigabase/files/gigabase-3.83-cpp14.patch
new file mode 100644
index 000000000000..47d2a1a540ff
--- /dev/null
+++ b/dev-db/gigabase/files/gigabase-3.83-cpp14.patch
@@ -0,0 +1,34 @@
+This patch fixes GCC6 (C++14) compilation errors. It replaces two invalid macro
+calls with correct code in one place. It also removes redefinitions of fmax and
+fmin functions which exist in standard library since C++11.
+Gentoo-bug: https://bugs.gentoo.org/show_bug.cgi?id=594550
+
+--- a/testddl.cpp
++++ b/testddl.cpp
+@@ -102,8 +102,13 @@
+
+ REGISTER(Record);
+
++#if __cplusplus < 201103L
+ USER_FUNC(sin);
+ USER_FUNC(cos);
++#else
++static dbUserFunction fsin_descriptor((double (*)(double))&sin, STRLITERAL("sin"));
++static dbUserFunction fcos_descriptor((double (*)(double))&cos, STRLITERAL("cos"));
++#endif
+
+ int __cdecl main()
+ {
+--- a/testtimeseries.cpp
++++ b/testtimeseries.cpp
+@@ -47,8 +47,10 @@
+ REGISTER(Stock);
+
+ inline int random(unsigned mod) { return rand() % mod; }
++#if __cplusplus < 201103L
+ inline float fmax(float x, float y) { return x > y ? x : y; }
+ inline float fmin(float x, float y) { return x < y ? x : y; }
++#endif
+
+ int main(int argc, char* argv[])
+ {
diff --git a/dev-db/gigabase/files/gigabase-3.83-fix-build-system.patch b/dev-db/gigabase/files/gigabase-3.83-fix-build-system.patch
new file mode 100644
index 000000000000..d807bc9a7fdb
--- /dev/null
+++ b/dev-db/gigabase/files/gigabase-3.83-fix-build-system.patch
@@ -0,0 +1,63 @@
+Fix build system to respect DESTDIR and rename subsql to subsql-gdb,
+in order to avoid name clash with FastDB version of subsql.
+
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -21,7 +21,7 @@
+ # Place where to copy Gigabase library
+ libdir = @libdir@
+
+-# Place where to copy Gigabase subsql utility
++# Place where to copy Gigabase subsql-gdb utility
+ bindir = @bindir@
+
+ VERSION = 2
+@@ -42,7 +42,7 @@
+
+ GB_LIB = libgigabase$(SUFF).${LIBEXT}
+ CLI_LIB = libcli$(SUFF).${LIBEXT}
+-EXES = subsql
++EXES = subsql-gdb
+
+ EXAMPLES = guess testdb testjoin testddl testperf testspat testperf2 testsync testiref testtrav testidx testidx2 clitest testblob testleak testsession testtimeseries testtl
+ WEB_EXAMPLES = cgistub bugdb clidb
+@@ -90,8 +90,8 @@
+ clitest: clitest.o $(CLI_LIB)
+ $(LIBTOOL) --mode=link $(LD) $(LDFLAGS) -o clitest clitest.o $(CLI_LIB) $(SOCKLIBS)
+
+-subsql: subsql.o $(GB_LIB)
+- $(LIBTOOL) --mode=link $(LD) $(LDFLAGS) -o subsql subsql.o $(GB_LIB) $(SOCKLIBS)
++subsql-gdb: subsql.o $(GB_LIB)
++ $(LIBTOOL) --mode=link $(LD) $(LDFLAGS) -o subsql-gdb subsql.o $(GB_LIB) $(SOCKLIBS)
+
+ bugdb: bugdb.o $(GB_LIB)
+ $(LIBTOOL) --mode=link $(LD) $(LDFLAGS) -o bugdb bugdb.o $(GB_LIB) $(SOCKLIBS)
+@@ -153,18 +153,18 @@
+ testleak: testleak.o $(GB_LIB)
+ $(LIBTOOL) --mode=link $(LD) $(LDFLAGS) -o testleak testleak.o $(GB_LIB) $(SLHACK)
+
+-install: subsql $(GB_LIB) $(CLI_LIB)
+- mkdir -p $(includedir)
+- cp $(INCS) $(CLI_INCS) $(includedir)
+- mkdir -p $(libdir)
+- $(LIBTOOL) --mode=install $(INSTALL) $(GB_LIB) $(CLI_LIB) $(libdir)
+- mkdir -p $(bindir)
+- if test -x .libs/subsql ; then \
+- cp .libs/subsql $(bindir); \
++install: subsql-gdb $(GB_LIB) $(CLI_LIB)
++ mkdir -p $(DESTDIR)$(includedir)
++ cp $(INCS) $(CLI_INCS) $(DESTDIR)$(includedir)
++ mkdir -p $(DESTDIR)$(libdir)
++ $(LIBTOOL) --mode=install $(INSTALL) $(GB_LIB) $(CLI_LIB) $(DESTDIR)$(libdir)
++ mkdir -p $(DESTDIR)$(bindir)
++ if test -x .libs/subsql-gdb ; then \
++ cp .libs/subsql-gdb $(DESTDIR)$(bindir); \
+ else \
+- cp subsql $(bindir); \
++ cp subsql-gdb $(DESTDIR)$(bindir); \
+ fi
+-# strip $(bindir)/subsql
++# strip $(bindir)/subsql-gdb
+
+ clean:
+ rm -f *.o *.lo core *~
diff --git a/dev-db/gigabase/files/gigabase-3.83-fix-dereferencing.patch b/dev-db/gigabase/files/gigabase-3.83-fix-dereferencing.patch
new file mode 100644
index 000000000000..d2f0669d24fa
--- /dev/null
+++ b/dev-db/gigabase/files/gigabase-3.83-fix-dereferencing.patch
@@ -0,0 +1,182 @@
+--- a/session.cpp
++++ b/session.cpp
+@@ -131,7 +131,7 @@
+ throw CursorException("Cursor is not opened");
+ }
+ fillBuffer(sizeof(oid_t));
+- oid_t currOid = *(oid_t*)&sockBuf[bufPos];
++ oid_t currOid = *(oid_t*)(sockBuf + bufPos);
+ bufPos += sizeof(oid_t);
+ if (currObj != NULL) {
+ delete[] currObj;
+@@ -139,7 +139,7 @@
+ }
+ if (currOid != 0) {
+ fillBuffer(sizeof(int));
+- size_t size = *(int*)&sockBuf[bufPos];
++ size_t size = *(int*)(sockBuf + bufPos);
+ if (size <= SOCKET_BUFFER_SIZE) {
+ fillBuffer(size);
+ if (record != NULL) {
+--- a/database.cpp
++++ b/database.cpp
+@@ -739,40 +739,55 @@
+ return;
+
+ case dbvmInvokeMethodBool:
+- execute(expr->ref.base, iattr, sattr);
+- expr->ref.field->method->invoke(sattr.base, &sattr.bvalue);
+- sattr.bvalue = *(bool*)&sattr.bvalue;
+- iattr.free(sattr);
+- return;
++ {
++ bool val;
++ execute(expr->ref.base, iattr, sattr);
++ expr->ref.field->method->invoke(sattr.base, &val);
++ sattr.bvalue = val;
++ iattr.free(sattr);
++ return;
++ }
+ case dbvmInvokeMethodInt1:
+- execute(expr->ref.base, iattr, sattr);
+- expr->ref.field->method->invoke(sattr.base, &sattr.ivalue);
+- sattr.ivalue = *(int1*)&sattr.ivalue;
+- iattr.free(sattr);
+- return;
++ {
++ int1 val;
++ execute(expr->ref.base, iattr, sattr);
++ expr->ref.field->method->invoke(sattr.base, &val);
++ sattr.ivalue = val;
++ iattr.free(sattr);
++ return;
++ }
+ case dbvmInvokeMethodInt2:
+- execute(expr->ref.base, iattr, sattr);
+- expr->ref.field->method->invoke(sattr.base, &sattr.ivalue);
+- sattr.ivalue = *(int2*)&sattr.ivalue;
+- iattr.free(sattr);
+- return;
++ {
++ int2 val;
++ execute(expr->ref.base, iattr, sattr);
++ expr->ref.field->method->invoke(sattr.base, &val);
++ sattr.ivalue = val;
++ iattr.free(sattr);
++ return;
++ }
+ case dbvmInvokeMethodInt4:
+- execute(expr->ref.base, iattr, sattr);
+- expr->ref.field->method->invoke(sattr.base, &sattr.ivalue);
+- sattr.ivalue = *(int4*)&sattr.ivalue;
+- iattr.free(sattr);
+- return;
++ {
++ int4 val;
++ execute(expr->ref.base, iattr, sattr);
++ expr->ref.field->method->invoke(sattr.base, &val);
++ sattr.ivalue = val;
++ iattr.free(sattr);
++ return;
++ }
+ case dbvmInvokeMethodInt8:
+ execute(expr->ref.base, iattr, sattr);
+ expr->ref.field->method->invoke(sattr.base, &sattr.ivalue);
+ iattr.free(sattr);
+ return;
+ case dbvmInvokeMethodReal4:
+- execute(expr->ref.base, iattr, sattr);
+- expr->ref.field->method->invoke(sattr.base, &sattr.fvalue);
+- sattr.fvalue = *(real4*)&sattr.fvalue;
+- iattr.free(sattr);
+- return;
++ {
++ real4 val;
++ execute(expr->ref.base, iattr, sattr);
++ expr->ref.field->method->invoke(sattr.base, &val);
++ sattr.fvalue = val;
++ iattr.free(sattr);
++ return;
++ }
+ case dbvmInvokeMethodReal8:
+ execute(expr->ref.base, iattr, sattr);
+ expr->ref.field->method->invoke(sattr.base, &sattr.fvalue);
+@@ -792,28 +807,43 @@
+ return;
+
+ case dbvmInvokeSelfMethodBool:
+- expr->ref.field->method->invoke(iattr.record, &sattr.bvalue);
+- sattr.bvalue = *(bool*)&sattr.bvalue;
+- return;
++ {
++ bool val;
++ expr->ref.field->method->invoke(iattr.record, &val);
++ sattr.bvalue = val;
++ return;
++ }
+ case dbvmInvokeSelfMethodInt1:
+- expr->ref.field->method->invoke(iattr.record, &sattr.ivalue);
+- sattr.ivalue = *(int1*)&sattr.ivalue;
+- return;
++ {
++ int1 val;
++ expr->ref.field->method->invoke(iattr.record, &val);
++ sattr.ivalue = val;
++ return;
++ }
+ case dbvmInvokeSelfMethodInt2:
+- expr->ref.field->method->invoke(iattr.record, &sattr.ivalue);
+- sattr.ivalue = *(int2*)&sattr.ivalue;
+- return;
++ {
++ int2 val;
++ expr->ref.field->method->invoke(iattr.record, &val);
++ sattr.ivalue = val;
++ return;
++ }
+ case dbvmInvokeSelfMethodInt4:
+- expr->ref.field->method->invoke(iattr.record, &sattr.ivalue);
+- sattr.ivalue = *(int4*)&sattr.ivalue;
+- return;
++ {
++ int4 val;
++ expr->ref.field->method->invoke(iattr.record, &val);
++ sattr.ivalue = val;
++ return;
++ }
+ case dbvmInvokeSelfMethodInt8:
+ expr->ref.field->method->invoke(iattr.record, &sattr.ivalue);
+ return;
+ case dbvmInvokeSelfMethodReal4:
+- expr->ref.field->method->invoke(iattr.record, &sattr.fvalue);
+- sattr.fvalue = *(real4*)&sattr.fvalue;
+- return;
++ {
++ real4 val;
++ expr->ref.field->method->invoke(iattr.record, &val);
++ sattr.fvalue = *(real4*)&sattr.fvalue;
++ return;
++ }
+ case dbvmInvokeSelfMethodReal8:
+ expr->ref.field->method->invoke(iattr.record, &sattr.fvalue);
+ return;
+--- a/server.cpp
++++ b/server.cpp
+@@ -2097,7 +2097,7 @@
+ bufUsed = 0;
+ }
+ oid_t oid = cursor.getOid();
+- *(oid_t*)&buf[bufUsed] = oid;
++ *(oid_t*)(buf + bufUsed) = oid;
+ bufUsed += sizeof(oid_t);
+ dbRecord* record = db->getRow(tie, oid);
+ size_t size = record->size;
+@@ -2129,7 +2129,7 @@
+ bufUsed = 0;
+ }
+ }
+- *(oid_t*)&buf[bufUsed] = 0;
++ *(oid_t*)(buf + bufUsed) = 0;
+ return session->sock->write(buf, bufUsed + sizeof(oid_t));
+ }
+
diff --git a/dev-db/gigabase/gigabase-3.83-r2.ebuild b/dev-db/gigabase/gigabase-3.83-r2.ebuild
new file mode 100644
index 000000000000..5e21d4f9ae8f
--- /dev/null
+++ b/dev-db/gigabase/gigabase-3.83-r2.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="OO-DBMS with interfaces for C/C++/Java/PHP/Perl"
+HOMEPAGE="http://www.garret.ru/~knizhnik/gigabase.html"
+SRC_URI="mirror://sourceforge/gigabase/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc static-libs"
+
+DEPEND="doc? ( app-doc/doxygen )"
+RDEPEND=""
+
+S="${WORKDIR}/${PN}"
+
+PATCHES=(
+ "${FILESDIR}/${P}-fix-dereferencing.patch"
+ "${FILESDIR}/${P}-cpp14.patch" # fix #594550
+ "${FILESDIR}/${P}-fix-build-system.patch"
+)
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_compile() {
+ default
+
+ if use doc; then
+ doxygen doxygen.cfg || die
+ HTML_DOCS=( GigaBASE.htm docs/html/. )
+ fi
+}
+
+src_test() {
+ local t
+ for t in testddl testidx testidx2 testiref testleak testperf \
+ testperf2 testspat testtl testsync testtimeseries; do
+ ./${t} || die
+ done
+}
+
+src_install() {
+ default
+
+ if ! use static-libs; then
+ find "${D}" -name '*.la' -delete || die
+ fi
+}
+
+pkg_postinst() {
+ elog "The subsql binary has been renamed to subsql-gdb,"
+ elog "to avoid a name clash with the FastDB version of subsql"
+}
diff --git a/dev-db/gigabase/metadata.xml b/dev-db/gigabase/metadata.xml
new file mode 100644
index 000000000000..4277b141f815
--- /dev/null
+++ b/dev-db/gigabase/metadata.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <longdescription lang="en">
+ Object-Relational Database Management System GigaBASE inherits most of the
+ features of FastDB, but uses page pool instead of direct mapping of file on
+ virtual memory. So GigaBASE is able to handle database, which size
+ significantly exceeds size of computer physical memory. Convenient and
+ flexible C++ interface makes development of application for GigaBASE very
+ easy and automatic scheme evaluation simplifies maintenance and modification
+ of the system. GigaBASE merges best features of relational (simple data
+ structure and non-procedural query language) and object-oriented (direct
+ object references, user defined types and methods) databases. GigaBASE is
+ primary oriented on application requiring fast data retrieving by means of
+ indices and direct object references, such as Web Server databases
+ applications. SUBSQL utility can be used for database browsing and
+ inspection, performing online backups, database recovery, importing data to
+ and exporting data from database. GigaBASE will perform automatic recovery
+ after system or application crash, you should not worry about it. The only
+ thing you can have to do manually is stopping all database application if
+ one of them is crashed leaving database blocked.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">gigabase</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/go-etcd-0_p20141013-r1 b/dev-db/go-etcd-0_p20141013-r1
deleted file mode 100644
index 8368028cdfe6..000000000000
--- a/dev-db/go-etcd-0_p20141013-r1
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile install unpack
-DEPEND=>=dev-lang/go-1.4
-DESCRIPTION=Go client library for etcd
-EAPI=5
-HOMEPAGE=https://github.com/coreos/go-etcd
-KEYWORDS=~amd64
-LICENSE=Apache-2.0
-SLOT=0
-SRC_URI=https://github.com/coreos/go-etcd/archive/25e2c63be8e8ab405014a78879e0992ae5ff55e8.tar.gz -> go-etcd-0_p20141013.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=d962cb0253c43a3accff66a0c74fdc2f
diff --git a/dev-db/go-etcd-2.0.0 b/dev-db/go-etcd-2.0.0
deleted file mode 100644
index 237adc320772..000000000000
--- a/dev-db/go-etcd-2.0.0
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile install unpack
-DEPEND=>=dev-lang/go-1.4
-DESCRIPTION=Go client library for etcd
-EAPI=5
-HOMEPAGE=https://github.com/coreos/go-etcd
-KEYWORDS=~amd64
-LICENSE=Apache-2.0
-SLOT=0
-SRC_URI=https://github.com/coreos/go-etcd/archive/25e2c63be8e8ab405014a78879e0992ae5ff55e8.tar.gz -> go-etcd-2.0.0.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=c81d5a16c230f8e9b444110704aae9e9
diff --git a/dev-db/go-etcd-2.0.0-r1 b/dev-db/go-etcd-2.0.0-r1
deleted file mode 100644
index 2a10878e1fea..000000000000
--- a/dev-db/go-etcd-2.0.0-r1
+++ /dev/null
@@ -1,10 +0,0 @@
-DEFINED_PHASES=compile install unpack
-DEPEND=>=dev-lang/go-1.4:=
-DESCRIPTION=Go client library for etcd
-EAPI=5
-HOMEPAGE=https://github.com/coreos/go-etcd
-KEYWORDS=~amd64
-LICENSE=Apache-2.0
-SLOT=0
-SRC_URI=https://github.com/coreos/go-etcd/archive/25e2c63be8e8ab405014a78879e0992ae5ff55e8.tar.gz -> go-etcd-2.0.0.tar.gz
-_md5_=56a7952d5cd4c7866702fd1be295f576
diff --git a/dev-db/go-etcd/Manifest b/dev-db/go-etcd/Manifest
new file mode 100644
index 000000000000..b413b8aed1a0
--- /dev/null
+++ b/dev-db/go-etcd/Manifest
@@ -0,0 +1,6 @@
+DIST go-etcd-0_p20141013.tar.gz 18214 BLAKE2B ceb14c88dc65c81d0b8f620986ad30d9b0b21f92169979c69d0f7fd97abd81ef0c210dd3cb4bc23f361fc13aa97ba2cf5fcf59524608a14637780a381f3bf21d SHA512 af07b2434bbad219962e989ca1d6ccb86bb40f698aa3f2b681ac04094dc7e878593af6a54e9c1e976d1aeb451661d8100295b0637291b46bafa45452537f1575
+DIST go-etcd-2.0.0.tar.gz 18214 BLAKE2B ceb14c88dc65c81d0b8f620986ad30d9b0b21f92169979c69d0f7fd97abd81ef0c210dd3cb4bc23f361fc13aa97ba2cf5fcf59524608a14637780a381f3bf21d SHA512 af07b2434bbad219962e989ca1d6ccb86bb40f698aa3f2b681ac04094dc7e878593af6a54e9c1e976d1aeb451661d8100295b0637291b46bafa45452537f1575
+EBUILD go-etcd-0_p20141013-r1.ebuild 1072 BLAKE2B acf7a53cefa4fce660450b01cad034fb14336079c036751d737b4ea81fde3f2a25aecadb33c058b74331fab66a77db7f340e2467e189cdaa2d52d0a55c55230e SHA512 b8bf1adf250703b8217416ed1ace2c77ccb2654cd8fdd145ddb59a3322a73ebaeeb85671295063d63aab767afed6061e3b7694b92cdc0996eac478c5159d458b
+EBUILD go-etcd-2.0.0-r1.ebuild 1060 BLAKE2B 0500272526f82e7c6c87dd4515aa85a930d3d1d6258b3a6a09543453dd9d1a5be19e0bf3ac5e2c71f5528d9841c8815b2f995cd54f70167d734874b557068787 SHA512 24dc15f7be65ddc229947695019d0bec02f15395b877f875378933063589f9d49d2f477eb35f15c8de3071803f85f3a52fa261a28bc705ab0feb7b9363b36bec
+EBUILD go-etcd-2.0.0.ebuild 1074 BLAKE2B 504e9e92681c5a03254c458c1f25ff7a2c97d3a35c9388ca3d2b168d10ea97bc441fe37c68bd58e746dbbef23daaacbc0237dc949f07065c8ca003de3a044bca SHA512 a6e57bf038305c646153e5dc047692bb54484702d74cb157e2ec1bd3618bced07c62b66d9b94050923419f29f771811a1ed82a2f3f926561fa0a2386ba9d4a5e
+MISC metadata.xml 509 BLAKE2B 4f392436ef8f201f72e16cd373c00dfef3f95cd1766233fb68fae2479cf9d3d844b2ab2222f7a91ba0bf3704c20822edad309916d0ce3dc16145a8940ba3acb1 SHA512 0162c39d76959d8cbe7ca2a280a4c415912c09f1d0044216ad73367c865dcf61037da0022711777fcc277fa8ee65feb5c04a2a4a50fb549a9585798ceb3c6d28
diff --git a/dev-db/go-etcd/go-etcd-0_p20141013-r1.ebuild b/dev-db/go-etcd/go-etcd-0_p20141013-r1.ebuild
new file mode 100644
index 000000000000..798b7e5544c3
--- /dev/null
+++ b/dev-db/go-etcd/go-etcd-0_p20141013-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils
+GO_PN=github.com/coreos/${PN}
+DESCRIPTION="Go client library for etcd"
+HOMEPAGE="https://github.com/coreos/go-etcd"
+EGIT_COMMIT="25e2c63be8e8ab405014a78879e0992ae5ff55e8"
+SRC_URI="https://${GO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+
+SLOT="0"
+LICENSE="Apache-2.0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=">=dev-lang/go-1.4"
+RDEPEND=""
+
+S=${WORKDIR}
+
+src_unpack() {
+ default_src_unpack
+ mkdir -p src/${GO_PN%/*} || die
+ mv ${PN}-${EGIT_COMMIT} src/${GO_PN} || die
+}
+
+src_compile() {
+ # Create a filtered GOROOT tree out of symlinks,
+ # excluding go-etcd, for bug #503324.
+ cp -sR /usr/lib/go goroot || die
+ rm -rf goroot/src/${GO_PN} || die
+ rm -rf goroot/pkg/linux_${ARCH}/${GO_PN} || die
+ GOROOT=${WORKDIR}/goroot GOPATH=${WORKDIR} \
+ go install -x ${GO_PN}/etcd || die
+}
+
+src_install() {
+ insopts -m0644 -p # preserve timestamps for bug 551486
+ insinto /usr/lib/go
+ doins -r pkg
+ insinto /usr/lib/go/src
+ egit_clean
+ doins -r src/*
+}
diff --git a/dev-db/go-etcd/go-etcd-2.0.0-r1.ebuild b/dev-db/go-etcd/go-etcd-2.0.0-r1.ebuild
new file mode 100644
index 000000000000..78e82a0d6773
--- /dev/null
+++ b/dev-db/go-etcd/go-etcd-2.0.0-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+GO_PN=github.com/coreos/${PN}
+EGIT_COMMIT="25e2c63be8e8ab405014a78879e0992ae5ff55e8"
+
+DESCRIPTION="Go client library for etcd"
+HOMEPAGE="https://github.com/coreos/go-etcd"
+SRC_URI="https://${GO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+
+SLOT="0"
+LICENSE="Apache-2.0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=">=dev-lang/go-1.4:="
+RDEPEND=""
+
+S=${WORKDIR}
+
+src_unpack() {
+ default_src_unpack
+ mkdir -p src/${GO_PN%/*} || die
+ mv ${PN}-${EGIT_COMMIT} src/${GO_PN} || die
+}
+
+src_compile() {
+ # Create a filtered GOROOT tree out of symlinks,
+ # excluding go-etcd, for bug #503324.
+ cp -sR /usr/lib/go goroot || die
+ rm -rf goroot/src/${GO_PN} || die
+ rm -rf goroot/pkg/linux_${ARCH}/${GO_PN} || die
+ GOROOT=${WORKDIR}/goroot GOPATH=${WORKDIR} \
+ go install -x ${GO_PN}/etcd || die
+}
+
+src_install() {
+ insopts -m0644 -p # preserve timestamps for bug 551486
+ insinto /usr/lib/go
+ doins -r pkg
+ insinto /usr/lib/go/src
+ egit_clean
+ doins -r src/*
+}
diff --git a/dev-db/go-etcd/go-etcd-2.0.0.ebuild b/dev-db/go-etcd/go-etcd-2.0.0.ebuild
new file mode 100644
index 000000000000..cec9a8d32864
--- /dev/null
+++ b/dev-db/go-etcd/go-etcd-2.0.0.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils
+
+GO_PN=github.com/coreos/${PN}
+EGIT_COMMIT="25e2c63be8e8ab405014a78879e0992ae5ff55e8"
+
+DESCRIPTION="Go client library for etcd"
+HOMEPAGE="https://github.com/coreos/go-etcd"
+SRC_URI="https://${GO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+
+SLOT="0"
+LICENSE="Apache-2.0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=">=dev-lang/go-1.4"
+RDEPEND=""
+
+S=${WORKDIR}
+
+src_unpack() {
+ default_src_unpack
+ mkdir -p src/${GO_PN%/*} || die
+ mv ${PN}-${EGIT_COMMIT} src/${GO_PN} || die
+}
+
+src_compile() {
+ # Create a filtered GOROOT tree out of symlinks,
+ # excluding go-etcd, for bug #503324.
+ cp -sR /usr/lib/go goroot || die
+ rm -rf goroot/src/${GO_PN} || die
+ rm -rf goroot/pkg/linux_${ARCH}/${GO_PN} || die
+ GOROOT=${WORKDIR}/goroot GOPATH=${WORKDIR} \
+ go install -x ${GO_PN}/etcd || die
+}
+
+src_install() {
+ insopts -m0644 -p # preserve timestamps for bug 551486
+ insinto /usr/lib/go
+ doins -r pkg
+ insinto /usr/lib/go/src
+ egit_clean
+ doins -r src/*
+}
diff --git a/dev-db/go-etcd/metadata.xml b/dev-db/go-etcd/metadata.xml
new file mode 100644
index 000000000000..479b509156bb
--- /dev/null
+++ b/dev-db/go-etcd/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <upstream>
+ <bugs-to>https://github.com/coreos/go-etcd/issues</bugs-to>
+ <changelog>https://github.com/coreos/go-etcd/commits/master</changelog>
+ <doc>https://godoc.org/github.com/coreos/go-etcd/etcd</doc>
+ <remote-id type="github">coreos/go-etcd</remote-id>
+ </upstream>
+ <maintainer type="person">
+ <email>zmedico@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-db/gqlplus-1.16 b/dev-db/gqlplus-1.16
deleted file mode 100644
index be3cdfe72a6c..000000000000
--- a/dev-db/gqlplus-1.16
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=prepare
-DEPEND=sys-libs/readline:* >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=a front-end for Oracle program sqlplus with command-line editing
-EAPI=5
-HOMEPAGE=https://sourceforge.net/projects/gqlplus/
-KEYWORDS=~amd64 ~amd64-linux ~x64-macos
-LICENSE=GPL-2
-RDEPEND=sys-libs/readline:*
-SLOT=0
-SRC_URI=mirror://sourceforge/gqlplus/gqlplus-1.16.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 libtool 0081a71a261724730ec4c248494f044d multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=4056669a53e9011a067714752bf521ce
diff --git a/dev-db/gqlplus/Manifest b/dev-db/gqlplus/Manifest
new file mode 100644
index 000000000000..218d06a27ce9
--- /dev/null
+++ b/dev-db/gqlplus/Manifest
@@ -0,0 +1,3 @@
+DIST gqlplus-1.16.tar.gz 2128428 BLAKE2B 5d2ad6cd58d7a5e0e6ce0d54301d70ad452d34a9636ce1f831d1b6d1de3bbc0ebce3d92ed15c2b8da60107d49c56c306543c768c0ef3534f34d2d545b80c43d7 SHA512 e9d7685e4db741db8232f7ba7a05df59042d0cafe198060adcd37aea2d3878e785eacb1f7b72fcb154558d1be8c619818dbeceffaefb75e372a18ed23e234512
+EBUILD gqlplus-1.16.ebuild 752 BLAKE2B 68f4fcc80d2884c2c79d576191316ba43135f2f310050ce6226fa7ac0645159624afe387586081533f29434615c1f48748a924d0a07680e506b132451e30765d SHA512 629af9bb7de9b883ce1c3e6a47c7100ac875302531de6fbdc9d84ccf19770a3af6e481f34e41fa7324f95ba06c554225db265d37fdfce63af2320c535f70e64e
+MISC metadata.xml 620 BLAKE2B 82537c625dbd12eca6562acf5605a5b3b6b1841dd946d2f5dd17a1730bb340f49837f3bea3c9ea6f830abd4c0ecbc3751d218a8daf843f65ca4bb292a5a355be SHA512 8ce9a86e99c4198a246b149f5a526f0cf70ea9e75d3e97bc643520c9377136e83ca56ac47869ae0b62f021dd28da6745204c7c12a52a82e996949b4a796086ce
diff --git a/dev-db/gqlplus/gqlplus-1.16.ebuild b/dev-db/gqlplus/gqlplus-1.16.ebuild
new file mode 100644
index 000000000000..a3aa8f209869
--- /dev/null
+++ b/dev-db/gqlplus/gqlplus-1.16.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools
+
+DESCRIPTION="a front-end for Oracle program sqlplus with command-line editing"
+HOMEPAGE="https://sourceforge.net/projects/gqlplus/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~amd64-linux ~x64-macos"
+IUSE=""
+
+DEPEND="sys-libs/readline:*"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ # don't use packaged readline and old version containing it
+ rm -Rf readline gqlplus-1.15
+
+ # maintainer can't seem to get versioning right
+ sed -i '/^#define VERSION/s/"[^"]\+"/"'"${PV}"'"/' gqlplus.c || die
+ sed -i '/^AC_INIT/s/\[[1-9.]\+\]/['"${PV}"']/' configure.ac || die
+ eautoreconf
+}
diff --git a/dev-db/gqlplus/metadata.xml b/dev-db/gqlplus/metadata.xml
new file mode 100644
index 000000000000..533ec708627b
--- /dev/null
+++ b/dev-db/gqlplus/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>grobian@gentoo.org</email>
+ <name>Fabian Groffen</name>
+ </maintainer>
+ <longdescription lang="en">
+ gqlplus is a front-end for Oracle program sqlplus with
+ command-line editing, history, table-name and column-name
+ completion. Otherwise the user interface is identical to that of
+ sqlplus. Command-line editing works as in bash/tcsh shells.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">gqlplus</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/henplus-0.9.8-r1 b/dev-db/henplus-0.9.8-r1
deleted file mode 100644
index aa8dfb49733e..000000000000
--- a/dev-db/henplus-0.9.8-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare setup
-DEPEND=>=virtual/jdk-1.6 dev-java/commons-cli:1 dev-java/libreadline-java:0 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip ) >=dev-java/ant-core-1.8.2:0 >=dev-java/javatoolkit-0.3.0-r2
-DESCRIPTION=Java-based multisession SQL shell for databases with JDBC support
-EAPI=5
-HOMEPAGE=http://henplus.sf.net
-IUSE=elibc_FreeBSD doc source elibc_FreeBSD
-KEYWORDS=amd64 x86
-LICENSE=GPL-2
-RDEPEND=>=virtual/jre-1.6 dev-java/commons-cli:1 dev-java/libreadline-java:0 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip )
-SLOT=0
-SRC_URI=mirror://sourceforge/henplus/henplus-0.9.8.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-ant-2 ea15ab9e838d1062abd6b53de2045d50 java-pkg-2 c4e6af2574fd1dc79b43a6e27af4b5fb java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=c9280b2a912e654b435f98f7d3f91b61
diff --git a/dev-db/henplus/Manifest b/dev-db/henplus/Manifest
new file mode 100644
index 000000000000..77bb6c0461aa
--- /dev/null
+++ b/dev-db/henplus/Manifest
@@ -0,0 +1,5 @@
+AUX 0.9.8-build.xml.patch 771 BLAKE2B b0fc8433a08fe2321656c8a34190dc19efbc6ed52022824ef74cf55e990c43a5cd48147550c40230843239bddf15fc77d4f0ed1beea872af2df5d1ebfe7f6258 SHA512 b886c7f53bbbb10221b99c3d2ff32513c5388769310714e1c74c69aa662618bc719aa7338ccde92ca2119f9e6fa9591ae260dfe5055fa760f90b5f26ad740190
+AUX henplus.pre 1418 BLAKE2B bedb6cbef3fc1713895716c8af2cc3a70d77a42c7a940e86c57157064177afd59d52369f1aee72ac4e2c7501f219b8da1fe8482424fae62e1ef875fc255cf333 SHA512 331138630336c9f7a2f7cbf343b6ea77277d4ad77d706497545a6ff33cf44572cbe126acb4f0d212a40f652a24190b629f7776dbca08630de66d6f8ac3fae26a
+DIST henplus-0.9.8.tar.gz 233035 BLAKE2B 0cfba9cde654103f539ce28508d77169ce3a34ccc9a8805253e9bcd3a731118408c8a241f82eb6da8be2b96d1a4932c95024a158eae48396b045d5b94b0acaa9 SHA512 a22fc847f4441f627c1fa12f4f365c38d0c8ddfc205758d044e797e83f8d37032995666c2ee3dbb68d0a5f563fa5d574886e85757b1faa0acfc055e92b2fad0b
+EBUILD henplus-0.9.8-r1.ebuild 1025 BLAKE2B 6ab6fecb647dbbaadff21db0f705559f87e1e96a9c06ecd5f18eee8ce7298fb46253b24d858b3a503b7ddb2f17a43523cb5b17581270aadeb9b4580ea60f730c SHA512 0d55002c3686531f7485ea47ac91bddd73ff0beaf02f52b161c8cbb091e4aa38d230166e43fd724171f6f20a0bf75da588baf70fce4f17c364dd1c73cab282b5
+MISC metadata.xml 313 BLAKE2B 494eb57813ba2f3f9c9ba73b23547819ae369df2ea1973710bbd5d240163902d67a854abaaf401e2ce598fa2ad9b559d48ea51e5db2dde55b1639de7b612e481 SHA512 22c759bfaa403d45fd081972c2009675d69156ff6f2caff621d9330b5c4a6c56030e70fd9a0639ff6a8684c1ff0e213ce9b8d6890607b12522eb2c768361d762
diff --git a/dev-db/henplus/files/0.9.8-build.xml.patch b/dev-db/henplus/files/0.9.8-build.xml.patch
new file mode 100644
index 000000000000..e2763978080e
--- /dev/null
+++ b/dev-db/henplus/files/0.9.8-build.xml.patch
@@ -0,0 +1,23 @@
+diff -ur henplus-0.9.8.old/build.xml henplus-0.9.8/build.xml
+--- henplus-0.9.8.old/build.xml 2009-05-01 23:51:41.000000000 +0300
++++ henplus-0.9.8/build.xml 2009-05-01 23:52:31.000000000 +0300
+@@ -33,13 +33,13 @@
+ <pathelement path="${classes}" />
+ </path>
+
+- <taskdef name="ant-server" classname="net.sweetohm.ant.server.ServerTask">
+- <classpath>
+- <pathelement location="${lib}/build/sat-0.7.jar" />
+- </classpath>
+- </taskdef>
+-
+ <target name="server">
++ <taskdef name="ant-server" classname="net.sweetohm.ant.server.ServerTask">
++ <classpath>
++ <pathelement location="${lib}/build/sat-0.7.jar" />
++ </classpath>
++ </taskdef>
++
+ <ant-server/>
+ </target>
+
diff --git a/dev-db/henplus/files/henplus.pre b/dev-db/henplus/files/henplus.pre
new file mode 100644
index 000000000000..c29585e369fa
--- /dev/null
+++ b/dev-db/henplus/files/henplus.pre
@@ -0,0 +1,51 @@
+#
+# Based on the upstream script but parts not relevant to Gentoo
+# stripped away. We would not need this at all but better to make
+# this behave as the upstream docs say and then also have all the
+# Gentoo goodies.
+# https://bugs.gentoo.org/show_bug.cgi?id=176185
+
+##------------------
+THISDIR=`dirname $0`
+# install layout is: script in /usr/bin/henplus and libs in /usr/share/henplus
+HENPLUSDIR=$THISDIR/../share/henplus
+
+# you may just throw your own jar files in this dir.
+# (like additional JDBC-drivers, that are not in default
+# classpath)
+for f in $HENPLUSDIR/*.jar $HENPLUSDIR/*.zip ; do
+ if [ -r "$f" ] ; then
+ CLASSPATH=$CLASSPATH:$f
+ fi
+done
+
+# starting at the current directory we look for additional
+# JDBC-drivers in .henplus/lib-directories up the path.
+# if no directory like that has been found the one in the
+# home directory will be used
+DIR=`pwd`
+CUSTOM_HENPLUSDIR=""
+
+while [ $DIR != "/" ] ; do
+ if [ -d $DIR"/.henplus/lib" ]; then
+ CUSTOM_HENPLUSDIR=$DIR"/.henplus/lib"
+ break
+ fi
+ DIR=`dirname $DIR`
+done
+
+if [ -z $CUSTOM_HENPLUSDIR ]; then
+ if [ -d "/.henplus/lib" ]; then
+ CUSTOM_HENPLUSDIR="/.henplus/lib"
+ else
+ CUSTOM_HENPLUSDIR=$HOME/.henplus/lib
+ fi
+fi
+
+for f in $CUSTOM_HENPLUSDIR/*.jar $CUSTOM_HENPLUSDIR/*.zip ; do
+ if [ -r "$f" ] ; then
+ CLASSPATH=$CLASSPATH:$f
+ fi
+done
+
+export CLASSPATH
diff --git a/dev-db/henplus/henplus-0.9.8-r1.ebuild b/dev-db/henplus/henplus-0.9.8-r1.ebuild
new file mode 100644
index 000000000000..a1d41261fac3
--- /dev/null
+++ b/dev-db/henplus/henplus-0.9.8-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+JAVA_PKG_IUSE="doc source"
+
+inherit java-pkg-2 eutils java-ant-2
+
+DESCRIPTION="Java-based multisession SQL shell for databases with JDBC support"
+HOMEPAGE="http://henplus.sf.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+COMMON_DEPEND="dev-java/commons-cli:1
+ dev-java/libreadline-java:0"
+RDEPEND=">=virtual/jre-1.6
+ ${COMMON_DEPEND}"
+DEPEND=">=virtual/jdk-1.6
+ ${COMMON_DEPEND}"
+
+java_prepare() {
+ epatch "${FILESDIR}/0.9.8-build.xml.patch"
+ rm -v lib/*.jar lib/*/*.jar || die
+}
+
+JAVA_ANT_REWRITE_CLASSPATH="true"
+EANT_GENTOO_CLASSPATH="commons-cli-1,libreadline-java"
+
+src_install () {
+ java-pkg_dojar "build/${PN}.jar"
+
+ java-pkg_dolauncher ${PN} -pre "${FILESDIR}/${PN}.pre" \
+ --main henplus.HenPlus
+
+ dodoc README || die
+ dohtml doc/HenPlus.html || die
+
+ use doc && java-pkg_dojavadoc javadoc/api
+ use source && java-pkg_dosrc "src/${PN}"
+}
diff --git a/dev-db/henplus/metadata.xml b/dev-db/henplus/metadata.xml
new file mode 100644
index 000000000000..651b465469ac
--- /dev/null
+++ b/dev-db/henplus/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>java@gentoo.org</email>
+ <name>Java</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">henplus</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/hsqldb-1.8.1.3-r2 b/dev-db/hsqldb-1.8.1.3-r2
deleted file mode 100644
index 360675acb72c..000000000000
--- a/dev-db/hsqldb-1.8.1.3-r2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup test
-DEPEND=java-virtuals/servlet-api:2.5 >=virtual/jdk-1.5 app-arch/unzip test? ( dev-java/junit:0 ) >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip ) >=dev-java/ant-core-1.8.2:0 >=dev-java/javatoolkit-0.3.0-r2
-DESCRIPTION=The leading SQL relational database engine written in Java
-EAPI=5
-HOMEPAGE=http://hsqldb.org
-IUSE=elibc_FreeBSD doc source test elibc_FreeBSD
-KEYWORDS=amd64 ~arm ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris
-LICENSE=BSD GPL-2
-RDEPEND=java-virtuals/servlet-api:2.5 >=virtual/jre-1.5 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip )
-SLOT=0
-SRC_URI=mirror://sourceforge/hsqldb/hsqldb_1_8_1_3.zip
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-ant-2 ea15ab9e838d1062abd6b53de2045d50 java-pkg-2 c4e6af2574fd1dc79b43a6e27af4b5fb java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=5265d69c55f5ffe2539f15456695c4b9
diff --git a/dev-db/hsqldb/Manifest b/dev-db/hsqldb/Manifest
new file mode 100644
index 000000000000..f292963781ab
--- /dev/null
+++ b/dev-db/hsqldb/Manifest
@@ -0,0 +1,10 @@
+AUX StringComparator.java 1986 BLAKE2B e86079c260e0732c8828626de3c3d1611376377c228c8efb28739dff5f82cbe26ed2a06f9bf6c2214e44a291c1af51e6cb2044fc639aaafb54e356fe6b978dc8 SHA512 a0103b0b8445bfbbe325c73ab65dcf4c22c8fd4dab89cd9d60809b4323263e62da2c20a0c1f2900ee97eb9ca2549730e1d37b7f1bffdfce3d116ca802fe8beaa
+AUX TestBug1191815.java 4112 BLAKE2B f8418d564f7489e3dd256e9783624ef66994875d2509ccd66972ed5704281ae9770df7f7521ec56ab66b44af142ff4a6a846fb9d04d768b2a0b2c5f78b9c6b7f SHA512 c37491e2fcea0b4ce6bd641ffe128deaa9a8e38533ec3e607415cb1325a975dd8317c212c0fbf9f42b25de7808869df6ac63dacd53c773455f5d2ca0a58f1f62
+AUX hsqldb 364 BLAKE2B 236ae5fff19eaf9c4aa184bf1228bd96c7841c8c1849d35d72be02d43b955be003c54a96fc9d792208a38c388609d3dce34a5ef1e2c36b9283dd69a545cc3e2d SHA512 6cd0a4a26739960536192a9dda36324e10a16e4ed51028515f07ca5542c68a9f13d9ee9456faf7f797071476747b2026cdf5872ebdf20c1fbfda1079c4164716
+AUX hsqldb-1.8.1.3-java7.patch 13842 BLAKE2B afb8a9ade41e830242cea603f0464462ef4abcf732b1e8ee0419925d37207579114baccf6862663ffe4c653f8954f5e64264729d66991c187690516fc8badb6a SHA512 b5e67c3a6e883b50ed74bbc18b81e5244b43161612d2114b645a16c1405c355555740daf8774a3347ae3721f607ca2eb7570117c1ca93ccbe925d34d4968b6e2
+AUX resolve-config-softlinks.patch 846 BLAKE2B 257d552458e7d4b59d45fa6827e081dfc8101ddef1f9928551834c9ffecb36f43610422dc7c482eae201b210005ed839eafb4cbb7403ad66d619e638153abc58 SHA512 5510a6f70647bb50d4c8ef6c8341b8d4bf38119fd8849b4086b4548ef19abbbaaa12d552f5602bd91ec24e96d7c4ef51efd8e83b38a841f3276ac478bd2480f4
+AUX server.properties 686 BLAKE2B 6b4482dfe6187adada772cffb1a46e39bacd9fa8ca5501dd58414f9815dc6b118d3f9de909953f88f1055ae1984ef3f9aee479c339920bf182f31f4265cdb6f1 SHA512 c36a1d2e387762f96872d94bdb3a6a2af9edb949be9d33321f9ea4e3fb996baecff6fc3875b6bef8f73a54a6a1cedd71dcdf97c881819cb130b1a2b43ec7e842
+AUX sqltool.rc 560 BLAKE2B 5f5e4bd1e9fe9759c2e2d5b6b5274343caa5028b29cfa4597c3a3348a1b07e4540d608d3dea5b189cf471b85721f15018490a7e4f8c56cc48ce648a07f0b7a45 SHA512 80ce53ad07c2091113787cb41232e5900426b042dcc3f62157569588538ad26d471e5d17aac62052902789065efb01647bfbc3488ff3d0f3c9e3df513895f57c
+DIST hsqldb_1_8_1_3.zip 3170550 BLAKE2B 0664bfa259af5091e3e76ca804e9c9890457ecc982ab07ee37640dc713053fb63d6dd295e9db4adb5e5436fac6275745526d3e830dd84e5daa3a32162627dc76 SHA512 0483ca3299b63b4931b07d49588c729231efca76a317b9620abbd5039127f3f79449eaa1e9d29c52782c58bdb0cc4879b1e3f30f669d2c02c880818f531a8442
+EBUILD hsqldb-1.8.1.3-r2.ebuild 5598 BLAKE2B 9a4d53b5e21ac4064140a94e7f0d53ae5bfab87d7a3dfae7611132f238e41b8daea394a0aee8eb3aa4ed06ec14438ac3ebe36d7d3749a111bd9b1ed94927e75c SHA512 06572f67b9027c4a999df509f0a7a5592c88fb98bd7168df750296543f456c644fcfdba03a6691ffbeda6e47490844cf8e4b7cd0b7a67e65667fd0d1cac6ae5c
+MISC metadata.xml 312 BLAKE2B 175d7bb3c54ffcc616117749062b16130ca8cf394ffd780991bd8bd5a21509527e2844cd4f1aaeba70b498274131d786b9a16d48d5ee8dca176e949e334093a6 SHA512 2b9fff35bd58701cd4992ddc02f6bc7a2027d90616a5b886ef352ad6c6781949a68478bb17bbc22382189ec73ddd1798f67c27941323cb0b727dfead38c7f975
diff --git a/dev-db/hsqldb/files/StringComparator.java b/dev-db/hsqldb/files/StringComparator.java
new file mode 100644
index 000000000000..ae0f7b0fb979
--- /dev/null
+++ b/dev-db/hsqldb/files/StringComparator.java
@@ -0,0 +1,53 @@
+/* Copyright (c) 2001-2008, The HSQL Development Group
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * Neither the name of the HSQL Development Group nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG,
+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+package org.hsqldb.lib;
+
+public class StringComparator implements ObjectComparator {
+
+ public int compare(Object a, Object b) {
+
+ // handle nulls
+ if (a == b) {
+ return 0;
+ }
+
+ if (a == null) {
+ return -1;
+ }
+
+ if (b == null) {
+ return 1;
+ }
+
+ return ((String) a).compareTo((String) b);
+ }
+}
diff --git a/dev-db/hsqldb/files/TestBug1191815.java b/dev-db/hsqldb/files/TestBug1191815.java
new file mode 100644
index 000000000000..06c606401cdd
--- /dev/null
+++ b/dev-db/hsqldb/files/TestBug1191815.java
@@ -0,0 +1,129 @@
+/* Copyright (c) 2001-2009, The HSQL Development Group
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * Neither the name of the HSQL Development Group nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG,
+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+package org.hsqldb.test;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.Statement;
+import java.sql.Timestamp;
+import java.util.Calendar;
+import java.util.GregorianCalendar;
+import java.util.TimeZone;
+
+import junit.framework.TestCase;
+import junit.framework.TestResult;
+
+/**
+ * Created on Apr 28, 2005
+ * @author Antranig Basman (antranig@caret.cam.ac.uk)
+ */
+public class TestBug1191815 extends TestBase {
+
+ public TestBug1191815(String name) {
+ super(name);
+ }
+
+ public void test() throws Exception {
+
+ try {
+ Connection conn = newConnection();
+ Statement stmt = conn.createStatement();
+
+ stmt.executeUpdate("drop table testA if exists;");
+ stmt.executeUpdate("create table testA(data timestamp);");
+
+ TimeZone pst = TimeZone.getTimeZone("PST");
+ Calendar cal = new GregorianCalendar(pst);
+
+ cal.clear();
+ cal.set(2005, 0, 1, 0, 0, 0);
+
+
+ // yyyy-mm-dd hh:mm:ss.fffffffff
+ Timestamp ts = new Timestamp(cal.getTimeInMillis());
+ ts.setNanos(1000);
+ PreparedStatement ps =
+ conn.prepareStatement("insert into testA values(?)");
+
+ ps.setTimestamp(1, ts, cal);
+ ps.execute();
+ ps.setTimestamp(1, ts, null);
+ ps.execute();
+
+ String sql = "select * from testA";
+
+ stmt = conn.createStatement();
+
+ ResultSet rs = stmt.executeQuery(sql);
+
+ rs.next();
+
+ Timestamp returned = rs.getTimestamp(1, cal);
+
+ rs.next();
+
+ Timestamp def = rs.getTimestamp(1, null);
+
+ assertEquals(ts, returned);
+ assertEquals(ts, def);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ public static void main(String[] args) throws Exception {
+
+ TestResult result;
+ TestCase test;
+ java.util.Enumeration exceptions;
+ java.util.Enumeration failures;
+ int count;
+
+ result = new TestResult();
+ test = new TestBug1191815("test");
+
+ test.run(result);
+
+ count = result.failureCount();
+
+ System.out.println("TestBug1192000 failure count: " + count);
+
+ failures = result.failures();
+
+ while (failures.hasMoreElements()) {
+ System.out.println(failures.nextElement());
+ }
+ }
+}
+
diff --git a/dev-db/hsqldb/files/hsqldb b/dev-db/hsqldb/files/hsqldb
new file mode 100644
index 000000000000..69920b07f868
--- /dev/null
+++ b/dev-db/hsqldb/files/hsqldb
@@ -0,0 +1,19 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use net
+}
+
+start() {
+ ebegin "Starting HSQL Database"
+ hsqldb_enable=yes /var/lib/hsqldb/bin/hsqldb start
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping HSQL Database"
+ hsqldb_enable=yes /var/lib/hsqldb/bin/hsqldb stop
+ eend $?
+}
diff --git a/dev-db/hsqldb/files/hsqldb-1.8.1.3-java7.patch b/dev-db/hsqldb/files/hsqldb-1.8.1.3-java7.patch
new file mode 100644
index 000000000000..7f9245597182
--- /dev/null
+++ b/dev-db/hsqldb/files/hsqldb-1.8.1.3-java7.patch
@@ -0,0 +1,380 @@
+diff --git a/build/build.xml b/build/build.xml
+index 68c446f..e82f00f 100644
+--- a/build/build.xml
++++ b/build/build.xml
+@@ -98,16 +98,24 @@ examples:
+ <echo message="ant.java.hasjsse=${ant.java.hasjsse}" />
+ </target>
+
+- <target name="javaversion6">
++ <target name="javaversion7" unless="ant.java.iscjavaset">
++ <available classname="java.util.Objects" property="ant.java.iscjava17"/>
++ <available classname="java.util.Objects" property="ant.java.iscjavaset"/>
++ </target>
++
++ <target name="javaversion6" depends="javaversion7" unless="ant.java.iscjavaset">
+ <available classname="java.net.IDN" property="ant.java.iscjava16"/>
++ <available classname="java.net.IDN" property="ant.java.iscjavaset"/>
+ </target>
+
+- <target name="javaversion4" depends="javaversion6" unless="ant.java.iscjava16">
++ <target name="javaversion4" depends="javaversion6" unless="ant.java.iscjavaset">
+ <available classname="java.nio.Buffer" property="ant.java.iscjava14"/>
++ <available classname="java.nio.Buffer" property="ant.java.iscjavaset"/>
+ </target>
+
+- <target name="javaversion2" depends="javaversion4" unless="ant.java.iscjava14">
++ <target name="javaversion2" depends="javaversion4" unless="ant.java.iscjavaset">
+ <available classname="java.lang.ref.Reference" property="ant.java.iscjava12"/>
++ <available classname="java.lang.ref.Reference" property="ant.java.iscjavaset"/>
+ </target>
+
+ <target name="-prepare" depends="init,javaversion2">
+@@ -166,6 +174,7 @@ examples:
+ <java classname="org.hsqldb.util.CodeSwitcher" classpath="classes" >
+ <arg file="${src}/org/hsqldb/lib/java/JavaSystem.java"/>
+ <arg file="${src}/org/hsqldb/lib/HsqlTimer.java"/>
++ <arg file="${src}/org/hsqldb/jdbcDriver.java"/>
+ <arg file="${src}/org/hsqldb/jdbc/jdbcStatement.java"/>
+ <arg file="${src}/org/hsqldb/persist/LockFile.java"/>
+ <arg file="${src}/org/hsqldb/persist/Logger.java"/>
+@@ -183,6 +192,7 @@ examples:
+ <java classname="org.hsqldb.util.CodeSwitcher" classpath="classes" >
+ <arg file="${src}/org/hsqldb/lib/java/JavaSystem.java"/>
+ <arg file="${src}/org/hsqldb/lib/HsqlTimer.java"/>
++ <arg file="${src}/org/hsqldb/jdbcDriver.java"/>
+ <arg file="${src}/org/hsqldb/jdbc/jdbcBlob.java"/>
+ <arg file="${src}/org/hsqldb/jdbc/jdbcDatabaseMetaData.java"/>
+ <arg file="${src}/org/hsqldb/jdbc/jdbcDataSource.java"/>
+@@ -210,6 +220,7 @@ examples:
+ <arg value="+JAVA2FULL"/>
+ <arg value="-JAVA4"/>
+ <arg value="-JAVA6"/>
++ <arg value="-JAVA7"/>
+ </java>
+ </target>
+
+@@ -218,6 +229,7 @@ examples:
+ <java classname="org.hsqldb.util.CodeSwitcher" classpath="classes" >
+ <arg file="${src}/org/hsqldb/lib/java/JavaSystem.java"/>
+ <arg file="${src}/org/hsqldb/lib/HsqlTimer.java"/>
++ <arg file="${src}/org/hsqldb/jdbcDriver.java"/>
+ <arg file="${src}/org/hsqldb/jdbc/jdbcBlob.java"/>
+ <arg file="${src}/org/hsqldb/jdbc/jdbcDatabaseMetaData.java"/>
+ <arg file="${src}/org/hsqldb/jdbc/jdbcDataSource.java"/>
+@@ -244,6 +256,7 @@ examples:
+ <arg value="+JAVA2FULL"/>
+ <arg value="+JAVA4"/>
+ <arg value="-JAVA6"/>
++ <arg value="-JAVA7"/>
+ </java>
+ </target>
+
+@@ -253,6 +266,43 @@ examples:
+ <java classname="org.hsqldb.util.CodeSwitcher" classpath="classes" >
+ <arg file="${src}/org/hsqldb/lib/java/JavaSystem.java"/>
+ <arg file="${src}/org/hsqldb/lib/HsqlTimer.java"/>
++ <arg file="${src}/org/hsqldb/jdbcDriver.java"/>
++ <arg file="${src}/org/hsqldb/jdbc/jdbcBlob.java"/>
++ <arg file="${src}/org/hsqldb/jdbc/jdbcDatabaseMetaData.java"/>
++ <arg file="${src}/org/hsqldb/jdbc/jdbcDataSource.java"/>
++ <arg file="${src}/org/hsqldb/jdbc/jdbcCallableStatement.java"/>
++ <arg file="${src}/org/hsqldb/jdbc/jdbcClob.java"/>
++ <arg file="${src}/org/hsqldb/jdbc/jdbcConnection.java"/>
++ <arg file="${src}/org/hsqldb/jdbc/jdbcParameterMetaData.java"/>
++ <arg file="${src}/org/hsqldb/jdbc/jdbcPreparedStatement.java"/>
++ <arg file="${src}/org/hsqldb/jdbc/jdbcResultSet.java"/>
++ <arg file="${src}/org/hsqldb/jdbc/jdbcResultSetMetaData.java"/>
++ <arg file="${src}/org/hsqldb/jdbc/jdbcStatement.java"/>
++ <arg file="${src}/org/hsqldb/persist/LockFile.java"/>
++ <arg file="${src}/org/hsqldb/persist/Logger.java"/>
++ <arg file="${src}/org/hsqldb/persist/ScaledRAFile.java"/>
++ <arg file="${src}/org/hsqldb/rowio/RowInputTextLog.java"/>
++ <arg file="${src}/org/hsqldb/util/DatabaseManager.java"/>
++ <arg file="${src}/org/hsqldb/util/ConnectionDialogCommon.java"/>
++ <arg file="${src}/org/hsqldb/lib/SimpleLog.java"/>
++ <arg file="${src}/org/hsqldb/rowio/RowInputTextLog.java"/>
++ <arg file="${src}/org/hsqldb/lib/SimpleLog.java"/>
++ <arg file="${src}/org/hsqldb/rowio/RowInputTextLog.java"/>
++ <arg file="${src}/org/hsqldb/HsqlDateTime.java"/>
++ <arg value="+JAVA2"/>
++ <arg value="+JAVA2FULL"/>
++ <arg value="+JAVA4"/>
++ <arg value="+JAVA6"/>
++ <arg value="-JAVA7"/>
++ </java>
++ </target>
++
++ <target name="switchtojdk17" depends="switchtojdk16"
++ description="self explanatory" if="ant.java.iscjava17">
++ <java classname="org.hsqldb.util.CodeSwitcher" classpath="classes" >
++ <arg file="${src}/org/hsqldb/lib/java/JavaSystem.java"/>
++ <arg file="${src}/org/hsqldb/lib/HsqlTimer.java"/>
++ <arg file="${src}/org/hsqldb/jdbcDriver.java"/>
+ <arg file="${src}/org/hsqldb/jdbc/jdbcBlob.java"/>
+ <arg file="${src}/org/hsqldb/jdbc/jdbcDatabaseMetaData.java"/>
+ <arg file="${src}/org/hsqldb/jdbc/jdbcDataSource.java"/>
+@@ -279,10 +329,11 @@ examples:
+ <arg value="+JAVA2FULL"/>
+ <arg value="+JAVA4"/>
+ <arg value="+JAVA6"/>
++ <arg value="+JAVA7"/>
+ </java>
+ </target>
+
+- <target name="store" depends="switchtojdk16"
++ <target name="store" depends="switchtojdk17"
+ description="compiles the /store folder">
+ <javac srcdir="${src}"
+ destdir="classes"
+diff --git a/src/org/hsqldb/jdbc/jdbcCallableStatement.java b/src/org/hsqldb/jdbc/jdbcCallableStatement.java
+index 3779094..d2131ed 100644
+--- a/src/org/hsqldb/jdbc/jdbcCallableStatement.java
++++ b/src/org/hsqldb/jdbc/jdbcCallableStatement.java
+@@ -3106,7 +3106,6 @@ implements CallableStatement {
+
+ //#endif JAVA4
+ //#ifdef JAVA6
+-/*
+ public void setPoolable(boolean poolable) throws SQLException
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+@@ -3376,7 +3375,20 @@ implements CallableStatement {
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+-*/
+
+ //#endif JAVA6
++
++//#ifdef JAVA7
++ public <T> T getObject(String columnLabel, Class<T> type) throws SQLException
++ {
++ throw new UnsupportedOperationException("Not supported yet.");
++ }
++
++ public <T> T getObject(int ColumnIndex, Class<T> type) throws SQLException
++ {
++ throw new UnsupportedOperationException("Not supported yet.");
++ }
++
++
++//#endif JAVA7
+ }
+diff --git a/src/org/hsqldb/jdbc/jdbcConnection.java b/src/org/hsqldb/jdbc/jdbcConnection.java
+index 5d59464..0c7e08a 100644
+--- a/src/org/hsqldb/jdbc/jdbcConnection.java
++++ b/src/org/hsqldb/jdbc/jdbcConnection.java
+@@ -43,13 +43,17 @@ import java.sql.Connection;
+ import java.sql.DatabaseMetaData;
+
+ //#ifdef JAVA6
+-/*
+ import java.sql.NClob;
+ import java.sql.SQLClientInfoException;
+ import java.sql.SQLXML;
+-*/
+
+ //#endif JAVA6
++
++//#ifdef JAVA7
++import java.util.concurrent.Executor;
++
++//#endif JAVA7
++
+ import java.sql.PreparedStatement;
+ import java.sql.SQLException;
+ import java.sql.SQLWarning;
+@@ -2794,4 +2798,31 @@ public class jdbcConnection implements Connection {
+ */
+
+ //#endif JAVA6
++
++//#ifdef JAVA7
++ public int getNetworkTimeout() throws SQLException
++ {
++ throw new UnsupportedOperationException("Not supported yet.");
++ }
++
++ public void setNetworkTimeout(Executor executor, int millis) throws SQLException
++ {
++ throw new UnsupportedOperationException("Not supported yet.");
++ }
++
++ public void abort(Executor executor) throws SQLException
++ {
++ throw new UnsupportedOperationException("Not supported yet.");
++ }
++
++ public String getSchema() throws SQLException
++ {
++ throw new UnsupportedOperationException("Not supported yet.");
++ }
++
++ public void setSchema(String schema) throws SQLException
++ {
++ throw new UnsupportedOperationException("Not supported yet.");
++ }
++//#endif JAVA7
+ }
+diff --git a/src/org/hsqldb/jdbc/jdbcDataSource.java b/src/org/hsqldb/jdbc/jdbcDataSource.java
+index 9f79a37..d0ab49b 100644
+--- a/src/org/hsqldb/jdbc/jdbcDataSource.java
++++ b/src/org/hsqldb/jdbc/jdbcDataSource.java
+@@ -47,6 +47,11 @@ import javax.sql.DataSource;
+ //#endif JAVA4
+ import org.hsqldb.jdbcDriver;
+
++//#ifdef JAVA7
++import java.sql.SQLFeatureNotSupportedException;
++import java.util.logging.Logger;
++//#endif JAVA7
++
+ // boucherb@users 20040411 - doc 1.7.2 - javadoc updates toward 1.7.2 final
+
+ /**
+@@ -312,7 +317,6 @@ public class jdbcDataSource implements Serializable {
+ }
+
+ //#ifdef JAVA6
+-/*
+ public <T> T unwrap(Class<T> iface) throws SQLException
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+@@ -322,7 +326,14 @@ public class jdbcDataSource implements Serializable {
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+-*/
+
+ //#endif JAVA6
++
++//#ifdef JAVA7
++ public Logger getParentLogger() throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException("Not supported yet.");
++ }
++
++//#endif JAVA7
+ }
+diff --git a/src/org/hsqldb/jdbc/jdbcDatabaseMetaData.java b/src/org/hsqldb/jdbc/jdbcDatabaseMetaData.java
+index ffa238d..0480228 100644
+--- a/src/org/hsqldb/jdbc/jdbcDatabaseMetaData.java
++++ b/src/org/hsqldb/jdbc/jdbcDatabaseMetaData.java
+@@ -5650,7 +5650,6 @@ public class jdbcDatabaseMetaData implements DatabaseMetaData {
+ }
+
+ //#ifdef JAVA6
+-/*
+ public RowIdLifetime getRowIdLifetime() throws SQLException
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+@@ -5694,7 +5693,23 @@ public class jdbcDatabaseMetaData implements DatabaseMetaData {
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+-*/
+
+ //#endif JAVA6
++
++
++//#ifdef JAVA7
++ public boolean generatedKeyAlwaysReturned() throws SQLException
++ {
++ throw new UnsupportedOperationException("Not supported yet.");
++ }
++
++ public ResultSet getPseudoColumns(String catalog, String schemaPattern,
++ String tableNamePattern, String columnNamePattern) throws SQLException
++ {
++ throw new UnsupportedOperationException("Not supported yet.");
++ }
++
++
++//#endif JAVA7
++
+ }
+diff --git a/src/org/hsqldb/jdbc/jdbcResultSet.java b/src/org/hsqldb/jdbc/jdbcResultSet.java
+index 2a6567e..81aecf3 100644
+--- a/src/org/hsqldb/jdbc/jdbcResultSet.java
++++ b/src/org/hsqldb/jdbc/jdbcResultSet.java
+@@ -5332,4 +5332,19 @@ public class jdbcResultSet implements ResultSet {
+ */
+
+ //#endif JAVA6
++
++//#ifdef JAVA7
++
++ public <T> T getObject(String columnLabel, Class<T> type) throws SQLException
++ {
++ throw new UnsupportedOperationException("Not supported yet.");
++ }
++
++ public <T> T getObject(int columnNum, Class<T> type) throws SQLException
++ {
++ throw new UnsupportedOperationException("Not supported yet.");
++ }
++
++//#endif JAVA7
++
+ }
+diff --git a/src/org/hsqldb/jdbc/jdbcStatement.java b/src/org/hsqldb/jdbc/jdbcStatement.java
+index f84f2e2..38bf8d0 100644
+--- a/src/org/hsqldb/jdbc/jdbcStatement.java
++++ b/src/org/hsqldb/jdbc/jdbcStatement.java
+@@ -1588,7 +1588,6 @@ public class jdbcStatement implements Statement {
+ }
+ }
+ //#ifdef JAVA6
+-/*
+ public void setPoolable(boolean poolable) throws SQLException
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+@@ -1608,6 +1607,17 @@ public class jdbcStatement implements Statement {
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+-*/
+ //#endif JAVA6
++
++//#ifdef JAVA7
++ public boolean isCloseOnCompletion() throws SQLException
++ {
++ throw new UnsupportedOperationException("Not supported yet.");
++ }
++
++ public void closeOnCompletion() throws SQLException
++ {
++ throw new UnsupportedOperationException("Not supported yet.");
++ }
++//#endif JAVA7
+ }
+diff --git a/src/org/hsqldb/jdbcDriver.java b/src/org/hsqldb/jdbcDriver.java
+index a377b36..361c074 100644
+--- a/src/org/hsqldb/jdbcDriver.java
++++ b/src/org/hsqldb/jdbcDriver.java
+@@ -42,6 +42,11 @@ import org.hsqldb.jdbc.jdbcConnection;
+ import org.hsqldb.persist.HsqlDatabaseProperties;
+ import org.hsqldb.persist.HsqlProperties;
+
++//#ifdef JAVA7
++import java.sql.SQLFeatureNotSupportedException;
++import java.util.logging.Logger;
++//#endif JAVA7
++
+ // fredt@users 20011220 - patch 1.7.0 by fredt
+ // new version numbering scheme
+ // fredt@users 20020320 - patch 1.7.0 - JDBC 2 support and error trapping
+@@ -321,4 +326,12 @@ public class jdbcDriver implements Driver {
+ DriverManager.registerDriver(new jdbcDriver());
+ } catch (Exception e) {}
+ }
++
++//#ifdef JAVA7
++ public Logger getParentLogger() throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException("Not supported yet.");
++ }
++
++//#endif JAVA7
+ }
diff --git a/dev-db/hsqldb/files/resolve-config-softlinks.patch b/dev-db/hsqldb/files/resolve-config-softlinks.patch
new file mode 100644
index 000000000000..5a716e6dc3a2
--- /dev/null
+++ b/dev-db/hsqldb/files/resolve-config-softlinks.patch
@@ -0,0 +1,22 @@
+diff -urpN hsqldb.orig/bin/hsqldb hsqldb/bin/hsqldb
+--- hsqldb.orig/bin/hsqldb 2006-07-08 15:55:55.000000000 +0200
++++ hsqldb/bin/hsqldb 2006-07-08 16:03:28.000000000 +0200
+@@ -282,6 +282,18 @@ else
+ echo "Auth file '$_AUTH_TEST_PATH' not readable" 1>&2
+ exit 2
+ }
++
++ # resolve links - $_AUTH_TEST_PATH may be a softlink
++ while [ -h "$_AUTH_TEST_PATH" ]; do
++ ls=`ls -ld "$_AUTH_TEST_PATH"`
++ link=`expr "$ls" : '.*-> \(.*\)$'`
++ if expr "$link" : '.*/.*' > /dev/null; then
++ _AUTH_TEST_PATH="$link"
++ else
++ _AUTH_TEST_PATH=`dirname "$_AUTH_TEST_PATH"`/"$link"
++ fi
++ done
++
+ ls -ld "$_AUTH_TEST_PATH" | grep '^-..------' > /dev/null 2>&1 || {
+ echo "Fix permissions on '$_AUTH_TEST_PATH' like 'chmod 600 $_AUTH_TEST_PATH'" 1>&2
+ exit 2
diff --git a/dev-db/hsqldb/files/server.properties b/dev-db/hsqldb/files/server.properties
new file mode 100644
index 000000000000..4827d1cb6ec0
--- /dev/null
+++ b/dev-db/hsqldb/files/server.properties
@@ -0,0 +1,20 @@
+# Hsqldb Server cfg file.
+# See the UNIX Quick Start and the Advanced Topics chapters
+# of the Hsqldb User Guide.
+
+server.database.0=file:/var/lib/hsqldb/db1
+server.urlid.0=localhost
+
+# Warning!
+# When running hsqldb in Server mode, for each additional database
+# the server.urlid.X entry must have a proper corresponding urlid
+# section in the 'sqltool.rc' file.
+# Otherwise you may have problems with shutting down the server.
+#
+# Note that each server can serve only up to 10 different
+# databases simultaneously (with consecutive {0-9} suffixes).
+
+# An example of additional database.
+#server.database.1=file:/var/lib/hsqldb/newdb/newdb
+#server.dbname.1=newdb
+#server.urlid.1=newdb
diff --git a/dev-db/hsqldb/files/sqltool.rc b/dev-db/hsqldb/files/sqltool.rc
new file mode 100644
index 000000000000..2e65a6816f3d
--- /dev/null
+++ b/dev-db/hsqldb/files/sqltool.rc
@@ -0,0 +1,18 @@
+# This is a sample SqlTool configuration file, a.k.a. rc file.
+
+# This is for a hsqldb Server running with default settings on your local
+# computer (and for which you have not changed the password for "sa").
+urlid localhost
+url jdbc:hsqldb:hsql://localhost
+username sa
+password
+
+# Each urlid section in this file corresponds to one of the
+# server.urlid.X entries in the 'server.properties' file.
+# This is required by the hsqldb init script.
+
+# An example of additional database.
+#urlid newdb
+#url jdbc:hsqldb:hsql://localhost/newdb
+#username sa
+#password
diff --git a/dev-db/hsqldb/hsqldb-1.8.1.3-r2.ebuild b/dev-db/hsqldb/hsqldb-1.8.1.3-r2.ebuild
new file mode 100644
index 000000000000..3a136fca2315
--- /dev/null
+++ b/dev-db/hsqldb/hsqldb-1.8.1.3-r2.ebuild
@@ -0,0 +1,173 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+JAVA_PKG_IUSE="doc source test"
+
+inherit eutils user versionator java-pkg-2 java-ant-2
+
+MY_PV=$(replace_all_version_separators _ )
+MY_P="${PN}_${MY_PV}"
+
+DESCRIPTION="The leading SQL relational database engine written in Java"
+HOMEPAGE="http://hsqldb.org"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.zip"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+CDEPEND="
+ java-virtuals/servlet-api:2.5"
+RDEPEND="${CDEPEND}
+ >=virtual/jre-1.5"
+DEPEND="${CDEPEND}
+ >=virtual/jdk-1.5
+ app-arch/unzip
+ test? ( dev-java/junit:0 )"
+
+S="${WORKDIR}/${PN}"
+
+HSQLDB_JAR=/usr/share/hsqldb/lib/hsqldb.jar
+HSQLDB_HOME=/var/lib/hsqldb
+
+pkg_setup() {
+ enewgroup hsqldb
+ enewuser hsqldb -1 /bin/sh /dev/null hsqldb
+
+ java-pkg-2_pkg_setup
+}
+
+java_prepare() {
+ rm -v lib/*.jar || die
+
+ sed -i -r \
+ -e "s#/etc/sysconfig#${EPREFIX}/etc/conf.d#g" \
+ bin/hsqldb || die
+
+ java-pkg_filter-compiler jikes
+
+ eant -q -f "${EANT_BUILD_XML}" cleanall > /dev/null
+
+ epatch "${FILESDIR}/resolve-config-softlinks.patch"
+ epatch "${FILESDIR}/${P}-java7.patch"
+
+ mkdir conf
+ sed -e "s/^HSQLDB_JAR_PATH=.*$/HSQLDB_JAR_PATH=${EPREFIX//\//\\/}${HSQLDB_JAR//\//\\/}/g" \
+ -e "s/^SERVER_HOME=.*$/SERVER_HOME=${EPREFIX//\//\\/}\/var\/lib\/hsqldb/g" \
+ -e "s/^HSQLDB_OWNER=.*$/HSQLDB_OWNER=hsqldb/g" \
+ -e 's/^#AUTH_FILE=.*$/AUTH_FILE=${SERVER_HOME}\/sqltool.rc/g' \
+ src/org/hsqldb/sample/sample-hsqldb.cfg > conf/hsqldb || die
+ cp "${FILESDIR}/server.properties" conf/ || die
+ cp "${FILESDIR}/sqltool.rc" conf/ || die
+
+ # Missing source file - needed for tests
+ # http://hsqldb.cvs.sourceforge.net/*checkout*/hsqldb/hsqldb-dev/src/org/hsqldb/lib/StringComparator.java?revision=1.1&pathrev=hsqldb_1_8_0_10
+ # https://sourceforge.net/tracker/index.php?func=detail&aid=2008754&group_id=23316&atid=378131
+ cp "${FILESDIR}/StringComparator.java" src/org/hsqldb/lib || die
+ cp "${FILESDIR}/TestBug1191815.java" src/org/hsqldb/test/ || die
+}
+
+JAVA_ANT_REWRITE_CLASSPATH="yes"
+
+# EANT_BUILD_XML used also in src_prepare
+EANT_BUILD_XML="build/build.xml"
+EANT_BUILD_TARGET="jar jarclient jarsqltool jarutil"
+EANT_DOC_TARGET="javadocdev"
+EANT_GENTOO_CLASSPATH="servlet-api-2.5"
+
+src_test() {
+ java-pkg_jar-from --into lib junit
+ eant -f ${EANT_BUILD_XML} jartest
+ cd testrun/hsqldb || die
+ ./runTest.sh TestSelf || die "TestSelf hsqldb tests failed"
+ # TODO. These fail. Investigate why.
+ #cd "${S}/testrun/sqltool" || die
+ #CLASSPATH="${S}/lib/hsqldb.jar" ./runtests.bash || die "sqltool test failed"
+}
+
+src_install() {
+ java-pkg_dojar lib/hsql*.jar
+
+ if use doc; then
+ dodoc doc/*.txt
+ dohtml -r doc/zaurus
+ dohtml -r doc/src
+ fi
+ use source && java-pkg_dosrc src/*
+
+ echo "CONFIG_PROTECT=\"${HSQLDB_HOME}\"" > "${T}"/35hsqldb || die
+ doenvd "${T}"/35hsqldb
+
+ # Put init, configuration and authorization files in /etc
+ doinitd "${FILESDIR}/hsqldb"
+ doconfd conf/hsqldb
+ dodir /etc/hsqldb
+ insinto /etc/hsqldb
+ # Change the ownership of server.properties and sqltool.rc
+ # files to hsqldb:hsqldb. (resolves Bug #111963)
+ use prefix || insopts -m0600 -o hsqldb -g hsqldb
+ doins conf/server.properties
+ use prefix || insopts -m0600 -o hsqldb -g hsqldb
+ doins conf/sqltool.rc
+
+ # Install init script
+ dodir "${HSQLDB_HOME}/bin"
+ keepdir "${HSQLDB_HOME}"
+ exeinto "${HSQLDB_HOME}/bin"
+ doexe bin/hsqldb
+
+ # Make sure that files have correct permissions
+ use prefix || chown -R hsqldb:hsqldb "${ED}${HSQLDB_HOME}"
+ chmod o-rwx "${ED}${HSQLDB_HOME}"
+
+ # Create symlinks to authorization files in the server home dir
+ # (required by the hqldb init script)
+ insinto "${HSQLDB_HOME}"
+ dosym ../../../etc/hsqldb/server.properties "${HSQLDB_HOME}/server.properties"
+ dosym ../../../etc/hsqldb/sqltool.rc "${HSQLDB_HOME}/sqltool.rc"
+}
+
+pkg_postinst() {
+ ewarn "If you intend to run Hsqldb in Server mode and you want to create"
+ ewarn "additional databases, remember to put correct information in both"
+ ewarn "'server.properties' and 'sqltool.rc' files."
+ ewarn "(read the 'Init script Setup Procedure' section of the 'Chapter 3."
+ ewarn "UNIX Quick Start' in the Hsqldb docs for more information)"
+ echo
+ elog "Example:"
+ echo
+ elog "${EPREFIX}/etc/hsqldb/server.properties"
+ elog "============================="
+ elog "server.database.1=file:xdb/xdb"
+ elog "server.dbname.1=xdb"
+ elog "server.urlid.1=xdb"
+ elog
+ elog "${EPREFIX}/etc/hsqldb/sqltool.rc"
+ elog "======================"
+ elog "urlid xdb"
+ elog "url jdbc:hsqldb:hsql://localhost/xdb"
+ elog "username sa"
+ elog "password "
+ echo
+ elog "Also note that each hsqldb server can serve only up to 10"
+ elog "different databases simultaneously (with consecutive {0-9}"
+ elog "suffixes in the 'server.properties' file)."
+ echo
+ ewarn "For data manipulation use:"
+ ewarn
+ ewarn "# java -classpath ${EPREFIX}${HSQLDB_JAR} org.hsqldb.util.DatabaseManager"
+ ewarn "# java -classpath ${EPREFIX}${HSQLDB_JAR} org.hsqldb.util.DatabaseManagerSwing"
+ ewarn "# java -classpath ${EPREFIX}${HSQLDB_JAR} org.hsqldb.util.SqlTool \\"
+ ewarn " --rcFile ${EPREFIX}/var/lib/hsqldb/sqltool.rc <dbname>"
+ echo
+ elog "The Hsqldb can be run in multiple modes - read 'Chapter 1. Running'"
+ elog "and Using Hsqldb' in the Hsqldb docs at:"
+ elog " http://hsqldb.org/web/hsqlDocsFrame.html"
+ elog "If you intend to run it in the Server mode, it is suggested to add the"
+ elog "init script to your start-up scripts, this should be done like this:"
+ elog " \`rc-update add hsqldb default\`"
+ echo
+}
diff --git a/dev-db/hsqldb/metadata.xml b/dev-db/hsqldb/metadata.xml
new file mode 100644
index 000000000000..90ae84e29855
--- /dev/null
+++ b/dev-db/hsqldb/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>java@gentoo.org</email>
+ <name>Java</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">hsqldb</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/hyperdex-1.6.0-r1 b/dev-db/hyperdex-1.6.0-r1
deleted file mode 100644
index 32c9d1150983..000000000000
--- a/dev-db/hyperdex-1.6.0-r1
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=configure install prepare setup
-DEPEND=dev-cpp/glog dev-cpp/sparsehash dev-libs/cityhash dev-libs/libpo6 dev-libs/libe dev-libs/busybee dev-libs/popt dev-libs/replicant dev-libs/libmacaroons dev-libs/libtreadstone dev-libs/json-c:= python? ( python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=A searchable distributed Key-Value Store
-EAPI=5
-HOMEPAGE=http://hyperdex.org
-IUSE=test +python python_targets_python2_7
-KEYWORDS=~amd64
-LICENSE=BSD
-RDEPEND=dev-cpp/glog dev-cpp/sparsehash dev-libs/cityhash dev-libs/libpo6 dev-libs/libe dev-libs/busybee dev-libs/popt dev-libs/replicant dev-libs/libmacaroons dev-libs/libtreadstone dev-libs/json-c:= python? ( python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] )
-REQUIRED_USE=python? ( python_targets_python2_7 ) test? ( python )
-RESTRICT=test
-SLOT=0
-SRC_URI=http://hyperdex.org/src/hyperdex-1.6.0.tar.gz http://dev.gentooexperimental.org/~patrick/autotools-java.tar
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 python-single-r1 26fdbe5e685d53f67303a3a43d9e4848 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=3c7cafba65d9e2e5a87ff7067fa8b6f4
diff --git a/dev-db/hyperdex-1.7.1 b/dev-db/hyperdex-1.7.1
deleted file mode 100644
index 77a6b4206aa9..000000000000
--- a/dev-db/hyperdex-1.7.1
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=configure install prepare setup
-DEPEND=dev-cpp/glog dev-cpp/sparsehash dev-libs/cityhash dev-libs/libpo6 dev-libs/libe dev-libs/busybee dev-libs/popt dev-libs/replicant dev-libs/libmacaroons dev-libs/libtreadstone dev-libs/json-c:= python? ( python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=A searchable distributed Key-Value Store
-EAPI=5
-HOMEPAGE=http://hyperdex.org
-IUSE=test +python python_targets_python2_7
-KEYWORDS=~amd64
-LICENSE=BSD
-RDEPEND=dev-cpp/glog dev-cpp/sparsehash dev-libs/cityhash dev-libs/libpo6 dev-libs/libe dev-libs/busybee dev-libs/popt dev-libs/replicant dev-libs/libmacaroons dev-libs/libtreadstone dev-libs/json-c:= python? ( python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] )
-REQUIRED_USE=python? ( python_targets_python2_7 ) test? ( python )
-RESTRICT=test
-SLOT=0
-SRC_URI=http://hyperdex.org/src/hyperdex-1.7.1.tar.gz http://dev.gentooexperimental.org/~patrick/autotools-java.tar
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 python-single-r1 26fdbe5e685d53f67303a3a43d9e4848 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=3c7cafba65d9e2e5a87ff7067fa8b6f4
diff --git a/dev-db/hyperdex-1.8.0 b/dev-db/hyperdex-1.8.0
deleted file mode 100644
index 8e6b88d00022..000000000000
--- a/dev-db/hyperdex-1.8.0
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=configure install prepare setup test
-DEPEND=dev-cpp/glog dev-cpp/sparsehash dev-libs/cityhash >=dev-libs/hyperleveldb-1.2 >=dev-libs/libpo6-0.8 >=dev-libs/libe-0.11 >=dev-libs/busybee-0.7 dev-libs/popt >=dev-libs/replicant-0.8 >=dev-libs/libmacaroons-0.3 >=dev-libs/libtreadstone-0.2 dev-libs/json-c:= python? ( python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=A searchable distributed Key-Value Store
-EAPI=5
-HOMEPAGE=http://hyperdex.org
-IUSE=test +python python_targets_python2_7
-KEYWORDS=~amd64
-LICENSE=BSD
-RDEPEND=dev-cpp/glog dev-cpp/sparsehash dev-libs/cityhash >=dev-libs/hyperleveldb-1.2 >=dev-libs/libpo6-0.8 >=dev-libs/libe-0.11 >=dev-libs/busybee-0.7 dev-libs/popt >=dev-libs/replicant-0.8 >=dev-libs/libmacaroons-0.3 >=dev-libs/libtreadstone-0.2 dev-libs/json-c:= python? ( python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] )
-REQUIRED_USE=python? ( python_targets_python2_7 ) test? ( python )
-RESTRICT=test
-SLOT=0
-SRC_URI=http://hyperdex.org/src/hyperdex-1.8.0.tar.gz http://dev.gentooexperimental.org/~patrick/autotools-java.tar
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 python-single-r1 26fdbe5e685d53f67303a3a43d9e4848 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=c4ecd66cf1d524ed8d3dbc32364c7af2
diff --git a/dev-db/hyperdex-1.8.1 b/dev-db/hyperdex-1.8.1
deleted file mode 100644
index 9b43c8fc3b65..000000000000
--- a/dev-db/hyperdex-1.8.1
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=configure install prepare setup test
-DEPEND=dev-cpp/glog dev-cpp/sparsehash dev-libs/cityhash >=dev-libs/hyperleveldb-1.2 >=dev-libs/libpo6-0.8 >=dev-libs/libe-0.11 >=dev-libs/busybee-0.7 dev-libs/popt >=dev-libs/replicant-0.8 >=dev-libs/libmacaroons-0.3 >=dev-libs/libtreadstone-0.2 dev-libs/json-c:= python? ( python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=A searchable distributed Key-Value Store
-EAPI=5
-HOMEPAGE=http://hyperdex.org
-IUSE=test +python python_targets_python2_7
-KEYWORDS=~amd64
-LICENSE=BSD
-RDEPEND=dev-cpp/glog dev-cpp/sparsehash dev-libs/cityhash >=dev-libs/hyperleveldb-1.2 >=dev-libs/libpo6-0.8 >=dev-libs/libe-0.11 >=dev-libs/busybee-0.7 dev-libs/popt >=dev-libs/replicant-0.8 >=dev-libs/libmacaroons-0.3 >=dev-libs/libtreadstone-0.2 dev-libs/json-c:= python? ( python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] )
-REQUIRED_USE=python? ( python_targets_python2_7 ) test? ( python )
-RESTRICT=test
-SLOT=0
-SRC_URI=http://hyperdex.org/src/hyperdex-1.8.1.tar.gz http://dev.gentooexperimental.org/~patrick/autotools-java.tar
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 python-single-r1 26fdbe5e685d53f67303a3a43d9e4848 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=c4ecd66cf1d524ed8d3dbc32364c7af2
diff --git a/dev-db/hyperdex-9999 b/dev-db/hyperdex-9999
deleted file mode 100644
index 4f5371e35c1f..000000000000
--- a/dev-db/hyperdex-9999
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=configure install prepare setup unpack
-DEPEND=dev-cpp/glog dev-cpp/sparsehash dev-libs/cityhash dev-libs/libpo6 dev-libs/libe dev-libs/busybee dev-libs/popt dev-libs/replicant dev-libs/json-c:= python? ( python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 >=dev-vcs/git-1.8.2.1[curl]
-DESCRIPTION=A searchable distributed Key-Value Store
-EAPI=5
-HOMEPAGE=http://hyperdex.org
-IUSE=+python python_targets_python2_7
-LICENSE=BSD
-RDEPEND=dev-cpp/glog dev-cpp/sparsehash dev-libs/cityhash dev-libs/libpo6 dev-libs/libe dev-libs/busybee dev-libs/popt dev-libs/replicant dev-libs/json-c:= python? ( python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] )
-REQUIRED_USE=python? ( || ( python_targets_python2_7 ) )
-SLOT=0
-SRC_URI=http://dev.gentooexperimental.org/~patrick/autotools-java.tar
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc git-r3 8f6de46b0aa318aea0e8cac62ece098b libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 python-r1 0b5829eb6369d7af3a834b6eed7b7107 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=578d9a8a4ea8c2b091b239544b28653e
diff --git a/dev-db/hyperdex/Manifest b/dev-db/hyperdex/Manifest
new file mode 100644
index 000000000000..280f0ccfa771
--- /dev/null
+++ b/dev-db/hyperdex/Manifest
@@ -0,0 +1,13 @@
+AUX hyperdex.confd 122 BLAKE2B e08c1573a30ba61309ed11d0a80a6e804ef13cf4d7ff68d03f55cf58657e5229cfe9ce585199984cfbc8716dc254038720d4026270950d936e20f837bd17e91d SHA512 77bd29ba3aad673a024be819c488bd344c0780d09822aa40285657f89c32a40de799bc33edb198205c7a42c8fc5fc1215c289100364caff95c6a1d765d436202
+AUX hyperdex.initd 226 BLAKE2B 85d9c431d02b01acaf995adfbe5e2a8c8ccaa8ecbbc1aa5f1cc5f4cc08a67a9c8e84e0d1d8c02f1786062b578b523d2582be6ec8f8111e712bec83fb7eae20bf SHA512 1eb77a5ea22e0893ba130239d9783b1699f6d1ef7773f9cba10e4353fd4cf4a21d9fd57b2f4acac0488597f88d74bf36e2fa0f5d6472709e926ef898463bf37c
+DIST autotools-java.tar 2770 BLAKE2B 40fde34a6b5f6be1e851c61bb933a7a35643b1d82e039c2aeb1c74e31069a5944559d6c61464c39374e3953b9059df8f079d7e734efed05ea52b190f90f7696a SHA512 a193c3c3f8cc654967905c9ab559098425f1688a75c21a4207959fbe13572b4dba3e5c21e04913f20e5aa1b1c2fd2b13dcef91cc4f031b06884ac3130edc5757
+DIST hyperdex-1.6.0.tar.gz 1490273 BLAKE2B bc8e83fa73f44695d82c2e7fb936b3cf3474947199c5925c84905893e694f9aff95eb7caa6f65303a67684a18f37acd112fb87babde6c584a1d884a88cbcfb7e SHA512 44e1c5fa1e0e2158bf3eb72dc94681f8aaf3a804ce7b2df05461c1f4c9f0e3e71ee7f0503c25ee9e00701ba9444df18ecbe427606de4ddd3b1f31d382b037272
+DIST hyperdex-1.7.1.tar.gz 1517677 BLAKE2B 45c2789736a6f609f2c327f31f1e248b05abb46d766b565f35609be1ca78f680e2cedd017336fc82c844d17034197c14230bbf07d30228001c6cd45bcd509e15 SHA512 41bf8cc49081ba41917c737facfa7b5e29bcf73f510ae5743356828643bd7292ac8c610915985e52f6609c4a80cf70e7d515504bbe0a85383c74d7e288f2dc5b
+DIST hyperdex-1.8.0.tar.gz 1516389 BLAKE2B 7636349a3d81cc2592fed5d6db7c7bbaacdc0d1f6e4cb4965f111fe04ef8232337d6f1f4ce5a4d335daaab58e4171073fff079afd1822d8d57aadd6927c7da58 SHA512 e667552f16899edf57a08f3704e762e33b33aa9508ee486187b5c6fd6f01ab9cb61cd65444a676386554cebb2e4d191b4181df4c9b399821e5d244791bf3cb12
+DIST hyperdex-1.8.1.tar.gz 1516446 BLAKE2B aa2e011b8fdda57d73662164dac30984b3b633dc27bdbd70e415859386559cc41874ff6da0faabac4c28518455464fb960f285f50fd8e76cb9f40e938c9e328c SHA512 28a9b1a1f99d4159fb2d453fb7f740d4926ac2275488c8676a70d45879be5b1ef9b1e84720f86ef4f058706558899f2e3229fc7140349dadc3974754a03ac13e
+EBUILD hyperdex-1.6.0-r1.ebuild 1497 BLAKE2B e9a1e01ea9d604d6255c515ff4ad26f010be49537fe6b341f95fc313c53093976b45a828d6343cc7272ed9782e1529b8797c4b0753b8518527d4897ca34f5b0b SHA512 08966755f65cc5307d0caaf4543056b111ca1927642c5b9d3273d236802b5c154ece90951519ba129495d80d95d0d9b7719863980b1a4e8cfc03a54cd6ac0418
+EBUILD hyperdex-1.7.1.ebuild 1497 BLAKE2B e9a1e01ea9d604d6255c515ff4ad26f010be49537fe6b341f95fc313c53093976b45a828d6343cc7272ed9782e1529b8797c4b0753b8518527d4897ca34f5b0b SHA512 08966755f65cc5307d0caaf4543056b111ca1927642c5b9d3273d236802b5c154ece90951519ba129495d80d95d0d9b7719863980b1a4e8cfc03a54cd6ac0418
+EBUILD hyperdex-1.8.0.ebuild 1596 BLAKE2B 8b302e59a9555aa19ac9c8bade8bdeb16141449a24204ba891f64dbd55d502cf25be329faeddb0e404f86251cf917f142ddab28243581c288c07f5ed297b8989 SHA512 1f66116c040ff29dc248c65d53ab33d5e92726c1ecc4bd3dc51307fad594e64fa3eccdee6821f458f081bb7c33a19ba28d9498b4bebf149dae842f5ade31e330
+EBUILD hyperdex-1.8.1.ebuild 1596 BLAKE2B 8b302e59a9555aa19ac9c8bade8bdeb16141449a24204ba891f64dbd55d502cf25be329faeddb0e404f86251cf917f142ddab28243581c288c07f5ed297b8989 SHA512 1f66116c040ff29dc248c65d53ab33d5e92726c1ecc4bd3dc51307fad594e64fa3eccdee6821f458f081bb7c33a19ba28d9498b4bebf149dae842f5ade31e330
+EBUILD hyperdex-9999.ebuild 1433 BLAKE2B 40a874a8b4d9fe5d727091f6f3775d13d7d92abae383f6352fb0e29783e5e081c63415dfd839a59eff26dc8a8d88dc8efeaea432855ca3301dd87d4015b74c79 SHA512 41f608776b4ee8068beea39066a4f7bd45c54583b11e483113c78f2b84c4ba49b064d1c717dae40721325e0856fabfd43d91a3a369035454a6d8d00fab05ad16
+MISC metadata.xml 247 BLAKE2B 5a20af3c9732ef7dba68131a08988652f5c93a6d186a82c4deb1bb9c06dc3ae73152a0d241cc346637f7b11caf4676da43301ba596c67b66669535e71db0b03e SHA512 29cf52c16b0cce69899d9c2da8acd9144b7d760442aa323b854dceadb42459e009545193b1df7911ac2241b59f4819b4a6bb1d206d6f57953f770031433bb6b7
diff --git a/dev-db/hyperdex/files/hyperdex.confd b/dev-db/hyperdex/files/hyperdex.confd
new file mode 100644
index 000000000000..d7bab25e5c9d
--- /dev/null
+++ b/dev-db/hyperdex/files/hyperdex.confd
@@ -0,0 +1,4 @@
+# /etc/conf.d/hyperdex: config file for /etc/init.d/hyperdex
+
+# see documentation for HyperDex for help
+#HYPERDEX_OPTS=""
diff --git a/dev-db/hyperdex/files/hyperdex.initd b/dev-db/hyperdex/files/hyperdex.initd
new file mode 100644
index 000000000000..181f1c7a811f
--- /dev/null
+++ b/dev-db/hyperdex/files/hyperdex.initd
@@ -0,0 +1,10 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command="/usr/bin/hyperdex-daemon"
+command_args="--daemon ${HYPERDEX_OPTS}"
+
+depend() {
+ use net
+}
diff --git a/dev-db/hyperdex/hyperdex-1.6.0-r1.ebuild b/dev-db/hyperdex/hyperdex-1.6.0-r1.ebuild
new file mode 100644
index 000000000000..ba8e0bd4d3de
--- /dev/null
+++ b/dev-db/hyperdex/hyperdex-1.6.0-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils python-single-r1 autotools
+
+DESCRIPTION="A searchable distributed Key-Value Store"
+
+HOMEPAGE="http://hyperdex.org"
+SRC_URI="http://hyperdex.org/src/${P}.tar.gz
+ http://dev.gentooexperimental.org/~patrick/autotools-java.tar"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+
+IUSE="test +python"
+# need to add ruby and java useflags too
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} ) test? ( python )"
+
+# Tests fail, still
+RESTRICT="test"
+
+DEPEND="
+ dev-cpp/glog
+ dev-cpp/sparsehash
+ dev-libs/cityhash
+ dev-libs/libpo6
+ dev-libs/libe
+ dev-libs/busybee
+ dev-libs/popt
+ dev-libs/replicant
+ dev-libs/libmacaroons
+ dev-libs/libtreadstone
+ dev-libs/json-c:=
+ python? ( ${PYTHON_DEPS} )"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ cp "${WORKDIR}/"*.m4 m4/
+ sed -i -e 's~json/json.h~json-c/json.h~' configure.ac common/datatype_document.cc daemon/index_document.cc || die "Blergh!"
+ eautoreconf
+}
+
+src_configure() {
+ econf --disable-static \
+ $(use_enable python python-bindings)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "Failed to install"
+ newinitd "${FILESDIR}/hyperdex.initd" hyperdex || die "Failed to install init script"
+ newconfd "${FILESDIR}/hyperdex.confd" hyperdex || die "Failed to install config file"
+ find "${D}" -name '*.la' -exec rm {} \; # bad buildsystem! bad!
+}
diff --git a/dev-db/hyperdex/hyperdex-1.7.1.ebuild b/dev-db/hyperdex/hyperdex-1.7.1.ebuild
new file mode 100644
index 000000000000..ba8e0bd4d3de
--- /dev/null
+++ b/dev-db/hyperdex/hyperdex-1.7.1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils python-single-r1 autotools
+
+DESCRIPTION="A searchable distributed Key-Value Store"
+
+HOMEPAGE="http://hyperdex.org"
+SRC_URI="http://hyperdex.org/src/${P}.tar.gz
+ http://dev.gentooexperimental.org/~patrick/autotools-java.tar"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+
+IUSE="test +python"
+# need to add ruby and java useflags too
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} ) test? ( python )"
+
+# Tests fail, still
+RESTRICT="test"
+
+DEPEND="
+ dev-cpp/glog
+ dev-cpp/sparsehash
+ dev-libs/cityhash
+ dev-libs/libpo6
+ dev-libs/libe
+ dev-libs/busybee
+ dev-libs/popt
+ dev-libs/replicant
+ dev-libs/libmacaroons
+ dev-libs/libtreadstone
+ dev-libs/json-c:=
+ python? ( ${PYTHON_DEPS} )"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ cp "${WORKDIR}/"*.m4 m4/
+ sed -i -e 's~json/json.h~json-c/json.h~' configure.ac common/datatype_document.cc daemon/index_document.cc || die "Blergh!"
+ eautoreconf
+}
+
+src_configure() {
+ econf --disable-static \
+ $(use_enable python python-bindings)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "Failed to install"
+ newinitd "${FILESDIR}/hyperdex.initd" hyperdex || die "Failed to install init script"
+ newconfd "${FILESDIR}/hyperdex.confd" hyperdex || die "Failed to install config file"
+ find "${D}" -name '*.la' -exec rm {} \; # bad buildsystem! bad!
+}
diff --git a/dev-db/hyperdex/hyperdex-1.8.0.ebuild b/dev-db/hyperdex/hyperdex-1.8.0.ebuild
new file mode 100644
index 000000000000..107843edc025
--- /dev/null
+++ b/dev-db/hyperdex/hyperdex-1.8.0.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils python-single-r1 autotools
+
+DESCRIPTION="A searchable distributed Key-Value Store"
+
+HOMEPAGE="http://hyperdex.org"
+SRC_URI="http://hyperdex.org/src/${P}.tar.gz
+ http://dev.gentooexperimental.org/~patrick/autotools-java.tar"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+
+IUSE="test +python"
+# need to add ruby and java useflags too
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} ) test? ( python )"
+
+# Tests fail, still
+RESTRICT="test"
+
+DEPEND="
+ dev-cpp/glog
+ dev-cpp/sparsehash
+ dev-libs/cityhash
+ >=dev-libs/hyperleveldb-1.2
+ >=dev-libs/libpo6-0.8
+ >=dev-libs/libe-0.11
+ >=dev-libs/busybee-0.7
+ dev-libs/popt
+ >=dev-libs/replicant-0.8
+ >=dev-libs/libmacaroons-0.3
+ >=dev-libs/libtreadstone-0.2
+ dev-libs/json-c:=
+ python? ( ${PYTHON_DEPS} )"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ cp "${WORKDIR}/"*.m4 m4/
+ sed -i -e 's~json/json.h~json-c/json.h~' configure.ac common/datatype_document.cc daemon/index_document.cc || die "Blergh!"
+ eautoreconf
+}
+
+src_configure() {
+ econf --disable-static \
+ $(use_enable python python-bindings)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "Failed to install"
+ newinitd "${FILESDIR}/hyperdex.initd" hyperdex || die "Failed to install init script"
+ newconfd "${FILESDIR}/hyperdex.confd" hyperdex || die "Failed to install config file"
+ find "${D}" -name '*.la' -exec rm {} \; # bad buildsystem! bad!
+}
+
+src_test() {
+ emake -j1 check
+}
diff --git a/dev-db/hyperdex/hyperdex-1.8.1.ebuild b/dev-db/hyperdex/hyperdex-1.8.1.ebuild
new file mode 100644
index 000000000000..107843edc025
--- /dev/null
+++ b/dev-db/hyperdex/hyperdex-1.8.1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils python-single-r1 autotools
+
+DESCRIPTION="A searchable distributed Key-Value Store"
+
+HOMEPAGE="http://hyperdex.org"
+SRC_URI="http://hyperdex.org/src/${P}.tar.gz
+ http://dev.gentooexperimental.org/~patrick/autotools-java.tar"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+
+IUSE="test +python"
+# need to add ruby and java useflags too
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} ) test? ( python )"
+
+# Tests fail, still
+RESTRICT="test"
+
+DEPEND="
+ dev-cpp/glog
+ dev-cpp/sparsehash
+ dev-libs/cityhash
+ >=dev-libs/hyperleveldb-1.2
+ >=dev-libs/libpo6-0.8
+ >=dev-libs/libe-0.11
+ >=dev-libs/busybee-0.7
+ dev-libs/popt
+ >=dev-libs/replicant-0.8
+ >=dev-libs/libmacaroons-0.3
+ >=dev-libs/libtreadstone-0.2
+ dev-libs/json-c:=
+ python? ( ${PYTHON_DEPS} )"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ cp "${WORKDIR}/"*.m4 m4/
+ sed -i -e 's~json/json.h~json-c/json.h~' configure.ac common/datatype_document.cc daemon/index_document.cc || die "Blergh!"
+ eautoreconf
+}
+
+src_configure() {
+ econf --disable-static \
+ $(use_enable python python-bindings)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "Failed to install"
+ newinitd "${FILESDIR}/hyperdex.initd" hyperdex || die "Failed to install init script"
+ newconfd "${FILESDIR}/hyperdex.confd" hyperdex || die "Failed to install config file"
+ find "${D}" -name '*.la' -exec rm {} \; # bad buildsystem! bad!
+}
+
+src_test() {
+ emake -j1 check
+}
diff --git a/dev-db/hyperdex/hyperdex-9999.ebuild b/dev-db/hyperdex/hyperdex-9999.ebuild
new file mode 100644
index 000000000000..d1d8b48d8504
--- /dev/null
+++ b/dev-db/hyperdex/hyperdex-9999.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils python-r1 autotools git-r3
+
+DESCRIPTION="A searchable distributed Key-Value Store"
+
+HOMEPAGE="http://hyperdex.org"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS=""
+
+EGIT_REPO_URI="https://github.com/rescrv/HyperDex.git"
+
+SRC_URI="http://dev.gentooexperimental.org/~patrick/autotools-java.tar"
+
+IUSE="+python"
+# need to add ruby and java useflags too
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+DEPEND="
+ dev-cpp/glog
+ dev-cpp/sparsehash
+ dev-libs/cityhash
+ dev-libs/libpo6
+ dev-libs/libe
+ dev-libs/busybee
+ dev-libs/popt
+ dev-libs/replicant
+ dev-libs/json-c:=
+ python? ( ${PYTHON_DEPS} )"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ cd m4; tar xf "${DISTDIR}/autotools-java.tar"
+ cd ..
+ sed -i -e 's~json/json.h~json-c/json.h~' configure.ac common/datatype_document.cc daemon/index_document.cc || die "Blergh!"
+ eautoreconf
+}
+
+src_configure() {
+ econf --disable-static \
+ $(use_enable python python-bindings)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "Failed to install"
+ newinitd "${FILESDIR}/hyperdex.initd" hyperdex || die "Failed to install init script"
+ newconfd "${FILESDIR}/hyperdex.confd" hyperdex || die "Failed to install config file"
+ find "${D}" -name '*.la' -exec rm {} \; # bad buildsystem! bad!
+}
diff --git a/dev-db/hyperdex/metadata.xml b/dev-db/hyperdex/metadata.xml
new file mode 100644
index 000000000000..40aa45df2b01
--- /dev/null
+++ b/dev-db/hyperdex/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-db/influxdb-1.5.1 b/dev-db/influxdb-1.5.1
deleted file mode 100644
index 14c9b3536166..000000000000
--- a/dev-db/influxdb-1.5.1
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile install setup test unpack
-DEPEND=>=app-text/asciidoc-8.6.10 app-text/xmlto >=dev-lang/go-1.9 virtual/pkgconfig
-DESCRIPTION=Scalable datastore for metrics, events, and real-time analytics
-EAPI=6
-HOMEPAGE=https://www.influxdata.com
-KEYWORDS=~amd64
-LICENSE=MIT
-SLOT=0
-SRC_URI=https://github.com/influxdata/influxdb/archive/v1.5.1.tar.gz -> influxdb-1.5.1.tar.gz https://github.com/collectd/go-collectd/archive/e84e8af5356e7f47485bbc95c96da6dd7984a67e.tar.gz -> github.com-collectd-go-collectd-e84e8af5356e7f47485bbc95c96da6dd7984a67e.tar.gz https://github.com/BurntSushi/toml/archive/a368813c5e648fee92e5f6c30e3944ff9d5e8895.tar.gz -> github.com-BurntSushi-toml-a368813c5e648fee92e5f6c30e3944ff9d5e8895.tar.gz https://github.com/RoaringBitmap/roaring/archive/cefad6e4f79d4fa5d1d758ff937dde300641ccfa.tar.gz -> github.com-RoaringBitmap-roaring-cefad6e4f79d4fa5d1d758ff937dde300641ccfa.tar.gz https://github.com/beorn7/perks/archive/4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9.tar.gz -> github.com-beorn7-perks-4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9.tar.gz https://github.com/bmizerany/pat/archive/c068ca2f0aacee5ac3681d68e4d0a003b7d1fd2c.tar.gz -> github.com-bmizerany-pat-c068ca2f0aacee5ac3681d68e4d0a003b7d1fd2c.tar.gz https://github.com/boltdb/bolt/archive/4b1ebc1869ad66568b313d0dc410e2be72670dda.tar.gz -> github.com-boltdb-bolt-4b1ebc1869ad66568b313d0dc410e2be72670dda.tar.gz https://github.com/cespare/xxhash/archive/1b6d2e40c16ba0dfce5c8eac2480ad6e7394819b.tar.gz -> github.com-cespare-xxhash-1b6d2e40c16ba0dfce5c8eac2480ad6e7394819b.tar.gz https://github.com/davecgh/go-spew/archive/346938d642f2ec3594ed81d874461961cd0faa76.tar.gz -> github.com-davecgh-go-spew-346938d642f2ec3594ed81d874461961cd0faa76.tar.gz https://github.com/dgrijalva/jwt-go/archive/24c63f56522a87ec5339cc3567883f1039378fdb.tar.gz -> github.com-dgrijalva-jwt-go-24c63f56522a87ec5339cc3567883f1039378fdb.tar.gz https://github.com/dgryski/go-bits/archive/2ad8d707cc05b1815ce6ff2543bb5e8d8f9298ef.tar.gz -> github.com-dgryski-go-bits-2ad8d707cc05b1815ce6ff2543bb5e8d8f9298ef.tar.gz https://github.com/dgryski/go-bitstream/archive/7d46cd22db7004f0cceb6f7975824b560cf0e486.tar.gz -> github.com-dgryski-go-bitstream-7d46cd22db7004f0cceb6f7975824b560cf0e486.tar.gz https://github.com/glycerine/go-unsnap-stream/archive/62a9a9eb44fd8932157b1a8ace2149eff5971af6.tar.gz -> github.com-glycerine-go-unsnap-stream-62a9a9eb44fd8932157b1a8ace2149eff5971af6.tar.gz https://github.com/gogo/protobuf/archive/1c2b16bc280d6635de6c52fc1471ab962dc36ec9.tar.gz -> github.com-gogo-protobuf-1c2b16bc280d6635de6c52fc1471ab962dc36ec9.tar.gz https://github.com/golang/protobuf/archive/1e59b77b52bf8e4b449a57e6f79f21226d571845.tar.gz -> github.com-golang-protobuf-1e59b77b52bf8e4b449a57e6f79f21226d571845.tar.gz https://github.com/golang/snappy/archive/d9eb7a3d35ec988b8585d4a0068e462c27d28380.tar.gz -> github.com-golang-snappy-d9eb7a3d35ec988b8585d4a0068e462c27d28380.tar.gz https://github.com/google/go-cmp/archive/18107e6c56edb2d51f965f7d68e59404f0daee54.tar.gz -> github.com-google-go-cmp-18107e6c56edb2d51f965f7d68e59404f0daee54.tar.gz https://github.com/influxdata/influxql/archive/21ddebb5641365d9b92234e8f5a566c41da9ab48.tar.gz -> github.com-influxdata-influxql-21ddebb5641365d9b92234e8f5a566c41da9ab48.tar.gz https://github.com/influxdata/usage-client/archive/6d3895376368aa52a3a81d2a16e90f0f52371967.tar.gz -> github.com-influxdata-usage-client-6d3895376368aa52a3a81d2a16e90f0f52371967.tar.gz https://github.com/influxdata/yamux/archive/1f58ded512de5feabbe30b60c7d33a7a896c5f16.tar.gz -> github.com-influxdata-yamux-1f58ded512de5feabbe30b60c7d33a7a896c5f16.tar.gz https://github.com/influxdata/yarpc/archive/036268cdec22b7074cd6d50cc6d7315c667063c7.tar.gz -> github.com-influxdata-yarpc-036268cdec22b7074cd6d50cc6d7315c667063c7.tar.gz https://github.com/jsternberg/zap-logfmt/archive/5ea53862c7fa897f44ae0b3004283308c0b0c9d1.tar.gz -> github.com-jsternberg-zap-logfmt-5ea53862c7fa897f44ae0b3004283308c0b0c9d1.tar.gz https://github.com/jwilder/encoding/archive/27894731927e49b0a9023f00312be26733744815.tar.gz -> github.com-jwilder-encoding-27894731927e49b0a9023f00312be26733744815.tar.gz https://github.com/mattn/go-isatty/archive/6ca4dbf54d38eea1a992b3c722a76a5d1c4cb25c.tar.gz -> github.com-mattn-go-isatty-6ca4dbf54d38eea1a992b3c722a76a5d1c4cb25c.tar.gz https://github.com/matttproud/golang_protobuf_extensions/archive/c12348ce28de40eed0136aa2b644d0ee0650e56c.tar.gz -> github.com-matttproud-golang_protobuf_extensions-c12348ce28de40eed0136aa2b644d0ee0650e56c.tar.gz https://github.com/opentracing/opentracing-go/archive/1361b9cd60be79c4c3a7fa9841b3c132e40066a7.tar.gz -> github.com-opentracing-opentracing-go-1361b9cd60be79c4c3a7fa9841b3c132e40066a7.tar.gz https://github.com/paulbellamy/ratecounter/archive/5a11f585a31379765c190c033b6ad39956584447.tar.gz -> github.com-paulbellamy-ratecounter-5a11f585a31379765c190c033b6ad39956584447.tar.gz https://github.com/peterh/liner/archive/88609521dc4b6c858fd4c98b628147da928ce4ac.tar.gz -> github.com-peterh-liner-88609521dc4b6c858fd4c98b628147da928ce4ac.tar.gz https://github.com/philhofer/fwd/archive/1612a298117663d7bc9a760ae20d383413859798.tar.gz -> github.com-philhofer-fwd-1612a298117663d7bc9a760ae20d383413859798.tar.gz https://github.com/prometheus/client_golang/archive/661e31bf844dfca9aeba15f27ea8aa0d485ad212.tar.gz -> github.com-prometheus-client_golang-661e31bf844dfca9aeba15f27ea8aa0d485ad212.tar.gz https://github.com/prometheus/client_model/archive/99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c.tar.gz -> github.com-prometheus-client_model-99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c.tar.gz https://github.com/prometheus/common/archive/2e54d0b93cba2fd133edc32211dcc32c06ef72ca.tar.gz -> github.com-prometheus-common-2e54d0b93cba2fd133edc32211dcc32c06ef72ca.tar.gz https://github.com/prometheus/procfs/archive/a6e9df898b1336106c743392c48ee0b71f5c4efa.tar.gz -> github.com-prometheus-procfs-a6e9df898b1336106c743392c48ee0b71f5c4efa.tar.gz https://github.com/retailnext/hllpp/archive/38a7bb71b483e855d35010808143beaf05b67f9d.tar.gz -> github.com-retailnext-hllpp-38a7bb71b483e855d35010808143beaf05b67f9d.tar.gz https://github.com/tinylib/msgp/archive/ad0ff2e232ad2e37faf67087fb24bf8d04a8ce20.tar.gz -> github.com-tinylib-msgp-ad0ff2e232ad2e37faf67087fb24bf8d04a8ce20.tar.gz https://github.com/xlab/treeprint/archive/06dfc6fa17cdde904617990a0c2d89e3e332dbb3.tar.gz -> github.com-xlab-treeprint-06dfc6fa17cdde904617990a0c2d89e3e332dbb3.tar.gz https://github.com/uber-go/atomic/archive/54f72d32435d760d5604f17a82e2435b28dc4ba5.tar.gz -> github.com-uber-go-atomic-54f72d32435d760d5604f17a82e2435b28dc4ba5.tar.gz https://github.com/uber-go/multierr/archive/fb7d312c2c04c34f0ad621048bbb953b168f9ff6.tar.gz -> github.com-uber-go-multierr-fb7d312c2c04c34f0ad621048bbb953b168f9ff6.tar.gz https://github.com/uber-go/zap/archive/35aad584952c3e7020db7b839f6b102de6271f89.tar.gz -> github.com-uber-go-zap-35aad584952c3e7020db7b839f6b102de6271f89.tar.gz https://github.com/golang/crypto/archive/9477e0b78b9ac3d0b03822fd95422e2fe07627cd.tar.gz -> github.com-golang-crypto-9477e0b78b9ac3d0b03822fd95422e2fe07627cd.tar.gz https://github.com/golang/net/archive/9dfe39835686865bff950a07b394c12a98ddc811.tar.gz -> github.com-golang-net-9dfe39835686865bff950a07b394c12a98ddc811.tar.gz https://github.com/golang/sync/archive/fd80eb99c8f653c847d294a001bdf2a3a6f768f5.tar.gz -> github.com-golang-sync-fd80eb99c8f653c847d294a001bdf2a3a6f768f5.tar.gz https://github.com/golang/sys/archive/062cd7e4e68206d8bab9b18396626e855c992658.tar.gz -> github.com-golang-sys-062cd7e4e68206d8bab9b18396626e855c992658.tar.gz https://github.com/golang/text/archive/a71fd10341b064c10f4a81ceac72bcf70f26ea34.tar.gz -> github.com-golang-text-a71fd10341b064c10f4a81ceac72bcf70f26ea34.tar.gz https://github.com/golang/time/archive/6dc17368e09b0e8634d71cac8168d853e869a0c7.tar.gz -> github.com-golang-time-6dc17368e09b0e8634d71cac8168d853e869a0c7.tar.gz
-_eclasses_=golang-base d4e3a3f895016e5c9d7afb1a33e7cf3c golang-build b66349c110e4ddd6203bbe8bf4ae05c1 golang-vcs-snapshot 913580335becddd3ebecefe852e47536 multilib 97f470f374f2e94ccab04a2fb21d811e systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81
-_md5_=49ca3070470a789883481974997ca3c8
diff --git a/dev-db/influxdb/Manifest b/dev-db/influxdb/Manifest
new file mode 100644
index 000000000000..a3f87ada88bd
--- /dev/null
+++ b/dev-db/influxdb/Manifest
@@ -0,0 +1,50 @@
+AUX influxd.conf 2961 BLAKE2B 465857627e9fad4761b1bdc8b35d18f2ee2e130b6ce943bb41f7621ea4621f38e5c59915f659ff47217884f6b596625f1ab1983b071b8859ecf2972cac94865b SHA512 8f052a10c44c4fb9c0e91a4eca5540ba76993a3f20a114f0c39a7ead01f33db7a4b22174cac7e4ab2e3614b75c033753fb6adcf001578f72ac05a4e551bd97fb
+AUX influxdb.confd 324 BLAKE2B 3800c8454474d424753db9635c04bb7149603bc16216d540dd8d06be58aac0082f9b5306e6addb6ed917fc97073a241997c0fc339a39c40c1bfb8550afb6e197 SHA512 18211682e300a93f49c2d9deecb49a7e8640cd1ae97236b28e85e78f74837a3a199735a6c33551d5222edec479e806c6ee606bfe61319d77a4475ca72fef8b9d
+AUX influxdb.rc 778 BLAKE2B 24d080b3fa822e52a05427567c078e1fb6da62b2a4a867e6f7caabdcb3ad9478b4f496995aca1a104ceb84ccf609d372f38b9bbce952af14f187cd4d5cab187a SHA512 17efd9705219f7edfdc4c4813592e5872fae53598c95fd954ad045df3333aeecb777f3a9395ed4265e73951e0b866b1dbfcd96f1af92c7719b2999d87fc0396d
+DIST github.com-BurntSushi-toml-a368813c5e648fee92e5f6c30e3944ff9d5e8895.tar.gz 42256 BLAKE2B 65fba0e39dbd7d9ffc5707379629ba9e8d91f186214afeb6b5f5960bd7d4b0f233247ecc1b23bff9c4ea8572f00b106ce5b833f88d975be5ffb29778fc18dcee SHA512 8a54f8b1f2fb9b5882d3c1498376c15aaf00eb8d9379090c38b03a6a291215923637dae9f36db1cca700687169cb08911e515222cd72fc153a5082ff4ddb5573
+DIST github.com-RoaringBitmap-roaring-cefad6e4f79d4fa5d1d758ff937dde300641ccfa.tar.gz 140675 BLAKE2B 229edd09629c2df7c3396a84ba3d4a427aa81e8a086a305059354b6ad1bb2009fba595068b727e57b51c4d610a23cab122b080536fed9326df42d7f2c41018a9 SHA512 6ca696bd1dec2c3b587e76614f64ca0b09df8af042c9193e6afcf23ec34f6f5e79ee13f9fdf450c5180c6eac07cf1e346cc2d64a653ef107d035efd98c71a23c
+DIST github.com-beorn7-perks-4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9.tar.gz 10593 BLAKE2B 057738aefe26d3d42ba1bc0906675403512a7bab1161bc1015f6d833296778f2236cb2b99bbebd5c7db2384634fef62d2afbfc8dd59bfb1320bc6184105aa437 SHA512 ecac8d361b4695b1fc32a9aaf9e0785201d1bebbf270226540e2c3fe193ad21f4fe8aed4e01937bd1e7273ca394455ca6fd7cf29418710f279cbb8eb92939e32
+DIST github.com-bmizerany-pat-c068ca2f0aacee5ac3681d68e4d0a003b7d1fd2c.tar.gz 6245 BLAKE2B 69344b2fd9aef8454d35a1a77c5192e6d461bde063524636a1c59fe529325803ea98853073323f8957f8396fb8bac74ca135880b89120a6041007870b692e38f SHA512 62b061ed5a9f037744dec9927a4c3f85dd260cf951cbc62d1eb897ee2c24d7572071fe1a97a0fecd2be866a84ea935a1e6daa34c97018cd3b391f50f0a42398f
+DIST github.com-boltdb-bolt-4b1ebc1869ad66568b313d0dc410e2be72670dda.tar.gz 83764 BLAKE2B b6e248bec2aec56d3713536c1cd00c7cacb54be0c21f4a3c82c461cc0782defd25ecd991b18945ca970bb159d9a46aad3851a697f6a0de4e3c5945c3d2208b5e SHA512 57586f4a26dfff950e766fd7663cc223b063aeafa32f7592a512b91bbd75315328313ec189a9461a17b65d36a99629f7b3fb0b3b6b1a2b23b1de9ad1f36a97fe
+DIST github.com-cespare-xxhash-1b6d2e40c16ba0dfce5c8eac2480ad6e7394819b.tar.gz 7839 BLAKE2B d70832fb4aaf18a33b3f45e4fb82ba003e46ecc4b5cb2cbc85a482851126a15e93396f4103cad79f4d0d83d67eb583a96721a2076a89570bf08f1e88f9e89504 SHA512 f93e119df10acc2e525734207bad67024bc0a48e7d84f72713c8cdebe6ffa8a75f4f11504dc9a7d59ea960f5724ae16145156371e650a093a7591829ebec758b
+DIST github.com-collectd-go-collectd-e84e8af5356e7f47485bbc95c96da6dd7984a67e.tar.gz 38929 BLAKE2B 42cd8dddd3708205c355c0bc8fdc400dad066286bdd19ba2a351255ca61b7c1bc5ed0ee9fa663c59c22dcc8327ed6b5fcc58d7f5793fe090b5aeb495ed57e1d4 SHA512 6b7ca8a439d9cb4d8a9b30620b7b6d278c625e4331d61ec2aed25e981e2cb5bbe44476e92feb1128a849cecd361d1976a82f26b6632e3d4fb58bee406ce635e4
+DIST github.com-davecgh-go-spew-346938d642f2ec3594ed81d874461961cd0faa76.tar.gz 42402 BLAKE2B e12d244274de239df8b72a2f020ed1f21a2dd2ebaf0448a431a9ec9d9d91a7face3f24936f3359fde39247c03c5aa5a61d2cc81bdf6bb668338cd81097bdfe7f SHA512 80b9f535dd85685cfd346b3c7f946fbc8b44d0537b7a3b7827103237a85f718fee2059067a7e1f21db13322f0d3ed1f7c44c36b451b8a6b5a0f6cf4e4db6553b
+DIST github.com-dgrijalva-jwt-go-24c63f56522a87ec5339cc3567883f1039378fdb.tar.gz 33535 BLAKE2B b20b1b0e41b52674471cfac16d4e151a650ece6e4fcd6e176e3a42d3795c47f963d155abcf6f2d4bd2fd438069c9587b28c049687bd31eda2044eff2fa7e2969 SHA512 b3afa346607289628947345e0e30d17fb0e736bc0b93e326e8bc5d7b564ad77387536006c1d3112ffff955c649c4aee2e3b4f73db1013e8815447f54f8664a4c
+DIST github.com-dgryski-go-bits-2ad8d707cc05b1815ce6ff2543bb5e8d8f9298ef.tar.gz 2196 BLAKE2B 6ae32c4d0b9e4114f3b9d5a0c1a8c8e7a3d8a7aefe7ca3396f087660adcfceff789bbb6188d9f6806b35f99a7a6843d03eb77065508d5caa0c6716bc0b163283 SHA512 2d2a80187f913dd1801f6768ba79f1ccdc7b085eb60863ec58822ce38cc0a111dd916134dde5afc4366fcba846d2d21615dc6ca06012df3085179afbdff3d611
+DIST github.com-dgryski-go-bitstream-7d46cd22db7004f0cceb6f7975824b560cf0e486.tar.gz 3009 BLAKE2B 1bc80b61dcd45cde68ded690d7129e05c45e151290bdb6209030034305ec3557c208da6f5a5c28b71af2679dc75548cba4043f5fa5bb1fb5a700148e23860fe6 SHA512 7df53064b89f8f21238dd154ecf18575b87504d801d0a96198539e8f8a772e05ba12cc70ef3200d4170c7fda7e01753d7a7e46e6a8f966e7f96532e78c5db60e
+DIST github.com-glycerine-go-unsnap-stream-62a9a9eb44fd8932157b1a8ace2149eff5971af6.tar.gz 19018 BLAKE2B 0af96e705f22b07b656955a36fe5a4c2828da1ffb61202dee0f694ec441e9c038cdf242de0a96123cffe26747b153ffd0f717c4393a834db89a8827ee30aaba0 SHA512 8bf728a93f255ded52eea96f317be7ff6ab4556760cea0d4510f77f61980e6bdb2765fe036416d711ab275b4752f261fd10c337a9e10638553d7f23747d38081
+DIST github.com-gogo-protobuf-1c2b16bc280d6635de6c52fc1471ab962dc36ec9.tar.gz 2570509 BLAKE2B 83b5b554ef7cf1836f49f883ccd40791ae936fc311114ecb5d81e9c98fb8ba5db3331e924863fbbe87bd0e103d5da5cfa0e49ba7dce897318a1c821e2cd1ee92 SHA512 666bcf92325755d1b9c20a74be09cafeb4b7087c64eef4adcae50ab28c367d3d65ef8484dd1e20069e880ffbdc6e810a9fc3bc21f92e399c78297a06bc9c7409
+DIST github.com-golang-crypto-9477e0b78b9ac3d0b03822fd95422e2fe07627cd.tar.gz 1298413 BLAKE2B 8a14bef5263975c2979846ab73d7abdcb1738443a3ef266efe596bff36ad3644fe43f7f62d9b8092828f446cb5d61be8b554481bfd0074ecb32e876abe177653 SHA512 4d014ade796ca9dd9e38a1df2445cfbc0fd74d2bb4c3b6849192b754b5cd715eb2c2694918d2e97a3aa0252362e553530fb66773c7068ec5347d5d2a72beb847
+DIST github.com-golang-net-9dfe39835686865bff950a07b394c12a98ddc811.tar.gz 926294 BLAKE2B 873eddc079f9891d3c72c865ac7f496ebea25b6fc2d4cf935f61ac2e422c04e1f8883dd0e9b97e359257c554d8986625a52015c2da2a8a93da4ce4204f858b50 SHA512 038f90bb667b63228b554066fd1efd608eb24615b549cea40314761022e0d0a775d268b6ac9072ad50b83e162467f8280f16b3d8fcd83c9bdace509279f3823f
+DIST github.com-golang-protobuf-1e59b77b52bf8e4b449a57e6f79f21226d571845.tar.gz 268477 BLAKE2B af1775f715a7c8434fe46872d8edf75241c851fb93e1e3f888c5fa1b603397e68c3878c9c69afe618ff1b7ae3d0c219ec96b8648af2fd2c2c9424a33f1710a2e SHA512 07de72078a66528d864da78c88be36351cf79be5235ec9f4ed1d71061a56b9b216fd29984ccfb2a610223a86b80aba2b9ca28a0d36fc2346b23070e25e72e29b
+DIST github.com-golang-snappy-d9eb7a3d35ec988b8585d4a0068e462c27d28380.tar.gz 62080 BLAKE2B e094b370ea4a366788073b2913e00ab28fe1c86a0cc6b2c630b3c80d429d74d4fe6493defb37a42b2ed722a661515655cf0a9175de0af1c9b13980a1341070c5 SHA512 23f9e9f21e220f95feb1de7764ca73c985f1b9f226f4011f5a06a7e03c42967a5c88990125284f69e721738ef1e0eccb7256915839e05f4d64c8bfcc254dbc96
+DIST github.com-golang-sync-fd80eb99c8f653c847d294a001bdf2a3a6f768f5.tar.gz 16388 BLAKE2B 592ca43086d182f7b7f0a8da90992a3e7aebf4ccc2b9c426e218afd26a7c4556a488134f8f317b108af4b2ea1d3659c19cf750127ede45a4c9d825245401c4db SHA512 fd051f9c839cd1f74673a2a7dc5cac6d6cce51371c3c6a21cbced58a7902f056522055e9c324d9d637539e49cfc59d0a2ac7725804f6e833be052b706f9265f0
+DIST github.com-golang-sys-062cd7e4e68206d8bab9b18396626e855c992658.tar.gz 769037 BLAKE2B 5b49fd85030ec5f4ee28a8a354f614797a1203ef98e039fd4c70f9dd228c528e6c71c763ad7cd65aefc83c4ec235ad2a0911e6915aca63ca4431e28aee6a93a8 SHA512 fd7ce44eef01931b5017d9054858d9f3197b03e5e824ec1e4377b2e1cc11beceb5e3fa2fcf5222e7d8624f054608be4e9edfe47261ecdb60ebd3156124ccd6e8
+DIST github.com-golang-text-a71fd10341b064c10f4a81ceac72bcf70f26ea34.tar.gz 4031312 BLAKE2B 890d83d0dc0135ce1817cee8f35a00d437fe23a27fd5ae599aa8b3640bdcfdb97271a848ce63904635be4e27a77dbff0ac7412e4a0efc0adcc27120987db7217 SHA512 f5205a85bc9375a54bbb2b5ee25b018a474dee63b5af98553fd3c2040f1e945ce2c3bd99e9266a37a56859aa47cef68d850e84737f5bd4ce2427167825bf0a2c
+DIST github.com-golang-time-6dc17368e09b0e8634d71cac8168d853e869a0c7.tar.gz 9548 BLAKE2B 8e29ac7d44106d5d36e580aba5677d5688ef3e850f6efaa83c01c4e4e6bda253adca564a01e2720f9b8216bd12abe99c2a519adb3e26085af8363d0c2b88e819 SHA512 12c4c592391f5e7f7334f28dc76193eeb8fb66df2294d91931daaf19912aa20a3ed27c8ece1bc02139b93d8767d22ec7dadbf800f91ae1f94aa635b490245feb
+DIST github.com-google-go-cmp-18107e6c56edb2d51f965f7d68e59404f0daee54.tar.gz 54191 BLAKE2B fc684c3f6154f937400684f44b2cffa63006c9820eb5e07f622c2d5d8d6de3074ed31b8556f01196ba9bcf6d23eb6704546413dc8faa3f05ca93483c4a30775d SHA512 622d568e1db52f6082d641aeb86d95ed4d518f0a78369828527215ed19c27702a91230e2c5ddb0ae7da5c46a143426be582c5a1b0b836eb234ff4e9c8faa230d
+DIST github.com-influxdata-influxql-21ddebb5641365d9b92234e8f5a566c41da9ab48.tar.gz 88699 BLAKE2B b1c1d150acf80e282117b8854c727f863ec8dc98dbf068a949e3135f2c663498d563a37fb9928fd272ce856e764e572b40124bb12ad5d7093afa0d614c940d14 SHA512 85e1f4bb3342f1825722a041cb7022e9c5ba15f3b1f724e6e108bb3249fe6dcc2aa0157a3b1220faaa15988f677dab7aa8bef4729f4895bf1d30c4e1537da1ba
+DIST github.com-influxdata-usage-client-6d3895376368aa52a3a81d2a16e90f0f52371967.tar.gz 6581 BLAKE2B ae34b07d1bea5f6ff494d2083318300bc507527568a1fdaeaa567790a089b93d51191ac9133e9660e1a343b0c0f1df863fa027722335f90b6b0c35f6f68556d3 SHA512 5caef7cf408eaf1a727791721e4fa1341d8cebea94ba83a2ddffec0365855995132438f020456da5f4cf5d130b7554fb1b0627a2095cc2f8f3c22efdb0eab37d
+DIST github.com-influxdata-yamux-1f58ded512de5feabbe30b60c7d33a7a896c5f16.tar.gz 22652 BLAKE2B 39fffba76bc14bfcc6bfacd9f1a9dcdd0a5ea71f7be18563de3565e8d981f4777f4a02b4a7a71ddc8c92de90c6a1cb2e343e3c0256b928f2f78749b03b7c802f SHA512 7912f80095118ae4f9f2ae8c475d0383abeceadf55125a77ee25e658761280728619650cb4fb759c56b2fb257ac3eafe66ef1d62b3a2b242a8543d0602097e06
+DIST github.com-influxdata-yarpc-036268cdec22b7074cd6d50cc6d7315c667063c7.tar.gz 34708 BLAKE2B f1299b999d5e22372c205e7e8877c622648583796f4a25bfd91845eec8cbcf8a3d3d6e619d53f7adde6ea1bd63a8acafb7a755b459558cbf793f252c553c2d44 SHA512 46501d4c3f2b35eac66a35c47b6317f7357cf37b541910e268bd08a6c4f4f09ac8e9a3c4f8cf574026729dde44d01dce4339b541b7b9f890c1d99e42a99c3153
+DIST github.com-jsternberg-zap-logfmt-5ea53862c7fa897f44ae0b3004283308c0b0c9d1.tar.gz 5608 BLAKE2B 9cd7a7cb427e8abeea6a1b9e46e24c960f8e8c0ad93911778e35266c2f3eb908aa6c50c42fa362ac5921f5e4b31a7ba5df60193fe11807c715873d37ff213793 SHA512 5bb1d9048de8046cc069588e3af6c91802956a9d5cefa0a87ac57e1c0d5da1ac74f39545b31557b28617123a61d12ef06f9531de6edf1fbbcbf5ba6012c43a37
+DIST github.com-jwilder-encoding-27894731927e49b0a9023f00312be26733744815.tar.gz 9680 BLAKE2B b2d9bf5de377fdbb115045367381437acf7aac75dbd068f0bfc9d1f14a696895177c525f3454f61e788990cb0413f4a8ae756b911e37c2b684a9c94ed2965ee0 SHA512 a90b829fee0b3d6106a0adc548f79e65d7c4f8713cf368a1229c56e72b7e116e1e096018f4740c9672aad983c2d2c635d1d0756cde85ab1399c4333e76de0683
+DIST github.com-mattn-go-isatty-6ca4dbf54d38eea1a992b3c722a76a5d1c4cb25c.tar.gz 3383 BLAKE2B 2034048312c4abc88a813d8ad83013f57e9a23477ecd847e92c3cf30e909e209f9a65acacf41d80b3569770c1400e338115c42fd48d358b66f68ccde69a9008d SHA512 1714a9e9ac7ad2ff30825328723b4c9a5c5f7544e876c6fe79b84c72ba1dd9bfcd6ded2308f6fcae8f1c893d22b84d6c72dfd30742edaa2a5b0d8e88eee27421
+DIST github.com-matttproud-golang_protobuf_extensions-c12348ce28de40eed0136aa2b644d0ee0650e56c.tar.gz 37215 BLAKE2B b3b007f925a4a1c1862c8cbe34c5cd225dfa610ad8c56b5328e6920a44b507680daeea97209370bd6b259654d0ca5791f4bcc54b8bd8970b9aaf994eada16d4f SHA512 2f78290d1448cfc041d10210092d6da6f3df2b9b6c16ff730750e976e450dafe2645ba945319a0a3064c88f9c18652c69c0e0cf69d8931c08d23ffe65a8cc07d
+DIST github.com-opentracing-opentracing-go-1361b9cd60be79c4c3a7fa9841b3c132e40066a7.tar.gz 24586 BLAKE2B 9eab0c61a49ff480593b45bb55cd5bed7c9ecdae1a3ffdc11e9fe189ed69af86c359e3d7eac542b9bc05488232655ae4485ba570463e67c04cc135e36b5ab5ea SHA512 56164418030d7e06583c98d67841743a4eb448c173985a7db061ab50db91332f1cb1e8f8087161a3c39d1d37a0f9152b67bf9c430d1d3ebf42f54ec5e51fb07b
+DIST github.com-paulbellamy-ratecounter-5a11f585a31379765c190c033b6ad39956584447.tar.gz 2877 BLAKE2B f03fb9f13eea9102bfa61b7f2753cc21638de285aaee694c09ebee5d8810fccf6ec695ba4b349fc848f2f30869d5b4859a46aa04a72b4ad07bf05cee1cfa1c1b SHA512 901c8e911d836e6fef5ec2c1ee84ad6198f2d560d55b85712cd867331e6fa23b9897065b83987e892bb6882a60c931ce548e0bc1ba597241227f6bc7aaac85b9
+DIST github.com-peterh-liner-88609521dc4b6c858fd4c98b628147da928ce4ac.tar.gz 20383 BLAKE2B 341d0d1ba33efebfc394d424dc855b7010efcef86b58c00d45c1fe8a528a88337089616767e2fba9d96b313d00b6b5036d2f0524d62fc9ef85226e66fd1ea206 SHA512 e446b856717f0792ce5b2b934005025bb74b6fa33fa0215829a432756e461579b24f7f95e4da14352d9226e1987e039653d5a86f6647895f67c7b1e062ce4741
+DIST github.com-philhofer-fwd-1612a298117663d7bc9a760ae20d383413859798.tar.gz 9224 BLAKE2B 4b6666b4b2e51d0a95eae7235e56f4787f55f034b17d77dbced390d96f92cca45b5c03ae64da6f60b706b61db564f3ea7e1639398752799facc0ec1d4f97d87d SHA512 1567bc6de5278b87123b0ff3e5211bb84f65bc1fd0ea610b9ffa8725e8635a6d6a2953d6c7cb3223371298f0d81bbcdb698d312e17a4a1df9ff18e7f7fef6794
+DIST github.com-prometheus-client_golang-661e31bf844dfca9aeba15f27ea8aa0d485ad212.tar.gz 94684 BLAKE2B 939955e453e6128bcd275b3ddfe36a7fdaec9321d4dd906979c18bb812e5be41dafba33480eef3bf5c2b8c3437573dd956b88d4befe3a39343a87a36d86db41c SHA512 6bcb5ad8590bec366c5c28306c47f41b9cbf18120255650cc57b033e3c206ee461502b3ae4a11fc21e8cf68d311ce834f912da917d2a1598d981e8475fb1e3eb
+DIST github.com-prometheus-client_model-99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c.tar.gz 54718 BLAKE2B 1dec6ac40fc5103117c2cf0538e138fc57c7b9795516c530b3c0dc2f5983f88c2d0eb1b094859815397fb14d50648240556fb6b11a8935586eca29eb66b4e958 SHA512 99bc72ca0887df4c7ab5a006af9c59afdc1281fe6d6d17f2897428a06da80d63d6ccd476deacb933cb208357500f14a7b96e99b9c5a7582e65a7aae87aaf2c50
+DIST github.com-prometheus-common-2e54d0b93cba2fd133edc32211dcc32c06ef72ca.tar.gz 62690 BLAKE2B 981efc277b38a6249cb232c2ce6f759ea7313902aa9e8edfa2e76bb793bbe0908d8b175a13248d042a8d2c611e57b278b5fe89d606e8410cd996a9f640bf94a1 SHA512 14e0e3a26c3a01e6921892559d34a6de05f8e1eb1fcb588b3f01d891679bce1a625806bf04aca16c89ca05efc907cc0ce3d06521dec30903886138b3c4b4dcd6
+DIST github.com-prometheus-procfs-a6e9df898b1336106c743392c48ee0b71f5c4efa.tar.gz 43909 BLAKE2B b1556c23231d14fa14626fb63a723ae0a835230990e6dd8a1416d038e9166a1ae94887e3ec0d1249057b117268116fb19f7c69c497c40e646ea55ff79fe557dc SHA512 6d37fe079ff63564704af89ab8403253d377ef183b68958cf281d9733613a3adae21a14e237fe6e05c17df01eaa88fe06c9941c34e9f388676ef2c84177a7dca
+DIST github.com-retailnext-hllpp-38a7bb71b483e855d35010808143beaf05b67f9d.tar.gz 43041 BLAKE2B 8c7e924f5c07a00775531996c552aad66c12b8fd1ffea78eff983cedf71a7132aba2b009c08c3c6886aa95fd095bcc7cbaeb300b7cd3cc5e29c415445181b1de SHA512 6255a5605ea9b30c6aff7598eaa3782d4c261d1b51d0f95e2457e11568ba553618e5789ac5f1e8047a6d39fd1d8f4f50275ada201939f3bd090b23e62bd103d2
+DIST github.com-tinylib-msgp-ad0ff2e232ad2e37faf67087fb24bf8d04a8ce20.tar.gz 67433 BLAKE2B e3ab12f6da0934af2110e9bd2fe7613b6b45a562abdf9100cf57a1113a8ba28e4a09372074de39f26deb83870b79feb2c73064d16a238a76d992c493daacbd88 SHA512 709ac306f8bc1b2894ae8b0182420dd1d6bf69e5721fc746e3b747e40c3088d92ad364c4bede557d78b120b32f4ff158d96b2c92e0b686fe6974076a62ce690f
+DIST github.com-uber-go-atomic-54f72d32435d760d5604f17a82e2435b28dc4ba5.tar.gz 7464 BLAKE2B 32eaf5d8da526d13a0d7f4cdf5737612107d3f78de252da48ae5e8968948d1e2314533fe20b9a1786e6bdff6646389072c5f82a8fe62f0b17a54484b2b3faeec SHA512 96c049f0c1e7e710036772a4446acd1bd4d22f3f422106c077d38b7c559f948dd019d4cb004894b93ae062f8b970ef5e422d51278fa2d2bb7e526a06cf5a1ee5
+DIST github.com-uber-go-multierr-fb7d312c2c04c34f0ad621048bbb953b168f9ff6.tar.gz 9242 BLAKE2B 120eb413fe3e64a00433753674eaa29a4108fcc87a3d9ee0f8b339889e5239e235e0445c0ab622d380a69d645b17380bb9aeca72c5f582e3012eaa874aad3c51 SHA512 ca342b9a6a9fe2dd976639956429b98ba57d14068d4a7a1b874cedce2b64fd9f89fd00bf6401ed3925b1b9b000707e8612ec22e5946ac11975a9bd342b716966
+DIST github.com-uber-go-zap-35aad584952c3e7020db7b839f6b102de6271f89.tar.gz 103010 BLAKE2B fced708acd2e4668a2478d287541b0e6d607aaec63d3d7f0dee619f8e9d4d9bc41259ddb73c882f4a78f0241befcb5aef939964487ac862e87e88fca65fc1485 SHA512 7893930d687b7217fff81f7965bddc020977b1969203e0a93a6b92b1fff87684f958439fa2ee78d236449943d6b53aa22dc6d7f4f05513dfdac1e54ece139cec
+DIST github.com-xlab-treeprint-06dfc6fa17cdde904617990a0c2d89e3e332dbb3.tar.gz 6365 BLAKE2B 4b7b406da890340592e8eeee19fbf45bfd3c30d2db00b300a2aa5607beb790c21ee29a470a92a14be77400f3c1ca89298650d32b53d98fa18a60521af76c9640 SHA512 7b9e950ea4d4288efbdca94e5a2dacdd28e2a23036253162a44365388aa0dc4ddafeb56f36b784b9d5c47a0071f0487da8a83df7c8e8ef6c197dc03a63bc7646
+DIST influxdb-1.5.1.tar.gz 1225941 BLAKE2B 6d3639f0c31b885f836e3e97ad943147ba206af4f7798389972f6880d111493633595251a92c540ae23fe0f8a57eb00befb19ddb3d229318b52baebf30301320 SHA512 d536bfd960c8d2145d275da934e1638f425ed168ca3c4b3987084f8dacb2f1b827082c635ad83ad3c3cf105efdbb8465d2f0f552215775f6eb321219280d626e
+EBUILD influxdb-1.5.1.ebuild 4699 BLAKE2B 67ff0a2e348012e12de388cb2c3f548ff1604f6f35aa5c9b3e3ac563e596179eaa8877e16f2659e1a08b5c784748ca22fd7165b04c54d0d068533e078367a28d SHA512 8c67a4394b7d10f81bc969c6b321166019f030f68d4925c062b1afd4f7b937d9c5900617521cf45acacac5e529f73341921d08f491786a8997d2c9b85f0c8865
+MISC metadata.xml 452 BLAKE2B b1c73f1e86864534f79c9b8e136691660014c6cffda6d92b89d6bf73cbaf17e28ba4989cbb3a48aa29cfd4587d02ac415406fdb49bccfa18c8129b8ae4cd146e SHA512 7100ef74e1dfbc09bf0accecedfeac01ddc257566fe1ea9138c0a0d1d491abe142ae677760704ba207a609d6a94e81367b515905aabd80ac1f78a4eba27d176b
diff --git a/dev-db/influxdb/files/influxd.conf b/dev-db/influxdb/files/influxd.conf
new file mode 100644
index 000000000000..f98f63ae2a91
--- /dev/null
+++ b/dev-db/influxdb/files/influxd.conf
@@ -0,0 +1,140 @@
+reporting-disabled = true
+bind-address = "127.0.0.1:8088"
+
+[meta]
+ dir = "/var/lib/influxdb/meta"
+ retention-autocreate = true
+ logging-enabled = true
+
+[data]
+ dir = "/var/lib/influxdb/data"
+ index-version = "inmem"
+ wal-dir = "/var/lib/influxdb/wal"
+ wal-fsync-delay = "0s"
+ query-log-enabled = true
+ cache-max-memory-size = 1073741824
+ cache-snapshot-memory-size = 26214400
+ cache-snapshot-write-cold-duration = "10m0s"
+ compact-full-write-cold-duration = "4h0m0s"
+ max-series-per-database = 1000000
+ max-values-per-tag = 100000
+ max-concurrent-compactions = 0
+ trace-logging-enabled = false
+
+[coordinator]
+ write-timeout = "10s"
+ max-concurrent-queries = 0
+ query-timeout = "0s"
+ log-queries-after = "0s"
+ max-select-point = 0
+ max-select-series = 0
+ max-select-buckets = 0
+
+[retention]
+ enabled = true
+ check-interval = "30m0s"
+
+[shard-precreation]
+ enabled = true
+ check-interval = "10m0s"
+ advance-period = "30m0s"
+
+[monitor]
+ store-enabled = true
+ store-database = "_internal"
+ store-interval = "10s"
+
+[subscriber]
+ enabled = true
+ http-timeout = "30s"
+ insecure-skip-verify = false
+ ca-certs = ""
+ write-concurrency = 40
+ write-buffer-size = 1000
+
+[http]
+ enabled = true
+ bind-address = ":8086"
+ auth-enabled = false
+ log-enabled = true
+ write-tracing = false
+ pprof-enabled = true
+ https-enabled = false
+ https-certificate = "/etc/ssl/influxdb.pem"
+ https-private-key = ""
+ max-row-limit = 0
+ max-connection-limit = 0
+ shared-secret = ""
+ realm = "InfluxDB"
+ unix-socket-enabled = false
+ bind-socket = "/var/run/influxdb.sock"
+ max-body-size = 25000000
+ access-log-path = ""
+
+[logging]
+ format = "auto"
+ level = "info"
+ suppress-logo = false
+
+[ifql]
+ enabled = false
+ log-enabled = true
+ bind-address = ":8082"
+
+[[graphite]]
+ enabled = false
+ bind-address = ":2003"
+ database = "graphite"
+ retention-policy = ""
+ protocol = "tcp"
+ batch-size = 5000
+ batch-pending = 10
+ batch-timeout = "1s"
+ consistency-level = "one"
+ separator = "."
+ udp-read-buffer = 0
+
+[[collectd]]
+ enabled = false
+ bind-address = ":25826"
+ database = "collectd"
+ retention-policy = ""
+ batch-size = 5000
+ batch-pending = 10
+ batch-timeout = "10s"
+ read-buffer = 0
+ typesdb = "/usr/share/collectd/types.db"
+ security-level = "none"
+ auth-file = "/etc/collectd/auth_file"
+ parse-multivalue-plugin = "split"
+
+[[opentsdb]]
+ enabled = false
+ bind-address = ":4242"
+ database = "opentsdb"
+ retention-policy = ""
+ consistency-level = "one"
+ tls-enabled = false
+ certificate = "/etc/ssl/influxdb.pem"
+ batch-size = 1000
+ batch-pending = 5
+ batch-timeout = "1s"
+ log-point-errors = true
+
+[[udp]]
+ enabled = false
+ bind-address = ":8089"
+ database = "udp"
+ retention-policy = ""
+ batch-size = 5000
+ batch-pending = 10
+ read-buffer = 0
+ batch-timeout = "1s"
+ precision = ""
+
+[continuous_queries]
+ log-enabled = true
+ enabled = true
+ query-stats-enabled = false
+ run-interval = "1s"
+
diff --git a/dev-db/influxdb/files/influxdb.confd b/dev-db/influxdb/files/influxdb.confd
new file mode 100644
index 000000000000..44e8a9cd3045
--- /dev/null
+++ b/dev-db/influxdb/files/influxdb.confd
@@ -0,0 +1,12 @@
+#The convention in this file is to show the default setting commented
+#out.
+#To change the setting, uncomment it then change the value.
+
+#This is the influxd error log:
+#error_log="/var/log/influxdb/influxd.log"
+
+#This is the influxd output log:
+#output_log="/dev/null"
+
+# Extra options to pass to influxd:
+#influxd_opts=""
diff --git a/dev-db/influxdb/files/influxdb.rc b/dev-db/influxdb/files/influxdb.rc
new file mode 100644
index 000000000000..4d18def5e508
--- /dev/null
+++ b/dev-db/influxdb/files/influxdb.rc
@@ -0,0 +1,34 @@
+#!/sbin/openrc-run
+
+config=/etc/influxdb/influxd.conf
+pidfile=/var/run/influxd.pid
+command=/usr/bin/influxd
+command_args="-config ${config} -pidfile ${pidfile} ${influxd_opts}"
+command_args="-config ${config} ${influxd_opts}"
+command_background=yes
+make_pidfile=yes
+command_user="influxdb:influxdb"
+retry=SIGTERM/30/SIGKILL/10
+wait=1000
+
+# Logging
+error_log="${error_log:-/var/log/influxdb/influxd.log}"
+output_log="${output_log:-/dev/null}"
+
+# Max open files
+rc_ulimit="-n 65536"
+
+start_pre() {
+ # Check if config file exist
+ if [ ! -r ${config} ]; then
+ eerror "config file ${config} doesn't exist"
+ return 1
+ fi
+ if [ ! -f "$error_log" ]; then
+ mkdir -p "$(dirname $error_log)"
+ fi
+ if [ ! -f "$output_log" ]; then
+ mkdir -p "$(dirname $output_log)"
+ fi
+ return 0
+}
diff --git a/dev-db/influxdb/influxdb-1.5.1.ebuild b/dev-db/influxdb/influxdb-1.5.1.ebuild
new file mode 100644
index 000000000000..c9076ff600e5
--- /dev/null
+++ b/dev-db/influxdb/influxdb-1.5.1.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGO_PN=github.com/influxdata/${PN}
+EGO_VENDOR=(
+"collectd.org e84e8af5356e7f47485bbc95c96da6dd7984a67e github.com/collectd/go-collectd"
+"github.com/BurntSushi/toml a368813c5e648fee92e5f6c30e3944ff9d5e8895"
+"github.com/RoaringBitmap/roaring cefad6e4f79d4fa5d1d758ff937dde300641ccfa"
+"github.com/beorn7/perks 4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9"
+"github.com/bmizerany/pat c068ca2f0aacee5ac3681d68e4d0a003b7d1fd2c"
+"github.com/boltdb/bolt 4b1ebc1869ad66568b313d0dc410e2be72670dda"
+"github.com/cespare/xxhash 1b6d2e40c16ba0dfce5c8eac2480ad6e7394819b"
+"github.com/davecgh/go-spew 346938d642f2ec3594ed81d874461961cd0faa76"
+"github.com/dgrijalva/jwt-go 24c63f56522a87ec5339cc3567883f1039378fdb"
+"github.com/dgryski/go-bits 2ad8d707cc05b1815ce6ff2543bb5e8d8f9298ef"
+"github.com/dgryski/go-bitstream 7d46cd22db7004f0cceb6f7975824b560cf0e486"
+"github.com/glycerine/go-unsnap-stream 62a9a9eb44fd8932157b1a8ace2149eff5971af6"
+"github.com/gogo/protobuf 1c2b16bc280d6635de6c52fc1471ab962dc36ec9"
+"github.com/golang/protobuf 1e59b77b52bf8e4b449a57e6f79f21226d571845"
+"github.com/golang/snappy d9eb7a3d35ec988b8585d4a0068e462c27d28380"
+"github.com/google/go-cmp 18107e6c56edb2d51f965f7d68e59404f0daee54"
+"github.com/influxdata/influxql 21ddebb5641365d9b92234e8f5a566c41da9ab48"
+"github.com/influxdata/usage-client 6d3895376368aa52a3a81d2a16e90f0f52371967"
+"github.com/influxdata/yamux 1f58ded512de5feabbe30b60c7d33a7a896c5f16"
+"github.com/influxdata/yarpc 036268cdec22b7074cd6d50cc6d7315c667063c7"
+"github.com/jsternberg/zap-logfmt 5ea53862c7fa897f44ae0b3004283308c0b0c9d1"
+"github.com/jwilder/encoding 27894731927e49b0a9023f00312be26733744815"
+"github.com/mattn/go-isatty 6ca4dbf54d38eea1a992b3c722a76a5d1c4cb25c"
+"github.com/matttproud/golang_protobuf_extensions c12348ce28de40eed0136aa2b644d0ee0650e56c"
+"github.com/opentracing/opentracing-go 1361b9cd60be79c4c3a7fa9841b3c132e40066a7"
+"github.com/paulbellamy/ratecounter 5a11f585a31379765c190c033b6ad39956584447"
+"github.com/peterh/liner 88609521dc4b6c858fd4c98b628147da928ce4ac"
+"github.com/philhofer/fwd 1612a298117663d7bc9a760ae20d383413859798"
+"github.com/prometheus/client_golang 661e31bf844dfca9aeba15f27ea8aa0d485ad212"
+"github.com/prometheus/client_model 99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c"
+"github.com/prometheus/common 2e54d0b93cba2fd133edc32211dcc32c06ef72ca"
+"github.com/prometheus/procfs a6e9df898b1336106c743392c48ee0b71f5c4efa"
+"github.com/retailnext/hllpp 38a7bb71b483e855d35010808143beaf05b67f9d"
+"github.com/tinylib/msgp ad0ff2e232ad2e37faf67087fb24bf8d04a8ce20"
+"github.com/xlab/treeprint 06dfc6fa17cdde904617990a0c2d89e3e332dbb3"
+"go.uber.org/atomic 54f72d32435d760d5604f17a82e2435b28dc4ba5 github.com/uber-go/atomic"
+"go.uber.org/multierr fb7d312c2c04c34f0ad621048bbb953b168f9ff6 github.com/uber-go/multierr"
+"go.uber.org/zap 35aad584952c3e7020db7b839f6b102de6271f89 github.com/uber-go/zap"
+"golang.org/x/crypto 9477e0b78b9ac3d0b03822fd95422e2fe07627cd github.com/golang/crypto"
+"golang.org/x/net 9dfe39835686865bff950a07b394c12a98ddc811 github.com/golang/net"
+"golang.org/x/sync fd80eb99c8f653c847d294a001bdf2a3a6f768f5 github.com/golang/sync"
+"golang.org/x/sys 062cd7e4e68206d8bab9b18396626e855c992658 github.com/golang/sys"
+"golang.org/x/text a71fd10341b064c10f4a81ceac72bcf70f26ea34 github.com/golang/text"
+"golang.org/x/time 6dc17368e09b0e8634d71cac8168d853e869a0c7 github.com/golang/time"
+ )
+
+inherit golang-build golang-vcs-snapshot systemd user
+
+DESCRIPTION=" Scalable datastore for metrics, events, and real-time analytics"
+HOMEPAGE="https://www.influxdata.com"
+SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ ${EGO_VENDOR_URI}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=">=app-text/asciidoc-8.6.10
+ app-text/xmlto"
+
+pkg_setup() {
+ enewgroup influxdb
+ enewuser influxdb -1 -1 /var/lib/influxdb influxdb
+}
+
+src_compile() {
+ pushd "src/${EGO_PN}" > /dev/null || die
+ set -- env GOPATH="${S}" go build -v -work -x ./...
+ echo "$@"
+ "$@" || die "compile failed"
+ cd man
+ emake build
+ popd > /dev/null
+}
+
+src_install() {
+ pushd "src/${EGO_PN}" > /dev/null || die
+ set -- env GOPATH="${S}" go install -v -work -x ./...
+ echo "$@"
+ "$@" || die
+ dobin "${S}"/bin/influx*
+ dodoc CHANGELOG.md etc/config.sample.toml
+ doman man/*.1
+ insinto /etc/logrotate.d
+ newins scripts/logrotate influxdb
+ systemd_dounit scripts/influxdb.service
+ newconfd "${FILESDIR}"/influxdb.confd influxdb
+ newinitd "${FILESDIR}"/influxdb.rc influxdb
+ insinto /etc/influxdb
+ doins "${FILESDIR}"/influxd.conf
+ keepdir /var/log/influxdb
+ fowners influxdb:influxdb /var/log/influxdb
+ popd > /dev/null || die
+}
diff --git a/dev-db/influxdb/metadata.xml b/dev-db/influxdb/metadata.xml
new file mode 100644
index 000000000000..893224717480
--- /dev/null
+++ b/dev-db/influxdb/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>williamh@gentoo.org</email>
+ <name>William Hubbs</name>
+ </maintainer>
+ <longdescription lang="en">
+ InfluxDB is an open source time series database with no external
+ dependencies. It is useful for recording metrics, events, and
+ performing analytics.
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-db/innotop-1.11.1 b/dev-db/innotop-1.11.1
deleted file mode 100644
index 0f1fb89a4aee..000000000000
--- a/dev-db/innotop-1.11.1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-perl/DBI dev-perl/DBD-mysql dev-perl/TermReadKey virtual/perl-Term-ANSIColor virtual/perl-Time-HiRes dev-lang/perl:=
-DESCRIPTION=A text-mode MySQL and InnoDB monitor like mytop, but with many more features
-EAPI=6
-HOMEPAGE=https://github.com/innotop/innotop
-KEYWORDS=~alpha ~amd64 ~ppc ~sparc ~x86
-LICENSE=|| ( Artistic GPL-2 )
-RDEPEND=dev-lang/perl:=
-SLOT=0
-SRC_URI=https://github.com/innotop/innotop/archive/v1.11.1.tar.gz -> innotop-1.11.1.tar.gz
-_eclasses_=multiprocessing cac3169468f893670dac3e7cb940e045 perl-functions 01e8c68d5a528bbcda4d3c60205983df perl-module 863b35d127db98823d439f8d73c2d011
-_md5_=820cec98f76f4def47217df585059995
diff --git a/dev-db/innotop-1.11.4 b/dev-db/innotop-1.11.4
deleted file mode 100644
index cbc8eefe73fb..000000000000
--- a/dev-db/innotop-1.11.4
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-perl/DBI dev-perl/DBD-mysql dev-perl/TermReadKey virtual/perl-Term-ANSIColor virtual/perl-Time-HiRes dev-lang/perl:=
-DESCRIPTION=A text-mode MySQL and InnoDB monitor like mytop, but with many more features
-EAPI=6
-HOMEPAGE=https://github.com/innotop/innotop
-KEYWORDS=~alpha ~amd64 ~ppc ~sparc ~x86
-LICENSE=|| ( Artistic GPL-2 )
-RDEPEND=dev-lang/perl:=
-SLOT=0
-SRC_URI=https://github.com/innotop/innotop/archive/v1.11.4.tar.gz -> innotop-1.11.4.tar.gz
-_eclasses_=multiprocessing cac3169468f893670dac3e7cb940e045 perl-functions 01e8c68d5a528bbcda4d3c60205983df perl-module 863b35d127db98823d439f8d73c2d011
-_md5_=62b50ac986cc187b9fd1fbb1741d0a01
diff --git a/dev-db/innotop/Manifest b/dev-db/innotop/Manifest
new file mode 100644
index 000000000000..6c9b306aab01
--- /dev/null
+++ b/dev-db/innotop/Manifest
@@ -0,0 +1,5 @@
+DIST innotop-1.11.1.tar.gz 178295 BLAKE2B d863ca92baf30d8570116892bbb3587233bfaf01cd7a3e20d659a0c6f39016c7f735961a94f2b63db2db9f01ab4ed8f87a767157ec6d4b243790c3d2d33cf460 SHA512 49654e8ed81f5690c7e80fb169ad514caedb8d62e22bddc12cc234701875bc8ca7e2cc79061c10557d63dadbb40f2328a58b38dcf8aa60469c0c1558dbf0bed9
+DIST innotop-1.11.4.tar.gz 179683 BLAKE2B 972a5304e97dd430ff59f1683da782b23633a82c47491704b42d46036ca30458ec961b2e071d983905217d18007430f9732e65de2fabf72bf05838af259d30ab SHA512 678d57074fd4fc87c93032052b87dc187cfe273e99fef8ec8f93131f8d885613bacda7b900f56e7572a6cc51c36c26fe1968e55dd1736b8509fb6e269c9d2aff
+EBUILD innotop-1.11.1.ebuild 636 BLAKE2B 885c065db1f297257955835aedf47c51eb768181a3cad3b17b07cae084935f1dd69b5886b2badc9adbf1f2a77acb9041d1308a5c9db35db4bab286c392cf0af0 SHA512 99631c9b1cc35783b526b46ae23cac85603b67f3aa1edee09a0b931adee9b59e67bebb8c79905c41d1447e0dad12ca791e26ff9d5918797db43c4a865fd27556
+EBUILD innotop-1.11.4.ebuild 636 BLAKE2B 54eadd7a6fdce16f6e7f61347666e9a1489a8218f4e82c9ac9d65cf927913fc04b92a46d4b6e655f5517e241d150b106244467c32d2baeec09ba35b1a810e46b SHA512 7b6c18ac7149d41b54cdd296ad0431dc291ebb6baa23dbba5a0903ea58a384cece14907238e05f31c64be49f18e6f4eda913a62d01ca06ca37173bd53a6a1d7c
+MISC metadata.xml 446 BLAKE2B 240fcfb51fe22a85a88ced188db07907943c96264440ac9af750eb071cde67ed3178bc32d402dc40dbd157dead3ed604e3193813be0ab5b460e365428f7296e5 SHA512 788b300a652ef6577b92c1db658937f7db9beffe2ae3a94559f0c3a885fbe0a0cfaef2aa6b7bc8fc907823722d4b9016b2e272b47932628b55d4512a7bfc9bf7
diff --git a/dev-db/innotop/innotop-1.11.1.ebuild b/dev-db/innotop/innotop-1.11.1.ebuild
new file mode 100644
index 000000000000..cdc2f369ac59
--- /dev/null
+++ b/dev-db/innotop/innotop-1.11.1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit perl-module
+
+DESCRIPTION="A text-mode MySQL and InnoDB monitor like mytop, but with many more features"
+HOMEPAGE="https://github.com/innotop/innotop"
+SRC_URI="https://github.com/innotop/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="|| ( Artistic GPL-2 )"
+KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86"
+SLOT="0"
+IUSE=""
+
+DEPEND="dev-perl/DBI
+ dev-perl/DBD-mysql
+ dev-perl/TermReadKey
+ virtual/perl-Term-ANSIColor
+ virtual/perl-Time-HiRes"
+
+DIST_TEST="do parallel"
+
+src_install() {
+ perl-module_src_install
+}
diff --git a/dev-db/innotop/innotop-1.11.4.ebuild b/dev-db/innotop/innotop-1.11.4.ebuild
new file mode 100644
index 000000000000..bb3180d850d9
--- /dev/null
+++ b/dev-db/innotop/innotop-1.11.4.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit perl-module
+
+DESCRIPTION="A text-mode MySQL and InnoDB monitor like mytop, but with many more features"
+HOMEPAGE="https://github.com/innotop/innotop"
+SRC_URI="https://github.com/innotop/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="|| ( Artistic GPL-2 )"
+KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86"
+SLOT="0"
+IUSE=""
+
+DEPEND="dev-perl/DBI
+ dev-perl/DBD-mysql
+ dev-perl/TermReadKey
+ virtual/perl-Term-ANSIColor
+ virtual/perl-Time-HiRes"
+
+DIST_TEST="do parallel"
+
+src_install() {
+ perl-module_src_install
+}
diff --git a/dev-db/innotop/metadata.xml b/dev-db/innotop/metadata.xml
new file mode 100644
index 000000000000..05dc2a7fb700
--- /dev/null
+++ b/dev-db/innotop/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>mysql-bugs@gentoo.org</email>
+ <name>MySQL</name>
+ </maintainer>
+ <longdescription>innotop - A text-mode MySQL and InnoDB monitor like mytop,
+but with many more features</longdescription>
+ <upstream>
+ <remote-id type="github">innotop/innotop</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/kdb-3.1.0-r1 b/dev-db/kdb-3.1.0-r1
deleted file mode 100644
index bffb2e0f1824..000000000000
--- a/dev-db/kdb-3.1.0-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install nofetch postinst postrm preinst prepare setup test unpack
-DEPEND=>=kde-frameworks/kcoreaddons-5.46.0:5 >=dev-qt/qtgui-5.9.4:5 >=dev-qt/qtwidgets-5.9.4:5 >=dev-qt/qtxml-5.9.4:5 dev-libs/icu:= mysql? ( virtual/mysql ) postgres? ( >=dev-qt/qtnetwork-5.9.4:5 dev-db/postgresql:* ) sqlite? ( dev-db/sqlite:3 ) || ( dev-lang/python:3.6 >=dev-lang/python-2.7.5-r2:2.7 ) dev-qt/linguist-tools:5 sys-devel/make >=dev-util/cmake-3.9.6 >=sys-apps/sed-4 dev-util/desktop-file-utils x11-misc/shared-mime-info >=kde-frameworks/extra-cmake-modules-5.46.0:5 >=dev-qt/qtcore-5.9.4:5 dev-util/desktop-file-utils app-arch/xz-utils
-DESCRIPTION=Database connectivity and creation framework for various vendors
-EAPI=6
-HOMEPAGE=https://www.kde.org/
-IUSE=debug mysql postgres sqlite debug
-KEYWORDS=amd64 x86
-LICENSE=LGPL-2+
-RDEPEND=>=kde-frameworks/kcoreaddons-5.46.0:5 >=dev-qt/qtgui-5.9.4:5 >=dev-qt/qtwidgets-5.9.4:5 >=dev-qt/qtxml-5.9.4:5 dev-libs/icu:= mysql? ( virtual/mysql ) postgres? ( >=dev-qt/qtnetwork-5.9.4:5 dev-db/postgresql:* ) sqlite? ( dev-db/sqlite:3 ) >=kde-frameworks/kf-env-4 || ( >=kde-frameworks/breeze-icons-5.46.0:5 kde-frameworks/oxygen-icons:* ) >=dev-qt/qtcore-5.9.4:5
-SLOT=5/4
-SRC_URI=mirror://kde/stable/kdb/src/kdb-3.1.0.tar.xz
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 gnome2-utils 29bb8f7881c95139e532a2d5e47ff834 kde5 5656d5465214c16946f295475046ea21 kde5-functions 475002208a2233f4ab555934b2b0ed0b ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 python-any-r1 6faea633ae2f79f6d55dcfd431b79fbf python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf virtualx 3a3c4637ea6d5a2113707a644766337c xdg 6cd76cc914c1a759dee032778487b57f xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=1a7b9627b648659c1a4fadc9fd84954e
diff --git a/dev-db/kdb/Manifest b/dev-db/kdb/Manifest
new file mode 100644
index 000000000000..4cc3aeb9622d
--- /dev/null
+++ b/dev-db/kdb/Manifest
@@ -0,0 +1,3 @@
+DIST kdb-3.1.0.tar.xz 543780 BLAKE2B d874765758e245fc939bf88312b064d2dcff3460b2c9e968277e0ce7b8821314273cb3086e821645f9d7605de1a4268e25d11c40f8bf847a8dc98c410bd4d9eb SHA512 f94f1ff87cb5133570f7e9b0ab48202a516eabe1c3f2ed750cd1794800d9b9936bbd62e1479ca6877c293f6473b7f4e2d4a144b928b5bc0f228af327131b43c2
+EBUILD kdb-3.1.0-r1.ebuild 1051 BLAKE2B fdb334e923fe982490712bb019e3318a1b5a91d2e2aae531db58dcc0c95c05f602f9372f4157215a51922a7859656a5aafd91d7b2f06a87de1bff32fbb616675 SHA512 b0c3b31c9c35bd8cc27d35763baac99952753685beafca43a20c21e528965471f8e01ef7b72aa021a20b2ee166a01a5887d497fac07875dd0811e450503db737
+MISC metadata.xml 249 BLAKE2B ad415db89e5dee1627aa77f44ded9d4e1e5b8217d06c7ca25bbaa3fe92ce67c2b1090957c45a821b407d7927e5af798498aa6a5b903895ee1af8ee20a446c7f7 SHA512 76a5a340b13f0053ca3c5e94ed24380ea8d29b45ac8655419e22eaadb1e4a827c04d2e7e36b65145c4964e6526f656618fc6ac144e277ef53cb7373e6239e3c3
diff --git a/dev-db/kdb/kdb-3.1.0-r1.ebuild b/dev-db/kdb/kdb-3.1.0-r1.ebuild
new file mode 100644
index 000000000000..d4fa79db7399
--- /dev/null
+++ b/dev-db/kdb/kdb-3.1.0-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_6 )
+
+inherit kde5 python-any-r1
+
+DESCRIPTION="Database connectivity and creation framework for various vendors"
+[[ ${KDE_BUILD_TYPE} != live ]] && SRC_URI="mirror://kde/stable/${PN}/src/${P}.tar.xz"
+
+LICENSE="LGPL-2+"
+SLOT="5/4"
+KEYWORDS="amd64 x86"
+IUSE="debug mysql postgres sqlite"
+
+RDEPEND="
+ $(add_frameworks_dep kcoreaddons)
+ $(add_qt_dep qtgui)
+ $(add_qt_dep qtwidgets)
+ $(add_qt_dep qtxml)
+ dev-libs/icu:=
+ mysql? ( virtual/mysql )
+ postgres? (
+ $(add_qt_dep qtnetwork)
+ dev-db/postgresql:*
+ )
+ sqlite? ( dev-db/sqlite:3 )
+"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ dev-qt/linguist-tools:5
+"
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+ kde5_pkg_setup
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DKDB_DEBUG_GUI=$(usex debug)
+ $(cmake-utils_use_find_package mysql MySQL)
+ $(cmake-utils_use_find_package postgres PostgreSQL)
+ $(cmake-utils_use_find_package sqlite Sqlite)
+ )
+
+ kde5_src_configure
+}
diff --git a/dev-db/kdb/metadata.xml b/dev-db/kdb/metadata.xml
new file mode 100644
index 000000000000..2fdbf33d963d
--- /dev/null
+++ b/dev-db/kdb/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>kde@gentoo.org</email>
+ <name>Gentoo KDE Project</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-db/kyotocabinet-1.2.76-r1 b/dev-db/kyotocabinet-1.2.76-r1
deleted file mode 100644
index 23e9c29c94b7..000000000000
--- a/dev-db/kyotocabinet-1.2.76-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=configure install prepare test
-DEPEND=sys-libs/zlib[static-libs?] app-arch/xz-utils[static-libs?] >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=A straightforward implementation of DBM
-EAPI=6
-HOMEPAGE=http://fallabs.com/kyotocabinet/
-IUSE=debug doc examples static-libs
-KEYWORDS=~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris
-LICENSE=GPL-3
-RDEPEND=sys-libs/zlib[static-libs?] app-arch/xz-utils[static-libs?]
-SLOT=0
-SRC_URI=http://fallabs.com/kyotocabinet/pkg/kyotocabinet-1.2.76.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=04dacfcc92e115dd9d21e44b75b1e61e
diff --git a/dev-db/kyotocabinet/Manifest b/dev-db/kyotocabinet/Manifest
new file mode 100644
index 000000000000..bc9385c60617
--- /dev/null
+++ b/dev-db/kyotocabinet/Manifest
@@ -0,0 +1,7 @@
+AUX fix_configure-1.2.62.patch 1668 BLAKE2B 5a572607b5c848c3616fcccac1e936f9218ace5e7f657f04583ce89e6a1a34eefdb9ffbf76a64862529afd6076444efd831b44b4d658b18fab6b402007ee0114 SHA512 cd36241bdde29f62b99b2bfcb45b592fad3d15a32a370c925e5085be18893a8ba9bb15cb55939871beb9776dc6ab7da4f2d2cf54efed6f86310f3297d33dd567
+AUX kyotocabinet-1.2.76-configure-8-byte-atomics.patch 1250 BLAKE2B 882c4897a40609bbfa1183cb97e80e5ed6d95d0035c30c836e3f252962db822249f8b48934923e816a720d3cbf64a6f47f80cef77528216f3171f332ca3a350b SHA512 4833cecd6c67515e0c59d7161be6891df290ae816593de1bf35718e9c9d8691db221bec5078c5dc7cf56e55b0086d61c415e148a7ee63b2a47ac4885f6d0960e
+AUX kyotocabinet-1.2.76-flags.patch 894 BLAKE2B 50efb4b21f0101a942eb758213cf703460056a951617298057567d08b116c7e0a631d631eace992ff447bed5b74940d2b60a8adad373cb77fe42b8c40bfcc9fd SHA512 60a15c54994a5f338cf168feb831d858fdd2cadd16ea0c8001ef652e8502797f5920d3fed0a3ec4a6a2d817381b4690410878a18c7c859df34e26b033f48fe03
+AUX kyotocabinet-1.2.76-gcc6.patch 289 BLAKE2B 5f2c972bf3f789c4573206dcb5fa2d1d21e50c16bc90889a978979f875e0597f48fba56cc9558c2f11202ab892d09f02c3b3d0c4bdc42e64857170a48d2797eb SHA512 755fe06635309139d55d1ede2e5ec30e37867501ead68abd3218c59ea016b72c9aa4d7d4072e15b53d22755606949dfaafa7b283d33a821d280fe7791ee8ff10
+DIST kyotocabinet-1.2.76.tar.gz 951930 BLAKE2B 7d2b5e5c85e0a6f90c88cd3b6e1b41588dffeaa2a404aa2c83281e033fe4e1275fbbc15584d4998e97f166c5060ce43c9cee9567121edbe1f72a0d5f52f42b40 SHA512 278db7b327eb4c21bf0137d9aa14fb67d74d5ce7ed1cb29fc9120d157a60de165ec0cf842903eb7952e8f998045ae585b958977fa973ba0e0773381de71d9f6a
+EBUILD kyotocabinet-1.2.76-r1.ebuild 1315 BLAKE2B 78a71cecfca9ba04ccc6b10270e29fc026d88fc7e37bc338888263523459b6590daafc39507614958a96bd52ae052c44c5ed000b93a4081e03b239aa658afb1f SHA512 be359b2010275adcc239b2972936e6113cd3784a73472660c4ae35eb33e06c630ba3c9bbdbb83996ab85e67502d460b10dfcc8577c45d7df8d01f3415e5b9b8a
+MISC metadata.xml 247 BLAKE2B 5a20af3c9732ef7dba68131a08988652f5c93a6d186a82c4deb1bb9c06dc3ae73152a0d241cc346637f7b11caf4676da43301ba596c67b66669535e71db0b03e SHA512 29cf52c16b0cce69899d9c2da8acd9144b7d760442aa323b854dceadb42459e009545193b1df7911ac2241b59f4819b4a6bb1d206d6f57953f770031433bb6b7
diff --git a/dev-db/kyotocabinet/files/fix_configure-1.2.62.patch b/dev-db/kyotocabinet/files/fix_configure-1.2.62.patch
new file mode 100644
index 000000000000..622b7fd52792
--- /dev/null
+++ b/dev-db/kyotocabinet/files/fix_configure-1.2.62.patch
@@ -0,0 +1,51 @@
+diff --git a/configure.in b/configure.in
+index 94e9d29..6999615 100644
+--- a/configure.in
++++ b/configure.in
+@@ -35,27 +35,18 @@ MYDOCUMENTFILES="COPYING FOSSEXCEPTION ChangeLog doc kyotocabinet.idl"
+ MYPCFILES="kyotocabinet.pc"
+
+ # Building flags
+-MYCFLAGS="-Wall -ansi -pedantic -fPIC -fsigned-char -g0 -O2"
+-MYCXXFLAGS="-Wall -fPIC -fsigned-char -g0 -O2"
+-MYCPPFLAGS="-I. -I\$(INCLUDEDIR) -I/usr/local/include"
++MYCFLAGS="-Wall -ansi -pedantic -fPIC -fsigned-char"
++MYCXXFLAGS="-Wall -fPIC -fsigned-char"
++MYCPPFLAGS="-I. -I\$(INCLUDEDIR)"
+ MYCPPFLAGS="$MYCPPFLAGS -DNDEBUG -D_GNU_SOURCE=1"
+ MYCPPFLAGS="$MYCPPFLAGS -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D__EXTENSIONS__"
+-MYLDFLAGS="-L. -L\$(LIBDIR) -L/usr/local/lib"
++MYLDFLAGS="-L. -L\$(LIBDIR)"
+ MYCMDLDFLAGS=""
+ MYCMDLIBS=""
+ MYLDLIBPATH=""
+ MYLDLIBPATHENV="LD_LIBRARY_PATH"
+ MYPOSTCMD="true"
+
+-# Building paths
+-PATH=".:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:$PATH"
+-CPATH=".:/usr/local/include:$CPATH"
+-LIBRARY_PATH=".:/usr/local/lib:$LIBRARY_PATH"
+-LD_LIBRARY_PATH=".:/usr/local/lib:$LD_LIBRARY_PATH"
+-PKG_CONFIG_PATH=".:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
+-export PATH CPATH LIBRARY_PATH LD_LIBRARY_PATH PKG_CONFIG_PATH
+-
+-
+
+ #================================================================
+ # Options
+@@ -285,14 +276,6 @@ then
+ MYCMDLIBS="$MYCMDLIBS $LIBS"
+ fi
+
+-# As-needed linking
+-if uname | grep Linux >config.tmp
+-then
+- MYLDFLAGS="$MYLDFLAGS -Wl,-rpath-link,.:/usr/local/lib:$MYLDLIBPATH"
+- MYLDFLAGS="$MYLDFLAGS -Wl,--as-needed"
+-else
+- MYCMDLIBS="$MYCMDLIBS $LIBS"
+-fi
+
+ # Shared libraries
+ if test "$enable_shared" != "no" && test "$enable_profile" != "yes"
diff --git a/dev-db/kyotocabinet/files/kyotocabinet-1.2.76-configure-8-byte-atomics.patch b/dev-db/kyotocabinet/files/kyotocabinet-1.2.76-configure-8-byte-atomics.patch
new file mode 100644
index 000000000000..729efc083ba5
--- /dev/null
+++ b/dev-db/kyotocabinet/files/kyotocabinet-1.2.76-configure-8-byte-atomics.patch
@@ -0,0 +1,44 @@
+From: Shawn Landden <shawnlandden@gmail.com>
+Date: Thu, 21 Jun 2012 20:34:28 -0700
+Subject: configure: 8 byte atomics
+
+fix up configure test to handle lack of 8 byte atomics correctly
+
+as is the case with all ARM targets currently
+---
+ configure | 29 +++++++++++++----------------
+ configure.in | 19 ++++++++++++++++---
+ 2 files changed, 29 insertions(+), 19 deletions(-)
+
+index a07063d..bfc6df0 100755
+--- a/configure.in
++++ b/configure.in
+@@ -238,9 +238,22 @@ fi
+ # Atomic operations
+ if test "$enable_atomic" != "no"
+ then
+- printf 'checking for atomic operations... '
+- AC_TRY_COMPILE([], [__sync_fetch_and_add], [MYGCCATOMIC=yes], [MYGCCATOMIC=no])
+- if test "$MYGCCATOMIC" = "yes"
++ printf 'checking for 8 byte atomic operations... '
++ if printf '
++/* Some targets support 4 byte atomics, but not 8 byte atomics,
++ * and will fail at link time if they are used.
++ *
++ * http://gcc.gnu.org/onlinedocs/gcc-4.6.3/gcc/Atomic-Builtins.html
++ * http://gcc.gnu.org/wiki/Atomic
++ */
++#include <stdint.h>
++int
++main ()
++{
++uint64_t n = 0xdeadbeaf;
++__sync_bool_compare_and_swap(&n, 0xdeadbeaf, 0);
++return n;
++}' | $CC -xc -o config.tmp - >/dev/null 2>&1
+ then
+ MYCPPFLAGS="$MYCPPFLAGS -D_MYGCCATOMIC"
+ printf 'yes\n'
+--
+1.7.9.5
+
diff --git a/dev-db/kyotocabinet/files/kyotocabinet-1.2.76-flags.patch b/dev-db/kyotocabinet/files/kyotocabinet-1.2.76-flags.patch
new file mode 100644
index 000000000000..931e8c3f7bbe
--- /dev/null
+++ b/dev-db/kyotocabinet/files/kyotocabinet-1.2.76-flags.patch
@@ -0,0 +1,31 @@
+--- a/configure.in
++++ b/configure.in
+@@ -193,28 +193,6 @@
+ # Byte order
+ AC_C_BIGENDIAN(MYCPPFLAGS="$MYCPPFLAGS -D_MYBIGEND")
+
+-# System-depending optimization
+-printf 'checking for 64-bit availability... '
+-if printf 'main() {}' | $CC -xc -m64 -o config.tmp - >config.tmp 2>&1
+-then
+- MYCFLAGS="-m64 $MYCFLAGS"
+- MYCXXFLAGS="-m64 $MYCXXFLAGS"
+- printf 'yes\n'
+-else
+- printf 'no\n'
+-fi
+-if test "$enable_opt" != "no"
+-then
+- printf 'checking for CPU optimization availability... '
+- if printf 'main() {}' | $CC -xc -march=native -o config.tmp - >config.tmp 2>&1
+- then
+- MYCFLAGS="-march=native $MYCFLAGS"
+- MYCXXFLAGS="-march=native $MYCXXFLAGS"
+- printf 'yes\n'
+- else
+- printf 'no\n'
+- fi
+-fi
+ printf 'checking for useless warnings... '
+ if printf 'main() {}' | $CC -xc \
+ -Wno-unused-but-set-variable -Wno-unused-but-set-parameter -o config.tmp - >config.tmp 2>&1
diff --git a/dev-db/kyotocabinet/files/kyotocabinet-1.2.76-gcc6.patch b/dev-db/kyotocabinet/files/kyotocabinet-1.2.76-gcc6.patch
new file mode 100644
index 000000000000..3bcc6a28e795
--- /dev/null
+++ b/dev-db/kyotocabinet/files/kyotocabinet-1.2.76-gcc6.patch
@@ -0,0 +1,11 @@
+--- a/kcdbext.h
++++ b/kcdbext.h
+@@ -1278,7 +1278,7 @@
+ if (omode_ == 0) {
+ set_error(_KCCODELINE_, BasicDB::Error::INVALID, "not opened");
+ *sp = 0;
+- return false;
++ return NULL;
+ }
+ if (!cache_) return db_.get(kbuf, ksiz, sp);
+ size_t dvsiz = 0;
diff --git a/dev-db/kyotocabinet/kyotocabinet-1.2.76-r1.ebuild b/dev-db/kyotocabinet/kyotocabinet-1.2.76-r1.ebuild
new file mode 100644
index 000000000000..2064029015cd
--- /dev/null
+++ b/dev-db/kyotocabinet/kyotocabinet-1.2.76-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools ltprune toolchain-funcs
+
+DESCRIPTION="A straightforward implementation of DBM"
+HOMEPAGE="http://fallabs.com/kyotocabinet/"
+SRC_URI="${HOMEPAGE}pkg/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
+IUSE="debug doc examples static-libs"
+
+DEPEND="sys-libs/zlib[static-libs?]
+ app-arch/xz-utils[static-libs?]"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/fix_configure-1.2.62.patch
+ "${FILESDIR}"/${PN}-1.2.76-configure-8-byte-atomics.patch
+ "${FILESDIR}"/${PN}-1.2.76-flags.patch
+ "${FILESDIR}"/${PN}-1.2.76-gcc6.patch
+)
+
+src_prepare() {
+ default
+
+ sed -i -e "/DOCDIR/d" Makefile.in || die
+ tc-export AR
+
+ mv configure.in configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable debug) \
+ $(use_enable static-libs static) \
+ $(use_enable !static-libs shared) \
+ --enable-lzma
+}
+
+src_test() {
+ emake -j1 check
+}
+
+src_install() {
+ default
+ prune_libtool_files
+
+ if use examples; then
+ insinto /usr/share/${PF}/example
+ doins example/*
+ fi
+
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ doins -r doc/*
+ fi
+}
diff --git a/dev-db/kyotocabinet/metadata.xml b/dev-db/kyotocabinet/metadata.xml
new file mode 100644
index 000000000000..40aa45df2b01
--- /dev/null
+++ b/dev-db/kyotocabinet/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-db/lib_mysqludf_log-0.0.2 b/dev-db/lib_mysqludf_log-0.0.2
deleted file mode 100644
index 07efdd99cc89..000000000000
--- a/dev-db/lib_mysqludf_log-0.0.2
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile install postinst prepare setup
-DEPEND=>=virtual/mysql-5.1
-DESCRIPTION=MySQL UDF to write to log files
-EAPI=4
-HOMEPAGE=http://www.mysqludf.org/lib_mysqludf_log/
-KEYWORDS=~amd64 ~x86
-LICENSE=LGPL-2.1
-RDEPEND=>=virtual/mysql-5.1
-SLOT=0
-SRC_URI=http://www.mysqludf.org/lib_mysqludf_log/lib_mysqludf_log_0.0.2.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=eb44600b3a490249b588d0216a673dfc
diff --git a/dev-db/lib_mysqludf_log/Manifest b/dev-db/lib_mysqludf_log/Manifest
new file mode 100644
index 000000000000..fdd3e65ea338
--- /dev/null
+++ b/dev-db/lib_mysqludf_log/Manifest
@@ -0,0 +1,4 @@
+AUX lib_mysqludf_log-warnings.patch 479 BLAKE2B ffaec94795811f77b6b8a0fe1c56547933add3583fcc45696bf5a8993926484088dda62f214faf85e7278340f2074e7c4356a19f70b48cdb0067487b19f03a61 SHA512 b3de4eebb97ba168574a0c06096484f62e4cf50c794d0755ea9b0872d2731f308763733ea3ec567e76f0801fc3159130da47bdf8c0d6ce06f0812a12345e959a
+DIST lib_mysqludf_log_0.0.2.tar.gz 1892 BLAKE2B 24f4197c2781e0bfd156b73adbea76f7a7580fcc85b55b566357d24896e5485ea7e93523286234ec3f1e39b386f54a63fe6f259053d7589622403655479d47d7 SHA512 674395c145260122bd14055a838b82d69217841364a496a518eb08860ba0beabe35627fe42108663caaf4a8c461d27551de43942ffd4c724d5ab912a2e74474d
+EBUILD lib_mysqludf_log-0.0.2.ebuild 1105 BLAKE2B 7d3313e6fb72ec9f6eba93c54947c917696065a30fda789f5cd1ae9f76fa3f649bba17064d022f51f771fe4e01cf65ebf14240361120092e24958fc42e186e8f SHA512 33b332b75c79b4120c9a48a94d1e6fc2f21a4a10201a866cd90d6134f2b5531654577b4d3ae0f62574a63bffde84d815980ed7535f5735ca7a5a66cb984e7a94
+MISC metadata.xml 166 BLAKE2B c254f1fb642881aba57637be14fb0a89b10384f91a128feaec3a8c870d76efc2cbacb92caccc0dee2dd19a5ac5eaf8643080dafa05c4e2ac96a68568927e5afd SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84
diff --git a/dev-db/lib_mysqludf_log/files/lib_mysqludf_log-warnings.patch b/dev-db/lib_mysqludf_log/files/lib_mysqludf_log-warnings.patch
new file mode 100644
index 000000000000..64b59639a328
--- /dev/null
+++ b/dev-db/lib_mysqludf_log/files/lib_mysqludf_log-warnings.patch
@@ -0,0 +1,11 @@
+--- lib_mysqludf_log.c.orig 2008-07-07 01:17:06.000000000 +0200
++++ lib_mysqludf_log.c 2011-10-18 12:50:52.000000000 +0200
+@@ -159,7 +159,7 @@
+ } else {
+ fmt = (char *)initid->ptr;
+ memcpy(fmt, "%0.", 3);
+- sprintf(fmt+3, "%d", args->lengths[0]<=9999? args->lengths[0]: 9999);
++ sprintf(fmt+3, "%d", (int)(args->lengths[0]<=9999? args->lengths[0]: 9999));
+ numDigits = strlen(fmt + 4);
+ memcpy(fmt + 4 + numDigits, "s\n\0", 3);
+ fprintf(stderr, fmt, args->args[0]);
diff --git a/dev-db/lib_mysqludf_log/lib_mysqludf_log-0.0.2.ebuild b/dev-db/lib_mysqludf_log/lib_mysqludf_log-0.0.2.ebuild
new file mode 100644
index 000000000000..639f48e5e596
--- /dev/null
+++ b/dev-db/lib_mysqludf_log/lib_mysqludf_log-0.0.2.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="MySQL UDF to write to log files"
+HOMEPAGE="http://www.mysqludf.org/lib_mysqludf_log/"
+SRC_URI="http://www.mysqludf.org/${PN}/${PN}_${PV}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=">=virtual/mysql-5.1"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"
+
+# compile helper
+_compile() {
+ local CC="$(tc-getCC)"
+ echo "${CC} ${@}" && "${CC}" "${@}"
+}
+
+pkg_setup() {
+ MYSQL_PLUGINDIR="$(mysql_config --plugindir)"
+ MYSQL_INCLUDE="$(mysql_config --include)"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-warnings.patch"
+}
+
+src_compile() {
+ _compile ${CFLAGS} -Wall -fPIC ${MYSQL_INCLUDE} \
+ -shared ${LDFLAGS} -o ${PN}.so ${PN}.c
+}
+
+src_install() {
+ exeinto "${MYSQL_PLUGINDIR}"
+ doexe ${PN}.so
+ dodoc ${PN}.sql
+}
+
+pkg_postinst() {
+ elog
+ elog "Please have a look at the documentation, how to"
+ elog "enable/disable the UDF functions of ${PN}."
+ elog
+ elog "The documentation is located here:"
+ elog "/usr/share/doc/${PF}"
+ elog
+}
diff --git a/dev-db/lib_mysqludf_log/metadata.xml b/dev-db/lib_mysqludf_log/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/dev-db/lib_mysqludf_log/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/dev-db/lib_mysqludf_stem-0.9.1 b/dev-db/lib_mysqludf_stem-0.9.1
deleted file mode 100644
index db83e51c4c4f..000000000000
--- a/dev-db/lib_mysqludf_stem-0.9.1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=configure install postinst prepare setup
-DEPEND=>=virtual/mysql-5.1 >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=MySQL UDFs which provides stemming capability for a variety of languages
-EAPI=4
-HOMEPAGE=http://www.mysqludf.org/lib_mysqludf_stem/
-KEYWORDS=~amd64 ~x86
-LICENSE=LGPL-2.1
-RDEPEND=>=virtual/mysql-5.1
-RESTRICT=test
-SLOT=0
-SRC_URI=http://www.mysqludf.org/lib_mysqludf_stem/lib_mysqludf_stem-0.9.1.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=7b03875019a0f868781cea7870bb7a79
diff --git a/dev-db/lib_mysqludf_stem/Manifest b/dev-db/lib_mysqludf_stem/Manifest
new file mode 100644
index 000000000000..aa8baa543c73
--- /dev/null
+++ b/dev-db/lib_mysqludf_stem/Manifest
@@ -0,0 +1,4 @@
+AUX lib_mysqludf_stem-mysql_m4.patch 2494 BLAKE2B ffa4e2b6b46e402b968c357a14cee41890c87d444238d6aca1a1268a37eb4515c248e93a4957d0dc3fa3aedbef5c79c114675b62311280415053f1646c875ba1 SHA512 11c057d563f430fa3fedfb8e1b9d830f2b593004dfca98d4ddf61b8ad4a6f77e67725862469dfc01c2dcabce2e65e64ca735e506344e044feeb51ff82e265c4e
+DIST lib_mysqludf_stem-0.9.1.tar.gz 953171 BLAKE2B 6cd6aeb2a5e856acffafa883f203bc74e11b2929bf760c9de2d7956816372afd961307642369c9653ce75c71044455b88972442318ea22b85dcde7b7bdc705d0 SHA512 d15736da91dc5a6f2b0289694efeb531337ff6a001d39aafca02c9f165ba5901163855b8f03d13a50c2ab9bee58e7fc03d19e893d086ec0022de9dd6921f93b7
+EBUILD lib_mysqludf_stem-0.9.1.ebuild 1641 BLAKE2B 219827447413f02bed15c83243e851860e5843e486752d47d3b61e0651761518a0b0b9224c4fd6e15864e536ee1b6ddc32c743985f0b30dfc7d4eecc67a25a56 SHA512 d2b001d5d05e1ed34ce1453b4519c07478312d41924afdc9f427c43135a49e9ef3d5bbe546c8f8206040f496c205cd6e749b5939ee4b7ca77ac9118e4f633483
+MISC metadata.xml 166 BLAKE2B c254f1fb642881aba57637be14fb0a89b10384f91a128feaec3a8c870d76efc2cbacb92caccc0dee2dd19a5ac5eaf8643080dafa05c4e2ac96a68568927e5afd SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84
diff --git a/dev-db/lib_mysqludf_stem/files/lib_mysqludf_stem-mysql_m4.patch b/dev-db/lib_mysqludf_stem/files/lib_mysqludf_stem-mysql_m4.patch
new file mode 100644
index 000000000000..c12d1f7d39a9
--- /dev/null
+++ b/dev-db/lib_mysqludf_stem/files/lib_mysqludf_stem-mysql_m4.patch
@@ -0,0 +1,71 @@
+--- config/ax_lib_mysql.m4.orig 2008-05-28 17:31:47.000000000 +0200
++++ config/ax_lib_mysql.m4 2008-11-26 22:43:48.000000000 +0100
+@@ -87,10 +87,9 @@
+ MYSQL_LDFLAGS="`$MYSQL_CONFIG --libs`"
+
+ MYSQL_VERSION=`$MYSQL_CONFIG --version`
+-
+- if test `$MYSQL_CONFIG | /usr/bin/awk '{if ($1 == "--plugindir") print 1}'` == "1"; then
+- MYSQL_PLUGINDIR=`$MYSQL_CONFIG --plugindir`
+- fi
++ if $MYSQL_CONFIG --plugindir > /dev/null; then
++ MYSQL_PLUGINDIR=`$MYSQL_CONFIG --plugindir`
++ fi
+
+ AC_DEFINE([HAVE_MYSQL], [1],
+ [Define to 1 if MySQL libraries are available])
+--- config/ax_mysql_bin.m4.orig 2007-08-15 02:22:37.000000000 +0200
++++ config/ax_mysql_bin.m4 2008-11-26 22:55:40.000000000 +0100
+@@ -43,35 +43,36 @@
+ fi
+
+ if test -z "$withmysqlbin" -o "$withmysqlbin" = "yes"; then
+- for i in /usr/bin /usr/local/bin ; do
+- if test -f "$i/mysql" ; then
+- MYSQL="$i/mysql $MYSQL_ARGS"
+- fi
+- done
++ MYSQL=`which mysql`;
++ if test -n "$MYSQL"; then MYSQL="$MYSQL $MYSQL_ARGS"; fi
+ elif test "$withmysqlbin" != "no"; then
+ MYSQL="$withmysqlbin"
+ fi
+
+ if test -n "$MYSQL" ; then
+- MYSQLBIN_PATH = `dirname "$MYSQL"`
++ MYSQLBIN_PATH=`dirname "$MYSQL"`
+ fi
+
+ if test -z "$withmysqladmin" -o "$withmysqladmin" = "yes"; then
+- for i in "$MYSQLBIN_PATH" /usr/bin /usr/local/bin ; do
+- if test -n "$i" -a -f "$i/mysqladmin" ; then
+- MYSQLADMIN="$i/mysqladmin $MYSQL_ARGS"
+- fi
+- done
++ if test -n "$MYSQLBIN_PATH" -a -f "$MYSQLBIN_PATH/mysqladmin"; then
++ MYSQLADMIN="$MYSQLBIN_PATH/mysqladmin";
++ else
++ MYSQLADMIN=`which mysqladmin`;
++ fi
++
++ if test -n "$MYSQLADMIN"; then MYSQLADMIN="$MYSQLADMIN $MYSQL_ARGS"; fi
+ elif test "$withmysqladmin" != "no"; then
+ MYSQLADMIN="$withmysqladmin"
+ fi
+
+ if test -z "$withmysqltest" -o "$withmysqltest" = "yes"; then
+- for i in "$MYSQLBIN_PATH" /usr/bin /usr/local/bin ; do
+- if test -n "$i" -a -f "$i/mysqltest" ; then
+- MYSQLTEST="$i/mysqltest $MYSQL_ARGS"
+- fi
+- done
++ if test -n "$MYSQLBIN_PATH" -a -f "$MYSQLBIN_PATH/mysqltest"; then
++ MYSQLTEST="$MYSQLBIN_PATH/mysqltest";
++ else
++ MYSQLTEST=`which mysqltest`;
++ fi
++
++ if test -n "$MYSQLTEST"; then MYSQLTEST="$MYSQLTEST $MYSQL_ARGS"; fi
+ elif test "$withmysqltest" != "no"; then
+ MYSQLTEST="$withmysqltest"
+ fi
diff --git a/dev-db/lib_mysqludf_stem/lib_mysqludf_stem-0.9.1.ebuild b/dev-db/lib_mysqludf_stem/lib_mysqludf_stem-0.9.1.ebuild
new file mode 100644
index 000000000000..fdfa360a4beb
--- /dev/null
+++ b/dev-db/lib_mysqludf_stem/lib_mysqludf_stem-0.9.1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils toolchain-funcs autotools
+
+DESCRIPTION="MySQL UDFs which provides stemming capability for a variety of languages"
+HOMEPAGE="http://www.mysqludf.org/lib_mysqludf_stem/"
+SRC_URI="http://www.mysqludf.org/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=">=virtual/mysql-5.1"
+RDEPEND="${DEPEND}"
+
+RESTRICT="test"
+
+pkg_setup() {
+ MYSQL_PLUGINDIR="$(mysql_config --plugindir)"
+ MYSQL_INCLUDE="$(mysql_config --include)"
+}
+
+src_prepare() {
+ # add AC_PROG_CXX to configure.ac
+ sed -i -e 's|\(AC_PROG_CC\)|\1\nAC_PROG_CXX|g' configure.ac
+
+ # fix ax_lib_mysql.m4 + ax_mysql_bin.m4
+ epatch "${FILESDIR}/${PN}-mysql_m4.patch"
+
+ # fix and clean libstemmer_c
+ sed -i -e 's|^\(CFLAGS\)=|\1+=-fPIC |g' libstemmer_c/Makefile
+ rm -f -- libstemmer_c/stemwords libstemmer_c/*.{o,a} libstemmer_c/*/*.o
+
+ edos2unix installdb.sql
+ eautoreconf
+}
+
+src_configure() {
+ econf --with-pic --disable-static --libdir="${MYSQL_PLUGINDIR}"
+}
+
+src_install() {
+ local X
+ emake DESTDIR="${D}" install
+ dodoc libstemmer_c/libstemmer/*.txt
+ [ -f ${PN}.html ] && dohtml ${PN}.html
+ [ -d doc/html ] && dohtml -r doc/html/.
+ for X in API AUTHORS ChangeLog NEWS README *installdb.sql; do
+ [ -s "${X}" ] && dodoc "${X}"
+ done
+
+ # remove obsolete *.la file
+ rm -f -- "${D}${MYSQL_PLUGINDIR}"/*.la
+}
+
+pkg_postinst() {
+ elog
+ elog "Please have a look at the documentation, how to"
+ elog "enable/disable the UDF functions of ${PN}."
+ elog
+ elog "The documentation is located here:"
+ elog "/usr/share/doc/${PF}"
+ elog
+}
diff --git a/dev-db/lib_mysqludf_stem/metadata.xml b/dev-db/lib_mysqludf_stem/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/dev-db/lib_mysqludf_stem/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/dev-db/libdbi-0.9.0 b/dev-db/libdbi-0.9.0
deleted file mode 100644
index 3a9bbc26fe09..000000000000
--- a/dev-db/libdbi-0.9.0
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=configure install prepare unpack
-DEPEND=>=sys-apps/sed-4 virtual/pkgconfig doc? ( app-text/openjade ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=A database-independent abstraction layer in C
-EAPI=4
-HOMEPAGE=http://libdbi.sourceforge.net/
-IUSE=doc static-libs
-KEYWORDS=alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd
-LICENSE=LGPL-2.1
-PDEPEND=>=dev-db/libdbi-drivers-0.9.0
-SLOT=0
-SRC_URI=mirror://sourceforge/libdbi/libdbi-0.9.0.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=b23d36142c542c492f1bd873aee268f4
diff --git a/dev-db/libdbi-drivers-0.9.0 b/dev-db/libdbi-drivers-0.9.0
deleted file mode 100644
index 49bc687002a4..000000000000
--- a/dev-db/libdbi-drivers-0.9.0
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=configure install prepare setup test
-DEPEND=>=dev-db/libdbi-0.9.0 firebird? ( dev-db/firebird ) mysql? ( virtual/mysql ) postgres? ( dev-db/postgresql ) sqlite? ( dev-db/sqlite:3 ) doc? ( app-text/openjade ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=The libdbi-drivers project maintains drivers for libdbi
-EAPI=4
-HOMEPAGE=http://libdbi-drivers.sourceforge.net/
-IUSE=doc firebird mysql oci8 postgres +sqlite static-libs
-KEYWORDS=alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd
-LICENSE=LGPL-2.1
-RDEPEND=>=dev-db/libdbi-0.9.0 firebird? ( dev-db/firebird ) mysql? ( virtual/mysql ) postgres? ( dev-db/postgresql ) sqlite? ( dev-db/sqlite:3 )
-REQUIRED_USE=|| ( mysql postgres sqlite firebird oci8 )
-RESTRICT=firebird? ( bindist )
-SLOT=0
-SRC_URI=mirror://sourceforge/project/libdbi-drivers/libdbi-drivers/libdbi-drivers-0.9.0/libdbi-drivers-0.9.0.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=1382fe976440060334b242f47c64e22b
diff --git a/dev-db/libdbi-drivers/Manifest b/dev-db/libdbi-drivers/Manifest
new file mode 100644
index 000000000000..a417eb909731
--- /dev/null
+++ b/dev-db/libdbi-drivers/Manifest
@@ -0,0 +1,4 @@
+AUX libdbi-drivers-0.9.0-doc-build-fix.patch 694 BLAKE2B 95207e6fbd947c01a1c3a99806f09e3f932b6d7b6fe1b55ffeb98ce73a54b7f984ffe9811c834e53e961500ae688b0548599b3f9b47a5d1e083eedf5c7ed650d SHA512 0ff58a08909327db91ebd0dfad7ac88ebb17156bbb7afc8bfc8a3711fee37708a7ad715ed50b5085cdd15d3cdb5c06de3a0779694104fb6332a1e9c2f51f5b0e
+DIST libdbi-drivers-0.9.0.tar.gz 1829864 BLAKE2B 2071c0cc21b1b4eeda926d5ce36f6dde03ede206dac91780aabafcb7c5b399f4b9580910e5ede08c9f0bf026f4af2088d1d0e8c1835b86273a7739b2946ed3c3 SHA512 f4d3aaa71014697c53012a10bf9f0af398bcf5ee5872af165f8f43a682d2fb3045a9172ffea0e068dcbfcad52494878c037d8d90fadfaf176936e42f7f1e85c1
+EBUILD libdbi-drivers-0.9.0.ebuild 2130 BLAKE2B d07220a35fafdfa263d8d2498d8ce8ce1f531cfb3f9495e60ae13d3d154096a18ec0579e925efbbe6ac3a5ebcdce9d12f759ec8d21b83fd168a5f3513635ec03 SHA512 e1d823317b37a8c30889a5148db8c6ceff0908dfc128a1f0a388675a146e45b501582ec70fba7fea47f578612d27f4ba651a21c5d26488a75b99e1dca8ad6d51
+MISC metadata.xml 302 BLAKE2B 50e613a8be312f9b8e234ef4a810a318f51f70e71f37a01f1932f2e70fecc543956e84690de88a14dac252101865ac0ef454966bc1bf54e5f574d2d6fddecf3e SHA512 d0d6c905c747105c3b5c2bde24ea7f8c63225779fe41f106b3de3d3082cbc01b0749546c3477db1e9f14db44e1b2921316f4cddb256ef8dddec3b4176a051c70
diff --git a/dev-db/libdbi-drivers/files/libdbi-drivers-0.9.0-doc-build-fix.patch b/dev-db/libdbi-drivers/files/libdbi-drivers-0.9.0-doc-build-fix.patch
new file mode 100644
index 000000000000..d0d74221fdb0
--- /dev/null
+++ b/dev-db/libdbi-drivers/files/libdbi-drivers-0.9.0-doc-build-fix.patch
@@ -0,0 +1,22 @@
+diff -Nuar libdbi-drivers-0.9.0.orig/configure.in libdbi-drivers-0.9.0/configure.in
+--- libdbi-drivers-0.9.0.orig/configure.in 2013-03-11 23:41:05.000000000 +0000
++++ libdbi-drivers-0.9.0/configure.in 2013-08-29 15:52:57.632105403 +0000
+@@ -165,14 +165,13 @@
+ dnl See whether to build the docs
+ dnl ==============================
+
+-ac_docs="YES"
++ac_docs="yes"
+ AC_ARG_ENABLE(docs,
+ [ --disable-docs do not build and install the documentation.],
+- [ if test "$enable_docs" = "no"; then
+- ac_docs="NO"
+- fi])
++ [ ac_docs="$enableval" ],
++ [ ac_docs="no" ])
+
+-if test "$ac_docs" = "YES"; then
++if test "$ac_docs" = "yes"; then
+ docs_subdirs="doc"
+ else
+ docs_subdirs=""
diff --git a/dev-db/libdbi-drivers/libdbi-drivers-0.9.0.ebuild b/dev-db/libdbi-drivers/libdbi-drivers-0.9.0.ebuild
new file mode 100644
index 000000000000..869be59eae32
--- /dev/null
+++ b/dev-db/libdbi-drivers/libdbi-drivers-0.9.0.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils autotools
+
+DESCRIPTION="The libdbi-drivers project maintains drivers for libdbi"
+SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${P}/${P}.tar.gz"
+HOMEPAGE="http://libdbi-drivers.sourceforge.net/"
+LICENSE="LGPL-2.1"
+
+IUSE="doc firebird mysql oci8 postgres +sqlite static-libs"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
+SLOT=0
+REQUIRED_USE="|| ( mysql postgres sqlite firebird oci8 )"
+RESTRICT="firebird? ( bindist )"
+
+RDEPEND="
+ >=dev-db/libdbi-0.9.0
+ firebird? ( dev-db/firebird )
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql )
+ sqlite? ( dev-db/sqlite:3 )
+"
+DEPEND="${RDEPEND}
+ doc? ( app-text/openjade )
+"
+
+DOCS="AUTHORS ChangeLog NEWS README README.osx TODO"
+
+pkg_setup() {
+ use oci8 && [[ -z "${ORACLE_HOME}" ]] && die "\$ORACLE_HOME is not set!"
+}
+
+src_prepare() {
+ #"${FILESDIR}"/${P}-fix-ac-macro.patch \
+ #"${FILESDIR}"/${PN}-0.8.3-oracle-build-fix.patch \
+ #"${FILESDIR}"/${PN}-0.8.3-firebird-fix.patch
+ epatch \
+ "${FILESDIR}"/${PN}-0.9.0-doc-build-fix.patch
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=""
+ # WARNING: the configure script does NOT work correctly
+ # --without-$driver does NOT work
+ # so do NOT use `use_with...`
+ # Future additions:
+ # msql
+ # freetds
+ # ingres
+ # db2
+ use mysql && myconf+=" --with-mysql"
+ use postgres && myconf+=" --with-pgsql"
+ use sqlite && myconf+=" --with-sqlite3"
+ use firebird && myconf+=" --with-firebird"
+ if use oci8; then
+ [[ -z "${ORACLE_HOME}" ]] && die "\$ORACLE_HOME is not set!"
+ myconf+=" --with-oracle-dir=${ORACLE_HOME} --with-oracle"
+ fi
+
+ econf \
+ $(use_enable doc docs) \
+ $(use_enable static-libs static) \
+ --with-dbi-libdir=/usr/$(get_libdir) \
+ ${myconf}
+}
+
+src_test() {
+ if [[ -z "${WANT_INTERACTIVE_TESTS}" ]]; then
+ ewarn "Tests disabled due to interactivity."
+ ewarn "Run with WANT_INTERACTIVE_TESTS=1 if you want them."
+ return 0
+ fi
+ einfo "Running interactive tests"
+ emake check
+}
+
+src_install() {
+ default
+
+ prune_libtool_files --all
+}
diff --git a/dev-db/libdbi-drivers/metadata.xml b/dev-db/libdbi-drivers/metadata.xml
new file mode 100644
index 000000000000..812be68795b8
--- /dev/null
+++ b/dev-db/libdbi-drivers/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>robbat2@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">libdbi-drivers</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/libdbi/Manifest b/dev-db/libdbi/Manifest
new file mode 100644
index 000000000000..173aea0bf3ad
--- /dev/null
+++ b/dev-db/libdbi/Manifest
@@ -0,0 +1,5 @@
+AUX dbi.pc.in 244 BLAKE2B b42f4a78c39034fe1ff4f2cf1ffc8bd252eb17e68dc50e03fd47ecd9838c37d00d5c4eb4a4b5ae5b3dd66ad63ba2c313923203b5514bf1161e405cd21e4fa4ce SHA512 6865b37e8d84d7a95b0ae482d9b1cb486ab7abbe726e699099ea4368d418f64b6d8cb02ecd4d1473f643aa5d715c57817a9496bd8950461921d5db4ff4272ef9
+AUX libdbi-0.9.0-doc-build-fix.patch 662 BLAKE2B 652bdba6b0e9b04bee87f48f0db1fba774bf153bd73f925b3d1111823c14e82ccf3202f8023736e3b0a91e00c28c6aca14ca5ffcad3126723c7f02cbc30a7049 SHA512 db18d3697be13ef416914843d0933caead3b1f57c13790373ec435318212f0ccfb599514f8bd6f1c603e09f13bd526b62322ff92e68512e43020b31f8d0dec55
+DIST libdbi-0.9.0.tar.gz 1194284 BLAKE2B 36ee5d9ec0a9b088735173cfa9a85e30ee595d6781aafeb994271e7745d259dbe983bea037182c471dc35ae36486a5fb8690e9c716e2e08a4a3964d90abd64f0 SHA512 ee8777195af43057409d051a6055ec0467cd926d48da076458b09f91d2f0995a1cc4bc071762e401b7bdcd8a4173fd8ea3472db3a1518e34b4c5b5ed24e4e2ce
+EBUILD libdbi-0.9.0.ebuild 1356 BLAKE2B 27543dca51004e503ae4d9f1cab3ccb34b168eb4f25e6065343cb780a8d414cee6d78f9f560057112a1e162445f33ccb4cf914ead7c8ee5da46ffbce2708da52 SHA512 a2b8b099edb1d5a3733656e61abfa3454bff90fb2faf2bffcffebfececb938bfe953adbc76216b55ebba5a42285974e6ae080721d386e9cba5f2d647ce8e415d
+MISC metadata.xml 294 BLAKE2B 1d9ff5692cbe4272918f7c3a8a5f9f1e564fd2ac3d5e5878be44f916557ecdefb843ad3b56e778d2833361609ac8cc9dec2939c04bab59687b4a7d2c25f4c750 SHA512 acb2d7a1ab6206a1f489cc8999ae35f014453bc95764000c5a6492a4b8832f2e0cf83bc875aecf50a6a6beb6bedabddb74628a2599f6c84a2d4aded345a39cd1
diff --git a/dev-db/libdbi/files/dbi.pc.in b/dev-db/libdbi/files/dbi.pc.in
new file mode 100644
index 000000000000..a0144549db9b
--- /dev/null
+++ b/dev-db/libdbi/files/dbi.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@/dbi
+
+Name: libdbi
+Description: database-independent abstraction layer in C
+Version: @VERSION@
+Libs: -L${libdir} -ldbi
+Cflags: -I${includedir} -I${includedir}/dbi
diff --git a/dev-db/libdbi/files/libdbi-0.9.0-doc-build-fix.patch b/dev-db/libdbi/files/libdbi-0.9.0-doc-build-fix.patch
new file mode 100644
index 000000000000..c0818b9c295b
--- /dev/null
+++ b/dev-db/libdbi/files/libdbi-0.9.0-doc-build-fix.patch
@@ -0,0 +1,22 @@
+diff -Nuar libdbi-0.9.0.orig/configure.in libdbi-0.9.0/configure.in
+--- libdbi-0.9.0.orig/configure.in 2013-08-29 15:34:54.883102666 +0000
++++ libdbi-0.9.0/configure.in 2013-08-29 15:36:07.827905613 +0000
+@@ -201,14 +201,13 @@
+ dnl See whether to build the docs
+ dnl ==============================
+
+-ac_docs="YES"
++ac_docs="yes"
+ AC_ARG_ENABLE(docs,
+ [ --disable-docs do not build and install the documentation.],
+- [ if test "$enable_docs" = "no"; then
+- ac_docs="NO"
+- fi])
++ [ ac_docs="$enableval" ],
++ [ ac_docs="no" ])
+
+-if test "$ac_docs" = "YES"; then
++if test "$ac_docs" = "yes"; then
+ docs_subdirs="doc"
+ else
+ docs_subdirs=""
diff --git a/dev-db/libdbi/libdbi-0.9.0.ebuild b/dev-db/libdbi/libdbi-0.9.0.ebuild
new file mode 100644
index 000000000000..7f6a738b7a40
--- /dev/null
+++ b/dev-db/libdbi/libdbi-0.9.0.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils autotools multilib
+
+DESCRIPTION="A database-independent abstraction layer in C"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+HOMEPAGE="http://libdbi.sourceforge.net/"
+LICENSE="LGPL-2.1"
+
+IUSE="doc static-libs"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
+SLOT=0
+
+DOCS="AUTHORS ChangeLog README README.osx TODO"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ >=sys-apps/sed-4
+ virtual/pkgconfig
+ doc? ( app-text/openjade )
+"
+PDEPEND=">=dev-db/libdbi-drivers-0.9.0" # On purpose, libdbi-drivers 0.8.4 does not exist
+
+src_unpack() {
+ unpack ${A}
+ chown -R portage:portage "${S}"
+}
+
+src_prepare() {
+ #epatch "${FILESDIR}"/${PN}-0.9.0-fix-ac-macro.patch
+ #epatch "${FILESDIR}"/libdbi-0.8.1-pkg-config.patch
+ #cp -f "${FILESDIR}"/dbi.pc.in "${S}"/dbi.pc.in
+ epatch "${FILESDIR}"/libdbi-0.9.0-doc-build-fix.patch
+
+ # configure.in has been changed
+ eautoreconf
+ # should append CFLAGS, not replace them
+ sed -i.orig -e 's/^CFLAGS = /CFLAGS += /g' src/Makefile.in
+}
+
+src_configure() {
+ econf \
+ $(use_enable doc docs) \
+ $(use_enable static-libs static)
+}
+
+src_install () {
+ default
+
+ prune_libtool_files --all
+
+ # syslog-ng requires dbi.pc
+ insinto /usr/$(get_libdir)/pkgconfig/
+ doins dbi.pc
+}
diff --git a/dev-db/libdbi/metadata.xml b/dev-db/libdbi/metadata.xml
new file mode 100644
index 000000000000..77b6543efd3e
--- /dev/null
+++ b/dev-db/libdbi/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>robbat2@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">libdbi</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/libiodbc-3.52.12 b/dev-db/libiodbc-3.52.12
deleted file mode 100644
index 1ed119f693b9..000000000000
--- a/dev-db/libiodbc-3.52.12
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=gtk? ( x11-libs/gtk+:2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=ODBC Interface for Linux
-EAPI=6
-HOMEPAGE=http://www.iodbc.org/
-IUSE=gtk abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos
-LICENSE=|| ( LGPL-2 BSD )
-RDEPEND=gtk? ( x11-libs/gtk+:2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] )
-SLOT=0
-SRC_URI=https://github.com/openlink/iODBC/archive/v3.52.12.zip -> libiodbc-3.52.12.zip
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 libtool 0081a71a261724730ec4c248494f044d multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=b9be7e25ac97f45d99492defbed31d4a
diff --git a/dev-db/libiodbc-3.52.8-r2 b/dev-db/libiodbc-3.52.8-r2
deleted file mode 100644
index 5ca05c5b3f74..000000000000
--- a/dev-db/libiodbc-3.52.8-r2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=gtk? ( x11-libs/gtk+:2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=ODBC Interface for Linux
-EAPI=5
-HOMEPAGE=http://www.iodbc.org/
-IUSE=gtk abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos
-LICENSE=|| ( LGPL-2 BSD )
-RDEPEND=gtk? ( x11-libs/gtk+:2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] )
-SLOT=0
-SRC_URI=https://github.com/openlink/iODBC/archive/v3.52.8.zip -> libiodbc-3.52.8.zip
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=111f9b03214366141a8f816ffe43079b
diff --git a/dev-db/libiodbc/Manifest b/dev-db/libiodbc/Manifest
new file mode 100644
index 000000000000..23d3eaa61d14
--- /dev/null
+++ b/dev-db/libiodbc/Manifest
@@ -0,0 +1,15 @@
+AUX fix-runpaths-r1.patch 438 BLAKE2B 0089f678dea14f4f1f3cf0e6fdaa9863b2659b3a93208404fbf29939a7d797cbac75a9f128d625fd4a8691807507bc69e42894bae19cacc680d202616d0e3de1 SHA512 2c64890a2e61f7fd3c6c053a35308b57eb7c50bf070d4833bd0b8a4182d3581cfb358ee315cc26cb26d6b11941d4e9265b38f59732f7b679d3b2d23d0dda0035
+AUX fix-runpaths.patch 434 BLAKE2B 064257ff2c1cdb15ab7bf3c2536d530d3803aa8dcab21a27f34c43c5095bf319b6eb9bce035a3c70675e5f5ecac5d529c63875ba64abb95150e3fd6494c09d94 SHA512 48364d6004c0f2dadb71a8b6838a4c4b1caf4d2df59e2f4acca82f6203704c4ad4aa4b3d0d4f33fdab4e8d01d7c70dad916b6bc4455dfa1581ff80f9f48468fa
+AUX libiodbc-3.52.12-multilib.patch 934 BLAKE2B e98b6bb650605154c251752d2208237a45dbc794ca141a292628192765020b33a3d6b331194d9f204657d06e590446b2809a91ad24944221005afae557c1d361 SHA512 718f564371d962283525f946b60b9028e66b3477d4bf20fd6f5363d08635c2d2603d9de5fb157e6039c124324578e5367e985d83623a3b1cd4dd0de7605f1911
+AUX libiodbc-3.52.7-debian_bug501100.patch 408 BLAKE2B 6fb1e24cb2d4f32eca6cde6d50bf9ce77e6a55e3e09c491f971863067b402e7f77bc5238750062094b4092d172909ff592fa36c31e50db122bb85bdfa0eaaaeb SHA512 e36a2b936b36af3cbdf125725628a2c5ca1f4d246c7b7eaf8c08a97e96fa25915b2b03bdd33f7a1c42b08d54f89174edbcb7f1ebaaa1a2e9777ff33023ac2575
+AUX libiodbc-3.52.7-debian_bug508480.patch 577 BLAKE2B 0d605b754b6b4b970a15a236be6eebdc6e24dcb1231cacf10e859b22eb577ac49b26ffcdae437cf05de26850de33ed10cfbbffb9b54ab79fada2525a6de939a3 SHA512 2e3a0ab2284b0b302e2eb5d27e1cc952810c5ec2d123491047cda15d1e0b2aa651a1d3357fb330be24fa72ec855a89143eb88bd4b87ce079b469b6ab8647ce74
+AUX libiodbc-3.52.7-gtk.patch 445 BLAKE2B 5992d5965ef3e5bb929825611be9d3dce723f9a80787022894adbe52b9100d4ce6e962a3cb4c413c8235ff51ff6d21e41ab599a3e5a4c8ad90fa71d892215c1a SHA512 ec7d682846103ac67274eb145c8501bdc8fdc2f0a7bda650302713e785ca428c75ad29230301e455ec2ad967aa272b13ad5283e8d5b01ff0dfca6beeac7dd0fb
+AUX libiodbc-3.52.7-multilib.patch 853 BLAKE2B cc0db746618d4b6120ac19ee5b99ca7901452130bb6a79b391620e1ea4639bc88ef45364b8a766507d8dbcf2ef2c9fef0187c6a75a88235618e25e861a88625f SHA512 b91644eb58110cc429458ce372441e76655171ffa52904e0629f238bc6df21793875a6f4b524dddaa9f68f1f2ebc773db56d6da08643e4054299d09f38517849
+AUX libiodbc-3.52.7-unicode_includes.patch 432 BLAKE2B 3f9c833c223fb5d5dd94530501b5403732b88b420a6cf6a0453734d1cacd9eebdb0e69d7cf265b4ce2da4baa2faad32b467beffdf76d6c339316323b2ba9237c SHA512 b4bd56e88199ed06ec7ce64bbf53c3d792c501cdadee44a1c52d95336c36e93c2379d312b14c576a138210f2cf277e895ded18e80db4e5bb3f664ccb5695a305
+AUX libiodbc-3.52.8-gtk-parallel-make.patch 661 BLAKE2B f77c1184d648e4da54c05b3f72c4761a73d574bd6a19f07d15e70d707ba49065e2fedf748b48a01506434b9e6ba01f33d6c8f516c95bffdc213ea4858d2049f5 SHA512 5378bba53eea8c45a13631b5b8d0d4efed78ea2f786835d509431da3813924cbc07aae3d19053efef6fc052d351193f576ed4fcc301956f59f3e36e18280d537
+AUX libiodbc-3.52.8-runtime-failures.patch 2033 BLAKE2B 943726b96d59fb560e1e42392d4d03c149ab55d4e237ad956f9b56d5f0a06abbab9e103412cb25423e9a1612ac2b74ff20a08e05d1561a3559559c80284e5298 SHA512 a6b921a85bf4076cf5af8744987cdd98ebc570043344e681def5a83e677e64ddc6457f86c135b33162f7248de6c9897b65978699582e0ad71cb9e696f6270142
+DIST libiodbc-3.52.12.zip 1248801 BLAKE2B e19b740904a332df7d7f510a6ef7414121e99bcbce0b89db94f4b7a09c0de09f39a8f8abdbec40029b79140fab6e1e1d319ad146cc7d74872a7fe69852a3f710 SHA512 240f6f7dc406fcc6688499bac8800b81380d32e8443e4f098875fabc649da1b86567b67d2259206be64cced8537d3171040d16be39845b9009cd90be62ae97db
+DIST libiodbc-3.52.8.zip 1188493 BLAKE2B 8439d0268b64d847c2bbb733fb203b3c2811f14dcd1cf2993472244e6430c2dac042f2b5056aed04049ba2cd139c83cd9c6c7ac6d4e1576dea58fc6e6aa0a5f0 SHA512 76da1e69a6e7ab1b7ba103547070c5dfe7c40fa88d82c243640d862c93c19e731d5a35d0575038491a148bb1d1cb7c5168dc30bf3f9600b31f4e014350f16551
+EBUILD libiodbc-3.52.12.ebuild 1658 BLAKE2B da9a89673e70ddf34a9e330b39ac43020d104400628f224593adc210db3f7154c29847d0bac930ffda5daedc61fa95bb7e4fb9e7e0c7c914e5d9f4c6aec27f8c SHA512 53efa97c5709d59b26d631aaefb9210468ab3aa2a8bdc32d9492a691b0ee2b66c7d6f9163095f00ab747370113a528600481eba35388914a91c36ff20d1df3a1
+EBUILD libiodbc-3.52.8-r2.ebuild 1711 BLAKE2B 5b4e8870a2e2a782bed3e1b05e22fbfac3489900320c4b73263c7e722b21136a3299219859d5788b2eb56685b76190c3fedbefbd1dceeb6871a3fe83d492b1cb SHA512 9ac4fa353299828cd7419ee5c5502434a3390db1a3f6c3558bda884cf091fa31cec34c69d2e2612985bd73c0ad97ee8dfa6bf6d96af59424f34148706475c8b1
+MISC metadata.xml 251 BLAKE2B de1fe040cd23515516e31a81c78089f5fb4b9240f43a659d0e6981665bec427ebfe5f68bbea534b92dd4352f42e366c2070d3ef3e7fc0d3beee880445d973bef SHA512 ec0eb5cbc30d0a7ad8c74612255d84a473c370d977f9be4c95904eb5281060bbe3c23d97fb9537e844bbaf90c2f6dd1fae891d44628bbca29fbecb0fe0cb8bbd
diff --git a/dev-db/libiodbc/files/fix-runpaths-r1.patch b/dev-db/libiodbc/files/fix-runpaths-r1.patch
new file mode 100644
index 000000000000..2cd76c816254
--- /dev/null
+++ b/dev-db/libiodbc/files/fix-runpaths-r1.patch
@@ -0,0 +1,15 @@
+--- a/samples/Makefile.am 2012-03-27 05:15:02.000000000 +0200
++++ b/samples/Makefile.am.new 2013-04-09 14:07:48.303789999 +0200
+@@ -78,12 +78,10 @@
+ #
+ iodbctest_SOURCES = iodbctest.c
+ iodbctest_LDADD = ../iodbc/libiodbc.la
+-iodbctest_LDFLAGS = -static
+
+ iodbctestw_CFLAGS = -DUNICODE
+ iodbctestw_SOURCES = iodbctest.c
+ iodbctestw_LDADD = ../iodbc/libiodbc.la
+-iodbctestw_LDFLAGS = -static
+
+ EXTRA_DIST = $(srcdir)/Makefile.sample
+
diff --git a/dev-db/libiodbc/files/fix-runpaths.patch b/dev-db/libiodbc/files/fix-runpaths.patch
new file mode 100644
index 000000000000..e913b4c7c4cc
--- /dev/null
+++ b/dev-db/libiodbc/files/fix-runpaths.patch
@@ -0,0 +1,15 @@
+--- samples/Makefile.am 2012-03-27 05:15:02.000000000 +0200
++++ samples/Makefile.am.new 2013-04-09 14:07:48.303789999 +0200
+@@ -78,12 +78,10 @@
+ #
+ iodbctest_SOURCES = iodbctest.c
+ iodbctest_LDADD = ../iodbc/libiodbc.la
+-iodbctest_LDFLAGS = -static
+
+ iodbctestw_CFLAGS = -DUNICODE
+ iodbctestw_SOURCES = iodbctest.c
+ iodbctestw_LDADD = ../iodbc/libiodbc.la
+-iodbctestw_LDFLAGS = -static
+
+ EXTRA_DIST = $(srcdir)/Makefile.sample
+
diff --git a/dev-db/libiodbc/files/libiodbc-3.52.12-multilib.patch b/dev-db/libiodbc/files/libiodbc-3.52.12-multilib.patch
new file mode 100644
index 000000000000..e2819211ccac
--- /dev/null
+++ b/dev-db/libiodbc/files/libiodbc-3.52.12-multilib.patch
@@ -0,0 +1,37 @@
+diff --git a/bin/iodbc-config.in b/bin/iodbc-config.in
+index 08d46ae..576aa8b 100644
+--- a/bin/iodbc-config.in
++++ b/bin/iodbc-config.in
+@@ -145,10 +145,10 @@ while test $# -gt 0; do
+ echo_libs=yes
+ ;;
+ --static-libs)
+- echo_staticlibs=yes
++ echo_libs=yes
+ ;;
+ --libtool-libs)
+- echo_libtoollibs=yes
++ echo_libs=yes
+ ;;
+ --data-dir)
+ echo_data_dir=yes
+@@ -196,19 +196,5 @@ if test "$echo_libs" = "yes"; then
+ if test "$lib_iodbc" = "yes"; then
+ libs="$libs -liodbc -liodbcinst"
+ fi
+- echo "-L@libdir@ $libs"
+-fi
+-if test "$echo_staticlibs" = "yes"; then
+- libs=""
+- if test "$lib_iodbc" = "yes"; then
+- libs="@libdir@/libiodbc.a @libdir@/libiodbcinst.a -lpthread @LIBADD_DL@"
+- fi
+- echo "$libs"
+-fi
+-if test "$echo_libtoollibs" = "yes"; then
+- libs=""
+- if test "$lib_iodbc" = "yes"; then
+- libs="@libdir@/libiodbc.la @libdir@/libiodbcinst.la"
+- fi
+ echo "$libs"
+ fi
diff --git a/dev-db/libiodbc/files/libiodbc-3.52.7-debian_bug501100.patch b/dev-db/libiodbc/files/libiodbc-3.52.7-debian_bug501100.patch
new file mode 100644
index 000000000000..5e19d1e68094
--- /dev/null
+++ b/dev-db/libiodbc/files/libiodbc-3.52.7-debian_bug501100.patch
@@ -0,0 +1,14 @@
+Index: libiodbc2-3.52.7/include/sqltypes.h
+===================================================================
+--- libiodbc2-3.52.7.orig/include/sqltypes.h 2010-06-26 21:15:00.000000000 +0200
++++ libiodbc2-3.52.7/include/sqltypes.h 2010-06-26 21:15:36.000000000 +0200
+@@ -96,6 +96,9 @@
+ extern "C" {
+ #endif
+
++#ifndef _IODBCUNIX_H
++#include <iodbcunix.h>
++#endif
+
+ /*
+ * Environment specific definitions
diff --git a/dev-db/libiodbc/files/libiodbc-3.52.7-debian_bug508480.patch b/dev-db/libiodbc/files/libiodbc-3.52.7-debian_bug508480.patch
new file mode 100644
index 000000000000..d1e80184e5b1
--- /dev/null
+++ b/dev-db/libiodbc/files/libiodbc-3.52.7-debian_bug508480.patch
@@ -0,0 +1,14 @@
+Index: libiodbc2-3.52.7/iodbcinst/inifile.c
+===================================================================
+--- libiodbc2-3.52.7.orig/iodbcinst/inifile.c 2010-06-26 21:29:43.000000000 +0200
++++ libiodbc2-3.52.7/iodbcinst/inifile.c 2010-06-26 21:30:07.000000000 +0200
+@@ -1023,7 +1023,8 @@
+
+ if (!_iodbcdm_cfg_find (pCfg, lpszSection, NULL))
+ {
+- while (curr < cbRetBuffer && 0 == _iodbcdm_cfg_nextentry (pCfg))
++ while (curr < cbRetBuffer && 0 == _iodbcdm_cfg_nextentry (pCfg)
++ && pCfg->section)
+ {
+ if (_iodbcdm_cfg_section (pCfg))
+ break;
diff --git a/dev-db/libiodbc/files/libiodbc-3.52.7-gtk.patch b/dev-db/libiodbc/files/libiodbc-3.52.7-gtk.patch
new file mode 100644
index 000000000000..83fc954d46c9
--- /dev/null
+++ b/dev-db/libiodbc/files/libiodbc-3.52.7-gtk.patch
@@ -0,0 +1,16 @@
+diff -pruN 3.52.6-1/configure.in 3.52.6-1ubuntu1/configure.in
+--- 3.52.6-1/configure.in 2007-10-08 14:04:32.000000000 +0100
++++ 3.52.6-1ubuntu1/configure.in 2007-12-06 00:12:00.000000000 +0000
+@@ -315,12 +315,6 @@ then
+ no_gtk=""
+ # Check for GTK+ 2.x
+ AM_PATH_GTK_2_0(2.0.0)
+- if test x$no_gtk != x
+- then
+- # Try GTK 1.2.x instead
+- no_gtk=""
+- AM_PATH_GTK(1.2.3)
+- fi
+ if test x$no_gtk = x
+ then
+ USE_GTK=true
diff --git a/dev-db/libiodbc/files/libiodbc-3.52.7-multilib.patch b/dev-db/libiodbc/files/libiodbc-3.52.7-multilib.patch
new file mode 100644
index 000000000000..73e81d30aec0
--- /dev/null
+++ b/dev-db/libiodbc/files/libiodbc-3.52.7-multilib.patch
@@ -0,0 +1,35 @@
+--- bin/iodbc-config.in.orig 2006-01-23 11:29:22.000000000 +0100
++++ bin/iodbc-config.in 2009-06-04 17:48:19.000000000 +0200
+@@ -145,10 +145,10 @@
+ echo_libs=yes
+ ;;
+ --static-libs)
+- echo_staticlibs=yes
++ echo_libs=yes
+ ;;
+ --libtool-libs)
+- echo_libtoollibs=yes
++ echo_libs=yes
+ ;;
+ --data-dir)
+ echo_data_dir=yes
+@@ -196,19 +196,5 @@
+ if test "$lib_iodbc" = "yes"; then
+ libs="$libs -liodbc -liodbcinst"
+ fi
+- echo "-L@libdir@ $libs"
+-fi
+-if test "$echo_staticlibs" = "yes"; then
+- libs=""
+- if test "$lib_iodbc" = "yes"; then
+- libs="@libdir@/libiodbc.a @libdir@/libiodbcinst.a @LIBADD_DL@"
+- fi
+- echo "$libs"
+-fi
+-if test "$echo_libtoollibs" = "yes"; then
+- libs=""
+- if test "$lib_iodbc" = "yes"; then
+- libs="@libdir@/libiodbc.la @libdir@/libiodbcinst.la"
+- fi
+ echo "$libs"
+ fi
diff --git a/dev-db/libiodbc/files/libiodbc-3.52.7-unicode_includes.patch b/dev-db/libiodbc/files/libiodbc-3.52.7-unicode_includes.patch
new file mode 100644
index 000000000000..67730ec65556
--- /dev/null
+++ b/dev-db/libiodbc/files/libiodbc-3.52.7-unicode_includes.patch
@@ -0,0 +1,12 @@
+Index: libiodbc2-3.52.7/iodbcinst/unicode.h
+===================================================================
+--- libiodbc2-3.52.7.orig/iodbcinst/unicode.h 2009-09-09 14:13:17.000000000 +0200
++++ libiodbc2-3.52.7/iodbcinst/unicode.h 2010-06-26 21:16:26.000000000 +0200
+@@ -76,6 +76,7 @@
+
+ #ifndef _UNICODE_H
+ #define _UNICODE_H
++#include <iodbc.h>
+
+
+ #if defined (__APPLE__) && !defined (MACOSX102) && !defined (HAVE_CONFIG_H)
diff --git a/dev-db/libiodbc/files/libiodbc-3.52.8-gtk-parallel-make.patch b/dev-db/libiodbc/files/libiodbc-3.52.8-gtk-parallel-make.patch
new file mode 100644
index 000000000000..7278499aff35
--- /dev/null
+++ b/dev-db/libiodbc/files/libiodbc-3.52.8-gtk-parallel-make.patch
@@ -0,0 +1,23 @@
+diff -u -r iODBC-3.52.8.orig/iodbcadm/Makefile.am iODBC-3.52.8/iodbcadm/Makefile.am
+--- iODBC-3.52.8.orig/iodbcadm/Makefile.am 2012-03-27 05:15:02.000000000 -0500
++++ iODBC-3.52.8/iodbcadm/Makefile.am 2013-01-08 08:12:58.639414826 -0600
+@@ -96,7 +96,7 @@
+
+ if GTK
+ libiodbcadm_la_LIBADD = \
+- ../iodbcadm/gtk/libiodbcadm-gtk.la \
++ gtk/libiodbcadm-gtk.la \
+ $(LIBADD_DL) \
+ @GTK_LIBS@ \
+ ../iodbcinst/libiodbc_common.la \
+@@ -117,8 +117,8 @@
+
+ iodbcadm_gtk_SOURCES =
+ iodbcadm_gtk_LDADD = \
+- ../iodbcadm/gtk/main.lo \
+- ../iodbcadm/libiodbcadm.la \
++ gtk/main.lo \
++ libiodbcadm.la \
+ ../iodbcinst/libiodbcinst.la \
+ ../iodbc/libiodbc.la \
+ @GTK_LIBS@
diff --git a/dev-db/libiodbc/files/libiodbc-3.52.8-runtime-failures.patch b/dev-db/libiodbc/files/libiodbc-3.52.8-runtime-failures.patch
new file mode 100644
index 000000000000..50724ba46b48
--- /dev/null
+++ b/dev-db/libiodbc/files/libiodbc-3.52.8-runtime-failures.patch
@@ -0,0 +1,56 @@
+diff -u -r iODBC-3.52.8.orig/configure.in iODBC-3.52.8/configure.in
+--- iODBC-3.52.8.orig/configure.in 2012-03-27 05:15:02.000000000 -0500
++++ iODBC-3.52.8/configure.in 2013-01-08 10:31:39.740041040 -0600
+@@ -87,7 +87,7 @@
+ AC_CONFIG_SRCDIR([include/isql.h])
+ AC_CONFIG_AUX_DIR(admin)
+ AC_CONFIG_MACRO_DIR(admin)
+-AM_CONFIG_HEADER(include/config.h)
++AC_CONFIG_HEADER(include/config.h)
+ AM_INIT_AUTOMAKE(AC_PACKAGE_TARNAME, AC_PACKAGE_VERSION)
+ AC_CANONICAL_HOST
+ AM_MAINTAINER_MODE
+diff -u -r iODBC-3.52.8.orig/iodbcadm/gtk/administrator.c iODBC-3.52.8/iodbcadm/gtk/administrator.c
+--- iODBC-3.52.8.orig/iodbcadm/gtk/administrator.c 2012-03-27 05:15:02.000000000 -0500
++++ iODBC-3.52.8/iodbcadm/gtk/administrator.c 2013-01-08 10:29:51.758462953 -0600
+@@ -72,6 +72,13 @@
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
++#ifdef __linux
++# ifndef _GNU_SOURCE
++# define _GNU_SOURCE /* make sure dladdr is declared */
++# endif
++# define HAVE_DL_INFO 1
++#endif
++
+ #include <iodbc.h>
+ #include <dlfcn.h>
+ #include <sys/stat.h>
+@@ -82,7 +89,7 @@
+ #include "odbc4.xpm"
+
+
+-#if !defined(HAVE_DL_INFO)
++#if defined (HAVE_DLADDR) && !defined(HAVE_DL_INFO)
+ typedef struct
+ {
+ const char *dli_fname; /* File name of defining object. */
+@@ -90,6 +97,7 @@
+ const char *dli_sname; /* Name of nearest symbol. */
+ void *dli_saddr; /* Exact value of nearest symbol. */
+ } Dl_info;
++
+ #endif /* HAVE_DL_INFO */
+
+ static char *szDriverButtons[] = {
+diff -u -r iODBC-3.52.8.orig/iodbcadm/gtk/gui.h iODBC-3.52.8/iodbcadm/gtk/gui.h
+--- iODBC-3.52.8.orig/iodbcadm/gtk/gui.h 2012-03-27 05:15:02.000000000 -0500
++++ iODBC-3.52.8/iodbcadm/gtk/gui.h 2013-01-08 10:30:48.124240299 -0600
+@@ -219,5 +219,6 @@
+ void addlistofdir_to_optionmenu(GtkWidget* widget, LPCSTR path, TDSNCHOOSER *choose_t);
+ LPSTR create_keyval (HWND wnd, LPCSTR attrs, BOOL *verify_conn);
+ LPSTR create_fgensetup (HWND hwnd, LPCSTR dsn, LPCSTR attrs, BOOL add, BOOL *verify_conn);
++void create_message (HWND hwnd, LPCSTR dsn, LPCSTR text);
+
+ #endif
diff --git a/dev-db/libiodbc/libiodbc-3.52.12.ebuild b/dev-db/libiodbc/libiodbc-3.52.12.ebuild
new file mode 100644
index 000000000000..601567f5e7e1
--- /dev/null
+++ b/dev-db/libiodbc/libiodbc-3.52.12.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools multilib-minimal
+
+MY_PN="iODBC"
+
+DESCRIPTION="ODBC Interface for Linux"
+HOMEPAGE="http://www.iodbc.org/"
+SRC_URI="https://github.com/openlink/${MY_PN}/archive/v${PV}.zip -> ${P}.zip"
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
+LICENSE="|| ( LGPL-2 BSD )"
+SLOT="0"
+IUSE="gtk"
+
+RDEPEND="gtk? ( x11-libs/gtk+:2[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}"
+
+DOCS=( AUTHORS NEWS README )
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+MULTILIB_CHOST_TOOLS=( /usr/bin/iodbc-config )
+
+PATCHES=(
+ "${FILESDIR}"/libiodbc-3.52.12-multilib.patch
+ "${FILESDIR}"/libiodbc-3.52.7-debian_bug501100.patch
+ "${FILESDIR}"/libiodbc-3.52.7-debian_bug508480.patch
+ "${FILESDIR}"/libiodbc-3.52.7-unicode_includes.patch
+ "${FILESDIR}"/fix-runpaths-r1.patch
+)
+
+src_prepare() {
+ default
+ sed -i.orig \
+ -e '/^cd "$PREFIX"/,/^esac/d' \
+ iodbc/install_libodbc.sh || die "sed failed"
+
+ # Without this, automake dies. It's what upstream's autogen.sh does.
+ touch ChangeLog || die "failed to create empty ChangeLog"
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" \
+ econf \
+ --disable-static \
+ --enable-odbc3 \
+ --enable-pthreads \
+ --with-layout=gentoo \
+ --with-iodbc-inidir=yes \
+ $(use_enable gtk gui)
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files
+
+ # Install lintian overrides
+ insinto /usr/share/lintian/overrides
+ newins debian/iodbc.lintian-overrides iodbc
+ newins debian/libiodbc2.lintian-overrides libiodbc2
+}
diff --git a/dev-db/libiodbc/libiodbc-3.52.8-r2.ebuild b/dev-db/libiodbc/libiodbc-3.52.8-r2.ebuild
new file mode 100644
index 000000000000..364fe91e946c
--- /dev/null
+++ b/dev-db/libiodbc/libiodbc-3.52.8-r2.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit autotools eutils multilib-minimal
+
+MY_PN="iODBC"
+
+DESCRIPTION="ODBC Interface for Linux"
+HOMEPAGE="http://www.iodbc.org/"
+SRC_URI="https://github.com/openlink/${MY_PN}/archive/v${PV}.zip -> ${P}.zip"
+
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
+LICENSE="|| ( LGPL-2 BSD )"
+SLOT="0"
+IUSE="gtk"
+
+RDEPEND="gtk? ( x11-libs/gtk+:2[${MULTILIB_USEDEP}] )"
+
+DEPEND="${RDEPEND}"
+
+DOCS="AUTHORS ChangeLog NEWS README"
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/iodbc-config
+)
+
+src_prepare() {
+ sed -i.orig \
+ -e '/^cd "$PREFIX"/,/^esac/d' \
+ iodbc/install_libodbc.sh || die "sed failed"
+ epatch \
+ "${FILESDIR}"/libiodbc-3.52.7-debian_bug501100.patch \
+ "${FILESDIR}"/libiodbc-3.52.7-debian_bug508480.patch \
+ "${FILESDIR}"/libiodbc-3.52.7-gtk.patch \
+ "${FILESDIR}"/libiodbc-3.52.7-multilib.patch \
+ "${FILESDIR}"/libiodbc-3.52.7-unicode_includes.patch \
+ "${FILESDIR}"/libiodbc-3.52.8-gtk-parallel-make.patch \
+ "${FILESDIR}"/libiodbc-3.52.8-runtime-failures.patch \
+ "${FILESDIR}"/fix-runpaths.patch
+ chmod -x include/*.h || die
+ eautoreconf
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} \
+ econf \
+ --disable-static \
+ --enable-odbc3 \
+ --enable-pthreads \
+ --with-layout=gentoo \
+ --with-iodbc-inidir=yes \
+ $(use_enable gtk gui)
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files
+
+ # Install lintian overrides
+ insinto /usr/share/lintian/overrides
+ newins debian/iodbc.lintian-overrides iodbc
+ newins debian/libiodbc2.lintian-overrides libiodbc2
+}
diff --git a/dev-db/libiodbc/metadata.xml b/dev-db/libiodbc/metadata.xml
new file mode 100644
index 000000000000..81b92f1d893e
--- /dev/null
+++ b/dev-db/libiodbc/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="github">openlink/iODBC</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/libodbc++-0.2.5-r2 b/dev-db/libodbc++-0.2.5-r2
deleted file mode 100644
index d642655b1691..000000000000
--- a/dev-db/libodbc++-0.2.5-r2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare
-DEPEND=dev-db/unixODBC sys-libs/ncurses
-DESCRIPTION=Provides a subset of the well-known JDBC 2.0(tm) and runs on top of ODBC
-EAPI=5
-HOMEPAGE=http://libodbcxx.sourceforge.net/
-IUSE=static-libs
-KEYWORDS=~alpha ~amd64 ~hppa ~ppc ~x86
-LICENSE=LGPL-2.1
-RDEPEND=dev-db/unixODBC sys-libs/ncurses
-SLOT=0
-SRC_URI=mirror://sourceforge/libodbcxx/libodbc++-0.2.5.tar.bz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=405e730b080313e5efe1a6f65b6f1e95
diff --git a/dev-db/libodbc++/Manifest b/dev-db/libodbc++/Manifest
new file mode 100644
index 000000000000..6f303c6fe9d4
--- /dev/null
+++ b/dev-db/libodbc++/Manifest
@@ -0,0 +1,6 @@
+AUX libodbc++-0.2.3-doxygen.patch 561 BLAKE2B 4b1813dc89760c0e70d36f853c21e5a830040fbb9128da4852c319b39a0e667533a515f8aaf17d6984e79cb35dcfc5c6e019b564d8bb6e5068c79ac20f9f2196 SHA512 226dcfe4cbe3bac7a3eba2f1eb1184115e71494a6063521e2a3c6944316a323c383c88891780c701ffaef3a3564248b58869b2ce5d1da753063579fca0f1b7d5
+AUX libodbc++-0.2.3-gcc41.patch 456 BLAKE2B ad9de19388669c345cd619ab95518e0a8c3ca4dc5b246bedc386c76ae45a1d89e5fe1a9c15e88e298e1f228fcf066a4e2c3237e60f75bc893c695aa3a518526a SHA512 9b758fab94141338f42d9ce4291620bb839f7d044a9020de90258b70ef0554bb128879a3008bbafae9e5fab2082170d1a2b9e631d5ea7ef5c23eaf03f14d7615
+AUX libodbc++-0.2.3-gcc44.patch 316 BLAKE2B a7c4e6466b9c3b0b4aca8ea4288df30a86e462835fba4b63cb1c7c1925732bcb75f5652d154bb7223fe135dccfc0308167e0f521e958b2ef3262a24d17820353 SHA512 6b8b6f57523e9128927530d95477c3c55a27c47836e7231e8017958bd20407e637fd4896015a2a3fbf2e47e3e44f7f3e933a28c4ac84fc600366b899462aebb1
+DIST libodbc++-0.2.5.tar.bz2 362310 BLAKE2B c0266eef510f8bee3c430b6998f68859955968ee26b1ce8b456a497f84ad5f67ef96b474de0966aa07ff4ef308737103887c949704635696b095fef0bbfe59f7 SHA512 cc2485a0dae8a3f548a26a759f1421133a0a23715296f632067f5967b61778ca64e1339e19a4de15d06fb80b4e43ec8ddb13ba170b70dd7202c4d07b5669c2c7
+EBUILD libodbc++-0.2.5-r2.ebuild 3266 BLAKE2B f9ade3122983dfc191874ded2a02d73d0adbd7c9549a7066fbd3ff319202f26022c7f5dc62c385c557e2acd1f32e7e91473817b159d0d05662ed5070a06aba14 SHA512 2a76bbc2584fda03c1547b2d8e9153d1e21366e62d1ff08120085a8bc66855258b13a58903c481d614cff27740a6fd9e4c4bd4744709f09c64db556fbd4b2352
+MISC metadata.xml 407 BLAKE2B a3b699351c53efebceb80a888a63d2481c021417d47234d8da83a9249602e4fbf55564430cf20e54c3171849310e440461da3d6c8e5ea1e9854c50cfd6bf17ef SHA512 053eab77d80889554b167bd7449d9ae3994d59c68f84e1732413e003729b3ee852b05fa2dcc160746be7b482b6ea8811f790e4f2ce61f025010c9a8070121cf0
diff --git a/dev-db/libodbc++/files/libodbc++-0.2.3-doxygen.patch b/dev-db/libodbc++/files/libodbc++-0.2.3-doxygen.patch
new file mode 100644
index 000000000000..e750c198123f
--- /dev/null
+++ b/dev-db/libodbc++/files/libodbc++-0.2.3-doxygen.patch
@@ -0,0 +1,12 @@
+diff -ur libodbc++-0.2.3-orig/doc/progref/Doxyfile libodbc++-0.2.3/doc/progref/Doxyfile
+--- libodbc++-0.2.3-orig/doc/progref/Doxyfile 2006-04-08 01:03:20.000000000 -0400
++++ libodbc++-0.2.3/doc/progref/Doxyfile 2006-04-08 01:06:03.000000000 -0400
+@@ -256,7 +256,7 @@
+ # each generated HTML page. If it is left blank doxygen will generate a
+ # standard footer.
+
+-HTML_FOOTER = footer
++HTML_FOOTER =
+
+ # The HTML_STYLESHEET tag can be used to specify a user defined cascading
+ # style sheet that is used by each HTML page. It can be used to
diff --git a/dev-db/libodbc++/files/libodbc++-0.2.3-gcc41.patch b/dev-db/libodbc++/files/libodbc++-0.2.3-gcc41.patch
new file mode 100644
index 000000000000..089277fbd722
--- /dev/null
+++ b/dev-db/libodbc++/files/libodbc++-0.2.3-gcc41.patch
@@ -0,0 +1,12 @@
+diff -ur libodbc++-0.2.3-orig/include/odbc++/drivermanager.h libodbc++-0.2.3/include/odbc++/drivermanager.h
+--- libodbc++-0.2.3-orig/include/odbc++/drivermanager.h 2006-04-08 00:54:19.000000000 -0400
++++ libodbc++-0.2.3/include/odbc++/drivermanager.h 2006-04-08 00:56:15.000000000 -0400
+@@ -26,6 +26,8 @@
+
+ #include <odbc++/types.h>
+
++#include <odbc++/errorhandler.h>
++
+ /** The namespace where all <b>libodbc++</b> classes reside */
+ namespace odbc {
+
diff --git a/dev-db/libodbc++/files/libodbc++-0.2.3-gcc44.patch b/dev-db/libodbc++/files/libodbc++-0.2.3-gcc44.patch
new file mode 100644
index 000000000000..415ae0185e08
--- /dev/null
+++ b/dev-db/libodbc++/files/libodbc++-0.2.3-gcc44.patch
@@ -0,0 +1,11 @@
+--- libodbc++-0.2.3-orig/src/datastream.h 2009-06-12 13:31:54.000000000 +0200
++++ libodbc++-0.2.3/src/datastream.h 2009-06-12 13:32:11.000000000 +0200
+@@ -25,6 +25,7 @@
+ #include <odbc++/types.h>
+
+ #if defined(ODBCXX_HAVE_ISO_CXXLIB)
++# include <cstdio>
+ # include <istream>
+ # include <streambuf>
+ #else
+
diff --git a/dev-db/libodbc++/libodbc++-0.2.5-r2.ebuild b/dev-db/libodbc++/libodbc++-0.2.5-r2.ebuild
new file mode 100644
index 000000000000..2ff9b64fa4bf
--- /dev/null
+++ b/dev-db/libodbc++/libodbc++-0.2.5-r2.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils flag-o-matic
+
+DESCRIPTION="Provides a subset of the well-known JDBC 2.0(tm) and runs on top of ODBC"
+SRC_URI="mirror://sourceforge/libodbcxx/${P}.tar.bz2"
+HOMEPAGE="http://libodbcxx.sourceforge.net/"
+
+LICENSE="LGPL-2.1"
+SLOT=0
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~x86"
+
+IUSE="static-libs"
+
+DEPEND="dev-db/unixODBC
+ sys-libs/ncurses"
+RDEPEND="${DEPEND}"
+
+SB="${S}-build"
+SB_MT="${S}-build-mt"
+# QT3 is no longer supported in Gentoo.
+#SB_QT="${S}-build_qt"
+#SB_QT_MT="${S}-build_qt-mt"
+
+src_prepare() {
+ #epatch "${FILESDIR}"/${PN}-0.2.3-std-streamsize.patch
+ epatch "${FILESDIR}"/${PN}-0.2.3-doxygen.patch
+ epatch "${FILESDIR}"/${PN}-0.2.3-gcc41.patch
+ #epatch "${FILESDIR}"/${PN}-0.2.3-gcc43.patch
+ #epatch "${FILESDIR}"/${PN}-0.2.3-typecast.patch
+ epatch "${FILESDIR}"/${PN}-0.2.3-gcc44.patch
+
+ # Fix configure to use ncurses instead of termcap (bug #103105)
+ sed -i -e 's~termcap~ncurses~g' configure
+
+ # Fix undeclared ODBCXX_STRING_PERCENT symbol, bug #532356
+ sed -i -e 's/ODBCXX_STRING_PERCENT/"%"/' src/dtconv.h || die
+
+ epatch_user
+}
+
+src_configure() {
+ local commonconf buildlist
+ commonconf="--with-odbc=/usr --without-tests"
+ commonconf="${commonconf} $(use_enable static-libs static) --enable-shared"
+ # " --enable-threads"
+
+ export ECONF_SOURCE="${S}"
+ append-flags -DODBCXX_DISABLE_READLINE_HACK
+
+ buildlist="${SB} ${SB_MT}"
+ #use qt3 && buildlist="${buildlist} $SB_QT $SB_QT_MT"
+
+ for sd in ${buildlist}; do
+ einfo "Doing configure pass for $sd"
+ mkdir -p "${sd}"
+ cd "${sd}"
+ commonconf2=''
+ LIBS=''
+ [ "${sd}" == "${SB_MT}" -o "${sd}" == "${SB_QT_MT}" ] && commonconf2="${commonconf2} --enable-threads"
+ [ "${sd}" == "${SB_QT}" -o "${sd}" == "${SB_QT_MT}" ] && commonconf2="${commonconf2} --with-qt"
+ # isql++ tool fails to compile:
+ #libodbc++-0.2.5/isql++/isql++.cpp: In constructor 'Isql::Isql(odbc::Connection*)':
+ #libodbc++-0.2.5/isql++/isql++.cpp:275: error: invalid cast to function type 'char** ()()'
+ #[ "${sd}" == "${SB}" ] && commonconf2="${commonconf2} --with-isqlxx"
+ # Upstream configure is broken as well, passing --without or
+ # --with-isqlxx=no will turn it ON instead of forcing it off.
+ #commonconf2="${commonconf2} _-without-isqlxx"
+ [ "${sd}" == "${SB_QT}" ] && commonconf2="${commonconf2} --with-qtsqlxx"
+ export LIBS
+ # using without-qt breaks the build
+ #--without-qt \
+ econf \
+ ${commonconf} \
+ ${commonconf2} \
+ || die "econf failed"
+ done
+}
+
+src_compile() {
+ local buildlist failures
+ buildlist="${SB} ${SB_MT}"
+ #use qt3 && buildlist="${buildlist} $SB_QT $SB_QT_MT"
+ for sd in ${buildlist}; do
+ einfo "Doing compile pass for $sd"
+ cd "${sd}"
+ emake LIBS='' || failures="${failures} ${sd//${S}-}"
+ done
+ [ -n "${failures}" ] && die "Failures: ${failures}"
+}
+
+src_install () {
+ dodoc AUTHORS BUGS ChangeLog NEWS README THANKS TODO
+
+ buildlist="${SB} ${SB_MT}"
+ #use qt3 && buildlist="${buildlist} $SB_QT $SB_QT_MT"
+ for sd in ${buildlist}; do
+ einfo "Doing install pass for $sd"
+ cd ${sd}
+ emake DESTDIR="${D}" install
+ done
+ if [[ "${P}" != "${PF}" ]]; then
+ mv "${D}"/usr/share/doc/${P}/* "${D}"/usr/share/doc/${PF}/
+ rmdir "${D}"/usr/share/doc/${P}
+ fi
+}
diff --git a/dev-db/libodbc++/metadata.xml b/dev-db/libodbc++/metadata.xml
new file mode 100644
index 000000000000..4fe3e6f563b4
--- /dev/null
+++ b/dev-db/libodbc++/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>robbat2@gentoo.org</email>
+ </maintainer>
+ <maintainer type="project">
+ <email>cpp@gentoo.org</email>
+ <name>Gentoo C++ Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">libodbcxx</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/libzdb-2.11.1 b/dev-db/libzdb-2.11.1
deleted file mode 100644
index 711146bd384d..000000000000
--- a/dev-db/libzdb-2.11.1
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=mysql? ( virtual/mysql ) postgres? ( dev-db/postgresql ) sqlite? ( >=dev-db/sqlite-3.7:3[unlock-notify(+)] ) ssl? ( dev-libs/openssl ) virtual/pkgconfig doc? ( app-doc/doxygen )
-DESCRIPTION=A thread safe high level multi-database connection pool library
-EAPI=4
-HOMEPAGE=http://www.tildeslash.com/libzdb/
-IUSE=debug doc mysql postgres +sqlite ssl static-libs
-KEYWORDS=amd64 x86
-LICENSE=GPL-3
-RDEPEND=mysql? ( virtual/mysql ) postgres? ( dev-db/postgresql ) sqlite? ( >=dev-db/sqlite-3.7:3[unlock-notify(+)] ) ssl? ( dev-libs/openssl )
-REQUIRED_USE=|| ( postgres mysql sqlite )
-RESTRICT=test
-SLOT=0
-SRC_URI=http://www.tildeslash.com/libzdb/dist/libzdb-2.11.1.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=9645d4fd4a97904f5c5f05a8e8717c76
diff --git a/dev-db/libzdb-2.11.2 b/dev-db/libzdb-2.11.2
deleted file mode 100644
index db1a59c95524..000000000000
--- a/dev-db/libzdb-2.11.2
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=mysql? ( virtual/mysql ) postgres? ( dev-db/postgresql ) sqlite? ( >=dev-db/sqlite-3.7:3[unlock-notify(+)] ) ssl? ( dev-libs/openssl ) virtual/pkgconfig doc? ( app-doc/doxygen )
-DESCRIPTION=A thread safe high level multi-database connection pool library
-EAPI=4
-HOMEPAGE=http://www.tildeslash.com/libzdb/
-IUSE=debug doc mysql postgres +sqlite ssl static-libs
-KEYWORDS=~x86 ~amd64
-LICENSE=GPL-3
-RDEPEND=mysql? ( virtual/mysql ) postgres? ( dev-db/postgresql ) sqlite? ( >=dev-db/sqlite-3.7:3[unlock-notify(+)] ) ssl? ( dev-libs/openssl )
-REQUIRED_USE=|| ( postgres mysql sqlite )
-RESTRICT=test
-SLOT=0
-SRC_URI=http://www.tildeslash.com/libzdb/dist/libzdb-2.11.2.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=daf4a427611fb283af52d09a14a5a113
diff --git a/dev-db/libzdb-2.11.3 b/dev-db/libzdb-2.11.3
deleted file mode 100644
index b61574356f14..000000000000
--- a/dev-db/libzdb-2.11.3
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=mysql? ( virtual/mysql ) postgres? ( dev-db/postgresql ) sqlite? ( >=dev-db/sqlite-3.7:3[unlock-notify(+)] ) ssl? ( dev-libs/openssl ) virtual/pkgconfig doc? ( app-doc/doxygen )
-DESCRIPTION=A thread safe high level multi-database connection pool library
-EAPI=4
-HOMEPAGE=http://www.tildeslash.com/libzdb/
-IUSE=debug doc mysql postgres +sqlite ssl static-libs
-KEYWORDS=~x86 ~amd64
-LICENSE=GPL-3
-RDEPEND=mysql? ( virtual/mysql ) postgres? ( dev-db/postgresql ) sqlite? ( >=dev-db/sqlite-3.7:3[unlock-notify(+)] ) ssl? ( dev-libs/openssl )
-REQUIRED_USE=|| ( postgres mysql sqlite )
-RESTRICT=test
-SLOT=0
-SRC_URI=http://www.tildeslash.com/libzdb/dist/libzdb-2.11.3.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=daf4a427611fb283af52d09a14a5a113
diff --git a/dev-db/libzdb-2.12 b/dev-db/libzdb-2.12
deleted file mode 100644
index 90ebea0a37d3..000000000000
--- a/dev-db/libzdb-2.12
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=mysql? ( virtual/mysql ) postgres? ( dev-db/postgresql ) sqlite? ( >=dev-db/sqlite-3.7:3[unlock-notify(+)] ) ssl? ( dev-libs/openssl ) virtual/pkgconfig doc? ( app-doc/doxygen )
-DESCRIPTION=A thread safe high level multi-database connection pool library
-EAPI=4
-HOMEPAGE=http://www.tildeslash.com/libzdb/
-IUSE=debug doc mysql postgres +sqlite ssl static-libs
-KEYWORDS=amd64 x86
-LICENSE=GPL-3
-RDEPEND=mysql? ( virtual/mysql ) postgres? ( dev-db/postgresql ) sqlite? ( >=dev-db/sqlite-3.7:3[unlock-notify(+)] ) ssl? ( dev-libs/openssl )
-REQUIRED_USE=|| ( postgres mysql sqlite )
-RESTRICT=test
-SLOT=0
-SRC_URI=http://www.tildeslash.com/libzdb/dist/libzdb-2.12.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=9645d4fd4a97904f5c5f05a8e8717c76
diff --git a/dev-db/libzdb-3.0 b/dev-db/libzdb-3.0
deleted file mode 100644
index fac9cf01be36..000000000000
--- a/dev-db/libzdb-3.0
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=mysql? ( virtual/mysql ) postgres? ( dev-db/postgresql ) sqlite? ( >=dev-db/sqlite-3.7:3[unlock-notify(+)] ) ssl? ( dev-libs/openssl ) virtual/pkgconfig doc? ( app-doc/doxygen )
-DESCRIPTION=A thread safe high level multi-database connection pool library
-EAPI=4
-HOMEPAGE=http://www.tildeslash.com/libzdb/
-IUSE=debug doc mysql postgres +sqlite ssl static-libs
-KEYWORDS=~x86 ~amd64
-LICENSE=GPL-3
-RDEPEND=mysql? ( virtual/mysql ) postgres? ( dev-db/postgresql ) sqlite? ( >=dev-db/sqlite-3.7:3[unlock-notify(+)] ) ssl? ( dev-libs/openssl )
-REQUIRED_USE=|| ( postgres mysql sqlite )
-RESTRICT=test
-SLOT=0
-SRC_URI=http://www.tildeslash.com/libzdb/dist/libzdb-3.0.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=daf4a427611fb283af52d09a14a5a113
diff --git a/dev-db/libzdb-3.1 b/dev-db/libzdb-3.1
deleted file mode 100644
index 24c500abde4f..000000000000
--- a/dev-db/libzdb-3.1
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=mysql? ( virtual/mysql ) postgres? ( dev-db/postgresql ) sqlite? ( >=dev-db/sqlite-3.7:3[unlock-notify(+)] ) ssl? ( dev-libs/openssl ) virtual/pkgconfig doc? ( app-doc/doxygen )
-DESCRIPTION=A thread safe high level multi-database connection pool library
-EAPI=5
-HOMEPAGE=http://www.tildeslash.com/libzdb/
-IUSE=debug doc mysql postgres +sqlite ssl static-libs
-KEYWORDS=amd64 x86
-LICENSE=GPL-3
-RDEPEND=mysql? ( virtual/mysql ) postgres? ( dev-db/postgresql ) sqlite? ( >=dev-db/sqlite-3.7:3[unlock-notify(+)] ) ssl? ( dev-libs/openssl )
-REQUIRED_USE=|| ( postgres mysql sqlite )
-RESTRICT=test
-SLOT=0
-SRC_URI=http://www.tildeslash.com/libzdb/dist/libzdb-3.1.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=439aebcbae2bce653fa6f58175a4ae94
diff --git a/dev-db/libzdb/Manifest b/dev-db/libzdb/Manifest
new file mode 100644
index 000000000000..5841b96b0423
--- /dev/null
+++ b/dev-db/libzdb/Manifest
@@ -0,0 +1,13 @@
+DIST libzdb-2.11.1.tar.gz 599354 BLAKE2B 12811a804b5ec9d87cffa4198a1208bba2cfc68627878f3bf8319958b940c047ea6d993e5a22024ffb3bc5af076b9098c39d8799039186df2edd09bd68f6f0d7 SHA512 b630c8ce8ee9eaee53cd801cca08af543faaf7f945c9bfd2721bba0a5569980949ab8212c4bf17fec56b5c5c107cef17cfa893e293444a39bd32116d47edb2c5
+DIST libzdb-2.11.2.tar.gz 603149 BLAKE2B 1491cc73b4008e33b45d3b173d216984f8bcefc030ce67d46a90585c41c9ee66854eb45bc20b0f384cae0dd3d376b06a0bdf4416e24bf73ddec753981c364211 SHA512 482510fcf382e3b235ae7a5615f175d46f2d0244ed2d06c6c2df14ea5cebff5dbf6ac855aedc28a7981b77f3662c505049c5439c33e29a762af2d2a793d959c9
+DIST libzdb-2.11.3.tar.gz 604720 BLAKE2B 94bee96f1d15dddfd7376295d0077aaf8983c44df97608c0accdc39f140d6aa00dba2e673f86178b853d68c6f99658f10df4133c53b23b625dc78aa6918f275e SHA512 89305e5ecfc6a630936268f2b70f417c9a66bcc37063f4d87fcc0d1e6b106f0fec0b299da9c7375087e77de07abf3ae81fb48027fd741f150cffef7027930c66
+DIST libzdb-2.12.tar.gz 599160 BLAKE2B e0143cb185cc497da5e82cddda8479d8cbcbf09f555d90aeadc2ac0eee800f56077bfcb752c7b9bcfd56704d24f78f9006991e4cebd3daa556be00abb6d7bcdc SHA512 d2fbf7e0d7a8f37f8ce3404a0bf249165daafb54dfff31e6c7cea964b8360c1322bcd8cdc97a0ec8fec0a3be5bbe4f1690cb36a956bbcbea7b6a795655089f6f
+DIST libzdb-3.0.tar.gz 700284 BLAKE2B 1fd3235659be3f4043b5ce8f79b1bd37dd483113e028e49cc1db004dd61edb3d1a89919d6caf33680afdb5d9d5bf38cea9dfdc0bf041b2ec1e34c040fdb1eb09 SHA512 ce29b0b381695b874627c38a12fe808179ed74a07898fce10bbf7db0279256192eba377a89c9daaf3c6981e29aa67f95e0b21615d9a94c36b0e2e90c9ce6e12d
+DIST libzdb-3.1.tar.gz 720162 BLAKE2B 2ad8ede7e2a1c0ee831ba546b7756d2688bcde83b537e812c12ab3d42d6bdc13526778ae68b61584a52569f0b42fbeb8462efe379821295d855f585ae3420df4 SHA512 7cf24ccf0f0a938955d8b54af2c6eca8a8f700737beafde9e824129f324511e06adbc11a3fdbd6ad6d9b902fdae6f7caab4e5c1c594d2211be314e3a24c697f3
+EBUILD libzdb-2.11.1.ebuild 1949 BLAKE2B 69c6a78a97234e1566c9b4caf7390ea4799252d7a1221639548e15f21445d0ba45ef63ed2607ddb220b622ae54cc3ba70df7a3108a769c78dcfc117c6e88b1ee SHA512 e463dc5edeec408ae42d282319b9cd4e49338fb7cf86a7c26de5ca808d9e4159fce8610f14fb881ae999626be373db4918e5f9162387f0663a7fc99cc6372ca3
+EBUILD libzdb-2.11.2.ebuild 1951 BLAKE2B 302b935d57edf84f87d99e32f1b44f2f0e4e85a175774bfd90f8528095b885e45917079947c057f6cb6d4ab6da12d6233a047275012a9a0e5f1d4ada5e29218f SHA512 d928c77f97d1f974561ef951fcdb3774af7880e6a06705df21698012a747475fb64b3c44248bbe4086e13e6373b038896d35c5cc877e57f2bbc3693498799a25
+EBUILD libzdb-2.11.3.ebuild 1951 BLAKE2B 302b935d57edf84f87d99e32f1b44f2f0e4e85a175774bfd90f8528095b885e45917079947c057f6cb6d4ab6da12d6233a047275012a9a0e5f1d4ada5e29218f SHA512 d928c77f97d1f974561ef951fcdb3774af7880e6a06705df21698012a747475fb64b3c44248bbe4086e13e6373b038896d35c5cc877e57f2bbc3693498799a25
+EBUILD libzdb-2.12.ebuild 1949 BLAKE2B 69c6a78a97234e1566c9b4caf7390ea4799252d7a1221639548e15f21445d0ba45ef63ed2607ddb220b622ae54cc3ba70df7a3108a769c78dcfc117c6e88b1ee SHA512 e463dc5edeec408ae42d282319b9cd4e49338fb7cf86a7c26de5ca808d9e4159fce8610f14fb881ae999626be373db4918e5f9162387f0663a7fc99cc6372ca3
+EBUILD libzdb-3.0.ebuild 1951 BLAKE2B 302b935d57edf84f87d99e32f1b44f2f0e4e85a175774bfd90f8528095b885e45917079947c057f6cb6d4ab6da12d6233a047275012a9a0e5f1d4ada5e29218f SHA512 d928c77f97d1f974561ef951fcdb3774af7880e6a06705df21698012a747475fb64b3c44248bbe4086e13e6373b038896d35c5cc877e57f2bbc3693498799a25
+EBUILD libzdb-3.1.ebuild 1947 BLAKE2B 9f4f0cc56ef76cd541f1b1cd3e0bcec1ca726926fbf696b29cdb67223bca088ca2628196198ad1c8d8b02c0e0318452e3ab8244209108eef8e443bec370fba66 SHA512 88f77f36dfa481d6886ecf767060fefd2064b2c31ddd950c64a2e6a34679951574f4cae330ab006ca4101c42b4cfa670f55a909fed1d5bbcb786dcc235a49744
+MISC metadata.xml 252 BLAKE2B 607ece46067f5be04418014fa63f92ad521ce98dcd952feb4fcd1bcfcb16fd520bddb62e7f6e14486a7f45a2505cc258067adc1017af98ba9e69a78244bc62a5 SHA512 e7da72c861777d74f6459375f6f43e39f9e4dda779352c3e8942fcd658dcce6f995f016e34a74b331533f1815fba3faa9af024956a804f38a411990878e4bad6
diff --git a/dev-db/libzdb/libzdb-2.11.1.ebuild b/dev-db/libzdb/libzdb-2.11.1.ebuild
new file mode 100644
index 000000000000..6c5247ef4b6b
--- /dev/null
+++ b/dev-db/libzdb/libzdb-2.11.1.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A thread safe high level multi-database connection pool library"
+HOMEPAGE="http://www.tildeslash.com/libzdb/"
+SRC_URI="http://www.tildeslash.com/${PN}/dist/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug doc mysql postgres +sqlite ssl static-libs"
+REQUIRED_USE=" || ( postgres mysql sqlite )"
+
+RESTRICT=test
+
+RDEPEND="mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql )
+ sqlite? ( >=dev-db/sqlite-3.7:3[unlock-notify(+)] )
+ ssl? ( dev-libs/openssl )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+src_prepare() {
+ sed -i -e "s|&& ./pool||g" test/Makefile.in || die
+}
+
+src_configure() {
+ ## TODO: check what --enable-optimized actually does
+ ## TODO: find someone with oracle db to add oci8 support
+ myconf=""
+ if [[ $(gcc-version) < 4.1 ]];then
+ myconf="${myconf} --disable-protected"
+ else
+ myconf="${myconf} --enable-protected"
+ fi
+
+ if use sqlite; then
+ myconf="${myconf} --with-sqlite=${EPREFIX}/usr/ --enable-sqliteunlock"
+ else
+ myconf="${myconf} --without-sqlite"
+ fi
+
+ if use mysql; then
+ myconf="${myconf} --with-mysql=${EPREFIX}/usr/bin/mysql_config"
+ else
+ myconf="${myconf} --without-mysql"
+ fi
+
+ if use postgres; then
+ myconf="${myconf} --with-postgresql=${EPREFIX}/usr/bin/pg_config"
+ else
+ myconf="${myconf} --without-postgresql"
+ fi
+
+ econf \
+ $(use_enable debug profiling) \
+ $(use_enable static-libs static) \
+ $(use_enable ssl openssl) \
+ --without-oci \
+ ${myconf}
+}
+
+src_compile() {
+ default_src_compile
+ if use doc; then
+ emake doc
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ # the --disable-static flag only skips .a
+ use static-libs || rm -f "${D}"/usr/lib*/libzdb.la
+
+ dodoc AUTHORS CHANGES README
+ if use doc;then
+ dohtml -r "${S}/doc/api-docs"/*
+ fi
+}
+
+src_test() {
+ emake verify
+}
diff --git a/dev-db/libzdb/libzdb-2.11.2.ebuild b/dev-db/libzdb/libzdb-2.11.2.ebuild
new file mode 100644
index 000000000000..a21cf467d7c8
--- /dev/null
+++ b/dev-db/libzdb/libzdb-2.11.2.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A thread safe high level multi-database connection pool library"
+HOMEPAGE="http://www.tildeslash.com/libzdb/"
+SRC_URI="http://www.tildeslash.com/${PN}/dist/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="debug doc mysql postgres +sqlite ssl static-libs"
+REQUIRED_USE=" || ( postgres mysql sqlite )"
+
+RESTRICT=test
+
+RDEPEND="mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql )
+ sqlite? ( >=dev-db/sqlite-3.7:3[unlock-notify(+)] )
+ ssl? ( dev-libs/openssl )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+src_prepare() {
+ sed -i -e "s|&& ./pool||g" test/Makefile.in || die
+}
+
+src_configure() {
+ ## TODO: check what --enable-optimized actually does
+ ## TODO: find someone with oracle db to add oci8 support
+ myconf=""
+ if [[ $(gcc-version) < 4.1 ]];then
+ myconf="${myconf} --disable-protected"
+ else
+ myconf="${myconf} --enable-protected"
+ fi
+
+ if use sqlite; then
+ myconf="${myconf} --with-sqlite=${EPREFIX}/usr/ --enable-sqliteunlock"
+ else
+ myconf="${myconf} --without-sqlite"
+ fi
+
+ if use mysql; then
+ myconf="${myconf} --with-mysql=${EPREFIX}/usr/bin/mysql_config"
+ else
+ myconf="${myconf} --without-mysql"
+ fi
+
+ if use postgres; then
+ myconf="${myconf} --with-postgresql=${EPREFIX}/usr/bin/pg_config"
+ else
+ myconf="${myconf} --without-postgresql"
+ fi
+
+ econf \
+ $(use_enable debug profiling) \
+ $(use_enable static-libs static) \
+ $(use_enable ssl openssl) \
+ --without-oci \
+ ${myconf}
+}
+
+src_compile() {
+ default_src_compile
+ if use doc; then
+ emake doc
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ # the --disable-static flag only skips .a
+ use static-libs || rm -f "${D}"/usr/lib*/libzdb.la
+
+ dodoc AUTHORS CHANGES README
+ if use doc;then
+ dohtml -r "${S}/doc/api-docs"/*
+ fi
+}
+
+src_test() {
+ emake verify
+}
diff --git a/dev-db/libzdb/libzdb-2.11.3.ebuild b/dev-db/libzdb/libzdb-2.11.3.ebuild
new file mode 100644
index 000000000000..a21cf467d7c8
--- /dev/null
+++ b/dev-db/libzdb/libzdb-2.11.3.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A thread safe high level multi-database connection pool library"
+HOMEPAGE="http://www.tildeslash.com/libzdb/"
+SRC_URI="http://www.tildeslash.com/${PN}/dist/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="debug doc mysql postgres +sqlite ssl static-libs"
+REQUIRED_USE=" || ( postgres mysql sqlite )"
+
+RESTRICT=test
+
+RDEPEND="mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql )
+ sqlite? ( >=dev-db/sqlite-3.7:3[unlock-notify(+)] )
+ ssl? ( dev-libs/openssl )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+src_prepare() {
+ sed -i -e "s|&& ./pool||g" test/Makefile.in || die
+}
+
+src_configure() {
+ ## TODO: check what --enable-optimized actually does
+ ## TODO: find someone with oracle db to add oci8 support
+ myconf=""
+ if [[ $(gcc-version) < 4.1 ]];then
+ myconf="${myconf} --disable-protected"
+ else
+ myconf="${myconf} --enable-protected"
+ fi
+
+ if use sqlite; then
+ myconf="${myconf} --with-sqlite=${EPREFIX}/usr/ --enable-sqliteunlock"
+ else
+ myconf="${myconf} --without-sqlite"
+ fi
+
+ if use mysql; then
+ myconf="${myconf} --with-mysql=${EPREFIX}/usr/bin/mysql_config"
+ else
+ myconf="${myconf} --without-mysql"
+ fi
+
+ if use postgres; then
+ myconf="${myconf} --with-postgresql=${EPREFIX}/usr/bin/pg_config"
+ else
+ myconf="${myconf} --without-postgresql"
+ fi
+
+ econf \
+ $(use_enable debug profiling) \
+ $(use_enable static-libs static) \
+ $(use_enable ssl openssl) \
+ --without-oci \
+ ${myconf}
+}
+
+src_compile() {
+ default_src_compile
+ if use doc; then
+ emake doc
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ # the --disable-static flag only skips .a
+ use static-libs || rm -f "${D}"/usr/lib*/libzdb.la
+
+ dodoc AUTHORS CHANGES README
+ if use doc;then
+ dohtml -r "${S}/doc/api-docs"/*
+ fi
+}
+
+src_test() {
+ emake verify
+}
diff --git a/dev-db/libzdb/libzdb-2.12.ebuild b/dev-db/libzdb/libzdb-2.12.ebuild
new file mode 100644
index 000000000000..6c5247ef4b6b
--- /dev/null
+++ b/dev-db/libzdb/libzdb-2.12.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A thread safe high level multi-database connection pool library"
+HOMEPAGE="http://www.tildeslash.com/libzdb/"
+SRC_URI="http://www.tildeslash.com/${PN}/dist/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug doc mysql postgres +sqlite ssl static-libs"
+REQUIRED_USE=" || ( postgres mysql sqlite )"
+
+RESTRICT=test
+
+RDEPEND="mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql )
+ sqlite? ( >=dev-db/sqlite-3.7:3[unlock-notify(+)] )
+ ssl? ( dev-libs/openssl )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+src_prepare() {
+ sed -i -e "s|&& ./pool||g" test/Makefile.in || die
+}
+
+src_configure() {
+ ## TODO: check what --enable-optimized actually does
+ ## TODO: find someone with oracle db to add oci8 support
+ myconf=""
+ if [[ $(gcc-version) < 4.1 ]];then
+ myconf="${myconf} --disable-protected"
+ else
+ myconf="${myconf} --enable-protected"
+ fi
+
+ if use sqlite; then
+ myconf="${myconf} --with-sqlite=${EPREFIX}/usr/ --enable-sqliteunlock"
+ else
+ myconf="${myconf} --without-sqlite"
+ fi
+
+ if use mysql; then
+ myconf="${myconf} --with-mysql=${EPREFIX}/usr/bin/mysql_config"
+ else
+ myconf="${myconf} --without-mysql"
+ fi
+
+ if use postgres; then
+ myconf="${myconf} --with-postgresql=${EPREFIX}/usr/bin/pg_config"
+ else
+ myconf="${myconf} --without-postgresql"
+ fi
+
+ econf \
+ $(use_enable debug profiling) \
+ $(use_enable static-libs static) \
+ $(use_enable ssl openssl) \
+ --without-oci \
+ ${myconf}
+}
+
+src_compile() {
+ default_src_compile
+ if use doc; then
+ emake doc
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ # the --disable-static flag only skips .a
+ use static-libs || rm -f "${D}"/usr/lib*/libzdb.la
+
+ dodoc AUTHORS CHANGES README
+ if use doc;then
+ dohtml -r "${S}/doc/api-docs"/*
+ fi
+}
+
+src_test() {
+ emake verify
+}
diff --git a/dev-db/libzdb/libzdb-3.0.ebuild b/dev-db/libzdb/libzdb-3.0.ebuild
new file mode 100644
index 000000000000..a21cf467d7c8
--- /dev/null
+++ b/dev-db/libzdb/libzdb-3.0.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A thread safe high level multi-database connection pool library"
+HOMEPAGE="http://www.tildeslash.com/libzdb/"
+SRC_URI="http://www.tildeslash.com/${PN}/dist/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="debug doc mysql postgres +sqlite ssl static-libs"
+REQUIRED_USE=" || ( postgres mysql sqlite )"
+
+RESTRICT=test
+
+RDEPEND="mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql )
+ sqlite? ( >=dev-db/sqlite-3.7:3[unlock-notify(+)] )
+ ssl? ( dev-libs/openssl )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+src_prepare() {
+ sed -i -e "s|&& ./pool||g" test/Makefile.in || die
+}
+
+src_configure() {
+ ## TODO: check what --enable-optimized actually does
+ ## TODO: find someone with oracle db to add oci8 support
+ myconf=""
+ if [[ $(gcc-version) < 4.1 ]];then
+ myconf="${myconf} --disable-protected"
+ else
+ myconf="${myconf} --enable-protected"
+ fi
+
+ if use sqlite; then
+ myconf="${myconf} --with-sqlite=${EPREFIX}/usr/ --enable-sqliteunlock"
+ else
+ myconf="${myconf} --without-sqlite"
+ fi
+
+ if use mysql; then
+ myconf="${myconf} --with-mysql=${EPREFIX}/usr/bin/mysql_config"
+ else
+ myconf="${myconf} --without-mysql"
+ fi
+
+ if use postgres; then
+ myconf="${myconf} --with-postgresql=${EPREFIX}/usr/bin/pg_config"
+ else
+ myconf="${myconf} --without-postgresql"
+ fi
+
+ econf \
+ $(use_enable debug profiling) \
+ $(use_enable static-libs static) \
+ $(use_enable ssl openssl) \
+ --without-oci \
+ ${myconf}
+}
+
+src_compile() {
+ default_src_compile
+ if use doc; then
+ emake doc
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ # the --disable-static flag only skips .a
+ use static-libs || rm -f "${D}"/usr/lib*/libzdb.la
+
+ dodoc AUTHORS CHANGES README
+ if use doc;then
+ dohtml -r "${S}/doc/api-docs"/*
+ fi
+}
+
+src_test() {
+ emake verify
+}
diff --git a/dev-db/libzdb/libzdb-3.1.ebuild b/dev-db/libzdb/libzdb-3.1.ebuild
new file mode 100644
index 000000000000..4de988ae6ebd
--- /dev/null
+++ b/dev-db/libzdb/libzdb-3.1.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A thread safe high level multi-database connection pool library"
+HOMEPAGE="http://www.tildeslash.com/libzdb/"
+SRC_URI="http://www.tildeslash.com/${PN}/dist/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug doc mysql postgres +sqlite ssl static-libs"
+REQUIRED_USE=" || ( postgres mysql sqlite )"
+
+RESTRICT=test
+
+RDEPEND="mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql )
+ sqlite? ( >=dev-db/sqlite-3.7:3[unlock-notify(+)] )
+ ssl? ( dev-libs/openssl )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+src_prepare() {
+ sed -i -e "s|&& ./pool||g" test/Makefile.in || die
+}
+
+src_configure() {
+ ## TODO: check what --enable-optimized actually does
+ ## TODO: find someone with oracle db to add oci8 support
+ myconf=""
+ if [[ $(gcc-version) < 4.1 ]];then
+ myconf="${myconf} --disable-protected"
+ else
+ myconf="${myconf} --enable-protected"
+ fi
+
+ if use sqlite; then
+ myconf="${myconf} --with-sqlite=${EPREFIX}/usr/ --enable-sqliteunlock"
+ else
+ myconf="${myconf} --without-sqlite"
+ fi
+
+ if use mysql; then
+ myconf="${myconf} --with-mysql=${EPREFIX}/usr/bin/mysql_config"
+ else
+ myconf="${myconf} --without-mysql"
+ fi
+
+ if use postgres; then
+ myconf="${myconf} --with-postgresql=${EPREFIX}/usr/bin/pg_config"
+ else
+ myconf="${myconf} --without-postgresql"
+ fi
+
+ econf \
+ $(use_enable debug profiling) \
+ $(use_enable static-libs static) \
+ $(use_enable ssl openssl) \
+ --without-oci \
+ ${myconf}
+}
+
+src_compile() {
+ default_src_compile
+ if use doc; then
+ emake doc
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ # the --disable-static flag only skips .a
+ use static-libs || rm -f "${D}"/usr/lib*/libzdb.la
+
+ dodoc AUTHORS CHANGES README
+ if use doc;then
+ dohtml -r "${S}/doc/api-docs"/*
+ fi
+}
+
+src_test() {
+ emake verify
+}
diff --git a/dev-db/libzdb/metadata.xml b/dev-db/libzdb/metadata.xml
new file mode 100644
index 000000000000..947ae36c152a
--- /dev/null
+++ b/dev-db/libzdb/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>lordvan@gentoo.org</email>
+ <name>Thomas Raschbacher</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-db/lmdb++-0.9.14.0 b/dev-db/lmdb++-0.9.14.0
deleted file mode 100644
index a6a78e5cf5d1..000000000000
--- a/dev-db/lmdb++-0.9.14.0
+++ /dev/null
@@ -1,10 +0,0 @@
-DEFINED_PHASES=install
-DESCRIPTION=C++11 wrapper for the LMDB database library
-EAPI=5
-HOMEPAGE=http://lmdbxx.sourceforge.net/
-KEYWORDS=~amd64 ~x86
-LICENSE=public-domain
-RDEPEND=dev-db/lmdb
-SLOT=0
-SRC_URI=mirror://sourceforge/lmdbxx/0.9.14.0/lmdbxx-0.9.14.0.tar.gz
-_md5_=9d1450042627992c01b6e2f9af32d01a
diff --git a/dev-db/lmdb++/Manifest b/dev-db/lmdb++/Manifest
new file mode 100644
index 000000000000..00c44127cfc9
--- /dev/null
+++ b/dev-db/lmdb++/Manifest
@@ -0,0 +1,3 @@
+DIST lmdbxx-0.9.14.0.tar.gz 14732 BLAKE2B c6c1217dc7bd56051152cba594b7aa571a055e5c155f777639569abbe38360f808dcd2858ca124db97e37147aa4e90df68fd1a8d23137b5e6663df0c2f0a84be SHA512 8eff8c89e0cb9989d8a0cedfd483856aeb2fcf810d59cf8afca3086034711ff22f2bb88ba967ef745d36fdaa1b5e79fb75655af764cddcdb2ac59fc255da670d
+EBUILD lmdb++-0.9.14.0.ebuild 518 BLAKE2B a7e8a2b2a53ec733728e2009de90321be825b25b31c20605d0af0cf04bb4fc5e651a3c1a644e36ba8f87d82e34ab28efe13f03fe3b17797d2733eec2c89464e9 SHA512 74aaa80812d92bb1527a6af9549b88fac1515ffaefcbdfd8d4985741e2f7fa1f7049a5e38a032d7bb412e86c2e8b6a54d7230b37d6f2b21187847619d46dc75e
+MISC metadata.xml 572 BLAKE2B 30b5e6888e9d045f4faf6fc9e9b06dddb51532edf9e8ae379451add454b93622a1f06b16419c05b09106b6acfcd27103b239d0d050bff0bd9e7c074699858609 SHA512 6d715221bd0c7975cd9171a4091e3735571ad97bcaf72e3b5800f513268b6199a40d5dd0c854e87ff3a68f6f5ae3e9a689dd511a1dbedcad748c98ba5deb61e7
diff --git a/dev-db/lmdb++/lmdb++-0.9.14.0.ebuild b/dev-db/lmdb++/lmdb++-0.9.14.0.ebuild
new file mode 100644
index 000000000000..f87e4833db55
--- /dev/null
+++ b/dev-db/lmdb++/lmdb++-0.9.14.0.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MY_P="${P/lmdb++/lmdbxx}"
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="C++11 wrapper for the LMDB database library"
+HOMEPAGE="http://lmdbxx.sourceforge.net/"
+SRC_URI="mirror://sourceforge/lmdbxx/${PV}/${MY_P}.tar.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-db/lmdb"
+
+src_install() {
+ emake PREFIX="${D}/usr" install
+ dodoc AUTHORS CREDITS INSTALL README TODO UNLICENSE
+}
diff --git a/dev-db/lmdb++/metadata.xml b/dev-db/lmdb++/metadata.xml
new file mode 100644
index 000000000000..40459a804d71
--- /dev/null
+++ b/dev-db/lmdb++/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>nicolasbock@gentoo.org</email>
+ <name>Nicolas Bock</name>
+ </maintainer>
+ <longdescription lang="en">
+ This is a comprehensive C++ wrapper for the LMDB embedded database
+ library, offering both an error-checked procedural interface and an
+ object-oriented resource interface with RAII semantics.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">lmdbxx</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/lmdb-0.9.18 b/dev-db/lmdb-0.9.18
deleted file mode 100644
index 62620cc1ca50..000000000000
--- a/dev-db/lmdb-0.9.18
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install prepare
-DESCRIPTION=An ultra-fast, ultra-compact key-value embedded data store
-EAPI=5
-HOMEPAGE=http://symas.com/mdb/
-IUSE=static-libs
-KEYWORDS=alpha amd64 arm ~arm64 hppa ia64 ppc ppc64 s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris
-LICENSE=OPENLDAP
-RDEPEND=!=net-nds/openldap-2.4.40
-SLOT=0/0.9.18
-SRC_URI=https://github.com/LMDB/lmdb/archive/LMDB_0.9.18.tar.gz
-_eclasses_=multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=73feeed2b62e72e8928cfeceb8532e4f
diff --git a/dev-db/lmdb-0.9.19 b/dev-db/lmdb-0.9.19
deleted file mode 100644
index 09ab3ecc50aa..000000000000
--- a/dev-db/lmdb-0.9.19
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install prepare
-DESCRIPTION=An ultra-fast, ultra-compact key-value embedded data store
-EAPI=6
-HOMEPAGE=http://symas.com/mdb/
-IUSE=static-libs
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris
-LICENSE=OPENLDAP
-RDEPEND=!=net-nds/openldap-2.4.40
-SLOT=0/0.9.19
-SRC_URI=https://github.com/LMDB/lmdb/archive/LMDB_0.9.19.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=e9513931bc09f34aee509549bb7923e8
diff --git a/dev-db/lmdb-0.9.21-r1 b/dev-db/lmdb-0.9.21-r1
deleted file mode 100644
index 84c390ba76b9..000000000000
--- a/dev-db/lmdb-0.9.21-r1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DESCRIPTION=An ultra-fast, ultra-compact key-value embedded data store
-EAPI=6
-HOMEPAGE=http://symas.com/mdb/
-IUSE=static-libs abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris
-LICENSE=OPENLDAP
-RDEPEND=!=net-nds/openldap-2.4.40
-SLOT=0/0.9.21
-SRC_URI=https://github.com/LMDB/lmdb/archive/LMDB_0.9.21.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=ceb7089a67ce655afe05cd13399878c4
diff --git a/dev-db/lmdb/Manifest b/dev-db/lmdb/Manifest
new file mode 100644
index 000000000000..542969a236f5
--- /dev/null
+++ b/dev-db/lmdb/Manifest
@@ -0,0 +1,7 @@
+DIST LMDB_0.9.18.tar.gz 139156 BLAKE2B 6a8d32c6f203272a212d5e298f7d1af290c12a87680c3177521d1b10d0c42691dbdfdb3b49d467c97cf4c621ddef8e00bca0bbaa352203eeca66e8e294c0fa8b SHA512 394e88d99d446eb30771d7cf7a661584683a0d6d8e976cc561b5eecbb2a5d0817bbd59994002afa4eae6c86a39f05f50ebc2eff77cd70dd8c67225df4611f5e6
+DIST LMDB_0.9.19.tar.gz 143141 BLAKE2B 69f39e2194638989d8a17b79edd7918966d5608f4e611a7446b45e7321adf3b7d4bd69107fe00a1476d32cbd43b83f512c8498cefa3fca7eea8ba615821341fe SHA512 1d9825f09592ad92a540a1dec232cf6649f41cc67b0d59dc8958a71f4090f347c84995f32a166e2c2efecb862981f455814dd07af99bc3489e42fe3fd8bc6191
+DIST LMDB_0.9.21.tar.gz 143352 BLAKE2B de206eb03ebd0ed329127380a2aeac693280d9c1d7b61a4a36c42889169b28adab30ecfeff37487b9e36f4e953bc6587e54b7a49dfd0969f2dec99e45bd09654 SHA512 e0f998507da654ccac02aa199367e8363c37f47e06ee0984085aae60fb086e49087824915bf8896f90187f1cc96e5c9caf5e5f72fa3911415151ca1e56f0309f
+EBUILD lmdb-0.9.18.ebuild 1240 BLAKE2B aae6c699c43144b64199e09b34f3595ec80702a77f5b16376ac74fae53bdfc79017194ed5defb442dedf3e5da7d751859eec24c303417a912bf374bfe984ec77 SHA512 bb0a08d277a3667d4d1fd658f21077fd7b803526940e5ea559a8e12d772af62575abb7b546813d8c2aaa4c6db8834127b127c9b56c38d27e8711c4431ae3a803
+EBUILD lmdb-0.9.19.ebuild 1849 BLAKE2B d9e235c2aa7ff06d2b6cdf6b6e29544a02d1aaa7ae7248afdf661c3ba4ea0ddbb0e7ed9ec7796e73b1865a430a2a8380236a3206e54a8eca054ba95ff9e1d820 SHA512 791cca180d0d429d64f197a627dd8d94c48e8502d38011be358fc901e521cdb3996653b2cc0c519b9e1e5a58815134e99e64f09d50bcc72444eb2990ac2879ad
+EBUILD lmdb-0.9.21-r1.ebuild 1960 BLAKE2B b2686f3859333a1f60b4e1053e40e7214ed3196e35b88956ada044f6655c7ae3a472e999db56d08bfeeb3d6520853b1091dc6d8a321827e67903c87e8aebbe15 SHA512 288aec449c08655fe4572451f2960cd6c489158198fc787cb5ec3bd489578995f651bd5d13c36924ef35c2497dd157ae46a78dc9b5e18b31f913753a2a8157bf
+MISC metadata.xml 540 BLAKE2B b064697aa562165a627cb1be8cce847c8046d10cf184a4563a632c43ebd1916ad866e843efd49ae5659e379f3695514005b9d601117719c9f48652dab48dcea8 SHA512 7ff1fddaca73c5d7b4a6a9ada9a7aad60e16c8c7063ad5cd9cf57301f504f6e0fe53bf568dec83abf522c2c099d2b3b2463619df17077ebaa3b39bd67bd738c4
diff --git a/dev-db/lmdb/lmdb-0.9.18.ebuild b/dev-db/lmdb/lmdb-0.9.18.ebuild
new file mode 100644
index 000000000000..95346b1baed8
--- /dev/null
+++ b/dev-db/lmdb/lmdb-0.9.18.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit toolchain-funcs
+
+DESCRIPTION="An ultra-fast, ultra-compact key-value embedded data store"
+HOMEPAGE="http://symas.com/mdb/"
+SRC_URI="https://github.com/LMDB/lmdb/archive/LMDB_${PV}.tar.gz"
+
+LICENSE="OPENLDAP"
+SLOT="0/${PV}"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ppc ppc64 s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris"
+IUSE="static-libs"
+
+DEPEND=""
+# =net-nds/openldap-2.4.40 installs lmdb files.
+RDEPEND="!=net-nds/openldap-2.4.40"
+
+S="${WORKDIR}/${PN}-LMDB_${PV}/libraries/liblmdb"
+
+src_prepare() {
+ sed -i -e "s!^CC.*!CC = $(tc-getCC)!" \
+ -e "s!^CFLAGS.*!CFLAGS = ${CFLAGS}!" \
+ -e "s!^AR.*!AR = $(tc-getAR)!" \
+ -e "/^prefix/s!/usr/local!${EPREFIX}/usr!" \
+ -e "/^libdir/s!lib\$!$(get_libdir)!" \
+ -e "s!shared!shared -Wl,-soname,liblmdb.so.0!" \
+ "${S}/Makefile" || die
+}
+
+src_configure() {
+ :
+}
+
+src_compile() {
+ emake LDLIBS+=" -pthread"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ mv "${ED}"usr/$(get_libdir)/liblmdb.so{,.0} || die
+ dosym liblmdb.so.0 /usr/$(get_libdir)/liblmdb.so
+
+ use static-libs || rm "${ED}"usr/$(get_libdir)/liblmdb.a || die
+}
diff --git a/dev-db/lmdb/lmdb-0.9.19.ebuild b/dev-db/lmdb/lmdb-0.9.19.ebuild
new file mode 100644
index 000000000000..c8ac76bcd7cd
--- /dev/null
+++ b/dev-db/lmdb/lmdb-0.9.19.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit toolchain-funcs flag-o-matic multilib
+
+DESCRIPTION="An ultra-fast, ultra-compact key-value embedded data store"
+HOMEPAGE="http://symas.com/mdb/"
+SRC_URI="https://github.com/LMDB/lmdb/archive/LMDB_${PV}.tar.gz"
+
+LICENSE="OPENLDAP"
+SLOT="0/${PV}"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+IUSE="static-libs"
+
+DEPEND=""
+# =net-nds/openldap-2.4.40 installs lmdb files.
+RDEPEND="!=net-nds/openldap-2.4.40"
+
+S="${WORKDIR}/${PN}-LMDB_${PV}/libraries/liblmdb"
+
+src_prepare() {
+ local soname="-Wl,-soname,liblmdb$(get_libname 0)"
+ [[ ${CHOST} == *-darwin* ]] && \
+ soname="-dynamiclib -install_name ${EPREFIX}/usr/$(get_libdir)/liblmdb$(get_libname 0)"
+ sed -i -e "s!^CC.*!CC = $(tc-getCC)!" \
+ -e "s!^CFLAGS.*!CFLAGS = ${CFLAGS}!" \
+ -e "s!^AR.*!AR = $(tc-getAR)!" \
+ -e "s!^SOEXT.*!SOEXT = $(get_libname)!" \
+ -e "/^prefix/s!/usr/local!${EPREFIX}/usr!" \
+ -e "/^libdir/s!lib\$!$(get_libdir)!" \
+ -e "s!shared!shared ${soname}!" \
+ "${S}/Makefile" || die
+ eapply_user
+}
+
+src_configure() {
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ # ensure sigwait has a second sig argument
+ append-cppflags -D_POSIX_PTHREAD_SEMANTICS
+ # fdatasync lives in -lrt on Solaris 10
+ [[ ${CHOST#*-solaris2.} -le 10 ]] && append-ldflags -lrt
+ fi
+}
+
+src_compile() {
+ emake LDLIBS+=" -pthread"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ mv "${ED}"usr/$(get_libdir)/liblmdb$(get_libname) \
+ "${ED}"usr/$(get_libdir)/liblmdb$(get_libname 0) || die
+ dosym liblmdb$(get_libname 0) /usr/$(get_libdir)/liblmdb$(get_libname)
+
+ use static-libs || rm "${ED}"usr/$(get_libdir)/liblmdb.a || die
+}
diff --git a/dev-db/lmdb/lmdb-0.9.21-r1.ebuild b/dev-db/lmdb/lmdb-0.9.21-r1.ebuild
new file mode 100644
index 000000000000..4a0589b13fe3
--- /dev/null
+++ b/dev-db/lmdb/lmdb-0.9.21-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit toolchain-funcs flag-o-matic multilib-minimal
+
+DESCRIPTION="An ultra-fast, ultra-compact key-value embedded data store"
+HOMEPAGE="http://symas.com/mdb/"
+SRC_URI="https://github.com/LMDB/lmdb/archive/LMDB_${PV}.tar.gz"
+
+LICENSE="OPENLDAP"
+SLOT="0/${PV}"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+IUSE="static-libs"
+
+DEPEND=""
+# =net-nds/openldap-2.4.40 installs lmdb files.
+RDEPEND="!=net-nds/openldap-2.4.40"
+
+S="${WORKDIR}/${PN}-LMDB_${PV}/libraries/liblmdb"
+
+src_prepare() {
+ eapply_user
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local soname="-Wl,-soname,liblmdb$(get_libname 0)"
+ [[ ${CHOST} == *-darwin* ]] && \
+ soname="-dynamiclib -install_name ${EPREFIX}/usr/$(get_libdir)/liblmdb$(get_libname 0)"
+ sed -i -e "s!^CC.*!CC = $(tc-getCC)!" \
+ -e "s!^CFLAGS.*!CFLAGS = ${CFLAGS}!" \
+ -e "s!^AR.*!AR = $(tc-getAR)!" \
+ -e "s!^SOEXT.*!SOEXT = $(get_libname)!" \
+ -e "/^prefix/s!/usr/local!${EPREFIX}/usr!" \
+ -e "/^libdir/s!lib\$!$(get_libdir)!" \
+ -e "s!shared!shared ${soname}!" \
+ "Makefile" || die
+
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ # ensure sigwait has a second sig argument
+ append-cppflags -D_POSIX_PTHREAD_SEMANTICS
+ # fdatasync lives in -lrt on Solaris 10
+ [[ ${CHOST#*-solaris2.} -le 10 ]] && append-ldflags -lrt
+ fi
+}
+
+multilib_src_compile() {
+ emake LDLIBS+=" -pthread"
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+
+ mv "${ED}"usr/$(get_libdir)/liblmdb$(get_libname) \
+ "${ED}"usr/$(get_libdir)/liblmdb$(get_libname 0) || die
+ dosym liblmdb$(get_libname 0) /usr/$(get_libdir)/liblmdb$(get_libname)
+
+ use static-libs || rm "${ED}"usr/$(get_libdir)/liblmdb.a || die
+}
diff --git a/dev-db/lmdb/metadata.xml b/dev-db/lmdb/metadata.xml
new file mode 100644
index 000000000000..160bf60c274e
--- /dev/null
+++ b/dev-db/lmdb/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <longdescription lang="en">
+ An ultra-fast, ultra-compact key-value embedded data store
+</longdescription>
+ <maintainer type="person">
+ <email>eras@gentoo.org</email>
+ <name>Eray Aslan</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>ldap-bugs@gentoo.org</email>
+ <name>Gentoo LDAP Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">LMDB/lmdb</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/m17n-db-1.7.0 b/dev-db/m17n-db-1.7.0
deleted file mode 100644
index 4756e386d355..000000000000
--- a/dev-db/m17n-db-1.7.0
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=install
-DEPEND=sys-devel/gettext
-DESCRIPTION=Database for the m17n library
-EAPI=6
-HOMEPAGE=https://savannah.nongnu.org/projects/m17n https://git.savannah.nongnu.org/cgit/m17n/m17n-db.git
-KEYWORDS=alpha amd64 arm ~arm64 hppa ia64 ppc ppc64 ~sh sparc x86
-LICENSE=LGPL-2.1
-RDEPEND=!dev-db/m17n-contrib virtual/libintl
-SLOT=0
-SRC_URI=mirror://nongnu/m17n/m17n-db-1.7.0.tar.gz
-_md5_=9196ec35befe66b3d04f313e9495c71f
diff --git a/dev-db/m17n-db/Manifest b/dev-db/m17n-db/Manifest
new file mode 100644
index 000000000000..2ca1f66ac692
--- /dev/null
+++ b/dev-db/m17n-db/Manifest
@@ -0,0 +1,3 @@
+DIST m17n-db-1.7.0.tar.gz 1939608 BLAKE2B 1b79e6ad32336a9ce34e14a52907b4064c410f70e356797ef59b1c9b8c83180453d820475b4dfb486eb1eb1d063607274b561a5120a60db0e0cfccad53d67eca SHA512 02c3cb347e9f5c840a723de9ed85be84fc9fb5f86d4963f0d1c6b669045d37d10e5efcf5ac0e0c3cb7249fb391b0dd32bd50fbc3332455aaf0b49d96fc09b2f2
+EBUILD m17n-db-1.7.0.ebuild 591 BLAKE2B c37f5b27b15f1503546df1ef7ddfccf41c7cd9ed718c0f126d45c55d0f18ce0d3f23067a625d5ddb60feccaae75c88c5484b59c37d76991f3ea2dc42a873515f SHA512 73641f583af3e34fb6b53ff61eca5e976a926a52d035bf96e56183baa8e31985762cb02739d8bf11dc7a49e3522d0090b5d81ef2266e3a3002619dd008fcac85
+MISC metadata.xml 240 BLAKE2B 3e01f599fdbafa5c02b594007c673bcfcccb41559bd2f42d7ea60a1f13932335cecf353c1216e8feba4bb091385b57f05c4c8b3c62eed6c7bea41e308fc6115c SHA512 12aaa73d9b690de68a5c7b20e214ceb099efa87884b784eafd994f26032b44dcb66e7feac8a5b1df7f349ac05c5a198a7593dff2cc686de158cb21e4c54f38dd
diff --git a/dev-db/m17n-db/m17n-db-1.7.0.ebuild b/dev-db/m17n-db/m17n-db-1.7.0.ebuild
new file mode 100644
index 000000000000..0083417f8f4c
--- /dev/null
+++ b/dev-db/m17n-db/m17n-db-1.7.0.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+DESCRIPTION="Database for the m17n library"
+HOMEPAGE="https://savannah.nongnu.org/projects/m17n https://git.savannah.nongnu.org/cgit/m17n/m17n-db.git"
+SRC_URI="mirror://nongnu/m17n/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ppc ppc64 ~sh sparc x86"
+IUSE=""
+
+DEPEND="sys-devel/gettext"
+RDEPEND="!dev-db/m17n-contrib
+ virtual/libintl"
+
+src_install() {
+ default
+
+ docinto FORMATS
+ dodoc FORMATS/*
+
+ docinto UNIDATA
+ dodoc UNIDATA/*
+}
diff --git a/dev-db/m17n-db/metadata.xml b/dev-db/m17n-db/metadata.xml
new file mode 100644
index 000000000000..e1a49f498885
--- /dev/null
+++ b/dev-db/m17n-db/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>cjk@gentoo.org</email>
+ <name>Cjk</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-db/maatkit-7540-r1 b/dev-db/maatkit-7540-r1
deleted file mode 100644
index a23b387675eb..000000000000
--- a/dev-db/maatkit-7540-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst prepare test unpack
-DEPEND=dev-perl/DBI dev-perl/DBD-mysql virtual/perl-Time-HiRes udf? ( dev-db/mysql ) virtual/perl-ExtUtils-MakeMaker dev-lang/perl[-build(-)] dev-lang/perl[-build(-)]
-DESCRIPTION=essential command-line utilities for MySQL
-EAPI=5
-HOMEPAGE=http://www.maatkit.org/
-IUSE=udf
-KEYWORDS=amd64 x86 ~amd64-linux ~x86-linux ~ppc-macos
-LICENSE=GPL-2
-RDEPEND=dev-perl/DBI dev-perl/DBD-mysql virtual/perl-Time-HiRes virtual/perl-Getopt-Long virtual/perl-Time-Local virtual/perl-Digest-MD5 virtual/perl-IO-Compress virtual/perl-File-Temp virtual/perl-File-Spec virtual/perl-Time-HiRes virtual/perl-Scalar-List-Utils dev-perl/TermReadKey dev-lang/perl[-build(-)] dev-lang/perl[-build(-)]
-SLOT=0
-SRC_URI=https://maatkit.googlecode.com/files/maatkit-7540.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 perl-app 4b65c2afee485a204b0b22518141ae47 perl-functions 01e8c68d5a528bbcda4d3c60205983df perl-module 863b35d127db98823d439f8d73c2d011 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=902d28095bc05a8a73ab33a5dcda39bd
diff --git a/dev-db/maatkit/Manifest b/dev-db/maatkit/Manifest
new file mode 100644
index 000000000000..4fedc66f416b
--- /dev/null
+++ b/dev-db/maatkit/Manifest
@@ -0,0 +1,3 @@
+DIST maatkit-7540.tar.gz 1312812 BLAKE2B fae133ac0fc95b6c824eccdd156941d6cc6693dda21756752b5f9244d4053b0d13d1464ab4dbb09b95da5385638f72f2e0c91c3ac64eeece0ad387324d8d01a9 SHA512 98cb44a5ebce09322b4d9a8cfa9e14e2ccb54ef9e0e8a95ee92b0fee5277f06157415152566497893488967735049d95c6efadc0d57c8a70060c7bc714afef9a
+EBUILD maatkit-7540-r1.ebuild 2648 BLAKE2B ff112cd9ecda8f35c52391c3956c9463c19ddd570a7752b4ad1f27307e36b9d3233365f38183d746c81b7654c5fafc4ae735c72031cfdc734c6d07333e1f0da9 SHA512 50bb20b8ed8f7cfe42e672c43803f62cc97756fd268be02e6166e7b184cf2671e8447aa7f12ec29c71872a493fa2b807318faaf62fa1ea94a95aa652bfef33eb
+MISC metadata.xml 775 BLAKE2B 42baf6e88495b073634b1c2ab46d2c160f01d654eaa59eff895a2df183ec0db8695032a55683240afa7c37e970bf57d1c51f7d282e83bc8beedb8cb16fea2ff8 SHA512 280bda9b191976c9b96f2916c93f2d3b29fdcdffe25c2465246d4752023d0c640660206447e9d20922e627e3d789e030f41f4750642ff2f5fffce07f3d59db4a
diff --git a/dev-db/maatkit/maatkit-7540-r1.ebuild b/dev-db/maatkit/maatkit-7540-r1.ebuild
new file mode 100644
index 000000000000..9cefb50cea68
--- /dev/null
+++ b/dev-db/maatkit/maatkit-7540-r1.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit perl-app perl-module toolchain-funcs
+
+DESCRIPTION="essential command-line utilities for MySQL"
+HOMEPAGE="http://www.maatkit.org/"
+SRC_URI="https://maatkit.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="udf"
+
+COMMON_DEPEND="dev-perl/DBI
+ dev-perl/DBD-mysql
+ virtual/perl-Time-HiRes"
+RDEPEND="${COMMON_DEPEND}
+ virtual/perl-Getopt-Long
+ virtual/perl-Time-Local
+ virtual/perl-Digest-MD5
+ virtual/perl-IO-Compress
+ virtual/perl-File-Temp
+ virtual/perl-File-Spec
+ virtual/perl-Time-HiRes
+ virtual/perl-Scalar-List-Utils
+ dev-perl/TermReadKey"
+DEPEND="${COMMON_DEPEND}
+ udf? ( dev-db/mysql )
+ virtual/perl-ExtUtils-MakeMaker"
+
+mysql-udf_src_compile() {
+ local udfdir="${T}/udf/"
+ mkdir -p "${udfdir}"
+
+ local udfname udffile udfext udfoutpath
+ udfname="${1}"
+ udfext=".so"
+ udffile="${udfname}${udfext}"
+ udfoutpath="${udfdir}/${udffile}"
+ shift
+ CXX="$(tc-getCXX)"
+ local src="$@"
+ if [ -z "$@" ]; then
+ src="${udfname}.cc"
+ fi
+ for f in ${src} ; do
+ [ -f "${f}" ] || \
+ die "UDF ${udfname}: Cannot find source file ${f} to compile"
+ done
+ einfo "UDF ${udfname}: compiling from ${src}"
+ ${CXX} \
+ ${CXXFLAGS} -I/usr/include/mysql \
+ ${LDFLAGS} -fPIC -shared -o "${udfoutpath}" $src \
+ || die "UDF ${udfname}: Failed to compile"
+}
+
+mysql-udf_src_install() {
+ local udfdir="${T}/udf/"
+ local udfname udfext udffile udfoutpath
+ udfname="${1}"
+ udfext=".so"
+ udffile="${udfname}${udfext}"
+ udfoutpath="${udfdir}/${udffile}"
+ insinto /usr/$(get_libdir)/mysql/plugins
+ doins "${udfoutpath}"
+}
+
+udf_done_intro=0
+mysql-udf_pkg_postinst() {
+ local udfname udffile udfext udffunc udfreturn
+ udfname="${1}"
+ udfext=".so"
+ udffile="${udfname}${udfext}"
+ udffunc="${2}"
+ udfreturn="${3}"
+ if [ ${udf_done_intro} -eq 0 ]; then
+ elog "To use the UDFs that were built:"
+ elog "Update your configuration to include 'plugin_dir=/usr/$(get_libdir)/mysql/plugins'"
+ elog "Issue the following commands as a user with FUNCTION privileges:"
+ udf_done_intro=1
+ fi
+ elog "CREATE FUNCTION ${udffunc} RETURNS ${udfreturn} SONAME '${udffile}'"
+}
+
+src_compile() {
+ perl-app_src_compile
+ if use udf; then
+ cd "${S}"/udf
+ mysql-udf_src_compile murmur_udf
+ mysql-udf_src_compile fnv_udf
+ fi
+}
+
+src_install() {
+ perl-module_src_install
+ if use udf; then
+ mysql-udf_src_install murmur_udf
+ mysql-udf_src_install fnv_udf
+ fi
+}
+
+pkg_postinst() {
+ if use udf; then
+ mysql-udf_pkg_postinst murmur_udf murmur_hash INTEGER
+ mysql-udf_pkg_postinst fnv_udf fnv_64 INTEGER
+ fi
+}
diff --git a/dev-db/maatkit/metadata.xml b/dev-db/maatkit/metadata.xml
new file mode 100644
index 000000000000..0e4bad3f0f4f
--- /dev/null
+++ b/dev-db/maatkit/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>idl0r@gentoo.org</email>
+ <name>Christian Ruppert</name>
+ </maintainer>
+ <longdescription>maatkit, formerly MySQL Toolkit, is a collection of command-line utilities that
+provide missing functionality for MySQL. Some of the tools implement lacking
+server functionality, such as online consistency checks for master/slave
+replication; others are client-side utilities such as a query profiler.</longdescription>
+ <use>
+ <flag name="udf">Build the MySQL UDFs shipped with maatkit, requires non-minimal MySQL</flag>
+ </use>
+ <upstream>
+ <remote-id type="google-code">maatkit</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/mariadb-10.0.33 b/dev-db/mariadb-10.0.33
deleted file mode 100644
index 1dbb3592f6f3..000000000000
--- a/dev-db/mariadb-10.0.33
+++ /dev/null
@@ -1,16 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst preinst prepare pretend setup test unpack
-DEPEND=|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) ) !bindist? ( >=sys-libs/readline-4.1:0= ) server? ( extraengine? ( odbc? ( dev-db/unixODBC:0= ) xml? ( dev-libs/libxml2:2= ) sys-libs/zlib[minizip] ) oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= ) pam? ( virtual/pam:0= ) tokudb? ( app-arch/snappy ) ) >=dev-libs/libpcre-8.41-r1:3=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] jdbc? ( >=dev-java/java-config-2.2.0-r3 ) virtual/pkgconfig sys-devel/make >=dev-util/cmake-3.9.6 kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 !dev-db/mariadb-native-client[mysqlcompat] jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) openssl? ( >=dev-libs/openssl-1.0.0:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) >=sys-libs/zlib-1.2.3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] sys-libs/ncurses:0= virtual/yacc static? ( sys-libs/ncurses[static-libs] )
-DESCRIPTION=An enhanced, drop-in replacement for MySQL
-EAPI=6
-HOMEPAGE=https://mariadb.org/
-IUSE=bindist jdbc odbc oqgraph pam sphinx tokudb xml elibc_FreeBSD jdbc abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64 debug embedded extraengine jemalloc latin1 libressl +openssl +perl profiling selinux +server systemtap static static-libs tcmalloc test yassl
-KEYWORDS=alpha amd64 arm ~arm64 ~hppa ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris
-LICENSE=GPL-2
-PDEPEND=perl? ( >=dev-perl/DBD-mysql-2.9004 ) server? ( ~virtual/mysql-5.6[embedded=,static=] ) virtual/libmysqlclient:0/18[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs=]
-RDEPEND=!bindist? ( >=sys-libs/readline-4.1:0= ) server? ( extraengine? ( odbc? ( dev-db/unixODBC:0= ) xml? ( dev-libs/libxml2:2= ) sys-libs/zlib[minizip] ) oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= ) pam? ( virtual/pam:0= ) tokudb? ( app-arch/snappy ) ) >=dev-libs/libpcre-8.41-r1:3=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] perl? ( !dev-db/mytop virtual/perl-Getopt-Long dev-perl/TermReadKey virtual/perl-Term-ANSIColor virtual/perl-Time-HiRes ) server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) ) jdbc? ( >=dev-java/java-config-2.2.0-r3 ) kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 !dev-db/mariadb-native-client[mysqlcompat] jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) openssl? ( >=dev-libs/openssl-1.0.0:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) >=sys-libs/zlib-1.2.3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] sys-libs/ncurses:0= selinux? ( sec-policy/selinux-mysql ) !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster server? ( !prefix? ( dev-db/mysql-init-scripts ) ) !<virtual/mysql-5.6-r4
-REQUIRED_USE=jdbc? ( extraengine server !static ) server? ( tokudb? ( jemalloc !tcmalloc ) ) static? ( !pam ) ^^ ( yassl openssl libressl ) !server? ( !extraengine !embedded ) ?? ( tcmalloc jemalloc ) static? ( !libressl !openssl yassl )
-RESTRICT=!bindist? ( bindist )
-SLOT=0/18
-SRC_URI=https://downloads.mariadb.org/interstitial/mariadb-10.0.33/source/mariadb-10.0.33.tar.gz mirror://gentoo/mysql-extras-20170926-1321Z.tar.bz2 https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-20170926-1321Z.tar.bz2 https://dev.gentoo.org/~grknight/distfiles/mysql-extras-20170926-1321Z.tar.bz2 https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-20170926-1321Z.tar.bz2 https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-20170926-1321Z.tar.bz2
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 multiprocessing cac3169468f893670dac3e7cb940e045 mysql-multilib-r1 9823899e303dd74138fef85f4a116e13 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=b8617954e34db11654285303d23d338c
diff --git a/dev-db/mariadb-10.0.34 b/dev-db/mariadb-10.0.34
deleted file mode 100644
index 602fbdbee513..000000000000
--- a/dev-db/mariadb-10.0.34
+++ /dev/null
@@ -1,16 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst preinst prepare pretend setup test unpack
-DEPEND=|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) ) !bindist? ( >=sys-libs/readline-4.1:0= ) server? ( extraengine? ( odbc? ( dev-db/unixODBC:0= ) xml? ( dev-libs/libxml2:2= ) sys-libs/zlib[minizip] ) oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= ) pam? ( virtual/pam:0= ) tokudb? ( app-arch/snappy ) ) >=dev-libs/libpcre-8.41-r1:3=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] jdbc? ( >=dev-java/java-config-2.2.0-r3 ) virtual/pkgconfig sys-devel/make >=dev-util/cmake-3.9.6 kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 !dev-db/mariadb-native-client[mysqlcompat] jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) openssl? ( >=dev-libs/openssl-1.0.0:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) >=sys-libs/zlib-1.2.3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] sys-libs/ncurses:0= virtual/yacc static? ( sys-libs/ncurses[static-libs] )
-DESCRIPTION=An enhanced, drop-in replacement for MySQL
-EAPI=6
-HOMEPAGE=https://mariadb.org/
-IUSE=bindist jdbc odbc oqgraph pam sphinx tokudb xml elibc_FreeBSD jdbc abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64 debug embedded extraengine jemalloc latin1 libressl +openssl +perl profiling selinux +server systemtap static static-libs tcmalloc test yassl
-KEYWORDS=~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris
-LICENSE=GPL-2
-PDEPEND=perl? ( >=dev-perl/DBD-mysql-2.9004 ) server? ( ~virtual/mysql-5.6[embedded=,static=] ) virtual/libmysqlclient:0/18[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs=]
-RDEPEND=!bindist? ( >=sys-libs/readline-4.1:0= ) server? ( extraengine? ( odbc? ( dev-db/unixODBC:0= ) xml? ( dev-libs/libxml2:2= ) sys-libs/zlib[minizip] ) oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= ) pam? ( virtual/pam:0= ) tokudb? ( app-arch/snappy ) ) >=dev-libs/libpcre-8.41-r1:3=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] perl? ( !dev-db/mytop virtual/perl-Getopt-Long dev-perl/TermReadKey virtual/perl-Term-ANSIColor virtual/perl-Time-HiRes ) server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) ) jdbc? ( >=dev-java/java-config-2.2.0-r3 ) kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 !dev-db/mariadb-native-client[mysqlcompat] jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) openssl? ( >=dev-libs/openssl-1.0.0:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) >=sys-libs/zlib-1.2.3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] sys-libs/ncurses:0= selinux? ( sec-policy/selinux-mysql ) !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster server? ( !prefix? ( dev-db/mysql-init-scripts ) ) !<virtual/mysql-5.6-r4
-REQUIRED_USE=jdbc? ( extraengine server !static ) server? ( tokudb? ( jemalloc !tcmalloc ) ) static? ( !pam ) ^^ ( yassl openssl libressl ) !server? ( !extraengine !embedded ) ?? ( tcmalloc jemalloc ) static? ( !libressl !openssl yassl )
-RESTRICT=!bindist? ( bindist )
-SLOT=0/18
-SRC_URI=https://downloads.mariadb.org/interstitial/mariadb-10.0.34/source/mariadb-10.0.34.tar.gz mirror://gentoo/mysql-extras-20170926-1321Z.tar.bz2 https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-20170926-1321Z.tar.bz2 https://dev.gentoo.org/~grknight/distfiles/mysql-extras-20170926-1321Z.tar.bz2 https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-20170926-1321Z.tar.bz2 https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-20170926-1321Z.tar.bz2
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 multiprocessing cac3169468f893670dac3e7cb940e045 mysql-multilib-r1 9823899e303dd74138fef85f4a116e13 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=909e1559ae17b87fd03ceebc440cbfb8
diff --git a/dev-db/mariadb-10.0.35 b/dev-db/mariadb-10.0.35
deleted file mode 100644
index 843857eadc9d..000000000000
--- a/dev-db/mariadb-10.0.35
+++ /dev/null
@@ -1,16 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst preinst prepare pretend setup test unpack
-DEPEND=|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) ) !bindist? ( >=sys-libs/readline-4.1:0= ) server? ( extraengine? ( odbc? ( dev-db/unixODBC:0= ) xml? ( dev-libs/libxml2:2= ) sys-libs/zlib[minizip] ) oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= ) pam? ( virtual/pam:0= ) tokudb? ( app-arch/snappy ) ) >=dev-libs/libpcre-8.41-r1:3=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] openssl? ( !>=dev-libs/openssl-1.1 ) jdbc? ( >=dev-java/java-config-2.2.0-r3 ) virtual/pkgconfig sys-devel/make >=dev-util/cmake-3.9.6 kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 !dev-db/mariadb-native-client[mysqlcompat] jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) openssl? ( >=dev-libs/openssl-1.0.0:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) >=sys-libs/zlib-1.2.3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] sys-libs/ncurses:0= virtual/yacc static? ( sys-libs/ncurses[static-libs] )
-DESCRIPTION=An enhanced, drop-in replacement for MySQL
-EAPI=6
-HOMEPAGE=https://mariadb.org/
-IUSE=bindist jdbc odbc oqgraph pam sphinx tokudb xml elibc_FreeBSD jdbc abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64 debug embedded extraengine jemalloc latin1 libressl +openssl +perl profiling selinux +server systemtap static static-libs tcmalloc test yassl
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris
-LICENSE=GPL-2
-PDEPEND=perl? ( >=dev-perl/DBD-mysql-2.9004 ) server? ( ~virtual/mysql-5.6[embedded=,static=] ) virtual/libmysqlclient:0/18[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs=]
-RDEPEND=!bindist? ( >=sys-libs/readline-4.1:0= ) server? ( extraengine? ( odbc? ( dev-db/unixODBC:0= ) xml? ( dev-libs/libxml2:2= ) sys-libs/zlib[minizip] ) oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= ) pam? ( virtual/pam:0= ) tokudb? ( app-arch/snappy ) ) >=dev-libs/libpcre-8.41-r1:3=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] openssl? ( !>=dev-libs/openssl-1.1 ) perl? ( !dev-db/mytop virtual/perl-Getopt-Long dev-perl/TermReadKey virtual/perl-Term-ANSIColor virtual/perl-Time-HiRes ) server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) ) jdbc? ( >=dev-java/java-config-2.2.0-r3 ) kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 !dev-db/mariadb-native-client[mysqlcompat] jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) openssl? ( >=dev-libs/openssl-1.0.0:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) >=sys-libs/zlib-1.2.3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] sys-libs/ncurses:0= selinux? ( sec-policy/selinux-mysql ) !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster server? ( !prefix? ( dev-db/mysql-init-scripts ) ) !<virtual/mysql-5.6-r4
-REQUIRED_USE=jdbc? ( extraengine server !static ) server? ( tokudb? ( jemalloc !tcmalloc ) ) static? ( !pam ) ^^ ( yassl openssl libressl ) !server? ( !extraengine !embedded ) ?? ( tcmalloc jemalloc ) static? ( !libressl !openssl yassl )
-RESTRICT=!bindist? ( bindist )
-SLOT=0/18
-SRC_URI=https://downloads.mariadb.org/interstitial/mariadb-10.0.35/source/mariadb-10.0.35.tar.gz mirror://gentoo/mysql-extras-20170926-1321Z.tar.bz2 https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-20170926-1321Z.tar.bz2 https://dev.gentoo.org/~grknight/distfiles/mysql-extras-20170926-1321Z.tar.bz2 https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-20170926-1321Z.tar.bz2 https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-20170926-1321Z.tar.bz2
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 multiprocessing cac3169468f893670dac3e7cb940e045 mysql-multilib-r1 9823899e303dd74138fef85f4a116e13 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=9c67dcd2c387a2bb09a1cd417faad65b
diff --git a/dev-db/mariadb-10.0.35-r2 b/dev-db/mariadb-10.0.35-r2
deleted file mode 100644
index b9710dd95546..000000000000
--- a/dev-db/mariadb-10.0.35-r2
+++ /dev/null
@@ -1,16 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst preinst prepare setup test unpack
-DEPEND=virtual/yacc static? ( sys-libs/ncurses[static-libs] ) || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) ) kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) !yassl? ( !libressl? ( dev-libs/openssl:0= !>=dev-libs/openssl-1.1 ) libressl? ( dev-libs/libressl:0= ) ) >=sys-libs/zlib-1.2.3:0= sys-libs/ncurses:0= !bindist? ( >=sys-libs/readline-4.1:0= ) server? ( extraengine? ( odbc? ( dev-db/unixODBC:0= ) xml? ( dev-libs/libxml2:2= ) ) numa? ( sys-process/numactl ) oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= ) pam? ( virtual/pam:0= ) tokudb? ( app-arch/snappy ) ) >=dev-libs/libpcre-8.41-r1:3= !client-libs? ( dev-db/mysql-connector-c[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) jdbc? ( >=dev-java/java-config-2.2.0-r3 ) sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=An enhanced, drop-in replacement for MySQL
-EAPI=6
-HOMEPAGE=https://mariadb.org/
-IUSE=bindist client-libs debug extraengine jdbc jemalloc latin1 libressl numa odbc oqgraph pam +perl profiling selinux +server sphinx static static-libs systemtap tcmalloc test tokudb xml yassl elibc_FreeBSD jdbc abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris
-LICENSE=GPL-2
-PDEPEND=perl? ( >=dev-perl/DBD-mysql-2.9004 )
-RDEPEND=selinux? ( sec-policy/selinux-mysql ) client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c ) !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster server? ( !prefix? ( dev-db/mysql-init-scripts ) ) kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) !yassl? ( !libressl? ( dev-libs/openssl:0= !>=dev-libs/openssl-1.1 ) libressl? ( dev-libs/libressl:0= ) ) >=sys-libs/zlib-1.2.3:0= sys-libs/ncurses:0= !bindist? ( >=sys-libs/readline-4.1:0= ) server? ( extraengine? ( odbc? ( dev-db/unixODBC:0= ) xml? ( dev-libs/libxml2:2= ) ) numa? ( sys-process/numactl ) oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= ) pam? ( virtual/pam:0= ) tokudb? ( app-arch/snappy ) ) >=dev-libs/libpcre-8.41-r1:3= !client-libs? ( dev-db/mysql-connector-c[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) perl? ( !dev-db/mytop virtual/perl-Getopt-Long dev-perl/TermReadKey virtual/perl-Term-ANSIColor virtual/perl-Time-HiRes ) server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) ) jdbc? ( >=dev-java/java-config-2.2.0-r3 )
-REQUIRED_USE=jdbc? ( extraengine server !static ) server? ( tokudb? ( jemalloc !tcmalloc ) ) ?? ( tcmalloc jemalloc ) static? ( yassl !pam )
-RESTRICT=!bindist? ( bindist ) libressl? ( test )
-SLOT=0/18
-SRC_URI=https://downloads.mariadb.org/interstitial/mariadb-10.0.35/source/mariadb-10.0.35.tar.gz mirror://gentoo/mysql-extras-20180515-1334Z.tar.bz2 https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-20180515-1334Z.tar.bz2 https://dev.gentoo.org/~grknight/distfiles/mysql-extras-20180515-1334Z.tar.bz2 https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-20180515-1334Z.tar.bz2 https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-20180515-1334Z.tar.bz2
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=0d60212e0d273034454d090eecc40a7a
diff --git a/dev-db/mariadb-10.1.29 b/dev-db/mariadb-10.1.29
deleted file mode 100644
index e3bc80c16cab..000000000000
--- a/dev-db/mariadb-10.1.29
+++ /dev/null
@@ -1,16 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst preinst prepare pretend setup test unpack
-DEPEND=|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) ) mroonga? ( app-text/groonga-normalizer-mysql ) kerberos? ( virtual/krb5[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) !bindist? ( sys-libs/binutils-libs:0= >=sys-libs/readline-4.1:0= ) server? ( backup? ( app-arch/libarchive:0= ) cracklib? ( sys-libs/cracklib:0= ) extraengine? ( odbc? ( dev-db/unixODBC:0= ) xml? ( dev-libs/libxml2:2= ) sys-libs/zlib[minizip] ) innodb-lz4? ( app-arch/lz4 ) innodb-lzo? ( dev-libs/lzo ) innodb-snappy? ( app-arch/snappy ) oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= ) pam? ( virtual/pam:0= ) systemd? ( sys-apps/systemd:= ) tokudb? ( app-arch/snappy ) ) >=dev-libs/libpcre-8.41-r1:3= jdbc? ( >=dev-java/java-config-2.2.0-r3 ) virtual/pkgconfig sys-devel/make >=dev-util/cmake-3.9.6 kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 !dev-db/mariadb-native-client[mysqlcompat] jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) openssl? ( >=dev-libs/openssl-1.0.0:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) >=sys-libs/zlib-1.2.3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] sys-libs/ncurses:0= virtual/yacc static? ( sys-libs/ncurses[static-libs] )
-DESCRIPTION=An enhanced, drop-in replacement for MySQL
-EAPI=6
-HOMEPAGE=https://mariadb.org/
-IUSE=+backup bindist cracklib galera kerberos innodb-lz4 innodb-lzo innodb-snappy jdbc mroonga odbc oqgraph pam sphinx sst-rsync sst-mariabackup sst-xtrabackup tokudb systemd xml elibc_FreeBSD jdbc abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64 debug embedded extraengine jemalloc latin1 libressl +openssl +perl profiling selinux +server systemtap static static-libs tcmalloc test yassl
-KEYWORDS=alpha amd64 arm ~arm64 ~hppa ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris
-LICENSE=GPL-2
-PDEPEND=galera? ( sst-xtrabackup? ( || ( >=dev-db/percona-xtrabackup-bin-2.2.4 dev-db/percona-xtrabackup ) ) ) perl? ( >=dev-perl/DBD-mysql-2.9004 ) server? ( ~virtual/mysql-5.6[embedded=,static=] ) virtual/libmysqlclient:0/18[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs=]
-RDEPEND=mroonga? ( app-text/groonga-normalizer-mysql ) kerberos? ( virtual/krb5[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) !bindist? ( sys-libs/binutils-libs:0= >=sys-libs/readline-4.1:0= ) server? ( backup? ( app-arch/libarchive:0= ) cracklib? ( sys-libs/cracklib:0= ) extraengine? ( odbc? ( dev-db/unixODBC:0= ) xml? ( dev-libs/libxml2:2= ) sys-libs/zlib[minizip] ) innodb-lz4? ( app-arch/lz4 ) innodb-lzo? ( dev-libs/lzo ) innodb-snappy? ( app-arch/snappy ) oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= ) pam? ( virtual/pam:0= ) systemd? ( sys-apps/systemd:= ) tokudb? ( app-arch/snappy ) ) >=dev-libs/libpcre-8.41-r1:3= galera? ( sys-apps/iproute2 =sys-cluster/galera-25* sst-rsync? ( sys-process/lsof ) sst-mariabackup? ( net-misc/socat[ssl] ) sst-xtrabackup? ( net-misc/socat[ssl] ) ) perl? ( !dev-db/mytop virtual/perl-Getopt-Long dev-perl/TermReadKey virtual/perl-Term-ANSIColor virtual/perl-Time-HiRes ) server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) ) jdbc? ( >=dev-java/java-config-2.2.0-r3 ) kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 !dev-db/mariadb-native-client[mysqlcompat] jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) openssl? ( >=dev-libs/openssl-1.0.0:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) >=sys-libs/zlib-1.2.3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] sys-libs/ncurses:0= selinux? ( sec-policy/selinux-mysql ) !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster server? ( !prefix? ( dev-db/mysql-init-scripts ) ) !<virtual/mysql-5.6-r4
-REQUIRED_USE=jdbc? ( extraengine server !static ) server? ( tokudb? ( jemalloc !tcmalloc ) ) static? ( !pam ) ^^ ( yassl openssl libressl ) !server? ( !extraengine !embedded ) ?? ( tcmalloc jemalloc ) static? ( !libressl !openssl yassl )
-RESTRICT=!bindist? ( bindist )
-SLOT=0/18
-SRC_URI=https://downloads.mariadb.org/interstitial/mariadb-10.1.29/source/mariadb-10.1.29.tar.gz mirror://gentoo/mysql-extras-20170926-1321Z.tar.bz2 https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-20170926-1321Z.tar.bz2 https://dev.gentoo.org/~grknight/distfiles/mysql-extras-20170926-1321Z.tar.bz2 https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-20170926-1321Z.tar.bz2 https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-20170926-1321Z.tar.bz2
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 multiprocessing cac3169468f893670dac3e7cb940e045 mysql-multilib-r1 9823899e303dd74138fef85f4a116e13 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=c8387170f04f022935f7f7bb560296c5
diff --git a/dev-db/mariadb-10.1.31-r1 b/dev-db/mariadb-10.1.31-r1
deleted file mode 100644
index 54c56d92bfbe..000000000000
--- a/dev-db/mariadb-10.1.31-r1
+++ /dev/null
@@ -1,16 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst preinst prepare pretend setup test unpack
-DEPEND=|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) ) mroonga? ( app-text/groonga-normalizer-mysql ) kerberos? ( virtual/krb5[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) !bindist? ( sys-libs/binutils-libs:0= >=sys-libs/readline-4.1:0= ) server? ( backup? ( app-arch/libarchive:0= ) cracklib? ( sys-libs/cracklib:0= ) extraengine? ( odbc? ( dev-db/unixODBC:0= ) xml? ( dev-libs/libxml2:2= ) sys-libs/zlib[minizip] ) innodb-lz4? ( app-arch/lz4 ) innodb-lzo? ( dev-libs/lzo ) innodb-snappy? ( app-arch/snappy ) numa? ( sys-process/numactl ) oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= ) pam? ( virtual/pam:0= ) systemd? ( sys-apps/systemd:= ) tokudb? ( app-arch/snappy ) ) >=dev-libs/libpcre-8.41-r1:3= jdbc? ( >=dev-java/java-config-2.2.0-r3 ) virtual/pkgconfig sys-devel/make >=dev-util/cmake-3.9.6 kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 !dev-db/mariadb-native-client[mysqlcompat] jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) openssl? ( >=dev-libs/openssl-1.0.0:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) >=sys-libs/zlib-1.2.3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] sys-libs/ncurses:0= virtual/yacc static? ( sys-libs/ncurses[static-libs] )
-DESCRIPTION=An enhanced, drop-in replacement for MySQL
-EAPI=6
-HOMEPAGE=https://mariadb.org/
-IUSE=+backup bindist cracklib galera kerberos innodb-lz4 innodb-lzo innodb-snappy jdbc mroonga numa odbc oqgraph pam sphinx sst-rsync sst-mariabackup sst-xtrabackup tokudb systemd xml elibc_FreeBSD jdbc abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64 debug embedded extraengine jemalloc latin1 libressl +openssl +perl profiling selinux +server systemtap static static-libs tcmalloc test yassl
-KEYWORDS=~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris
-LICENSE=GPL-2
-PDEPEND=galera? ( sst-xtrabackup? ( || ( >=dev-db/percona-xtrabackup-bin-2.2.4 dev-db/percona-xtrabackup ) ) ) perl? ( >=dev-perl/DBD-mysql-2.9004 ) server? ( ~virtual/mysql-5.6[embedded=,static=] ) virtual/libmysqlclient:0/18[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs=]
-RDEPEND=mroonga? ( app-text/groonga-normalizer-mysql ) kerberos? ( virtual/krb5[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) !bindist? ( sys-libs/binutils-libs:0= >=sys-libs/readline-4.1:0= ) server? ( backup? ( app-arch/libarchive:0= ) cracklib? ( sys-libs/cracklib:0= ) extraengine? ( odbc? ( dev-db/unixODBC:0= ) xml? ( dev-libs/libxml2:2= ) sys-libs/zlib[minizip] ) innodb-lz4? ( app-arch/lz4 ) innodb-lzo? ( dev-libs/lzo ) innodb-snappy? ( app-arch/snappy ) numa? ( sys-process/numactl ) oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= ) pam? ( virtual/pam:0= ) systemd? ( sys-apps/systemd:= ) tokudb? ( app-arch/snappy ) ) >=dev-libs/libpcre-8.41-r1:3= galera? ( sys-apps/iproute2 =sys-cluster/galera-25* sst-rsync? ( sys-process/lsof ) sst-mariabackup? ( net-misc/socat[ssl] ) sst-xtrabackup? ( net-misc/socat[ssl] ) ) perl? ( !dev-db/mytop virtual/perl-Getopt-Long dev-perl/TermReadKey virtual/perl-Term-ANSIColor virtual/perl-Time-HiRes ) server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) ) jdbc? ( >=dev-java/java-config-2.2.0-r3 ) kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 !dev-db/mariadb-native-client[mysqlcompat] jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) openssl? ( >=dev-libs/openssl-1.0.0:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) >=sys-libs/zlib-1.2.3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] sys-libs/ncurses:0= selinux? ( sec-policy/selinux-mysql ) !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster server? ( !prefix? ( dev-db/mysql-init-scripts ) ) !<virtual/mysql-5.6-r4
-REQUIRED_USE=jdbc? ( extraengine server !static ) server? ( tokudb? ( jemalloc !tcmalloc ) ) static? ( !pam ) ^^ ( yassl openssl libressl ) !server? ( !extraengine !embedded ) ?? ( tcmalloc jemalloc ) static? ( !libressl !openssl yassl )
-RESTRICT=!bindist? ( bindist )
-SLOT=0/18
-SRC_URI=https://downloads.mariadb.org/interstitial/mariadb-10.1.31/source/mariadb-10.1.31.tar.gz mirror://gentoo/mysql-extras-20180515-0123Z.tar.bz2 https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-20180515-0123Z.tar.bz2 https://dev.gentoo.org/~grknight/distfiles/mysql-extras-20180515-0123Z.tar.bz2 https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-20180515-0123Z.tar.bz2 https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-20180515-0123Z.tar.bz2
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 multiprocessing cac3169468f893670dac3e7cb940e045 mysql-multilib-r1 9823899e303dd74138fef85f4a116e13 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=1d62b0fe33815981c9230fd53ddf83aa
diff --git a/dev-db/mariadb-10.1.33 b/dev-db/mariadb-10.1.33
deleted file mode 100644
index 99339a4c6a58..000000000000
--- a/dev-db/mariadb-10.1.33
+++ /dev/null
@@ -1,16 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst preinst prepare pretend setup test unpack
-DEPEND=|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) ) mroonga? ( app-text/groonga-normalizer-mysql ) kerberos? ( virtual/krb5[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) !bindist? ( sys-libs/binutils-libs:0= >=sys-libs/readline-4.1:0= ) server? ( backup? ( app-arch/libarchive:0= ) cracklib? ( sys-libs/cracklib:0= ) extraengine? ( odbc? ( dev-db/unixODBC:0= ) xml? ( dev-libs/libxml2:2= ) sys-libs/zlib[minizip] ) innodb-lz4? ( app-arch/lz4 ) innodb-lzo? ( dev-libs/lzo ) innodb-snappy? ( app-arch/snappy ) numa? ( sys-process/numactl ) oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= ) pam? ( virtual/pam:0= ) systemd? ( sys-apps/systemd:= ) tokudb? ( app-arch/snappy ) ) >=dev-libs/libpcre-8.41-r1:3= openssl? ( !>=dev-libs/openssl-1.1.0 ) jdbc? ( >=dev-java/java-config-2.2.0-r3 ) virtual/pkgconfig sys-devel/make >=dev-util/cmake-3.9.6 kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 !dev-db/mariadb-native-client[mysqlcompat] jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) openssl? ( >=dev-libs/openssl-1.0.0:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) >=sys-libs/zlib-1.2.3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] sys-libs/ncurses:0= virtual/yacc static? ( sys-libs/ncurses[static-libs] )
-DESCRIPTION=An enhanced, drop-in replacement for MySQL
-EAPI=6
-HOMEPAGE=https://mariadb.org/
-IUSE=+backup bindist cracklib galera kerberos innodb-lz4 innodb-lzo innodb-snappy jdbc mroonga numa odbc oqgraph pam sphinx sst-rsync sst-mariabackup sst-xtrabackup tokudb systemd xml elibc_FreeBSD jdbc abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64 debug embedded extraengine jemalloc latin1 libressl +openssl +perl profiling selinux +server systemtap static static-libs tcmalloc test yassl
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris
-LICENSE=GPL-2
-PDEPEND=galera? ( sst-xtrabackup? ( || ( >=dev-db/percona-xtrabackup-bin-2.2.4 dev-db/percona-xtrabackup ) ) ) perl? ( >=dev-perl/DBD-mysql-2.9004 ) server? ( ~virtual/mysql-5.6[embedded=,static=] ) virtual/libmysqlclient:0/18[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs=]
-RDEPEND=mroonga? ( app-text/groonga-normalizer-mysql ) kerberos? ( virtual/krb5[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) !bindist? ( sys-libs/binutils-libs:0= >=sys-libs/readline-4.1:0= ) server? ( backup? ( app-arch/libarchive:0= ) cracklib? ( sys-libs/cracklib:0= ) extraengine? ( odbc? ( dev-db/unixODBC:0= ) xml? ( dev-libs/libxml2:2= ) sys-libs/zlib[minizip] ) innodb-lz4? ( app-arch/lz4 ) innodb-lzo? ( dev-libs/lzo ) innodb-snappy? ( app-arch/snappy ) numa? ( sys-process/numactl ) oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= ) pam? ( virtual/pam:0= ) systemd? ( sys-apps/systemd:= ) tokudb? ( app-arch/snappy ) ) >=dev-libs/libpcre-8.41-r1:3= openssl? ( !>=dev-libs/openssl-1.1.0 ) galera? ( sys-apps/iproute2 =sys-cluster/galera-25* sst-rsync? ( sys-process/lsof ) sst-mariabackup? ( net-misc/socat[ssl] ) sst-xtrabackup? ( net-misc/socat[ssl] ) ) perl? ( !dev-db/mytop virtual/perl-Getopt-Long dev-perl/TermReadKey virtual/perl-Term-ANSIColor virtual/perl-Time-HiRes ) server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) ) jdbc? ( >=dev-java/java-config-2.2.0-r3 ) kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 !dev-db/mariadb-native-client[mysqlcompat] jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) openssl? ( >=dev-libs/openssl-1.0.0:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) >=sys-libs/zlib-1.2.3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] sys-libs/ncurses:0= selinux? ( sec-policy/selinux-mysql ) !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster server? ( !prefix? ( dev-db/mysql-init-scripts ) ) !<virtual/mysql-5.6-r4
-REQUIRED_USE=jdbc? ( extraengine server !static ) server? ( tokudb? ( jemalloc !tcmalloc ) ) static? ( !pam ) ^^ ( yassl openssl libressl ) !server? ( !extraengine !embedded ) ?? ( tcmalloc jemalloc ) static? ( !libressl !openssl yassl )
-RESTRICT=!bindist? ( bindist )
-SLOT=0/18
-SRC_URI=https://downloads.mariadb.org/interstitial/mariadb-10.1.33/source/mariadb-10.1.33.tar.gz mirror://gentoo/mysql-extras-20180515-0123Z.tar.bz2 https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-20180515-0123Z.tar.bz2 https://dev.gentoo.org/~grknight/distfiles/mysql-extras-20180515-0123Z.tar.bz2 https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-20180515-0123Z.tar.bz2 https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-20180515-0123Z.tar.bz2
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 multiprocessing cac3169468f893670dac3e7cb940e045 mysql-multilib-r1 9823899e303dd74138fef85f4a116e13 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=ee6fdb58fdc34964bae63367626cbccd
diff --git a/dev-db/mariadb-10.1.34 b/dev-db/mariadb-10.1.34
deleted file mode 100644
index ad42b9a8d938..000000000000
--- a/dev-db/mariadb-10.1.34
+++ /dev/null
@@ -1,16 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst preinst prepare setup test unpack
-DEPEND=virtual/yacc static? ( sys-libs/ncurses[static-libs] ) || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) ) kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) !yassl? ( !libressl? ( dev-libs/openssl:0= !>=dev-libs/openssl-1.1 ) libressl? ( dev-libs/libressl:0= ) ) >=sys-libs/zlib-1.2.3:0= sys-libs/ncurses:0= !bindist? ( sys-libs/binutils-libs:0= >=sys-libs/readline-4.1:0= ) server? ( backup? ( app-arch/libarchive:0= ) cracklib? ( sys-libs/cracklib:0= ) extraengine? ( odbc? ( dev-db/unixODBC:0= ) xml? ( dev-libs/libxml2:2= ) sys-libs/zlib[minizip] ) innodb-lz4? ( app-arch/lz4 ) innodb-lzo? ( dev-libs/lzo ) innodb-snappy? ( app-arch/snappy ) kerberos? ( virtual/krb5 ) mroonga? ( app-text/groonga-normalizer-mysql >=app-text/groonga-7.0.4 ) numa? ( sys-process/numactl ) oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= ) pam? ( virtual/pam:0= ) systemd? ( sys-apps/systemd:= ) tokudb? ( app-arch/snappy ) ) !yassl? ( !libressl? ( !>=dev-libs/openssl-1.1.0 ) ) >=dev-libs/libpcre-8.41-r1:3= !client-libs? ( dev-db/mysql-connector-c[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) virtual/pkgconfig jdbc? ( >=dev-java/java-config-2.2.0-r3 ) sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=An enhanced, drop-in replacement for MySQL
-EAPI=6
-HOMEPAGE=https://mariadb.org/
-IUSE=+backup bindist client-libs cracklib debug extraengine galera jdbc jemalloc kerberos innodb-lz4 innodb-lzo innodb-snappy latin1 libressl mroonga numa odbc oqgraph pam +perl profiling selinux +server sphinx sst-rsync sst-mariabackup sst-xtrabackup systemd systemtap static static-libs tcmalloc test tokudb xml yassl elibc_FreeBSD jdbc abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris
-LICENSE=GPL-2
-PDEPEND=perl? ( >=dev-perl/DBD-mysql-2.9004 ) server? ( galera? ( sst-xtrabackup? ( || ( >=dev-db/percona-xtrabackup-bin-2.2.4 dev-db/percona-xtrabackup ) ) ) )
-RDEPEND=selinux? ( sec-policy/selinux-mysql ) client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c ) !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster server? ( !prefix? ( dev-db/mysql-init-scripts ) ) kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) !yassl? ( !libressl? ( dev-libs/openssl:0= !>=dev-libs/openssl-1.1 ) libressl? ( dev-libs/libressl:0= ) ) >=sys-libs/zlib-1.2.3:0= sys-libs/ncurses:0= !bindist? ( sys-libs/binutils-libs:0= >=sys-libs/readline-4.1:0= ) server? ( backup? ( app-arch/libarchive:0= ) cracklib? ( sys-libs/cracklib:0= ) extraengine? ( odbc? ( dev-db/unixODBC:0= ) xml? ( dev-libs/libxml2:2= ) sys-libs/zlib[minizip] ) innodb-lz4? ( app-arch/lz4 ) innodb-lzo? ( dev-libs/lzo ) innodb-snappy? ( app-arch/snappy ) kerberos? ( virtual/krb5 ) mroonga? ( app-text/groonga-normalizer-mysql >=app-text/groonga-7.0.4 ) numa? ( sys-process/numactl ) oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= ) pam? ( virtual/pam:0= ) systemd? ( sys-apps/systemd:= ) tokudb? ( app-arch/snappy ) ) !yassl? ( !libressl? ( !>=dev-libs/openssl-1.1.0 ) ) >=dev-libs/libpcre-8.41-r1:3= !client-libs? ( dev-db/mysql-connector-c[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) server? ( galera? ( sys-apps/iproute2 =sys-cluster/galera-25* sst-rsync? ( sys-process/lsof ) sst-mariabackup? ( net-misc/socat[ssl] ) sst-xtrabackup? ( net-misc/socat[ssl] ) ) ) perl? ( !dev-db/mytop virtual/perl-Getopt-Long dev-perl/TermReadKey virtual/perl-Term-ANSIColor virtual/perl-Time-HiRes ) server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) ) jdbc? ( >=dev-java/java-config-2.2.0-r3 )
-REQUIRED_USE=jdbc? ( extraengine server !static ) server? ( tokudb? ( jemalloc !tcmalloc ) ) ?? ( tcmalloc jemalloc ) static? ( yassl !pam )
-RESTRICT=!bindist? ( bindist ) libressl? ( test )
-SLOT=0/18
-SRC_URI=https://downloads.mariadb.org/interstitial/mariadb-10.1.34/source/mariadb-10.1.34.tar.gz mirror://gentoo/mysql-extras-20180621-0218Z.tar.bz2 https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-20180621-0218Z.tar.bz2 https://dev.gentoo.org/~grknight/distfiles/mysql-extras-20180621-0218Z.tar.bz2 https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-20180621-0218Z.tar.bz2 https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-20180621-0218Z.tar.bz2
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=2850a89cde9c32f9bb8924aeb9dd31de
diff --git a/dev-db/mariadb-10.2.15 b/dev-db/mariadb-10.2.15
deleted file mode 100644
index f2d87e3de4fb..000000000000
--- a/dev-db/mariadb-10.2.15
+++ /dev/null
@@ -1,16 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst preinst prepare setup test unpack
-DEPEND=virtual/yacc static? ( sys-libs/ncurses[static-libs] ) || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) ) kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) client-libs? ( >=sys-libs/zlib-1.2.3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] kerberos? ( virtual/krb5[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) yassl? ( net-libs/gnutls:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) !yassl? ( !libressl? ( >=dev-libs/openssl-1.0.0:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) ) ) !client-libs? ( >=sys-libs/zlib-1.2.3:0= kerberos? ( virtual/krb5 ) yassl? ( net-libs/gnutls:0= ) !yassl? ( !libressl? ( >=dev-libs/openssl-1.0.0:0= ) libressl? ( dev-libs/libressl:0= ) ) ) sys-libs/ncurses:0= !bindist? ( sys-libs/binutils-libs:0= >=sys-libs/readline-4.1:0= ) server? ( backup? ( app-arch/libarchive:0= ) cracklib? ( sys-libs/cracklib:0= ) extraengine? ( odbc? ( dev-db/unixODBC:0= ) xml? ( dev-libs/libxml2:2= ) ) innodb-lz4? ( app-arch/lz4 ) innodb-lzo? ( dev-libs/lzo ) innodb-snappy? ( app-arch/snappy ) mroonga? ( app-text/groonga-normalizer-mysql >=app-text/groonga-7.0.4 ) numa? ( sys-process/numactl ) oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= ) pam? ( virtual/pam:0= ) systemd? ( sys-apps/systemd:= ) tokudb? ( app-arch/snappy ) ) >=dev-libs/libpcre-8.41-r1:3= !client-libs? ( dev-db/mariadb-connector-c[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] dev-db/mysql-connector-c[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) virtual/pkgconfig jdbc? ( >=dev-java/java-config-2.2.0-r3 ) sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=An enhanced, drop-in replacement for MySQL
-EAPI=6
-HOMEPAGE=https://mariadb.org/
-IUSE=+backup bindist client-libs cracklib debug extraengine galera innodb-lz4 innodb-lzo innodb-snappy jdbc jemalloc kerberos latin1 libressl mroonga numa odbc oqgraph pam +perl profiling rocksdb selinux +server sphinx sst-rsync sst-mariabackup sst-xtrabackup static static-libs systemd systemtap tcmalloc test tokudb xml yassl elibc_FreeBSD jdbc abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris
-LICENSE=GPL-2 LGPL-2.1+
-PDEPEND=perl? ( >=dev-perl/DBD-mysql-2.9004 ) server? ( ~virtual/mysql-5.6[static=] galera? ( sst-xtrabackup? ( || ( >=dev-db/percona-xtrabackup-bin-2.2.4 dev-db/percona-xtrabackup ) ) ) )
-RDEPEND=selinux? ( sec-policy/selinux-mysql ) client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c ) !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster server? ( !prefix? ( dev-db/mysql-init-scripts ) ) !<virtual/mysql-5.6-r9 kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) client-libs? ( >=sys-libs/zlib-1.2.3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] kerberos? ( virtual/krb5[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) yassl? ( net-libs/gnutls:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) !yassl? ( !libressl? ( >=dev-libs/openssl-1.0.0:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) ) ) !client-libs? ( >=sys-libs/zlib-1.2.3:0= kerberos? ( virtual/krb5 ) yassl? ( net-libs/gnutls:0= ) !yassl? ( !libressl? ( >=dev-libs/openssl-1.0.0:0= ) libressl? ( dev-libs/libressl:0= ) ) ) sys-libs/ncurses:0= !bindist? ( sys-libs/binutils-libs:0= >=sys-libs/readline-4.1:0= ) server? ( backup? ( app-arch/libarchive:0= ) cracklib? ( sys-libs/cracklib:0= ) extraengine? ( odbc? ( dev-db/unixODBC:0= ) xml? ( dev-libs/libxml2:2= ) ) innodb-lz4? ( app-arch/lz4 ) innodb-lzo? ( dev-libs/lzo ) innodb-snappy? ( app-arch/snappy ) mroonga? ( app-text/groonga-normalizer-mysql >=app-text/groonga-7.0.4 ) numa? ( sys-process/numactl ) oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= ) pam? ( virtual/pam:0= ) systemd? ( sys-apps/systemd:= ) tokudb? ( app-arch/snappy ) ) >=dev-libs/libpcre-8.41-r1:3= !client-libs? ( dev-db/mariadb-connector-c[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] dev-db/mysql-connector-c[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) server? ( galera? ( sys-apps/iproute2 =sys-cluster/galera-25* sst-rsync? ( sys-process/lsof ) sst-mariabackup? ( net-misc/socat[ssl] ) sst-xtrabackup? ( net-misc/socat[ssl] ) ) ) perl? ( !dev-db/mytop virtual/perl-Getopt-Long dev-perl/TermReadKey virtual/perl-Term-ANSIColor virtual/perl-Time-HiRes ) server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) ) jdbc? ( >=dev-java/java-config-2.2.0-r3 )
-REQUIRED_USE=jdbc? ( extraengine server !static ) server? ( tokudb? ( jemalloc !tcmalloc ) ) !server? ( !extraengine ) ?? ( tcmalloc jemalloc ) static? ( yassl !pam )
-RESTRICT=!bindist? ( bindist ) libressl? ( test )
-SLOT=0/18
-SRC_URI=https://downloads.mariadb.org/interstitial/mariadb-10.2.15/source/mariadb-10.2.15.tar.gz mirror://gentoo/mysql-extras-20180515-1334Z.tar.bz2 https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-20180515-1334Z.tar.bz2 https://dev.gentoo.org/~grknight/distfiles/mysql-extras-20180515-1334Z.tar.bz2 https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-20180515-1334Z.tar.bz2 https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-20180515-1334Z.tar.bz2
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=f087ea6e91a2c6cc407440ccb9c0f54b
diff --git a/dev-db/mariadb-10.2.16 b/dev-db/mariadb-10.2.16
deleted file mode 100644
index 9a004774dade..000000000000
--- a/dev-db/mariadb-10.2.16
+++ /dev/null
@@ -1,16 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst preinst prepare setup test unpack
-DEPEND=virtual/yacc static? ( sys-libs/ncurses[static-libs] ) || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) ) kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) client-libs? ( >=sys-libs/zlib-1.2.3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] kerberos? ( virtual/krb5[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) yassl? ( net-libs/gnutls:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) !yassl? ( !libressl? ( >=dev-libs/openssl-1.0.0:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) ) ) !client-libs? ( >=sys-libs/zlib-1.2.3:0= kerberos? ( virtual/krb5 ) yassl? ( net-libs/gnutls:0= ) !yassl? ( !libressl? ( >=dev-libs/openssl-1.0.0:0= ) libressl? ( dev-libs/libressl:0= ) ) ) sys-libs/ncurses:0= !bindist? ( sys-libs/binutils-libs:0= >=sys-libs/readline-4.1:0= ) server? ( backup? ( app-arch/libarchive:0= ) cracklib? ( sys-libs/cracklib:0= ) extraengine? ( odbc? ( dev-db/unixODBC:0= ) xml? ( dev-libs/libxml2:2= ) ) innodb-lz4? ( app-arch/lz4 ) innodb-lzo? ( dev-libs/lzo ) innodb-snappy? ( app-arch/snappy ) mroonga? ( app-text/groonga-normalizer-mysql >=app-text/groonga-7.0.4 ) numa? ( sys-process/numactl ) oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= ) pam? ( virtual/pam:0= ) systemd? ( sys-apps/systemd:= ) tokudb? ( app-arch/snappy ) ) >=dev-libs/libpcre-8.41-r1:3= !client-libs? ( dev-db/mariadb-connector-c[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] dev-db/mysql-connector-c[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) virtual/pkgconfig jdbc? ( >=dev-java/java-config-2.2.0-r3 ) sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=An enhanced, drop-in replacement for MySQL
-EAPI=6
-HOMEPAGE=https://mariadb.org/
-IUSE=+backup bindist client-libs cracklib debug extraengine galera innodb-lz4 innodb-lzo innodb-snappy jdbc jemalloc kerberos latin1 libressl mroonga numa odbc oqgraph pam +perl profiling rocksdb selinux +server sphinx sst-rsync sst-mariabackup sst-xtrabackup static static-libs systemd systemtap tcmalloc test tokudb xml yassl elibc_FreeBSD jdbc abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris
-LICENSE=GPL-2 LGPL-2.1+
-PDEPEND=perl? ( >=dev-perl/DBD-mysql-2.9004 ) server? ( ~virtual/mysql-5.6[static=] galera? ( sst-xtrabackup? ( || ( >=dev-db/percona-xtrabackup-bin-2.2.4 dev-db/percona-xtrabackup ) ) ) )
-RDEPEND=selinux? ( sec-policy/selinux-mysql ) client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c ) !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster server? ( !prefix? ( dev-db/mysql-init-scripts ) ) !<virtual/mysql-5.6-r9 kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) client-libs? ( >=sys-libs/zlib-1.2.3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] kerberos? ( virtual/krb5[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) yassl? ( net-libs/gnutls:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) !yassl? ( !libressl? ( >=dev-libs/openssl-1.0.0:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) ) ) !client-libs? ( >=sys-libs/zlib-1.2.3:0= kerberos? ( virtual/krb5 ) yassl? ( net-libs/gnutls:0= ) !yassl? ( !libressl? ( >=dev-libs/openssl-1.0.0:0= ) libressl? ( dev-libs/libressl:0= ) ) ) sys-libs/ncurses:0= !bindist? ( sys-libs/binutils-libs:0= >=sys-libs/readline-4.1:0= ) server? ( backup? ( app-arch/libarchive:0= ) cracklib? ( sys-libs/cracklib:0= ) extraengine? ( odbc? ( dev-db/unixODBC:0= ) xml? ( dev-libs/libxml2:2= ) ) innodb-lz4? ( app-arch/lz4 ) innodb-lzo? ( dev-libs/lzo ) innodb-snappy? ( app-arch/snappy ) mroonga? ( app-text/groonga-normalizer-mysql >=app-text/groonga-7.0.4 ) numa? ( sys-process/numactl ) oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= ) pam? ( virtual/pam:0= ) systemd? ( sys-apps/systemd:= ) tokudb? ( app-arch/snappy ) ) >=dev-libs/libpcre-8.41-r1:3= !client-libs? ( dev-db/mariadb-connector-c[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] dev-db/mysql-connector-c[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) server? ( galera? ( sys-apps/iproute2 =sys-cluster/galera-25* sst-rsync? ( sys-process/lsof ) sst-mariabackup? ( net-misc/socat[ssl] ) sst-xtrabackup? ( net-misc/socat[ssl] ) ) ) perl? ( !dev-db/mytop virtual/perl-Getopt-Long dev-perl/TermReadKey virtual/perl-Term-ANSIColor virtual/perl-Time-HiRes ) server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) ) jdbc? ( >=dev-java/java-config-2.2.0-r3 )
-REQUIRED_USE=jdbc? ( extraengine server !static ) server? ( tokudb? ( jemalloc !tcmalloc ) ) !server? ( !extraengine ) ?? ( tcmalloc jemalloc ) static? ( yassl !pam )
-RESTRICT=!bindist? ( bindist ) libressl? ( test )
-SLOT=0/18
-SRC_URI=https://downloads.mariadb.org/interstitial/mariadb-10.2.16/source/mariadb-10.2.16.tar.gz mirror://gentoo/mysql-extras-20180515-1334Z.tar.bz2 https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-20180515-1334Z.tar.bz2 https://dev.gentoo.org/~grknight/distfiles/mysql-extras-20180515-1334Z.tar.bz2 https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-20180515-1334Z.tar.bz2 https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-20180515-1334Z.tar.bz2
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=f087ea6e91a2c6cc407440ccb9c0f54b
diff --git a/dev-db/mariadb-10.3.6_rc b/dev-db/mariadb-10.3.6_rc
deleted file mode 100644
index bf38aba0e678..000000000000
--- a/dev-db/mariadb-10.3.6_rc
+++ /dev/null
@@ -1,16 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst preinst prepare setup test unpack
-DEPEND=virtual/yacc static? ( sys-libs/ncurses[static-libs] ) || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) ) kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) client-libs? ( >=sys-libs/zlib-1.2.3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] kerberos? ( virtual/krb5[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) yassl? ( net-libs/gnutls:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) !yassl? ( !libressl? ( >=dev-libs/openssl-1.0.0:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) ) ) !client-libs? ( >=sys-libs/zlib-1.2.3:0= kerberos? ( virtual/krb5 ) yassl? ( net-libs/gnutls:0= ) !yassl? ( !libressl? ( >=dev-libs/openssl-1.0.0:0= ) libressl? ( dev-libs/libressl:0= ) ) ) sys-libs/ncurses:0= !bindist? ( sys-libs/binutils-libs:0= >=sys-libs/readline-4.1:0= ) server? ( backup? ( app-arch/libarchive:0= ) cracklib? ( sys-libs/cracklib:0= ) extraengine? ( odbc? ( dev-db/unixODBC:0= ) xml? ( dev-libs/libxml2:2= ) ) innodb-lz4? ( app-arch/lz4 ) innodb-lzo? ( dev-libs/lzo ) innodb-snappy? ( app-arch/snappy ) mroonga? ( app-text/groonga-normalizer-mysql >=app-text/groonga-7.0.4 ) numa? ( sys-process/numactl ) oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= ) pam? ( virtual/pam:0= ) systemd? ( sys-apps/systemd:= ) tokudb? ( app-arch/snappy ) ) >=dev-libs/libpcre-8.41-r1:3= virtual/pkgconfig jdbc? ( >=dev-java/java-config-2.2.0-r3 ) sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=An enhanced, drop-in replacement for MySQL
-EAPI=6
-HOMEPAGE=https://mariadb.org/
-IUSE=+backup bindist client-libs cracklib debug extraengine galera innodb-lz4 innodb-lzo innodb-snappy jdbc jemalloc kerberos latin1 libressl mroonga numa odbc oqgraph pam +perl profiling rocksdb selinux +server sphinx sst-rsync sst-mariabackup sst-xtrabackup static static-libs systemd systemtap tcmalloc test tokudb xml yassl elibc_FreeBSD jdbc abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris
-LICENSE=GPL-2 LGPL-2.1+
-PDEPEND=perl? ( >=dev-perl/DBD-mysql-2.9004 ) !client-libs? ( dev-db/mariadb-connector-c[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] dev-db/mysql-connector-c[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) server? ( ~virtual/mysql-5.6[static=] galera? ( sst-xtrabackup? ( || ( >=dev-db/percona-xtrabackup-bin-2.2.4 dev-db/percona-xtrabackup ) ) ) )
-RDEPEND=selinux? ( sec-policy/selinux-mysql ) client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c ) !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster server? ( !prefix? ( dev-db/mysql-init-scripts ) ) !<virtual/mysql-5.6-r11 kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) client-libs? ( >=sys-libs/zlib-1.2.3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] kerberos? ( virtual/krb5[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) yassl? ( net-libs/gnutls:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) !yassl? ( !libressl? ( >=dev-libs/openssl-1.0.0:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) ) ) !client-libs? ( >=sys-libs/zlib-1.2.3:0= kerberos? ( virtual/krb5 ) yassl? ( net-libs/gnutls:0= ) !yassl? ( !libressl? ( >=dev-libs/openssl-1.0.0:0= ) libressl? ( dev-libs/libressl:0= ) ) ) sys-libs/ncurses:0= !bindist? ( sys-libs/binutils-libs:0= >=sys-libs/readline-4.1:0= ) server? ( backup? ( app-arch/libarchive:0= ) cracklib? ( sys-libs/cracklib:0= ) extraengine? ( odbc? ( dev-db/unixODBC:0= ) xml? ( dev-libs/libxml2:2= ) ) innodb-lz4? ( app-arch/lz4 ) innodb-lzo? ( dev-libs/lzo ) innodb-snappy? ( app-arch/snappy ) mroonga? ( app-text/groonga-normalizer-mysql >=app-text/groonga-7.0.4 ) numa? ( sys-process/numactl ) oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= ) pam? ( virtual/pam:0= ) systemd? ( sys-apps/systemd:= ) tokudb? ( app-arch/snappy ) ) >=dev-libs/libpcre-8.41-r1:3= server? ( galera? ( sys-apps/iproute2 =sys-cluster/galera-25* sst-rsync? ( sys-process/lsof ) sst-mariabackup? ( net-misc/socat[ssl] ) sst-xtrabackup? ( net-misc/socat[ssl] ) ) ) perl? ( !dev-db/mytop virtual/perl-Getopt-Long dev-perl/TermReadKey virtual/perl-Term-ANSIColor virtual/perl-Time-HiRes ) server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) ) jdbc? ( >=dev-java/java-config-2.2.0-r3 )
-REQUIRED_USE=jdbc? ( extraengine server !static ) server? ( tokudb? ( jemalloc !tcmalloc ) ) !server? ( !extraengine ) ?? ( tcmalloc jemalloc ) static? ( yassl !pam )
-RESTRICT=!bindist? ( bindist ) libressl? ( test )
-SLOT=0/18
-SRC_URI=https://downloads.mariadb.org/interstitial/mariadb-10.3.6/source/mariadb-10.3.6.tar.gz mirror://gentoo/mysql-extras-20180515-1334Z.tar.bz2 https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-20180515-1334Z.tar.bz2 https://dev.gentoo.org/~grknight/distfiles/mysql-extras-20180515-1334Z.tar.bz2 https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-20180515-1334Z.tar.bz2 https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-20180515-1334Z.tar.bz2
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=f7fed23ff1629713420391f8506b85b5
diff --git a/dev-db/mariadb-10.3.7 b/dev-db/mariadb-10.3.7
deleted file mode 100644
index 060331d16804..000000000000
--- a/dev-db/mariadb-10.3.7
+++ /dev/null
@@ -1,16 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst preinst prepare setup test unpack
-DEPEND=virtual/yacc static? ( sys-libs/ncurses[static-libs] ) || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) ) kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) >=sys-libs/zlib-1.2.3:0= kerberos? ( virtual/krb5 ) yassl? ( net-libs/gnutls:0= ) !yassl? ( !libressl? ( >=dev-libs/openssl-1.0.0:0= ) libressl? ( dev-libs/libressl:0= ) ) sys-libs/ncurses:0= !bindist? ( sys-libs/binutils-libs:0= >=sys-libs/readline-4.1:0= ) server? ( backup? ( app-arch/libarchive:0= ) cracklib? ( sys-libs/cracklib:0= ) extraengine? ( odbc? ( dev-db/unixODBC:0= ) xml? ( dev-libs/libxml2:2= ) ) innodb-lz4? ( app-arch/lz4 ) innodb-lzo? ( dev-libs/lzo ) innodb-snappy? ( app-arch/snappy ) mroonga? ( app-text/groonga-normalizer-mysql >=app-text/groonga-7.0.4 ) numa? ( sys-process/numactl ) oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= ) pam? ( virtual/pam:0= ) systemd? ( sys-apps/systemd:= ) tokudb? ( app-arch/snappy ) ) >=dev-libs/libpcre-8.41-r1:3= dev-db/mariadb-connector-c[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] dev-db/mysql-connector-c[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] virtual/pkgconfig jdbc? ( >=dev-java/java-config-2.2.0-r3 ) sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=An enhanced, drop-in replacement for MySQL
-EAPI=6
-HOMEPAGE=https://mariadb.org/
-IUSE=+backup bindist client-libs cracklib debug extraengine galera innodb-lz4 innodb-lzo innodb-snappy jdbc jemalloc kerberos latin1 libressl mroonga numa odbc oqgraph pam +perl profiling rocksdb selinux +server sphinx sst-rsync sst-mariabackup sst-xtrabackup static static-libs systemd systemtap tcmalloc test tokudb xml yassl elibc_FreeBSD jdbc abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris
-LICENSE=GPL-2 LGPL-2.1+
-PDEPEND=perl? ( >=dev-perl/DBD-mysql-2.9004 ) server? ( ~virtual/mysql-5.6[static=] galera? ( sst-xtrabackup? ( || ( >=dev-db/percona-xtrabackup-bin-2.2.4 dev-db/percona-xtrabackup ) ) ) )
-RDEPEND=selinux? ( sec-policy/selinux-mysql ) !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster server? ( !prefix? ( dev-db/mysql-init-scripts ) ) !<virtual/mysql-5.6-r11 kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) >=sys-libs/zlib-1.2.3:0= kerberos? ( virtual/krb5 ) yassl? ( net-libs/gnutls:0= ) !yassl? ( !libressl? ( >=dev-libs/openssl-1.0.0:0= ) libressl? ( dev-libs/libressl:0= ) ) sys-libs/ncurses:0= !bindist? ( sys-libs/binutils-libs:0= >=sys-libs/readline-4.1:0= ) server? ( backup? ( app-arch/libarchive:0= ) cracklib? ( sys-libs/cracklib:0= ) extraengine? ( odbc? ( dev-db/unixODBC:0= ) xml? ( dev-libs/libxml2:2= ) ) innodb-lz4? ( app-arch/lz4 ) innodb-lzo? ( dev-libs/lzo ) innodb-snappy? ( app-arch/snappy ) mroonga? ( app-text/groonga-normalizer-mysql >=app-text/groonga-7.0.4 ) numa? ( sys-process/numactl ) oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= ) pam? ( virtual/pam:0= ) systemd? ( sys-apps/systemd:= ) tokudb? ( app-arch/snappy ) ) >=dev-libs/libpcre-8.41-r1:3= dev-db/mariadb-connector-c[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] dev-db/mysql-connector-c[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] server? ( galera? ( sys-apps/iproute2 =sys-cluster/galera-25* sst-rsync? ( sys-process/lsof ) sst-mariabackup? ( net-misc/socat[ssl] ) sst-xtrabackup? ( net-misc/socat[ssl] ) ) ) perl? ( !dev-db/mytop virtual/perl-Getopt-Long dev-perl/TermReadKey virtual/perl-Term-ANSIColor virtual/perl-Time-HiRes ) server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) ) jdbc? ( >=dev-java/java-config-2.2.0-r3 )
-REQUIRED_USE=jdbc? ( extraengine server !static ) server? ( tokudb? ( jemalloc !tcmalloc ) ) ?? ( tcmalloc jemalloc ) static? ( yassl !pam )
-RESTRICT=!bindist? ( bindist ) libressl? ( test )
-SLOT=0/18
-SRC_URI=https://downloads.mariadb.org/interstitial/mariadb-10.3.7/source/mariadb-10.3.7.tar.gz mirror://gentoo/mysql-extras-20180529-0042Z.tar.bz2 https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-20180529-0042Z.tar.bz2 https://dev.gentoo.org/~grknight/distfiles/mysql-extras-20180529-0042Z.tar.bz2 https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-20180529-0042Z.tar.bz2 https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-20180529-0042Z.tar.bz2
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=0ea69b49cee6ed33889b37f398f3ac3b
diff --git a/dev-db/mariadb-10.3.8 b/dev-db/mariadb-10.3.8
deleted file mode 100644
index 44427e2a1dae..000000000000
--- a/dev-db/mariadb-10.3.8
+++ /dev/null
@@ -1,16 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst preinst prepare setup test unpack
-DEPEND=virtual/yacc static? ( sys-libs/ncurses[static-libs] ) || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) ) kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) >=sys-libs/zlib-1.2.3:0= kerberos? ( virtual/krb5 ) yassl? ( net-libs/gnutls:0= ) !yassl? ( !libressl? ( >=dev-libs/openssl-1.0.0:0= ) libressl? ( dev-libs/libressl:0= ) ) sys-libs/ncurses:0= !bindist? ( sys-libs/binutils-libs:0= >=sys-libs/readline-4.1:0= ) server? ( backup? ( app-arch/libarchive:0= ) cracklib? ( sys-libs/cracklib:0= ) extraengine? ( odbc? ( dev-db/unixODBC:0= ) xml? ( dev-libs/libxml2:2= ) ) innodb-lz4? ( app-arch/lz4 ) innodb-lzo? ( dev-libs/lzo ) innodb-snappy? ( app-arch/snappy ) mroonga? ( app-text/groonga-normalizer-mysql >=app-text/groonga-7.0.4 ) numa? ( sys-process/numactl ) oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= ) pam? ( virtual/pam:0= ) systemd? ( sys-apps/systemd:= ) tokudb? ( app-arch/snappy ) ) >=dev-libs/libpcre-8.41-r1:3= dev-db/mariadb-connector-c[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] dev-db/mysql-connector-c[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] virtual/pkgconfig jdbc? ( >=dev-java/java-config-2.2.0-r3 ) sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=An enhanced, drop-in replacement for MySQL
-EAPI=6
-HOMEPAGE=https://mariadb.org/
-IUSE=+backup bindist client-libs cracklib debug extraengine galera innodb-lz4 innodb-lzo innodb-snappy jdbc jemalloc kerberos latin1 libressl mroonga numa odbc oqgraph pam +perl profiling rocksdb selinux +server sphinx sst-rsync sst-mariabackup sst-xtrabackup static static-libs systemd systemtap tcmalloc test tokudb xml yassl elibc_FreeBSD jdbc abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris
-LICENSE=GPL-2 LGPL-2.1+
-PDEPEND=perl? ( >=dev-perl/DBD-mysql-2.9004 ) server? ( ~virtual/mysql-5.6[static=] galera? ( sst-xtrabackup? ( || ( >=dev-db/percona-xtrabackup-bin-2.2.4 dev-db/percona-xtrabackup ) ) ) )
-RDEPEND=selinux? ( sec-policy/selinux-mysql ) !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster server? ( !prefix? ( dev-db/mysql-init-scripts ) ) !<virtual/mysql-5.6-r11 kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) >=sys-libs/zlib-1.2.3:0= kerberos? ( virtual/krb5 ) yassl? ( net-libs/gnutls:0= ) !yassl? ( !libressl? ( >=dev-libs/openssl-1.0.0:0= ) libressl? ( dev-libs/libressl:0= ) ) sys-libs/ncurses:0= !bindist? ( sys-libs/binutils-libs:0= >=sys-libs/readline-4.1:0= ) server? ( backup? ( app-arch/libarchive:0= ) cracklib? ( sys-libs/cracklib:0= ) extraengine? ( odbc? ( dev-db/unixODBC:0= ) xml? ( dev-libs/libxml2:2= ) ) innodb-lz4? ( app-arch/lz4 ) innodb-lzo? ( dev-libs/lzo ) innodb-snappy? ( app-arch/snappy ) mroonga? ( app-text/groonga-normalizer-mysql >=app-text/groonga-7.0.4 ) numa? ( sys-process/numactl ) oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= ) pam? ( virtual/pam:0= ) systemd? ( sys-apps/systemd:= ) tokudb? ( app-arch/snappy ) ) >=dev-libs/libpcre-8.41-r1:3= dev-db/mariadb-connector-c[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] dev-db/mysql-connector-c[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] server? ( galera? ( sys-apps/iproute2 =sys-cluster/galera-25* sst-rsync? ( sys-process/lsof ) sst-mariabackup? ( net-misc/socat[ssl] ) sst-xtrabackup? ( net-misc/socat[ssl] ) ) ) perl? ( !dev-db/mytop virtual/perl-Getopt-Long dev-perl/TermReadKey virtual/perl-Term-ANSIColor virtual/perl-Time-HiRes ) server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) ) jdbc? ( >=dev-java/java-config-2.2.0-r3 )
-REQUIRED_USE=jdbc? ( extraengine server !static ) server? ( tokudb? ( jemalloc !tcmalloc ) ) ?? ( tcmalloc jemalloc ) static? ( yassl !pam )
-RESTRICT=!bindist? ( bindist ) libressl? ( test )
-SLOT=0/18
-SRC_URI=https://downloads.mariadb.org/interstitial/mariadb-10.3.8/source/mariadb-10.3.8.tar.gz mirror://gentoo/mysql-extras-20180529-0042Z.tar.bz2 https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-20180529-0042Z.tar.bz2 https://dev.gentoo.org/~grknight/distfiles/mysql-extras-20180529-0042Z.tar.bz2 https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-20180529-0042Z.tar.bz2 https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-20180529-0042Z.tar.bz2
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=0ea69b49cee6ed33889b37f398f3ac3b
diff --git a/dev-db/mariadb-5.5.60 b/dev-db/mariadb-5.5.60
deleted file mode 100644
index 239c83b189ed..000000000000
--- a/dev-db/mariadb-5.5.60
+++ /dev/null
@@ -1,16 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst postrm preinst prepare setup test unpack
-DEPEND=|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) ssl? ( !>=dev-libs/openssl-1.1 ) sys-devel/make >=dev-util/cmake-3.9.6 ssl? ( >=dev-libs/openssl-0.9.6d:0 ) kernel_linux? ( sys-process/procps ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 >=sys-libs/zlib-1.2.3 !bindist? ( >=sys-libs/readline-4.1:0 ) oqgraph? ( >=dev-libs/boost-1.40.0 ) !minimal? ( pam? ( virtual/pam ) ) perl? ( !dev-db/mytop ) !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster jemalloc? ( dev-libs/jemalloc[static-libs?] ) tcmalloc? ( dev-util/google-perftools ) >=sys-libs/zlib-1.2.3[static-libs?] ssl? ( >=dev-libs/openssl-0.9.6d[static-libs?] ) systemtap? ( >=dev-util/systemtap-1.3 ) kernel_linux? ( dev-libs/libaio ) virtual/yacc static? ( sys-libs/ncurses[static-libs] ) >=dev-util/cmake-2.4.3 >=dev-util/cmake-2.6.3
-DESCRIPTION=An enhanced, drop-in replacement for MySQL
-EAPI=5
-HOMEPAGE=https://mariadb.org/
-IUSE=bindist debug embedded minimal +perl selinux ssl static static-libs test latin1 extraengine cluster max-idx-128 +community profiling oqgraph sphinx pam tokudb jemalloc tcmalloc systemtap
-KEYWORDS=~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris
-LICENSE=GPL-2
-PDEPEND=perl? ( >=dev-perl/DBD-mysql-2.9004 ) ~virtual/mysql-5.5
-RDEPEND=ssl? ( >=dev-libs/openssl-0.9.6d:0 ) kernel_linux? ( sys-process/procps ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 >=sys-libs/zlib-1.2.3 !bindist? ( >=sys-libs/readline-4.1:0 ) oqgraph? ( >=dev-libs/boost-1.40.0 ) !minimal? ( pam? ( virtual/pam ) ) perl? ( !dev-db/mytop ) !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster jemalloc? ( dev-libs/jemalloc[static-libs?] ) tcmalloc? ( dev-util/google-perftools ) >=sys-libs/zlib-1.2.3[static-libs?] ssl? ( >=dev-libs/openssl-0.9.6d[static-libs?] ) systemtap? ( >=dev-util/systemtap-1.3 ) kernel_linux? ( dev-libs/libaio ) !minimal? ( !prefix? ( dev-db/mysql-init-scripts ) ) selinux? ( sec-policy/selinux-mysql ) perl? ( virtual/perl-Getopt-Long dev-perl/TermReadKey virtual/perl-Term-ANSIColor virtual/perl-Time-HiRes )
-REQUIRED_USE=minimal? ( !oqgraph ) minimal? ( !sphinx ) tokudb? ( jemalloc !tcmalloc ) tcmalloc? ( !jemalloc ) jemalloc? ( !tcmalloc ) minimal? ( !cluster !extraengine !embedded ) static? ( !ssl )
-RESTRICT=!bindist? ( bindist )
-SLOT=0/18
-SRC_URI=http://ftp.osuosl.org/pub/mariadb/mariadb-5.5.60/kvm-tarbake-jaunty-x86/mariadb-5.5.60.tar.gz http://ftp.osuosl.org/pub/mariadb/mariadb-5.5.60/source/mariadb-5.5.60.tar.gz http://mirror.jmu.edu/pub/mariadb/mariadb-5.5.60/kvm-tarbake-jaunty-x86/mariadb-5.5.60.tar.gz http://mirrors.coreix.net/mariadb/mariadb-5.5.60/kvm-tarbake-jaunty-x86/mariadb-5.5.60.tar.gz http://mirrors.syringanetworks.net/mariadb/mariadb-5.5.60/kvm-tarbake-jaunty-x86/mariadb-5.5.60.tar.gz http://mirrors.fe.up.pt/pub/mariadb/mariadb-5.5.60/kvm-tarbake-jaunty-x86/mariadb-5.5.60.tar.gz http://mirror2.hs-esslingen.de/mariadb/mariadb-5.5.60/kvm-tarbake-jaunty-x86/mariadb-5.5.60.tar.gz mirror://gentoo/mysql-extras-20160721-1526Z.tar.bz2 https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-20160721-1526Z.tar.bz2 https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-20160721-1526Z.tar.bz2 https://dev.gentoo.org/~grknight/distfiles/mysql-extras-20160721-1526Z.tar.bz2
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 mysql-cmake 39849cc54381eee7c8d7333058ea7132 mysql-v2 af0178e9946ce2a0df18ca31f697e949 mysql_fx fd803e05287868299aac78823b68920e ninja-utils d2e7e7d290428bb25c56dcf2502badc1 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=fe4883f60e960a27b519d800db1d66f7
diff --git a/dev-db/mariadb-connector-c-3.0.3 b/dev-db/mariadb-connector-c-3.0.3
deleted file mode 100644
index 3c8debfb6b63..000000000000
--- a/dev-db/mariadb-connector-c-3.0.3
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=sys-libs/zlib:=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] virtual/libiconv:=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] curl? ( net-misc/curl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) kerberos? ( || ( app-crypt/mit-krb5[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] app-crypt/heimdal[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) ) ssl? ( gnutls? ( >=net-libs/gnutls-3.3.24:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) !gnutls? ( libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) !libressl? ( dev-libs/openssl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) ) ) sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=C client library for MariaDB/MySQL
-EAPI=6
-HOMEPAGE=https://mariadb.org/
-IUSE=+curl gnutls kerberos libressl mysqlcompat +ssl static-libs abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~s390 ~sparc ~x86
-LICENSE=LGPL-2.1
-RDEPEND=sys-libs/zlib:=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] virtual/libiconv:=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] curl? ( net-misc/curl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) kerberos? ( || ( app-crypt/mit-krb5[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] app-crypt/heimdal[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) ) ssl? ( gnutls? ( >=net-libs/gnutls-3.3.24:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) !gnutls? ( libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) !libressl? ( dev-libs/openssl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) ) ) mysqlcompat? ( !dev-db/mysql[client-libs(+)] !dev-db/mysql-cluster[client-libs(+)] !dev-db/mariadb[client-libs(+)] !dev-db/mariadb-galera[client-libs(+)] !dev-db/percona-server[client-libs(+)] !dev-db/mysql-connector-c ) !>=dev-db/mariadb-10.2.0[client-libs(+)]
-SLOT=0/3
-SRC_URI=https://downloads.mariadb.org/f/connector-c-3.0.3/mariadb-connector-c-3.0.3-src.tar.gz?serve -> mariadb-connector-c-3.0.3-src.tar.gz
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=b1468757de9537aa1770d87f4d3fe12c
diff --git a/dev-db/mariadb-connector-c-3.0.4 b/dev-db/mariadb-connector-c-3.0.4
deleted file mode 100644
index ad3fca1067a7..000000000000
--- a/dev-db/mariadb-connector-c-3.0.4
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=sys-libs/zlib:=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] virtual/libiconv:=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] curl? ( net-misc/curl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) kerberos? ( || ( app-crypt/mit-krb5[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] app-crypt/heimdal[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) ) ssl? ( gnutls? ( >=net-libs/gnutls-3.3.24:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) !gnutls? ( libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) !libressl? ( dev-libs/openssl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) ) ) sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=C client library for MariaDB/MySQL
-EAPI=6
-HOMEPAGE=https://mariadb.org/
-IUSE=+curl gnutls kerberos libressl mysqlcompat +ssl static-libs test abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~s390 ~sparc ~x86
-LICENSE=LGPL-2.1
-RDEPEND=sys-libs/zlib:=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] virtual/libiconv:=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] curl? ( net-misc/curl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) kerberos? ( || ( app-crypt/mit-krb5[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] app-crypt/heimdal[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) ) ssl? ( gnutls? ( >=net-libs/gnutls-3.3.24:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) !gnutls? ( libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) !libressl? ( dev-libs/openssl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) ) ) mysqlcompat? ( !dev-db/mysql[client-libs(+)] !dev-db/mysql-cluster[client-libs(+)] !dev-db/mariadb[client-libs(+)] !dev-db/mariadb-galera[client-libs(+)] !dev-db/percona-server[client-libs(+)] !dev-db/mysql-connector-c ) !>=dev-db/mariadb-10.2.0[client-libs(+)]
-SLOT=0/3
-SRC_URI=https://downloads.mariadb.org/f/connector-c-3.0.4/mariadb-connector-c-3.0.4-src.tar.gz?serve -> mariadb-connector-c-3.0.4-src.tar.gz
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=37e1c4d70cb8f5bcc53ee1abaac3acab
diff --git a/dev-db/mariadb-connector-c-9999 b/dev-db/mariadb-connector-c-9999
deleted file mode 100644
index afe8a4ee4b4c..000000000000
--- a/dev-db/mariadb-connector-c-9999
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test unpack
-DEPEND=sys-libs/zlib:=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] virtual/libiconv:=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] curl? ( net-misc/curl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) kerberos? ( || ( app-crypt/mit-krb5[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] app-crypt/heimdal[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) ) ssl? ( gnutls? ( >=net-libs/gnutls-3.3.24:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) !gnutls? ( libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) !libressl? ( dev-libs/openssl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) ) ) sys-devel/make >=dev-util/cmake-3.9.6 >=dev-vcs/git-1.8.2.1[curl]
-DESCRIPTION=C client library for MariaDB/MySQL
-EAPI=6
-HOMEPAGE=https://mariadb.org/
-IUSE=+curl gnutls kerberos libressl mysqlcompat +ssl static-libs test abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-LICENSE=LGPL-2.1
-RDEPEND=sys-libs/zlib:=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] virtual/libiconv:=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] curl? ( net-misc/curl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) kerberos? ( || ( app-crypt/mit-krb5[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] app-crypt/heimdal[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) ) ssl? ( gnutls? ( >=net-libs/gnutls-3.3.24:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) !gnutls? ( libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) !libressl? ( dev-libs/openssl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) ) ) mysqlcompat? ( !dev-db/mysql[client-libs(+)] !dev-db/mysql-cluster[client-libs(+)] !dev-db/mariadb[client-libs(+)] !dev-db/mariadb-galera[client-libs(+)] !dev-db/percona-server[client-libs(+)] !dev-db/mysql-connector-c ) !>=dev-db/mariadb-10.2.0[client-libs(+)]
-SLOT=0/3
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 git-r3 8f6de46b0aa318aea0e8cac62ece098b ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=37e1c4d70cb8f5bcc53ee1abaac3acab
diff --git a/dev-db/mariadb-connector-c/Manifest b/dev-db/mariadb-connector-c/Manifest
new file mode 100644
index 000000000000..e09ad82ea07d
--- /dev/null
+++ b/dev-db/mariadb-connector-c/Manifest
@@ -0,0 +1,7 @@
+AUX gentoo-layout-3.0.patch 311 BLAKE2B 4c2f0ae8aa53d605bcaf134274d3b549ec970b43cc68eed1ac71cf089c9fa32a1343d7ebfdf428e7f25032f5782aecfb86fb8f78528ffc708ab15dc7285a24e7 SHA512 4d5a48b4dd66aab04ba597b30e96b4601c6745acca21be1daf051ba6ce1e8fef1a0efa46d8e81da1ecdc893a8ee471bd8c7ed0c5436ee33b8b4f7cd18fdca1a5
+DIST mariadb-connector-c-3.0.3-src.tar.gz 666928 BLAKE2B 83181949f1867909fd96696ac5cc9d11433a0c772ecb97d862983916b235d380fd84462d547faf42756d6698dd9dbe7dcd4d6b1d0f6336e147f5a597108ea025 SHA512 6da66a32165cb74b106bf94e13a35d4bb38f05e5d2b3ff3740862dfc0892a7705977c1394b4f84b8e1f1e50a59a3fadbc62e7733b1feb532c6368a9fc262db04
+DIST mariadb-connector-c-3.0.4-src.tar.gz 659406 BLAKE2B 9285880338e6040976741d8b440d78ef95005d44e0e7b1428cb526735380038d6dfaccfd6bd689f4b9c084a340281b2d8f4f38a193d1c6a4c5853c5333617899 SHA512 6edc7b70380aade1c88a3d9dac70d6da846e6e2e7d7b0dc2eddaba148dc3889f2baa3e757a8b91e479b1ae14051d9f948fbfdc516219e21d4a3117f6700cb020
+EBUILD mariadb-connector-c-3.0.3.ebuild 3259 BLAKE2B 022262ab89e5bc0af4213958d9fbe9239e879367fc297561b5d97304e1850ecb128bf737e7a5e42fd4fb0e52016fd03bbcae3e3db63c72b672f89ee99231f595 SHA512 d6ca3e2b0536c43a8f8f3a2c2611bf51ffdc362dd07e5b292597c09f1d7a2dceef5511c9ba10c588e2a4a6df969e1993681da6cf9eb36eea65bba73df167ab75
+EBUILD mariadb-connector-c-3.0.4.ebuild 2723 BLAKE2B db5b1a8828a269cc8700ef26bc91e26e8d5388f1b64680904110901fd0324c9e51b9ad96eaf2699a2bed2382f1aafc57826b7e4033a4334123cac3cd941d6f02 SHA512 16ab1ed293955187ca85d74cdc1866cc99a4b3ad2edccae97e4d5ed689adaacde528795ddbfafd7580619b4a91aa8aee09c0f3c3ddbfcbc93ffe1ec0fd400d0f
+EBUILD mariadb-connector-c-9999.ebuild 2723 BLAKE2B db5b1a8828a269cc8700ef26bc91e26e8d5388f1b64680904110901fd0324c9e51b9ad96eaf2699a2bed2382f1aafc57826b7e4033a4334123cac3cd941d6f02 SHA512 16ab1ed293955187ca85d74cdc1866cc99a4b3ad2edccae97e4d5ed689adaacde528795ddbfafd7580619b4a91aa8aee09c0f3c3ddbfcbc93ffe1ec0fd400d0f
+MISC metadata.xml 324 BLAKE2B fab5394015cd337683f65a257556ed0f15e35826bb0a6ce75a7033cd5931455ff2bed527064d698e9b3165f2cfcaff8a4bdfcad0b830482ae2e4389a79d529fb SHA512 1fe9e5d5d9f8e817ce49117fbcc6a6d706a090752606647496f2b7a25de51bfb641a408ff0cdaf626d83eb5c314d2e28c3f29532307d942cb41498edf4b44aa6
diff --git a/dev-db/mariadb-connector-c/files/gentoo-layout-3.0.patch b/dev-db/mariadb-connector-c/files/gentoo-layout-3.0.patch
new file mode 100644
index 000000000000..b57b7abc03b4
--- /dev/null
+++ b/dev-db/mariadb-connector-c/files/gentoo-layout-3.0.patch
@@ -0,0 +1,9 @@
+--- a/mariadb_config/CMakeLists.txt 2016-02-12 21:21:06.981021227 -0500
++++ b/mariadb_config/CMakeLists.txt 2016-02-12 22:06:02.397130410 -0500
+@@ -40,5 +44,5 @@
+ # Installation
+ #
+ INSTALL(TARGETS mariadb_config
+- DESTINATION "bin"
++ DESTINATION ${INSTALL_BINDIR}
+ COMPONENT Development)
diff --git a/dev-db/mariadb-connector-c/mariadb-connector-c-3.0.3.ebuild b/dev-db/mariadb-connector-c/mariadb-connector-c-3.0.3.ebuild
new file mode 100644
index 000000000000..b58efb7c1cb4
--- /dev/null
+++ b/dev-db/mariadb-connector-c/mariadb-connector-c-3.0.3.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+VCS_INHERIT=""
+if [[ "${PV}" == 9999 ]] ; then
+ VCS_INHERIT="git-r3"
+ EGIT_REPO_URI="https://github.com/MariaDB/connector-c.git"
+ KEYWORDS="~arm ~arm64 ~hppa ~ia64 ~ppc64 ~s390 ~sparc"
+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="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~s390 ~sparc ~x86"
+fi
+
+inherit cmake-utils multilib-minimal toolchain-funcs ${VCS_INHERIT}
+
+MULTILIB_CHOST_TOOLS=( /usr/bin/mariadb_config )
+
+MULTILIB_WRAPPED_HEADERS+=(
+ /usr/include/mariadb/mariadb_version.h
+)
+
+DESCRIPTION="C client library for MariaDB/MySQL"
+HOMEPAGE="https://mariadb.org/"
+LICENSE="LGPL-2.1"
+
+SLOT="0/3"
+IUSE="+curl gnutls kerberos libressl mysqlcompat +ssl static-libs"
+
+DEPEND="sys-libs/zlib:=[${MULTILIB_USEDEP}]
+ virtual/libiconv:=[${MULTILIB_USEDEP}]
+ curl? ( net-misc/curl:0=[${MULTILIB_USEDEP}] )
+ kerberos? ( || ( app-crypt/mit-krb5[${MULTILIB_USEDEP}]
+ app-crypt/heimdal[${MULTILIB_USEDEP}] ) )
+ ssl? (
+ gnutls? ( >=net-libs/gnutls-3.3.24:0=[${MULTILIB_USEDEP}] )
+ !gnutls? (
+ libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
+ !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
+ )
+ )
+ "
+RDEPEND="${DEPEND}
+ mysqlcompat? (
+ !dev-db/mysql[client-libs(+)]
+ !dev-db/mysql-cluster[client-libs(+)]
+ !dev-db/mariadb[client-libs(+)]
+ !dev-db/mariadb-galera[client-libs(+)]
+ !dev-db/percona-server[client-libs(+)]
+ !dev-db/mysql-connector-c )
+ !>=dev-db/mariadb-10.2.0[client-libs(+)]
+ "
+PATCHES=(
+ "${FILESDIR}/gentoo-layout-3.0.patch" )
+
+src_prepare() {
+ local gpluginconf="${T}/gentoo-plugins.cmake"
+ touch "${gpluginconf}" || die
+ # Plugins cannot be disabled by a build switch, redefine them in our own file to be included
+ if ! use kerberos ; then
+ echo 'REGISTER_PLUGIN("AUTH_GSSAPI" "" "auth_gssapi_plugin" "OFF" "auth_gssapi_client" 1)' \
+ >> "${gpluginconf}" || die
+ fi
+ if ! use curl ; then
+ echo 'REGISTER_PLUGIN("REMOTEIO" "" "remote_io_plugin" "OFF" "remote_io" 1)' \
+ >> "${gpluginconf}" || die
+ fi
+ cmake-utils_src_prepare
+}
+
+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)
+ -DWITH_CURL=$(usex curl ON OFF)
+ -DAUTH_GSSAPI_PLUGIN_TYPE:STRING=$(usex kerberos ON OFF)
+ -DINSTALL_LIBDIR="$(get_libdir)"
+ -DINSTALL_PLUGINDIR="$(get_libdir)/mariadb/plugin"
+ -DINSTALL_BINDIR=bin
+ -DPLUGIN_CONF_FILE:STRING="${T}/gentoo-plugins.cmake"
+ )
+ cmake-utils_src_configure
+}
+
+multilib_src_compile() {
+ cmake-utils_src_compile
+}
+
+multilib_src_install() {
+ cmake-utils_src_install
+ if use mysqlcompat ; then
+ dosym libmariadb.so.3 /usr/$(get_libdir)/libmysqlclient.so.19
+ dosym libmariadb.so.3 /usr/$(get_libdir)/libmysqlclient.so
+ fi
+}
+
+multilib_src_install_all() {
+ if ! use static-libs ; then
+ find "${D}" -name "*.a" -delete || die
+ fi
+ if use mysqlcompat ; then
+ dosym mariadb_config /usr/bin/mysql_config
+ dosym mariadb /usr/include/mysql
+ fi
+}
diff --git a/dev-db/mariadb-connector-c/mariadb-connector-c-3.0.4.ebuild b/dev-db/mariadb-connector-c/mariadb-connector-c-3.0.4.ebuild
new file mode 100644
index 000000000000..26cda8c4c2f2
--- /dev/null
+++ b/dev-db/mariadb-connector-c/mariadb-connector-c-3.0.4.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+VCS_INHERIT=""
+if [[ "${PV}" == 9999 ]] ; then
+ VCS_INHERIT="git-r3"
+ EGIT_REPO_URI="https://github.com/MariaDB/mariadb-connector-c.git"
+ KEYWORDS=""
+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="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~s390 ~sparc ~x86"
+fi
+
+inherit cmake-utils multilib-minimal toolchain-funcs ${VCS_INHERIT}
+
+MULTILIB_CHOST_TOOLS=( /usr/bin/mariadb_config )
+
+MULTILIB_WRAPPED_HEADERS+=(
+ /usr/include/mariadb/mariadb_version.h
+)
+
+DESCRIPTION="C client library for MariaDB/MySQL"
+HOMEPAGE="https://mariadb.org/"
+LICENSE="LGPL-2.1"
+
+SLOT="0/3"
+IUSE="+curl gnutls kerberos libressl mysqlcompat +ssl static-libs test"
+
+DEPEND="sys-libs/zlib:=[${MULTILIB_USEDEP}]
+ virtual/libiconv:=[${MULTILIB_USEDEP}]
+ curl? ( net-misc/curl:0=[${MULTILIB_USEDEP}] )
+ kerberos? ( || ( app-crypt/mit-krb5[${MULTILIB_USEDEP}]
+ app-crypt/heimdal[${MULTILIB_USEDEP}] ) )
+ ssl? (
+ gnutls? ( >=net-libs/gnutls-3.3.24:0=[${MULTILIB_USEDEP}] )
+ !gnutls? (
+ libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
+ !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
+ )
+ )
+ "
+RDEPEND="${DEPEND}
+ mysqlcompat? (
+ !dev-db/mysql[client-libs(+)]
+ !dev-db/mysql-cluster[client-libs(+)]
+ !dev-db/mariadb[client-libs(+)]
+ !dev-db/mariadb-galera[client-libs(+)]
+ !dev-db/percona-server[client-libs(+)]
+ !dev-db/mysql-connector-c )
+ !>=dev-db/mariadb-10.2.0[client-libs(+)]
+ "
+PATCHES=(
+ "${FILESDIR%/}/gentoo-layout-3.0.patch" )
+
+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)
+ -DWITH_CURL=$(usex curl ON OFF)
+ -DCLIENT_PLUGIN_AUTH_GSSAPI_CLIENT:STRING=$(usex kerberos DYNAMIC OFF)
+ -DINSTALL_LIBDIR="$(get_libdir)"
+ -DINSTALL_PLUGINDIR="$(get_libdir)/mariadb/plugin"
+ -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
+ if use mysqlcompat ; then
+ dosym libmariadb.so.3 /usr/$(get_libdir)/libmysqlclient.so.19
+ dosym libmariadb.so.3 /usr/$(get_libdir)/libmysqlclient.so
+ fi
+}
+
+multilib_src_install_all() {
+ if ! use static-libs ; then
+ find "${D}" -name "*.a" -delete || die
+ fi
+ if use mysqlcompat ; then
+ dosym mariadb_config /usr/bin/mysql_config
+ dosym mariadb /usr/include/mysql
+ 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
new file mode 100644
index 000000000000..26cda8c4c2f2
--- /dev/null
+++ b/dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+VCS_INHERIT=""
+if [[ "${PV}" == 9999 ]] ; then
+ VCS_INHERIT="git-r3"
+ EGIT_REPO_URI="https://github.com/MariaDB/mariadb-connector-c.git"
+ KEYWORDS=""
+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="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~s390 ~sparc ~x86"
+fi
+
+inherit cmake-utils multilib-minimal toolchain-funcs ${VCS_INHERIT}
+
+MULTILIB_CHOST_TOOLS=( /usr/bin/mariadb_config )
+
+MULTILIB_WRAPPED_HEADERS+=(
+ /usr/include/mariadb/mariadb_version.h
+)
+
+DESCRIPTION="C client library for MariaDB/MySQL"
+HOMEPAGE="https://mariadb.org/"
+LICENSE="LGPL-2.1"
+
+SLOT="0/3"
+IUSE="+curl gnutls kerberos libressl mysqlcompat +ssl static-libs test"
+
+DEPEND="sys-libs/zlib:=[${MULTILIB_USEDEP}]
+ virtual/libiconv:=[${MULTILIB_USEDEP}]
+ curl? ( net-misc/curl:0=[${MULTILIB_USEDEP}] )
+ kerberos? ( || ( app-crypt/mit-krb5[${MULTILIB_USEDEP}]
+ app-crypt/heimdal[${MULTILIB_USEDEP}] ) )
+ ssl? (
+ gnutls? ( >=net-libs/gnutls-3.3.24:0=[${MULTILIB_USEDEP}] )
+ !gnutls? (
+ libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
+ !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
+ )
+ )
+ "
+RDEPEND="${DEPEND}
+ mysqlcompat? (
+ !dev-db/mysql[client-libs(+)]
+ !dev-db/mysql-cluster[client-libs(+)]
+ !dev-db/mariadb[client-libs(+)]
+ !dev-db/mariadb-galera[client-libs(+)]
+ !dev-db/percona-server[client-libs(+)]
+ !dev-db/mysql-connector-c )
+ !>=dev-db/mariadb-10.2.0[client-libs(+)]
+ "
+PATCHES=(
+ "${FILESDIR%/}/gentoo-layout-3.0.patch" )
+
+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)
+ -DWITH_CURL=$(usex curl ON OFF)
+ -DCLIENT_PLUGIN_AUTH_GSSAPI_CLIENT:STRING=$(usex kerberos DYNAMIC OFF)
+ -DINSTALL_LIBDIR="$(get_libdir)"
+ -DINSTALL_PLUGINDIR="$(get_libdir)/mariadb/plugin"
+ -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
+ if use mysqlcompat ; then
+ dosym libmariadb.so.3 /usr/$(get_libdir)/libmysqlclient.so.19
+ dosym libmariadb.so.3 /usr/$(get_libdir)/libmysqlclient.so
+ fi
+}
+
+multilib_src_install_all() {
+ if ! use static-libs ; then
+ find "${D}" -name "*.a" -delete || die
+ fi
+ if use mysqlcompat ; then
+ dosym mariadb_config /usr/bin/mysql_config
+ dosym mariadb /usr/include/mysql
+ fi
+}
diff --git a/dev-db/mariadb-connector-c/metadata.xml b/dev-db/mariadb-connector-c/metadata.xml
new file mode 100644
index 000000000000..9c4d844e8798
--- /dev/null
+++ b/dev-db/mariadb-connector-c/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+<email>mysql-bugs@gentoo.org</email>
+<name>MySQL</name>
+</maintainer>
+<use>
+<flag name="mysqlcompat">Enable mysqlclient library symbolic links</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-db/mariadb-galera-10.0.35-r1 b/dev-db/mariadb-galera-10.0.35-r1
deleted file mode 100644
index 7ccd9a5b4eb6..000000000000
--- a/dev-db/mariadb-galera-10.0.35-r1
+++ /dev/null
@@ -1,16 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst preinst prepare setup test unpack
-DEPEND=virtual/yacc static? ( sys-libs/ncurses[static-libs] ) || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) ) kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) !yassl? ( !libressl? ( dev-libs/openssl:0= !>=dev-libs/openssl-1.1 ) libressl? ( dev-libs/libressl:0= ) ) >=sys-libs/zlib-1.2.3:0= sys-libs/ncurses:0= !bindist? ( >=sys-libs/readline-4.1:0= ) server? ( extraengine? ( odbc? ( dev-db/unixODBC:0= ) xml? ( dev-libs/libxml2:2= ) ) numa? ( sys-process/numactl ) oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= ) pam? ( virtual/pam:0= ) tokudb? ( app-arch/snappy ) ) >=dev-libs/libpcre-8.41-r1:3= !client-libs? ( dev-db/mysql-connector-c[static-libs?] ) jdbc? ( >=dev-java/java-config-2.2.0-r3 ) sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=An enhanced, drop-in replacement for MySQL
-EAPI=6
-HOMEPAGE=https://mariadb.org/
-IUSE=bindist client-libs debug extraengine jdbc jemalloc latin1 libressl numa odbc oqgraph pam +perl profiling selinux +server sphinx sst-rsync sst-xtrabackup static static-libs systemtap tcmalloc test tokudb xml yassl elibc_FreeBSD jdbc
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2 LGPL-2.1+
-PDEPEND=perl? ( >=dev-perl/DBD-mysql-2.9004 ) server? ( sst-xtrabackup? ( || ( >=dev-db/percona-xtrabackup-bin-2.2.4 dev-db/percona-xtrabackup ) ) )
-RDEPEND=selinux? ( sec-policy/selinux-mysql ) client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c ) !dev-db/mysql !dev-db/mariadb !dev-db/percona-server !dev-db/mysql-cluster server? ( !prefix? ( dev-db/mysql-init-scripts ) ) kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) !yassl? ( !libressl? ( dev-libs/openssl:0= !>=dev-libs/openssl-1.1 ) libressl? ( dev-libs/libressl:0= ) ) >=sys-libs/zlib-1.2.3:0= sys-libs/ncurses:0= !bindist? ( >=sys-libs/readline-4.1:0= ) server? ( extraengine? ( odbc? ( dev-db/unixODBC:0= ) xml? ( dev-libs/libxml2:2= ) ) numa? ( sys-process/numactl ) oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= ) pam? ( virtual/pam:0= ) tokudb? ( app-arch/snappy ) ) >=dev-libs/libpcre-8.41-r1:3= !client-libs? ( dev-db/mysql-connector-c[static-libs?] ) server? ( sys-apps/iproute2 =sys-cluster/galera-25* sst-rsync? ( sys-process/lsof ) sst-xtrabackup? ( net-misc/socat[ssl] ) ) perl? ( !dev-db/mytop virtual/perl-Getopt-Long dev-perl/TermReadKey virtual/perl-Term-ANSIColor virtual/perl-Time-HiRes ) server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) ) jdbc? ( >=dev-java/java-config-2.2.0-r3 )
-REQUIRED_USE=jdbc? ( extraengine server !static ) server? ( tokudb? ( jemalloc !tcmalloc ) ) !server? ( !extraengine ) ?? ( tcmalloc jemalloc ) static? ( yassl !pam )
-RESTRICT=!bindist? ( bindist ) libressl? ( test )
-SLOT=0/18
-SRC_URI=https://downloads.mariadb.org/interstitial/mariadb-galera-10.0.35/source/mariadb-galera-10.0.35.tar.gz mirror://gentoo/mysql-extras-20180515-1334Z.tar.bz2 https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-20180515-1334Z.tar.bz2 https://dev.gentoo.org/~grknight/distfiles/mysql-extras-20180515-1334Z.tar.bz2 https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-20180515-1334Z.tar.bz2 https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-20180515-1334Z.tar.bz2
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=a3b37a67d1e88573de13a40bafdcd26d
diff --git a/dev-db/mariadb-galera/Manifest b/dev-db/mariadb-galera/Manifest
new file mode 100644
index 000000000000..c6aaffd26a11
--- /dev/null
+++ b/dev-db/mariadb-galera/Manifest
@@ -0,0 +1,5 @@
+AUX my.cnf-5.6 5144 BLAKE2B 2f977b6a92524cfabbdd19058430c62dd4d03a0587036f49057eff69fda04c148a4dca8e58abe418a2bdc0fe1ef3c780cf53d7214fb51f13d5a4b2a4f7a3b8e9 SHA512 db4bdde6f82d9bd33026477d89d8191ddc4099586273ca4aa3f2dcd09572f887d03f79c2ce00bf74d01c21a18384b05516982bdcf31a6c458631315ea75c4cab
+DIST mariadb-galera-10.0.35.tar.gz 66950519 BLAKE2B a0b48de41234d1800c1734782bd604d30512e3d33d1937cd3e79f68ec804089166223ba53450ef630779d2b74bc4ace611dc748b4ceca7ed4e4151f97d693655 SHA512 e0160ef74d45c332edf49f21bb673b926008cba9ba650f97a47d7631260b2517db19e1730b76be77af4ee384aa5cc9b3453a24da57c48ab5f062f937494aee87
+DIST mysql-extras-20180515-1334Z.tar.bz2 321462 BLAKE2B 48fc1e0058fa824e6234b0f3319d261997e99f334c8583c0def4cdac4b59f2380d7153ab0fa2ca9a6ab15e35899c2a7586e3b61f4044c4c949110cc8ab9fb0e6 SHA512 de3000f0c65eed9595b52d53205cdcac60cb4a06a5aca27057c8beca6a7890f453aeeda0bb8487b8de75cfb4caa48682b7706273574876c5cefd0d03988c4f7e
+EBUILD mariadb-galera-10.0.35-r1.ebuild 27201 BLAKE2B d9a1443ed469f5ca28e4e25c494064877ae0363a46b6834488a83511da3e4149f4a033ec97da8e80a756e2b106a912748a4b78a46177543b4b1380ec2dab2a51 SHA512 df449a5020ee5d6993ad29026799d5987fb7c0bf3fd1de6fa2d1af521907fe71bb48e08ee6ffdd93722c823cb8719c3122e17aa7dcfba69cb9534d8d77b1fae2
+MISC metadata.xml 1812 BLAKE2B d8dca52245956dd59e770feaa45354e8b6d718b950a072bd8db93f162ac59ad4029556c5f02b7753a4b541eaf9e0d97d93eb29c06649be4391268212d395896e SHA512 7e2cb0d0b2bb303f475ac84dd9ebb23b1df940eec5fbe562cd238be1f2e1d3564edeb66b5d237d529ec1ab4b6aad4935d2ab490411f8083a934fd1f4894647e0
diff --git a/dev-db/mariadb-galera/files/my.cnf-5.6 b/dev-db/mariadb-galera/files/my.cnf-5.6
new file mode 100644
index 000000000000..379a2c47049f
--- /dev/null
+++ b/dev-db/mariadb-galera/files/my.cnf-5.6
@@ -0,0 +1,158 @@
+# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file.
+
+# The following options will be passed to all MySQL clients
+[client]
+#password = your_password
+port = 3306
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
+
+[mysql]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqladmin]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlcheck]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqldump]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlimport]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlshow]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[myisamchk]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+
+[myisampack]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+
+# use [safe_mysqld] with mysql-3
+[mysqld_safe]
+err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err
+
+# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations
+[mysqld]
+character-set-server = utf8
+user = mysql
+port = 3306
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
+pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid
+log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err
+basedir = @GENTOO_PORTAGE_EPREFIX@/usr
+datadir = @DATADIR@
+skip-external-locking
+key_buffer_size = 16M
+max_allowed_packet = 4M
+table_open_cache = 400
+sort_buffer_size = 512K
+net_buffer_length = 16K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql
+#Set this to your desired error message language
+lc_messages = en_US
+
+# security:
+# using "localhost" in connects uses sockets by default
+# skip-networking
+bind-address = 127.0.0.1
+
+log-bin
+server-id = 1
+
+# point the following paths to different dedicated disks
+tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/
+#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname
+
+# you need the debug USE flag enabled to use the following directives,
+# if needed, uncomment them, start the server and issue
+# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace
+# this will show you *exactly* what's happening in your server ;)
+
+#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql
+#gdb
+#debug = d:t:i:o,/tmp/mysqld.trace
+#one-thread
+
+# the rest of the innodb config follows:
+# don't eat too much memory, we're trying to be safe on 64Mb boxes
+# you might want to bump this up a bit on boxes with more RAM
+innodb_buffer_pool_size = 128M
+#
+# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-(
+# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route
+# we have to take for the moment
+#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+#innodb_log_arch_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+# you may wish to change this size to be more suitable for your system
+# the max is there to avoid run-away growth on your machine
+innodb_data_file_path = ibdata1:10M:autoextend:max:128M
+# we keep this at around 25% of of innodb_buffer_pool_size
+# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size)
+innodb_log_file_size = 48M
+# this is the default, increase it if you have very large transactions going on
+innodb_log_buffer_size = 8M
+# this is the default and won't hurt you
+# you shouldn't need to tweak it
+innodb_log_files_in_group=2
+# see the innodb config docs, the other options are not always safe
+innodb_flush_log_at_trx_commit = 1
+innodb_lock_wait_timeout = 50
+innodb_file_per_table
+
+# Uncomment this to get FEDERATED engine support
+#plugin-load=federated=ha_federated.so
+loose-federated
+
+# These settings are required for Galera clustering
+#mysql settings
+binlog_format=ROW
+default-storage-engine=innodb
+innodb_autoinc_lock_mode=2
+query_cache_size=0
+query_cache_type=0
+bind-address=0.0.0.0
+# Uncomment this section to activate Galera clustering
+#wsrep_provider=@GENTOO_PORTAGE_EPREFIX@/usr/lib/galera/libgalera_smm.so
+# You should change this name to something meaningful
+#wsrep_cluster_name="my_wsrep_cluster"
+# List all nodes of the cluster including this one
+#wsrep_cluster_address="gcomm://172.16.8.5,172.16.8.6,172.16.8.4"
+#wsrep_sst_method=rsync
+
+[mysqldump]
+quick
+max_allowed_packet = 16M
+
+[mysql]
+# uncomment the next directive if you are not familiar with SQL
+#safe-updates
+
+[isamchk]
+key_buffer_size = 20M
+sort_buffer_size = 20M
+read_buffer = 2M
+write_buffer = 2M
+
+[myisamchk]
+key_buffer_size = 20M
+sort_buffer_size = 20M
+read_buffer_size = 2M
+write_buffer_size = 2M
+
+[mysqlhotcopy]
+interactive-timeout
+
+[mariadb]
diff --git a/dev-db/mariadb-galera/mariadb-galera-10.0.35-r1.ebuild b/dev-db/mariadb-galera/mariadb-galera-10.0.35-r1.ebuild
new file mode 100644
index 000000000000..90a0f496067d
--- /dev/null
+++ b/dev-db/mariadb-galera/mariadb-galera-10.0.35-r1.ebuild
@@ -0,0 +1,849 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20180515-1334Z"
+SUBSLOT="18"
+
+JAVA_PKG_OPT_USE="jdbc"
+
+# Keeping eutils in EAPI=6 for emktemp in pkg_config
+
+inherit eutils flag-o-matic prefix toolchain-funcs java-pkg-opt-2 user cmake-utils
+
+SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz "
+
+# Gentoo patches to MySQL
+if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
+ SRC_URI="${SRC_URI}
+ mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
+fi
+
+HOMEPAGE="https://mariadb.org/"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL"
+LICENSE="GPL-2 LGPL-2.1+"
+SLOT="0/${SUBSLOT:-0}"
+IUSE="bindist client-libs debug extraengine jdbc jemalloc latin1 libressl
+ numa odbc oqgraph pam +perl profiling selinux +server sphinx
+ sst-rsync sst-xtrabackup static static-libs systemtap tcmalloc
+ test tokudb xml yassl"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="!bindist? ( bindist ) libressl? ( test )"
+
+REQUIRED_USE="jdbc? ( extraengine server !static )
+ server? ( tokudb? ( jemalloc !tcmalloc ) )
+ !server? ( !extraengine )
+ ?? ( tcmalloc jemalloc )
+ static? ( yassl !pam )"
+
+KEYWORDS="~amd64 ~x86"
+
+# 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"
+
+if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
+ MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
+ inherit git-r3
+ EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
+ EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras"
+ EGIT_CLONE_TYPE=shallow
+else
+ MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
+fi
+
+PATCHES=(
+ "${MY_PATCH_DIR}/01050_all_mariadb_mysql_config_cleanup-5.5.41.patch"
+ "${MY_PATCH_DIR}/20006_all_cmake_elib-mariadb-10.0.33.patch"
+ "${MY_PATCH_DIR}/20009_all_mariadb_myodbc_symbol_fix-5.5.38.patch"
+ "${MY_PATCH_DIR}/20018_all_mariadb-galera-10.0.20-without-clientlibs-tools.patch"
+)
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+COMMON_DEPEND="
+ kernel_linux? (
+ sys-process/procps:0=
+ dev-libs/libaio:0=
+ )
+ >=sys-apps/sed-4
+ >=sys-apps/texinfo-4.7-r1
+ jemalloc? ( dev-libs/jemalloc:0= )
+ tcmalloc? ( dev-util/google-perftools:0= )
+ systemtap? ( >=dev-util/systemtap-1.3:0= )
+ !yassl? (
+ !libressl? ( dev-libs/openssl:0= !>=dev-libs/openssl-1.1 )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ >=sys-libs/zlib-1.2.3:0=
+ sys-libs/ncurses:0=
+ !bindist? (
+ >=sys-libs/readline-4.1:0=
+ )
+ server? (
+ extraengine? (
+ odbc? ( dev-db/unixODBC:0= )
+ xml? ( dev-libs/libxml2:2= )
+ )
+ numa? ( sys-process/numactl )
+ oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
+ pam? ( virtual/pam:0= )
+ tokudb? ( app-arch/snappy )
+ )
+ >=dev-libs/libpcre-8.41-r1:3=
+ !client-libs? ( dev-db/mysql-connector-c[static-libs?] )
+"
+DEPEND="virtual/yacc
+ static? ( sys-libs/ncurses[static-libs] )
+ || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+ server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) )
+ ${COMMON_DEPEND}"
+RDEPEND="selinux? ( sec-policy/selinux-mysql )
+ client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
+ !dev-db/mysql !dev-db/mariadb !dev-db/percona-server !dev-db/mysql-cluster
+ server? ( !prefix? ( dev-db/mysql-init-scripts ) )
+ ${COMMON_DEPEND}
+ server? (
+ sys-apps/iproute2
+ =sys-cluster/galera-25*
+ sst-rsync? ( sys-process/lsof )
+ sst-xtrabackup? ( net-misc/socat[ssl] )
+ )
+ perl? ( !dev-db/mytop
+ virtual/perl-Getopt-Long
+ dev-perl/TermReadKey
+ virtual/perl-Term-ANSIColor
+ virtual/perl-Time-HiRes )
+ server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) )
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+# percona-xtrabackup-bin causes a circular dependency if DBD-mysql is not already installed
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )
+ server? ( sst-xtrabackup? ( || ( >=dev-db/percona-xtrabackup-bin-2.2.4 dev-db/percona-xtrabackup ) ) )"
+
+pkg_setup() {
+ if [[ ${MERGE_TYPE} != binary ]] ; then
+ local GCC_MAJOR_SET=$(gcc-major-version)
+ local GCC_MINOR_SET=$(gcc-minor-version)
+ if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \
+ ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+ eerror "${PN} with tokudb needs to be built with gcc-4.7 or later."
+ eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+ die
+ fi
+ fi
+ java-pkg-opt-2_pkg_setup
+ if has test ${FEATURES} && \
+ use server && ! has userpriv ${FEATURES} ; then
+ eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+
+ # This should come after all of the die statements
+ enewgroup mysql 60 || die "problem adding 'mysql' group"
+ enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
+}
+
+pkg_preinst() {
+ java-pkg-opt-2_pkg_preinst
+}
+
+pkg_postinst() {
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ # Create log directory securely if it does not exist
+ [[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+ if use server ; then
+ if use pam; then
+ einfo
+ elog "This install includes the PAM authentication plugin."
+ elog "To activate and configure the PAM plugin, please read:"
+ elog "https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/"
+ einfo
+ fi
+
+ if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+ einfo
+ elog "You might want to run:"
+ elog "\"emerge --config =${CATEGORY}/${PF}\""
+ elog "if this is a new install."
+ elog
+ elog "If you are switching server implentations, you should run the"
+ elog "mysql_upgrade tool."
+ einfo
+ else
+ einfo
+ elog "If you are upgrading major versions, you should run the"
+ elog "mysql_upgrade tool."
+ einfo
+ fi
+
+ einfo
+ elog "Be sure to edit the my.cnf file to activate your cluster settings."
+ elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
+ elog "The first time the cluster is activated, you should add"
+ elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
+ elog "This option should then be removed for subsequent starts."
+ einfo
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ # Grab the patches
+ [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR%/}/mysql-extras" git-r3_src_unpack
+
+ mv -f "${WORKDIR%/}/${PN%%-galera}-${PV}" "${S}" || die
+}
+
+disable_engine() {
+ echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
+}
+
+disable_plugin() {
+ echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
+}
+
+src_prepare() {
+ java-pkg-opt-2_src_prepare
+ if use tcmalloc; then
+ echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S%/}/sql/CMakeLists.txt" || die
+ fi
+
+ # Don't build bundled xz-utils for tokudb
+ echo > "${S%/}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
+ sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S%/}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
+ sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S%/}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
+
+ local plugin
+ local server_plugins=( handler_socket auth_socket feedback metadata_lock_info
+ locale_info qc_info server_audit semisync sql_errlog )
+ local test_plugins=( audit_null auth_examples daemon_example fulltext )
+ if ! use server; then # These plugins are for the server
+ for plugin in "${server_plugins[@]}" ; do
+ disable_plugin "${plugin}"
+ done
+ fi
+
+ if ! use test; then # These plugins are only used during testing
+ for plugin in "${test_plugins[@]}" ; do
+ disable_plugin "${plugin}"
+ done
+ fi
+
+ # Collides with mariadb-connector-c bug 655980
+ disable_plugin auth_dialog
+
+ # Don't build Mroonga or example
+ disable_engine mroonga
+ disable_engine example
+
+ if ! use oqgraph ; then # avoids extra library checks
+ disable_engine oqgraph
+ fi
+
+ cmake-utils_src_prepare
+}
+
+src_configure(){
+ # bug 508724 mariadb cannot use ld.gold
+ tc-ld-disable-gold
+ # Bug #114895, bug #110149
+ filter-flags "-O" "-O[01]"
+
+ append-cxxflags -felide-constructors
+
+ # 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')"
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr"
+ -DINSTALL_SYSCONFDIR="${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/mariadb
+ -DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin
+ -DINSTALL_SCRIPTDIR=share/mariadb/scripts
+ -DINSTALL_MYSQLDATADIR="${EPREFIX%/}/var/lib/mysql"
+ -DINSTALL_SBINDIR=sbin
+ -DINSTALL_SUPPORTFILESDIR="${EPREFIX%/}/usr/share/mariadb"
+ -DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+ -DWITH_UNIT_TESTS=$(usex test ON OFF)
+ -DWITH_ZLIB=system
+ -DENABLED_LOCAL_INFILE=1
+ -DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
+ -DINSTALL_UNIX_ADDRDIR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
+ # 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)
+ -DWITHOUT_CLIENTLIBS=YES
+ -DWITH_READLINE=$(usex bindist 1 0)
+ -DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1)
+ -DENABLE_DTRACE=$(usex systemtap)
+ )
+ if use test ; then
+ mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mariadb/mysql-test )
+ else
+ mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+ fi
+
+ if ! use yassl ; then
+ mycmakeargs+=( -DWITH_SSL=system )
+ else
+ mycmakeargs+=( -DWITH_SSL=bundled )
+ fi
+
+ if use server ; then
+
+ # Federated{,X} must be treated special otherwise they will not be built as plugins
+ if ! use extraengine ; then
+ mycmakeargs+=(
+ -DWITHOUT_FEDERATED_STORAGE_ENGINE=1
+ -DWITHOUT_FEDERATEDX_STORAGE_ENGINE=1 )
+ fi
+
+ mycmakeargs+=(
+ -DWITH_JEMALLOC=$(usex jemalloc system)
+ -DWITH_PCRE=system
+ -D$(usex sphinx WITH WITHOUT)_SPHINX_STORAGE_ENGINE=1
+ -D$(usex tokudb WITH WITHOUT)_TOKUDB_STORAGE_ENGINE=1
+ -D$(usex oqgraph WITH WITHOUT)_AUTH_PAM=1
+ -D$(usex extraengine WITH WITHOUT)_SEQUENCE_STORAGE_ENGINE=1
+ -D$(usex extraengine WITH WITHOUT)_SPIDER_STORAGE_ENGINE=1
+ -D$(usex extraengine WITH WITHOUT)_CONNECT_STORAGE_ENGINE=1
+ -DCONNECT_WITH_LIBXML2=$(usex xml)
+ -DCONNECT_WITH_ODBC=$(usex odbc)
+ -DCONNECT_WITH_JDBC=$(usex jdbc)
+ # Build failure and autodep wrt bug 639144
+ -DCONNECT_WITH_MONGO=OFF
+ -DWITH_WSREP=ON
+ -DINSTALL_SQLBENCHDIR=share/mariadb
+ )
+
+ # Workaround for MDEV-14524
+ use tokudb && mycmakeargs+=( -DTOKUDB_OK=1 )
+
+ 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."
+
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+ -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+ )
+
+ elif ! use latin1 ; then
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=utf8
+ -DDEFAULT_COLLATION=utf8_general_ci
+ )
+ else
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=latin1
+ -DDEFAULT_COLLATION=latin1_swedish_ci
+ )
+ fi
+ mycmakeargs+=(
+ -DEXTRA_CHARSETS=all
+ -DDISABLE_SHARED=$(usex static YES NO)
+ -DWITH_EMBEDDED_SERVER=OFF
+ -DENABLED_PROFILING=$(usex profiling)
+ )
+
+ if use static; then
+ mycmakeargs+=( -DWITH_PIC=1 )
+ fi
+
+ if use jemalloc || use tcmalloc ; then
+ mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
+ fi
+
+ # Storage engines
+ mycmakeargs+=(
+ -DWITH_ARCHIVE_STORAGE_ENGINE=1
+ -DWITH_BLACKHOLE_STORAGE_ENGINE=1
+ -DWITH_CSV_STORAGE_ENGINE=1
+ -DWITH_HEAP_STORAGE_ENGINE=1
+ -DWITH_INNOBASE_STORAGE_ENGINE=1
+ -DWITH_MYISAMMRG_STORAGE_ENGINE=1
+ -DWITH_MYISAM_STORAGE_ENGINE=1
+ -DWITH_PARTITION_STORAGE_ENGINE=1
+ )
+
+ else
+ mycmakeargs+=(
+ -DWITHOUT_SERVER=1
+ -DWITH_EMBEDDED_SERVER=OFF
+ -DEXTRA_CHARSETS=none
+ -DINSTALL_SQLBENCHDIR=
+ )
+ fi
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ # Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
+ if [[ -f "${ED}/usr/include/mysql/server/private/config.h" ]] ; then
+ rm "${ED}/usr/include/mysql/server/private/config.h" || die
+ fi
+
+ # 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 "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
+ fi
+
+ # Configuration stuff
+ einfo "Building default configuration ..."
+ insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+ [[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+ local mycnf_src="my.cnf-5.6"
+ sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+ "${FILESDIR}/${mycnf_src}" \
+ > "${TMPDIR}/my.cnf.ok" || die
+ use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR}/my.cnf.ok"
+ if use latin1 ; then
+ sed -i \
+ -e "/character-set/s|utf8|latin1|g" \
+ "${TMPDIR}/my.cnf.ok" || die
+ fi
+ eprefixify "${TMPDIR}/my.cnf.ok"
+ newins "${TMPDIR}/my.cnf.ok" my.cnf
+
+ if use server ; then
+ einfo "Including support files and sample configurations"
+ docinto "support-files"
+ local script
+ for script in \
+ "${S}"/support-files/magic
+ do
+ [[ -f "$script" ]] && dodoc "${script}"
+ done
+
+ docinto "scripts"
+ for script in "${S}"/scripts/mysql* ; do
+ [[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
+ done
+ fi
+
+ #Remove mytop if perl is not selected
+ [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+}
+
+# Official test instructions:
+# USE='extraengine perl server static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mariadb-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+ _disable_test() {
+ local rawtestname reason
+ rawtestname="${1}" ; shift
+ reason="${@}"
+ ewarn "test '${rawtestname}' disabled: '${reason}'"
+ echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+ }
+
+ local TESTDIR="${BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ if ! use server ; then
+ einfo "Skipping server tests due to minimal build."
+ return 0
+ fi
+
+ # 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 [[ $UID -eq 0 ]]; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+ has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+ # Run CTest (test-units)
+ cmake-utils_src_test
+ retstatus_unit=$?
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+ # Enable parallel testing, auto will try to detect number of cores
+ # You may set this by hand.
+ # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+ export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+ # 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"
+ # These are failing in MariaDB 10.0 for now and are believed to be
+ # false positives:
+ #
+ # main.mysql_client_test, main.mysql_client_test_nonblock
+ # main.mysql_client_test_comp:
+ # segfaults at random under Portage only, suspect resource limits.
+
+ local t
+ for t in main.mysql_client_test main.mysql_client_test_nonblock \
+ main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam ; do
+ _disable_test "$t" "False positives in Gentoo"
+ done
+
+ if ! use client-libs ; then
+ _disable_test main.plugin_auth "Needs client libraries built"
+ 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"
+}
+
+mysql_init_vars() {
+ MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mariadb"}
+ MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+ MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+ MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ MY_DATADIR=""
+ if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
+ MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+ | sed -ne '/datadir/s|^--datadir=||p' \
+ | tail -n1`
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
+ | sed -e 's/.*=\s*//' \
+ | tail -n1`
+ fi
+ fi
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ MY_DATADIR="${MY_LOCALSTATEDIR}"
+ einfo "Using default MY_DATADIR"
+ fi
+ elog "MySQL MY_DATADIR is ${MY_DATADIR}"
+
+ if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
+ if [[ -e "${MY_DATADIR}" ]] ; then
+ # If you get this and you're wondering about it, see bug #207636
+ elog "MySQL datadir found in ${MY_DATADIR}"
+ elog "A new one will not be created."
+ PREVIOUS_DATADIR="yes"
+ else
+ PREVIOUS_DATADIR="no"
+ fi
+ export PREVIOUS_DATADIR
+ fi
+ else
+ if [[ ${EBUILD_PHASE} == "config" ]]; then
+ local new_MY_DATADIR
+ new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+ | sed -ne '/datadir/s|^--datadir=||p' \
+ | tail -n1`
+
+ if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
+ ewarn "MySQL MY_DATADIR has changed"
+ ewarn "from ${MY_DATADIR}"
+ ewarn "to ${new_MY_DATADIR}"
+ MY_DATADIR="${new_MY_DATADIR}"
+ fi
+ fi
+ fi
+
+ export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+ export MY_LOCALSTATEDIR MY_LOGDIR
+ export MY_DATADIR
+}
+
+pkg_config() {
+ _getoptval() {
+ local mypd="${EROOT}"/usr/bin/my_print_defaults
+ local section="$1"
+ local flag="--${2}="
+ local extra_options="${3}"
+ "${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
+ }
+ local old_MY_DATADIR="${MY_DATADIR}"
+ local old_HOME="${HOME}"
+ # my_print_defaults needs to read stuff in $HOME/.my.cnf
+ export HOME=${EPREFIX}/root
+
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ [[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
+ if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
+ die "Minimal builds do NOT include the MySQL server"
+ fi
+
+ if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
+ local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
+ MY_DATADIR_s="${MY_DATADIR_s%%/}"
+ local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
+ old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
+
+ if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
+ if [[ -d "${MY_DATADIR_s}" ]]; then
+ ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
+ ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
+ else
+ elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
+ mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
+ || die "Moving MY_DATADIR failed"
+ fi
+ else
+ ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
+ if [[ -d "${MY_DATADIR_s}" ]]; then
+ ewarn "Attempting to use ${MY_DATADIR_s}"
+ else
+ eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
+ die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
+ fi
+ fi
+ fi
+
+ local pwd1="a"
+ local pwd2="b"
+ local maxtry=15
+
+ 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
+ MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
+ # These are dir+prefix
+ MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
+ MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+ MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
+ MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+
+ if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
+ einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
+ install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
+ fi
+ if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
+ einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
+ install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
+ fi
+ if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
+ einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
+ install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
+ fi
+
+ if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
+ ewarn "You have already a MySQL database in place."
+ ewarn "(${ROOT}/${MY_DATADIR}/*)"
+ ewarn "Please rename or delete it if you wish to replace it."
+ die "MySQL database already exists!"
+ fi
+
+ # 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 "${MYSQL_ROOT_PASSWORD}" ]; then
+
+ einfo "Please provide a password for the mysql 'root' user now"
+ einfo "or through the ${HOME}/.my.cnf file."
+ ewarn "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
+ fi
+
+ local options
+ local sqltmp="$(emktemp)"
+
+ # Fix bug 446200. Don't reference host my.cnf, needs to come first,
+ # see https://bugs.mysql.com/bug.php?id=31312
+ use prefix && options="${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
+ for opt in grant-tables 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}" && options="${options} ${optfull}"
+ done
+
+ einfo "Creating the mysql database and setting proper permissions on it ..."
+
+ # Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
+ PID_DIR="${EROOT}/var/run/mysqld"
+ if [[ ! -d "${PID_DIR}" ]]; then
+ install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
+ fi
+
+ if [[ ! -d "${MY_DATADIR}" ]]; then
+ install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
+ fi
+
+ pushd "${TMPDIR}" &>/dev/null || die
+
+ # Filling timezones, see
+ # https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+ "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
+
+ local cmd=( "${EROOT}usr/share/mariadb/scripts/mysql_install_db" )
+ [[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
+ cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
+ einfo "Command: ${cmd[*]}"
+ su -s /bin/sh -c "${cmd[*]}" mysql \
+ >"${TMPDIR}"/mysql_install_db.log 2>&1
+ if [ $? -ne 0 ]; then
+ grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
+ die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
+ fi
+ popd &>/dev/null || die
+ [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
+ || die "MySQL databases not installed"
+
+ use prefix || options="${options} --user=mysql"
+
+ local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
+ local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
+ local mysqld="${EROOT}/usr/sbin/mysqld \
+ ${options} \
+ --log-warnings=0 \
+ --basedir=${EROOT}/usr \
+ --datadir=${ROOT}/${MY_DATADIR} \
+ --max_allowed_packet=8M \
+ --net_buffer_length=16K \
+ --socket=${socket} \
+ --pid-file=${pidfile}
+ --tmpdir=${ROOT}/${MYSQL_TMPDIR}"
+ #einfo "About to start mysqld: ${mysqld}"
+ ebegin "Starting mysqld"
+ einfo "Command ${mysqld}"
+ ${mysqld} &
+ rc=$?
+ while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
+ maxtry=$((${maxtry}-1))
+ echo -n "."
+ sleep 1
+ done
+ eend $rc
+
+ if ! [[ -S "${socket}" ]]; then
+ die "Completely failed to start up mysqld with: ${mysqld}"
+ fi
+
+ ebegin "Setting root password"
+ # Do this from memory, as we don't want clear text passwords in temp files
+ local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
+ "${EROOT}/usr/bin/mysql" \
+ "--socket=${socket}" \
+ -hlocalhost \
+ -e "${sql}"
+ eend $?
+
+ if [[ -n "${sqltmp}" ]] ; then
+ ebegin "Loading \"zoneinfo\", this step may require a few seconds"
+ "${EROOT}/usr/bin/mysql" \
+ "--socket=${socket}" \
+ -hlocalhost \
+ -uroot \
+ --password="${MYSQL_ROOT_PASSWORD}" \
+ mysql < "${sqltmp}"
+ rc=$?
+ eend $?
+ [[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
+ fi
+
+ # Stop the server and cleanup
+ einfo "Stopping the server ..."
+ kill $(< "${pidfile}" )
+ rm -f "${sqltmp}"
+ wait %1
+ einfo "Done"
+}
diff --git a/dev-db/mariadb-galera/metadata.xml b/dev-db/mariadb-galera/metadata.xml
new file mode 100644
index 000000000000..2e7afd2663cf
--- /dev/null
+++ b/dev-db/mariadb-galera/metadata.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>mysql-bugs@gentoo.org</email>
+ <name>MySQL</name>
+ </maintainer>
+<use>
+ <flag name="client-libs">Build the client libraries from the server package instead of the C Connector packages</flag>
+ <flag name="extraengine">Add support for alternative storage engines (Archive, CSV, Blackhole, Federated(X), Partition)</flag>
+ <flag name="jdbc">Enable the CONNECT engine to access foreign databases via JDBC</flag>
+ <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for allocations.</flag>
+ <flag name="latin1">Use LATIN1 encoding instead of UTF8</flag>
+ <flag name="libressl">Enable SSL connections and crypto functions using <pkg>dev-libs/libressl</pkg></flag>
+ <flag name="numa">Enable NUMA support using <pkg>sys-process/numactl</pkg> (NUMA kernel support is also required)</flag>
+ <flag name="oqgraph">Add support for the Open Query GRAPH engine</flag>
+ <flag name="profiling">Add support for statement profiling (requires USE=community).</flag>
+ <flag name="server">Build the server program</flag>
+ <flag name="sst-rsync">Add tools needed to support the rsync SST method</flag>
+ <flag name="sst-xtrabackup">Add tools needed to support the xtrabackup and xtrabackup-v2 SST methods</flag>
+ <flag name="systemtap">Build support for profiling and tracing using <pkg>dev-util/systemtap</pkg></flag>
+ <flag name="sphinx">Add suport for the sphinx full-text search engine</flag>
+ <flag name="test">Install upstream testsuites for end use.</flag>
+ <flag name="tokudb">Add support for TokuDB storage engine</flag>
+ <flag name="yassl">Enable SSL connections and crypto functions using the bundled yaSSL</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-db/mariadb/Manifest b/dev-db/mariadb/Manifest
new file mode 100644
index 000000000000..e2dd1124f336
--- /dev/null
+++ b/dev-db/mariadb/Manifest
@@ -0,0 +1,41 @@
+AUX my.cnf-10.2 140 BLAKE2B 3a56b7e38c3dc00215cae4bdc3270e30e85299d3290c0c995a611e4b8b15e66f40d6ac40ab18369e7863742ab6eda94259be5a7f363a26020c6fce28a7582e94 SHA512 85c650670e364f5f71842d9ab07b59c5de6e26e774e7192102562e56f94ed5f8fbc487cef31c134209c22b72fde38f7f53b7279cead97a8af608436d1ecc8857
+AUX my.cnf-5.1 4722 BLAKE2B 37993cf0be5a58359e197ae7b5b36e03c26ebdeac9531dfe21cd53d83d4741be6856ab8d6dc1c2e29fd0a281f1b75af7b23436a66afa1e2a45d1d4a13227571f SHA512 1b7c0d49cd13e265f1c52afda471e8365f3d679fe724a7dec296683355123f6b2fc7f8dd5c8e195d561f8ba68fcc5078d029b750dbb71d892b1ee828beda5a05
+AUX my.cnf-5.5 4805 BLAKE2B 39ffb485329b246867db03977661441ebfa71c8ac6275d5263ddfdaf189bad54b27884b98f6f901d9850514011c31b08f5ed7ef3e330a6a2cc7a91229fa524a8 SHA512 2826b9c5d751150e57bf11665d05257fae6e20fb97fae72fdcb460b653bd96198b5cbc94db6bf81c17e36e5554fbcec8dfd717f554b55a5d5d090e17ad49c819
+AUX my.cnf-5.6 4579 BLAKE2B 5d3bac1e59b6f0ca798c334dd72f7ad1d17168166e8e6d088aeb681a4403c63167a3d320c4bf8fd97ea7e45b275a43443bc4028f2a91a11362f182945e4a6401 SHA512 4a55807a119e847f6aa42c94a3c1761eb819d837a9d71a28afb71e5704195f920a0488d54cbeacbe978590c5f2b1dc9b743127cb9d2aa9e3813db226b5bdc356
+AUX my.cnf-5.6-r1 4597 BLAKE2B ae7eb874421819b8ce8e3c21e00f21bba1fb508a8d0ea4825f110b42521deca01726d3a8154c1c541119592b809ef6263d13e7701eba7dc8af201b3777c6d226 SHA512 5670fc67032656c5079fe5190ffef5443d5646ffae00d42e231c584e7688578a7df33dbe473749ea160e978152f5d94325eb023c748826aee89866694bc050f8
+AUX my.cnf.distro-client 637 BLAKE2B b9b6b01195a4e2523a0a1cb7efdf5c35579d394b12b7426cc7f2e65485d8c5bd54622b096be12fb9c1b252fc7311278d79ff922ba9332074e4f06419c5dba68e SHA512 85c0b0eb4281b398ca7c010042d69b4306ccebae9838bf7a1ee53c0d6bb12b20f95bcbd3bb359b107b018d456d7bcae8d168757ff34028ce69357ce3f3fbd54e
+AUX my.cnf.distro-server 998 BLAKE2B a7f2977a96d394cb7e24d72d82a1c21095c4b55607e5ca4a2c10619278796c328931a5ec076c15b60afef370c2e5da02ca0c628f330e876b4d2c984eeb54df5f SHA512 d9ab6f7fdfe08e6c242f84410ec680ef6aa6778c4bd55fee67c644e1a7d997446d8ef2129be6fc9833d16fe40cf17e09cdf0cf015f06bb145bbf9cfecb51e882
+DIST mariadb-10.0.33.tar.gz 69211872 BLAKE2B 02efa97a75ff13655e9a6d6ba562c4d14bd749b4873ac2f783f32494104f00517c2af63805afa552b6ba707aa412d61b8b3561d5d4d534bf9ad5c6f67b33cfe4 SHA512 9369399553ab336ba1ab20393b69fe5ba49e88ff86d9a448034a9d521e8d85216eb1093e040dd893fc2fb15344da3d57995074bd489be66a3b1457abab097104
+DIST mariadb-10.0.34.tar.gz 69266294 BLAKE2B ee8157d1b4d5d4cc096159efb3a20321486092eb28f35d120ee99b2260e52f46d1803b62df29a4fc905de23aa009dbb4666e8457903d97d5fdb14dcbfdda4b2c SHA512 46539ef37ec3b2fb00e7d546f3bbfe48eb86d0403d33e50b1bca40c145d69ca3ac8ddaa72ddb0c1f0aa41f3177aedfe1c6c0bdb7949d47efe49aed3ed52bd47b
+DIST mariadb-10.0.35.tar.gz 66551252 BLAKE2B 69cc9c78f7c47a4b1760940cb0f395b4053fcc47c1087a0c2af873d4a998ee60915e1f4e64f7fe6474c7c1fa3dabe48a3b6621c67893b20526f01e56b0542e7a SHA512 01fc8d48be3f3847bb222835436ab938c6c5b5ac8ba6cc87b3b6d2a2201b7ab4b152dc1f7d9749c89de90097d50052714ac08aafbbb117fffac32bfb47e74779
+DIST mariadb-10.1.29.tar.gz 67885370 BLAKE2B 40b94ed519522f16ee4687a9c569a0e52632d2aeccf65b87070de31118bf5e719cce78cf36afd4f1386166b14e418e0262ffbc3a61098c95e6ee101faf871ec5 SHA512 c169dfa2878f9fa9e0e9d12ca79fcbfa644e9b51bb0b78b8dd51d6c5679f3184d139fa96a1ddb25f3ae5d1c0489708c2c624f96a24020f77bf7e5247fac45ecd
+DIST mariadb-10.1.31.tar.gz 67982786 BLAKE2B 1fabbea67345024157be4be34a50c4e9c73b1a60def452321b6e9209d9fb16aace92e7ab1c37c168e5c9f6c52b623245e9df3171ce3f84e8fd0e840948b3e57f SHA512 db37ddb8ae5daf35b37d5132860c19c4a9b51c40005d05c5107f956ac5b4ecd447375b6f3a09bf59ea5aef2f4009314ed6e969ca2ac516722702b4da286dbd89
+DIST mariadb-10.1.33.tar.gz 65292094 BLAKE2B 3223f9476e946112f7c1d23cc82ff52636801244136343413ae00336173ec58bb4af8dc36e065f6cd27e9aa3f9f999b1d19f9257b928bd92555b34b614b9cf76 SHA512 1d30e06d0c19e338bfbbe6815cf5eee8e1b839b525950f7f54c7cf8f89034658a284df4756f54719ab0f55875546d4713b03bab7dd094ec13291732b069f737e
+DIST mariadb-10.1.34.tar.gz 65298561 BLAKE2B 3f3af7b8bad68a08f69befd3f3e7bd88b8cf058feb20309dc2cdbd16bf5d015c2cb0d1d9d2fdf831f6183c0b9bb25405124c24b2940467489e05d42c57f7b0a6 SHA512 3c18359006b340dcf724d1fce36dcc19916c42492269a7545e0726172b8f7b84860e10725c74e4458dae34572395f1650bf17838e9058544e0a6cfcbffd54f6d
+DIST mariadb-10.2.15.tar.gz 73329750 BLAKE2B e588f54d1b8807df1a57b87831294c70a7d21ed73bba96487a091338ee94855c2b796c939057546b9437b2caf96600ef6f7e111557249adaa9e18795a5a35ade SHA512 7702af8787973b15784dc8a89f9d56765725a420e2e68f1924b67c88c134c7d83d3249dddd16707fa9e5f05ed747f813f16feefbb477e999a6698b1dcfb5a88f
+DIST mariadb-10.2.16.tar.gz 73363798 BLAKE2B 31b4d21612f72ff2784b038479ccb866f8d870019c1ff86ff8fa11256e56e659203c83ba52294cc16d0d73531f1d30f5e4ab218a1daadd02223cda3e4c984590 SHA512 3ee476987580c9105645936bbbf29e5614753120247d8909833221c66d68bd507c99643b8b17f23e99644825ad03e03c841309731915e9101f3b5cf47c14e902
+DIST mariadb-10.3.6.tar.gz 71064269 BLAKE2B 681150a26de95cc276276a9b8d0b2c6e4a842dac80f20c2e8b0caeec5823cb956feffb494d18b1f2832e220c392c437424813de7720fb83a5d5c1fca71a4aef9 SHA512 cf146752be5857e702a3c88f42c7b6be3117bd92ac304eb217f902c1ffe478dc3043d3cf6a9a9305b51babb3bafc2612a8e4f5dfa7731cfa53634014d86438d1
+DIST mariadb-10.3.7.tar.gz 71816160 BLAKE2B 213cfe2999b48c088e08e8289a6243d79b91e465fce51850a253a121896f69df03f935940f25ac290e15e29f97b3a16f75711044b8986f6ec3841ef8beafa0b4 SHA512 b1b3ad9ddc45bdfd3d03888ba160f9991b23187341deac402d5dc4b735511e29767a5dc64ca557bea9bf3d3b413b941ef2e1f5fa30be056dfaec4542a43895f1
+DIST mariadb-10.3.8.tar.gz 72152953 BLAKE2B 4742be1d533c7958b61efd430411a1e7390faffc25ceccc09c736647fb263dc3797064725335abf17f9362c7a92293ea5fc72bc2ddd70636f83c25e35c4c83aa SHA512 e1b61900a06fa57992a2f8516771f5fb98799ed5a4bbe74f858c0fe87b907cc6b600942d6fe97b6064cb39b610a7213cb3bc9634a336f9ebffe11dfe67746422
+DIST mariadb-5.5.60.tar.gz 45822878 BLAKE2B 150a2d7108db2db18d66b56d961b05f8746f744e9453e341fde21f93bd846a3091a44c5df3baed6774d0ad12b8dc806b9bfdd177b4149f5be9d37af2a298f807 SHA512 eacf6ec57d46b00701b5038a67745174060d592b0e425466149c9a1b6dc1ac0659a36e57e82bf7e9f7865d8eac3dd50d0737630bd6220002d168b5b574437e4c
+DIST mysql-extras-20160721-1526Z.tar.bz2 301788 BLAKE2B 23ef75d0122e9e18382f708a86c61624e0437fad593b7f02ccb2b3939d710404e18e3b70617ed400e5f6947d3a92d2867a5f7d98bf61597442e99989f60ca4f7 SHA512 c7450039780e4e2684c932ba7c291c1de25dd1a64e4c6e88aa13b790768b4100955f36ae4a3bf983569ea23b43be02da6dad3d5985c1163ec9e8aa91f0efd85d
+DIST mysql-extras-20170926-1321Z.tar.bz2 312466 BLAKE2B 3e3e19a905961570cea9c1eb14dec3780da80409e996b1aeddb08625da875f5d08798a862cb1b80566b0d8be0d9ec2aab0a390ca90f991203c9871538b11f00a SHA512 556e782ccc40d8cffb2fde8c46038c90023440c07785ec667f898afdb8c802faeb4dbfe8b3918a1e563b46d1dc8c0de1172f7843ce08ee1ded435b344f8f0cf5
+DIST mysql-extras-20180515-0123Z.tar.bz2 320380 BLAKE2B a56e3ef19f4e30628fea9889dbb55379a8c92f08c9c493fe3f524b98fabf3505150fbe7cc65f97fc8b75632b5dd7360ddb9bd1542714c5e9916f94c2792ff3db SHA512 3e0b36ab4cb3f2e7d30f1fb2d8d3a916439611f1714475f2ab0480ba51176f47dcccd40931de4bd0a46b0aca6dfcb62cfc92b6939eed2e61628947bf664008ee
+DIST mysql-extras-20180515-1334Z.tar.bz2 321462 BLAKE2B 48fc1e0058fa824e6234b0f3319d261997e99f334c8583c0def4cdac4b59f2380d7153ab0fa2ca9a6ab15e35899c2a7586e3b61f4044c4c949110cc8ab9fb0e6 SHA512 de3000f0c65eed9595b52d53205cdcac60cb4a06a5aca27057c8beca6a7890f453aeeda0bb8487b8de75cfb4caa48682b7706273574876c5cefd0d03988c4f7e
+DIST mysql-extras-20180529-0042Z.tar.bz2 321715 BLAKE2B c40e7c8de7d24f1ab6208968f3e22aae9e7782f02edef1391d37583ba4a99e67646eba2b9fdcf2a77e3e5a3a86c36632edfebb42b12ab242662cf6913313168d SHA512 a136d9f9567a3bbd396c1e33d1d7b6565be16b5b0a514835299a09b009e9d908328066701bb1c6c19af74225b1d166e3f57af81b277b6d8fad9e63c009523586
+DIST mysql-extras-20180621-0218Z.tar.bz2 321959 BLAKE2B f444a3bd5e75c7ef491d175b1fc775a091c12870f4ac1003f0458dd5c7a1c91e09adec78013e828b4d8b16e96060426825b1650def8c22199dd59897b732359e SHA512 20523897dac98b369ab064932507034e547ffd283059285a4fb2bf1d63637c663d4d641dc91c5687de308a50eab3e75788d3cae720259a03d99b7e01f4146762
+EBUILD mariadb-10.0.33.ebuild 6719 BLAKE2B 047c09af4815c1b37c69e6af9330e1160f7b0121240715db0e70b53378237535f2406caf5b5a93deeaa0b698657dba108dc0550b9f9ae3c4c57781fa09b2dc11 SHA512 1acb699a7bcd105451598209f4d2edb227fce26c0865ad6588a50efdebedc6aec9f3b71206ffe91a2502f2ad39b9992710a1078e435944ad4400889702cb5d55
+EBUILD mariadb-10.0.34.ebuild 6720 BLAKE2B fb7d3b50cf280896d3a0b7e0013e2df38130583ad7318c7aec9562df125d364684d9107511402ad189b7af81a0032cde465e98a08cf651fc3ea3c5b8d48dec79 SHA512 21bbf7eb8a664030396dfe992960c056eb15694d5e722178a17dc9b7a8ef57273a0b7d6b24648a17ee12a4dc0ebefe6ab902023270b0ab338e0dd26358eb7c37
+EBUILD mariadb-10.0.35-r2.ebuild 27294 BLAKE2B 13a2c91f9e5a8baa08e71bbd52f109cf8cb4ae3453266f1ea51e1731d550dca518b630536e371334f8598acd96a9d3bd6ac7df37f4b98c27e10d24ed091d8ecb SHA512 49a4b0d79604071a92b0f0dca95139845c66c032301fb8a11ea15629353f9afa078122ede6ffc0f86d75b331c93a99c6b967382a4bde14e6e1774868aa471765
+EBUILD mariadb-10.0.35.ebuild 6763 BLAKE2B c4f4d33c3f6eee8bef8801efdfc9f0b03e709cbba8be50d191e659b280cd0b61043bd3a43d58f018195b53ae238a6c0d6134c75b394d6677b30733d9d05bdcfb SHA512 765af6d0288cbba81c8031fdfd8cf766416710938c98b50bd844a4dd165aea99aa2c5ff3647861cefb80f368d5a663a6d6b0660bc103b66222198535a1d724ba
+EBUILD mariadb-10.1.29.ebuild 7322 BLAKE2B fba21493641bc929ff1cdc9a9f3275681a5a47ea59c95b647f4f18ee27efe0672fc931772d703880fea019d50da54481d9b81abd0a4593a494a3181bfbb192bf SHA512 71a58c66cff52f97e6c341802631951fcfae777c1ac21d9ba4578556f9992c94cc560cb1dc46243fb16d89f96836eda384a74bc81756b4254a58dc476a1c3de6
+EBUILD mariadb-10.1.31-r1.ebuild 7887 BLAKE2B 87c53cdd7a2b71db846319c31f479d091e976df7c22de6381bcb7b9904e07f67ce64665d72618131ce2cab7f41dbf708c7fd698acb14a808eafa2fcd620f9c91 SHA512 227b60e701a6a9c1608e45fbae3148e815d39ce172f8d31c47add44416ab2a398cc771ca3e1745fb37d7a0b9d6fb0f42653a5f0694cdd7d8cba130ad19925572
+EBUILD mariadb-10.1.33.ebuild 7964 BLAKE2B 287e2e9464b4ba1e36c6555f65672d9ee86148507190121efbb0a0d1dce288a2f8f9c7309a7e400c446d3ad5191d1efbe8d899a3ef4b2ec7efa504043744671f SHA512 d9022bd84086fe9f64b019b9ec57f64028b81d656b57ded0b154e9f1123b02ea921e1a73577f86fbff2d41ba05972415dbd1d81ba54ecc3daef057adc2bfe80c
+EBUILD mariadb-10.1.34.ebuild 29137 BLAKE2B ba0b1c21106d0c21d3a198c9ed02a3e3257bfdf4b9b74ccd30a046f97d5364cec365969d1b2a497649cddfc6f4e2187edf67e7d64ae2eaf3bce504fb421c76b3 SHA512 b78fa9e047af71d6b18975d3e67515625a6d8342208019170fbdfa686e360a2e7465493b2adea0ab19bc27dbb3ad1dd24910336ae88ffb25e9aa5b5b26f52829
+EBUILD mariadb-10.2.15.ebuild 33302 BLAKE2B 89de6850682e46f62da74ce87b7425ceb1714f2fe998b7045d50bdf0a4871534f853f480d8ecb08a0fba6e0617e90edaa6c259f39df9899335cad0c2b6dfcda5 SHA512 4d1aae1914e7c9177154bb1d4a38f85980218a51a31b45a801b59d416824760ac0e72e4d0d9579d75748aea6f71bc3ec832623814c36444ada9b3f5dc133a9c9
+EBUILD mariadb-10.2.16.ebuild 33302 BLAKE2B 89de6850682e46f62da74ce87b7425ceb1714f2fe998b7045d50bdf0a4871534f853f480d8ecb08a0fba6e0617e90edaa6c259f39df9899335cad0c2b6dfcda5 SHA512 4d1aae1914e7c9177154bb1d4a38f85980218a51a31b45a801b59d416824760ac0e72e4d0d9579d75748aea6f71bc3ec832623814c36444ada9b3f5dc133a9c9
+EBUILD mariadb-10.3.6_rc.ebuild 33516 BLAKE2B 638931f75ffe9728d1ca5f7a49d9d4eeca4d8724dc5c13a8073df8affd3c2d4369717c7cedf404cc5aad32f8bf6ada1a2c0208eca61dbd407e0231e7ce839fda SHA512 762550c3c529e75f69864ea8d37409e54150a7ec459339432a51cc2fe4b937cb7d9948c8fcb5f25f35a2d012aff2366b8f9b3075cd30c15cce96a3f08f350e20
+EBUILD mariadb-10.3.7.ebuild 31857 BLAKE2B a0151273ae861f42400f363489938c5497ec15c4bda4b7c79c7a65a048123d951e5112b6374088f175e7d8adccb63e567a49560732d0720be77eeb62a9998ac2 SHA512 d8c674246faa964546f20daf4881401b06b79db1a11f1d713cbc0375da3bc7bb0d4d68265a17fb8812cd17c673abfd1abeb7c63a599e09d240051bb4f070725e
+EBUILD mariadb-10.3.8.ebuild 31857 BLAKE2B a0151273ae861f42400f363489938c5497ec15c4bda4b7c79c7a65a048123d951e5112b6374088f175e7d8adccb63e567a49560732d0720be77eeb62a9998ac2 SHA512 d8c674246faa964546f20daf4881401b06b79db1a11f1d713cbc0375da3bc7bb0d4d68265a17fb8812cd17c673abfd1abeb7c63a599e09d240051bb4f070725e
+EBUILD mariadb-5.5.60.ebuild 4254 BLAKE2B ee31137be4020cdb3626a93981eb2c667b4c9f8a543d52e272f4c2721f8ded71305a1caab6319a3a7cad25cbdf17a736abae3eb01062ffe5cc54c66da1b9703d SHA512 9d9ffc8ca65d6e4f7a64f4e6c1477096d46404d3a4401db1687ab5507452bbf4afb294667a2b01f7db8ba6953b8d935a40211fb006273462723846b960248920
+MISC metadata.xml 3172 BLAKE2B 9b546b51359c0881ee5ce452c89e788ff27300471433fb9d1eb28b3f72d47cd84787eac1d7fd536a8133aa56dd4dd9c1139afb4b3e83b463ce12b7d6cb0fa35f SHA512 143381d9443b778b4f8fb5545c6e8ac59e54eaba20458eecb757e292650a1fd5a470ded204f25c173f456cc222bd32f8b9885e00ecb00c9b4abfd639c9e98391
diff --git a/dev-db/mariadb/files/my.cnf-10.2 b/dev-db/mariadb/files/my.cnf-10.2
new file mode 100644
index 000000000000..80b47714b8f5
--- /dev/null
+++ b/dev-db/mariadb/files/my.cnf-10.2
@@ -0,0 +1,3 @@
+# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file.
+
+!includedir @GENTOO_PORTAGE_EPREFIX@/etc/mysql/mariadb.d
diff --git a/dev-db/mariadb/files/my.cnf-5.1 b/dev-db/mariadb/files/my.cnf-5.1
new file mode 100644
index 000000000000..ec5abfbde9d2
--- /dev/null
+++ b/dev-db/mariadb/files/my.cnf-5.1
@@ -0,0 +1,145 @@
+# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file.
+
+# The following options will be passed to all MySQL clients
+[client]
+#password = your_password
+port = 3306
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
+
+[mysql]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqladmin]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlcheck]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqldump]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlimport]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlshow]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[myisamchk]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+
+[myisampack]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+
+# use [safe_mysqld] with mysql-3
+[mysqld_safe]
+err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err
+
+# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations
+[mysqld]
+character-set-server = utf8
+user = mysql
+port = 3306
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
+pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid
+log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err
+basedir = @GENTOO_PORTAGE_EPREFIX@/usr
+datadir = @DATADIR@
+skip-external-locking
+key_buffer = 16M
+max_allowed_packet = 1M
+table_open_cache = 64
+sort_buffer_size = 512K
+net_buffer_length = 8K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+language = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/english
+
+# security:
+# using "localhost" in connects uses sockets by default
+# skip-networking
+bind-address = 127.0.0.1
+
+log-bin
+server-id = 1
+
+# point the following paths to different dedicated disks
+tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/
+#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname
+
+# you need the debug USE flag enabled to use the following directives,
+# if needed, uncomment them, start the server and issue
+# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace
+# this will show you *exactly* what's happening in your server ;)
+
+#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql
+#gdb
+#debug = d:t:i:o,/tmp/mysqld.trace
+#one-thread
+
+# uncomment the following directives if you are using BDB tables
+#bdb_cache_size = 4M
+#bdb_max_lock = 10000
+
+# the following is the InnoDB configuration
+# if you wish to disable innodb instead
+# uncomment just the next line
+#skip-innodb
+#
+# the rest of the innodb config follows:
+# don't eat too much memory, we're trying to be safe on 64Mb boxes
+# you might want to bump this up a bit on boxes with more RAM
+innodb_buffer_pool_size = 16M
+# this is the default, increase it if you have lots of tables
+innodb_additional_mem_pool_size = 2M
+#
+# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-(
+# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route
+# we have to take for the moment
+#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+#innodb_log_arch_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+# you may wish to change this size to be more suitable for your system
+# the max is there to avoid run-away growth on your machine
+innodb_data_file_path = ibdata1:10M:autoextend:max:128M
+# we keep this at around 25% of of innodb_buffer_pool_size
+# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size)
+innodb_log_file_size = 5M
+# this is the default, increase it if you have very large transactions going on
+innodb_log_buffer_size = 8M
+# this is the default and won't hurt you
+# you shouldn't need to tweak it
+innodb_log_files_in_group=2
+# see the innodb config docs, the other options are not always safe
+innodb_flush_log_at_trx_commit = 1
+innodb_lock_wait_timeout = 50
+innodb_file_per_table
+
+[mysqldump]
+quick
+max_allowed_packet = 16M
+
+[mysql]
+# uncomment the next directive if you are not familiar with SQL
+#safe-updates
+
+[isamchk]
+key_buffer = 20M
+sort_buffer_size = 20M
+read_buffer = 2M
+write_buffer = 2M
+
+[myisamchk]
+key_buffer = 20M
+sort_buffer_size = 20M
+read_buffer = 2M
+write_buffer = 2M
+
+[mysqlhotcopy]
+interactive-timeout
diff --git a/dev-db/mariadb/files/my.cnf-5.5 b/dev-db/mariadb/files/my.cnf-5.5
new file mode 100644
index 000000000000..dec0c4cb8ee3
--- /dev/null
+++ b/dev-db/mariadb/files/my.cnf-5.5
@@ -0,0 +1,149 @@
+# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file.
+
+# The following options will be passed to all MySQL clients
+[client]
+#password = your_password
+port = 3306
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
+
+[mysql]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqladmin]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlcheck]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqldump]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlimport]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlshow]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[myisamchk]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+
+[myisampack]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+
+# use [safe_mysqld] with mysql-3
+[mysqld_safe]
+err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err
+
+# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations
+[mysqld]
+character-set-server = utf8
+user = mysql
+port = 3306
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
+pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid
+log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err
+basedir = @GENTOO_PORTAGE_EPREFIX@/usr
+datadir = @DATADIR@
+skip-external-locking
+key_buffer_size = 16M
+max_allowed_packet = 1M
+table_open_cache = 64
+sort_buffer_size = 512K
+net_buffer_length = 8K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql
+#Set this to your desired error message language
+lc_messages = en_US
+
+# security:
+# using "localhost" in connects uses sockets by default
+# skip-networking
+bind-address = 127.0.0.1
+
+log-bin
+server-id = 1
+
+# point the following paths to different dedicated disks
+tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/
+#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname
+
+# you need the debug USE flag enabled to use the following directives,
+# if needed, uncomment them, start the server and issue
+# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace
+# this will show you *exactly* what's happening in your server ;)
+
+#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql
+#gdb
+#debug = d:t:i:o,/tmp/mysqld.trace
+#one-thread
+
+# the following is the InnoDB configuration
+# if you wish to disable innodb instead
+# uncomment just the next line
+#skip-innodb
+#
+# the rest of the innodb config follows:
+# don't eat too much memory, we're trying to be safe on 64Mb boxes
+# you might want to bump this up a bit on boxes with more RAM
+innodb_buffer_pool_size = 16M
+# this is the default, increase it if you have lots of tables
+innodb_additional_mem_pool_size = 2M
+#
+# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-(
+# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route
+# we have to take for the moment
+#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+#innodb_log_arch_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+# you may wish to change this size to be more suitable for your system
+# the max is there to avoid run-away growth on your machine
+innodb_data_file_path = ibdata1:10M:autoextend:max:128M
+# we keep this at around 25% of of innodb_buffer_pool_size
+# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size)
+innodb_log_file_size = 5M
+# this is the default, increase it if you have very large transactions going on
+innodb_log_buffer_size = 8M
+# this is the default and won't hurt you
+# you shouldn't need to tweak it
+innodb_log_files_in_group=2
+# see the innodb config docs, the other options are not always safe
+innodb_flush_log_at_trx_commit = 1
+innodb_lock_wait_timeout = 50
+innodb_file_per_table
+
+# Uncomment this to get FEDERATED engine support
+#plugin-load=federated=ha_federated.so
+loose-federated
+
+[mysqldump]
+quick
+max_allowed_packet = 16M
+
+[mysql]
+# uncomment the next directive if you are not familiar with SQL
+#safe-updates
+
+[isamchk]
+key_buffer_size = 20M
+sort_buffer_size = 20M
+read_buffer = 2M
+write_buffer = 2M
+
+[myisamchk]
+key_buffer_size = 20M
+sort_buffer_size = 20M
+read_buffer_size = 2M
+write_buffer_size = 2M
+
+[mysqlhotcopy]
+interactive-timeout
+
+[mariadb]
diff --git a/dev-db/mariadb/files/my.cnf-5.6 b/dev-db/mariadb/files/my.cnf-5.6
new file mode 100644
index 000000000000..f3a433d39566
--- /dev/null
+++ b/dev-db/mariadb/files/my.cnf-5.6
@@ -0,0 +1,142 @@
+# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file.
+
+# The following options will be passed to all MySQL clients
+[client]
+#password = your_password
+port = 3306
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
+
+[mysql]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqladmin]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlcheck]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqldump]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlimport]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlshow]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[myisamchk]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+
+[myisampack]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+
+# use [safe_mysqld] with mysql-3
+[mysqld_safe]
+err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err
+
+# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations
+[mysqld]
+character-set-server = utf8
+user = mysql
+port = 3306
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
+pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid
+log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err
+basedir = @GENTOO_PORTAGE_EPREFIX@/usr
+datadir = @DATADIR@
+skip-external-locking
+key_buffer_size = 16M
+max_allowed_packet = 4M
+table_open_cache = 400
+sort_buffer_size = 512K
+net_buffer_length = 16K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql
+#Set this to your desired error message language
+lc_messages = en_US
+
+# security:
+# using "localhost" in connects uses sockets by default
+# skip-networking
+bind-address = 127.0.0.1
+
+log-bin
+server-id = 1
+
+# point the following paths to different dedicated disks
+tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/
+#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname
+
+# you need the debug USE flag enabled to use the following directives,
+# if needed, uncomment them, start the server and issue
+# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace
+# this will show you *exactly* what's happening in your server ;)
+
+#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql
+#gdb
+#debug = d:t:i:o,/tmp/mysqld.trace
+#one-thread
+
+# the rest of the innodb config follows:
+# don't eat too much memory, we're trying to be safe on 64Mb boxes
+# you might want to bump this up a bit on boxes with more RAM
+innodb_buffer_pool_size = 128M
+#
+# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-(
+# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route
+# we have to take for the moment
+#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+#innodb_log_arch_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+# you may wish to change this size to be more suitable for your system
+# the max is there to avoid run-away growth on your machine
+innodb_data_file_path = ibdata1:10M:autoextend:max:128M
+# we keep this at around 25% of of innodb_buffer_pool_size
+# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size)
+innodb_log_file_size = 48M
+# this is the default, increase it if you have very large transactions going on
+innodb_log_buffer_size = 8M
+# this is the default and won't hurt you
+# you shouldn't need to tweak it
+innodb_log_files_in_group=2
+# see the innodb config docs, the other options are not always safe
+innodb_flush_log_at_trx_commit = 1
+innodb_lock_wait_timeout = 50
+innodb_file_per_table
+
+# Uncomment this to get FEDERATED engine support
+#plugin-load=federated=ha_federated.so
+loose-federated
+
+[mysqldump]
+quick
+max_allowed_packet = 16M
+
+[mysql]
+# uncomment the next directive if you are not familiar with SQL
+#safe-updates
+
+[isamchk]
+key_buffer_size = 20M
+sort_buffer_size = 20M
+read_buffer = 2M
+write_buffer = 2M
+
+[myisamchk]
+key_buffer_size = 20M
+sort_buffer_size = 20M
+read_buffer_size = 2M
+write_buffer_size = 2M
+
+[mysqlhotcopy]
+interactive-timeout
+
+[mariadb]
diff --git a/dev-db/mariadb/files/my.cnf-5.6-r1 b/dev-db/mariadb/files/my.cnf-5.6-r1
new file mode 100644
index 000000000000..cde5312a5687
--- /dev/null
+++ b/dev-db/mariadb/files/my.cnf-5.6-r1
@@ -0,0 +1,142 @@
+# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file.
+
+# The following options will be passed to all MySQL clients
+[client]
+#password = your_password
+port = 3306
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
+
+[mysql]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb/charsets
+default-character-set=utf8
+
+[mysqladmin]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb/charsets
+default-character-set=utf8
+
+[mysqlcheck]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb/charsets
+default-character-set=utf8
+
+[mysqldump]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb/charsets
+default-character-set=utf8
+
+[mysqlimport]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb/charsets
+default-character-set=utf8
+
+[mysqlshow]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb/charsets
+default-character-set=utf8
+
+[myisamchk]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb/charsets
+
+[myisampack]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb/charsets
+
+# use [safe_mysqld] with mysql-3
+[mysqld_safe]
+err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err
+
+# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations
+[mysqld]
+character-set-server = utf8
+user = mysql
+port = 3306
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
+pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid
+log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err
+basedir = @GENTOO_PORTAGE_EPREFIX@/usr
+datadir = @DATADIR@
+skip-external-locking
+key_buffer_size = 16M
+max_allowed_packet = 4M
+table_open_cache = 400
+sort_buffer_size = 512K
+net_buffer_length = 16K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb
+#Set this to your desired error message language
+lc_messages = en_US
+
+# security:
+# using "localhost" in connects uses sockets by default
+# skip-networking
+bind-address = 127.0.0.1
+
+log-bin
+server-id = 1
+
+# point the following paths to different dedicated disks
+tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/
+#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname
+
+# you need the debug USE flag enabled to use the following directives,
+# if needed, uncomment them, start the server and issue
+# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace
+# this will show you *exactly* what's happening in your server ;)
+
+#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql
+#gdb
+#debug = d:t:i:o,/tmp/mysqld.trace
+#one-thread
+
+# the rest of the innodb config follows:
+# don't eat too much memory, we're trying to be safe on 64Mb boxes
+# you might want to bump this up a bit on boxes with more RAM
+innodb_buffer_pool_size = 128M
+#
+# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-(
+# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route
+# we have to take for the moment
+#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+#innodb_log_arch_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+# you may wish to change this size to be more suitable for your system
+# the max is there to avoid run-away growth on your machine
+innodb_data_file_path = ibdata1:10M:autoextend:max:128M
+# we keep this at around 25% of of innodb_buffer_pool_size
+# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size)
+innodb_log_file_size = 48M
+# this is the default, increase it if you have very large transactions going on
+innodb_log_buffer_size = 8M
+# this is the default and won't hurt you
+# you shouldn't need to tweak it
+innodb_log_files_in_group=2
+# see the innodb config docs, the other options are not always safe
+innodb_flush_log_at_trx_commit = 1
+innodb_lock_wait_timeout = 50
+innodb_file_per_table
+
+# Uncomment this to get FEDERATED engine support
+#plugin-load=federated=ha_federated.so
+loose-federated
+
+[mysqldump]
+quick
+max_allowed_packet = 16M
+
+[mysql]
+# uncomment the next directive if you are not familiar with SQL
+#safe-updates
+
+[isamchk]
+key_buffer_size = 20M
+sort_buffer_size = 20M
+read_buffer = 2M
+write_buffer = 2M
+
+[myisamchk]
+key_buffer_size = 20M
+sort_buffer_size = 20M
+read_buffer_size = 2M
+write_buffer_size = 2M
+
+[mysqlhotcopy]
+interactive-timeout
+
+[mariadb]
diff --git a/dev-db/mariadb/files/my.cnf.distro-client b/dev-db/mariadb/files/my.cnf.distro-client
new file mode 100644
index 000000000000..4bbe0f976c63
--- /dev/null
+++ b/dev-db/mariadb/files/my.cnf.distro-client
@@ -0,0 +1,21 @@
+# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/50-distro-client.cnf: The global mysql configuration file.
+
+# The following options will be passed to all MySQL clients
+[client]
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
+character-sets-dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb/charsets
+default-character-set=utf8
+
+[mysql]
+# uncomment the next directive if you are not familiar with SQL
+#safe-updates
+
+[mysqldump]
+quick
+max_allowed_packet = 16M
+
+[myisamchk]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb/charsets
+
+[myisampack]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb/charsets
diff --git a/dev-db/mariadb/files/my.cnf.distro-server b/dev-db/mariadb/files/my.cnf.distro-server
new file mode 100644
index 000000000000..eaf80be0a15d
--- /dev/null
+++ b/dev-db/mariadb/files/my.cnf.distro-server
@@ -0,0 +1,28 @@
+# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/50-distro-server.cnf: The global mysql configuration file.
+
+# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations
+[mysqld]
+character-set-server = utf8
+user = mysql
+port = 3306
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
+pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mariadb.pid
+log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err
+basedir = @GENTOO_PORTAGE_EPREFIX@/usr
+datadir = @DATADIR@
+skip-external-locking
+lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb
+#Set this to your desired error message language
+lc_messages = en_US
+
+# security:
+# using "localhost" in connects uses sockets by default
+# skip-networking
+bind-address = 127.0.0.1
+
+log-bin
+server-id = 1
+
+# point the following paths to different dedicated disks
+tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/
+#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname
diff --git a/dev-db/mariadb/mariadb-10.0.33.ebuild b/dev-db/mariadb/mariadb-10.0.33.ebuild
new file mode 100644
index 000000000000..4efb85756bb8
--- /dev/null
+++ b/dev-db/mariadb/mariadb-10.0.33.ebuild
@@ -0,0 +1,209 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20170926-1321Z"
+SUBSLOT="18"
+MYSQL_PV_MAJOR="5.6"
+
+JAVA_PKG_OPT_USE="jdbc"
+
+inherit toolchain-funcs java-pkg-opt-2 mysql-multilib-r1
+
+HOMEPAGE="https://mariadb.org/"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL"
+
+IUSE="bindist jdbc odbc oqgraph pam sphinx tokudb xml"
+RESTRICT="!bindist? ( bindist )"
+
+REQUIRED_USE="jdbc? ( extraengine server !static ) server? ( tokudb? ( jemalloc !tcmalloc ) ) static? ( !pam )"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+PATCHES=(
+ "${MY_PATCH_DIR}/01050_all_mariadb_mysql_config_cleanup-5.5.41.patch"
+ "${MY_PATCH_DIR}/20006_all_cmake_elib-mariadb-10.0.33.patch"
+ "${MY_PATCH_DIR}/20009_all_mariadb_myodbc_symbol_fix-5.5.38.patch"
+ "${MY_PATCH_DIR}/20018_all_mariadb-10.0.20-without-clientlibs-tools.patch"
+)
+COMMON_DEPEND="
+ !bindist? ( >=sys-libs/readline-4.1:0= )
+ server? (
+ extraengine? (
+ odbc? ( dev-db/unixODBC:0= )
+ xml? ( dev-libs/libxml2:2= )
+ sys-libs/zlib[minizip]
+ )
+ oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
+ pam? ( virtual/pam:0= )
+ tokudb? ( app-arch/snappy )
+ )
+ >=dev-libs/libpcre-8.41-r1:3=[${MULTILIB_USEDEP}]
+"
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+ server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) )
+ ${COMMON_DEPEND}"
+RDEPEND="${RDEPEND} ${COMMON_DEPEND}
+ perl? ( !dev-db/mytop
+ virtual/perl-Getopt-Long
+ dev-perl/TermReadKey
+ virtual/perl-Term-ANSIColor
+ virtual/perl-Time-HiRes )
+ server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) )
+"
+MULTILIB_WRAPPED_HEADERS+=( /usr/include/mysql/mysql_version.h
+ /usr/include/mysql/private/probes_mysql_nodtrace.h
+ /usr/include/mysql/private/probes_mysql_dtrace.h )
+
+pkg_setup() {
+ java-pkg-opt-2_pkg_setup
+ mysql-multilib-r1_pkg_setup
+}
+
+pkg_preinst() {
+ java-pkg-opt-2_pkg_preinst
+ mysql-multilib-r1_pkg_preinst
+}
+
+src_prepare() {
+ java-pkg-opt-2_src_prepare
+ mysql-multilib-r1_src_prepare
+}
+
+src_configure(){
+ # bug 508724 mariadb cannot use ld.gold
+ tc-ld-disable-gold
+ local MYSQL_CMAKE_NATIVE_DEFINES=(
+ -DWITH_JEMALLOC=$(usex jemalloc system)
+ -DWITH_PCRE=system
+ )
+ if use server ; then
+ # Federated{,X} must be treated special otherwise they will not be built as plugins
+ if ! use extraengine ; then
+ MYSQL_CMAKE_NATIVE_DEFINES+=(
+ -DWITHOUT_FEDERATED=1
+ -DWITHOUT_FEDERATEDX=1 )
+ fi
+
+ # Connect with Zip is currently broken and does not compile
+ # Reported upstream https://jira.mariadb.org/browse/MDEV-11809
+
+ MYSQL_CMAKE_NATIVE_DEFINES+=(
+ $(mysql-cmake_use_plugin oqgraph OQGRAPH)
+ $(mysql-cmake_use_plugin sphinx SPHINX)
+ $(mysql-cmake_use_plugin tokudb TOKUDB)
+ $(mysql-cmake_use_plugin pam AUTH_PAM)
+ $(mysql-cmake_use_plugin extraengine SEQUENCE)
+ $(mysql-cmake_use_plugin extraengine SPIDER)
+ $(mysql-cmake_use_plugin extraengine CONNECT)
+ -DCONNECT_WITH_LIBXML2=$(usex xml)
+ -DCONNECT_WITH_ODBC=$(usex odbc)
+ -DCONNECT_WITH_JDBC=$(usex jdbc)
+ -DWITHOUT_MROONGA=1
+ )
+ fi
+ mysql-multilib-r1_src_configure
+}
+
+# Official test instructions:
+# USE='extraengine perl server openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mariadb-X.X.XX.ebuild \
+# digest clean package
+multilib_src_test() {
+
+ if ! multilib_is_native_abi ; then
+ einfo "Server tests not available on non-native abi".
+ return 0;
+ fi
+
+ local TESTDIR="${BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ if use server ; then
+
+ # 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 [[ $UID -eq 0 ]]; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+ has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ addpredict /this-dir-does-not-exist/t9.MYI
+
+ # Run CTest (test-units)
+ cmake-utils_src_test
+ retstatus_unit=$?
+ [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+ # Enable parallel testing, auto will try to detect number of cores
+ # You may set this by hand.
+ # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+ export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+ # create directories because mysqladmin might run out of order
+ mkdir -p "${T}"/var-tests{,/log}
+
+ # These are failing in MariaDB 10.0 for now and are believed to be
+ # false positives:
+ #
+ # main.information_schema, binlog.binlog_statement_insert_delayed,
+ # main.mysqld--help, funcs_1.is_triggers, funcs_1.is_tables_mysql,
+ # funcs_1.is_columns_mysql main.bootstrap
+ # fails due to USE=-latin1 / utf8 default
+ #
+ # main.mysql_client_test, main.mysql_client_test_nonblock
+ # main.mysql_client_test_comp:
+ # segfaults at random under Portage only, suspect resource limits.
+ #
+ # archive.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+ # fails due to bad cleanup of previous tests when run in parallel
+ # The tool is deprecated anyway
+ # Bug 532288
+
+#main.bootstrap \
+ for t in connect.drop-open-error ; do
+# main.mysql_client_test_comp \
+# binlog.binlog_statement_insert_delayed main.information_schema \
+# main.mysqld--help \
+# archive.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
+# funcs_1.is_triggers funcs_1.is_tables_mysql funcs_1.is_columns_mysql ; do
+ mysql-multilib-r1_disable_test "$t" "False positives in Gentoo"
+ done
+
+ # Run mysql tests
+ pushd "${TESTDIR}" || die
+
+ # run mysql-test tests
+ perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder
+
+ retstatus_tests=$?
+ [[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+ has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+ popd || die
+
+ # Cleanup is important for these testcases.
+ pkill -9 -f "${S}/ndb" 2>/dev/null
+ pkill -9 -f "${S}/sql" 2>/dev/null
+
+ failures=""
+ [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+ [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+ has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+ [[ -z "$failures" ]] || die "Test failures: $failures"
+ einfo "Tests successfully completed"
+
+ else
+ einfo "Skipping server tests due to minimal build."
+ fi
+}
diff --git a/dev-db/mariadb/mariadb-10.0.34.ebuild b/dev-db/mariadb/mariadb-10.0.34.ebuild
new file mode 100644
index 000000000000..d1b812cfdda4
--- /dev/null
+++ b/dev-db/mariadb/mariadb-10.0.34.ebuild
@@ -0,0 +1,209 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20170926-1321Z"
+SUBSLOT="18"
+MYSQL_PV_MAJOR="5.6"
+
+JAVA_PKG_OPT_USE="jdbc"
+
+inherit toolchain-funcs java-pkg-opt-2 mysql-multilib-r1
+
+HOMEPAGE="https://mariadb.org/"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL"
+
+IUSE="bindist jdbc odbc oqgraph pam sphinx tokudb xml"
+RESTRICT="!bindist? ( bindist )"
+
+REQUIRED_USE="jdbc? ( extraengine server !static ) server? ( tokudb? ( jemalloc !tcmalloc ) ) static? ( !pam )"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+PATCHES=(
+ "${MY_PATCH_DIR}/01050_all_mariadb_mysql_config_cleanup-5.5.41.patch"
+ "${MY_PATCH_DIR}/20006_all_cmake_elib-mariadb-10.0.33.patch"
+ "${MY_PATCH_DIR}/20009_all_mariadb_myodbc_symbol_fix-5.5.38.patch"
+ "${MY_PATCH_DIR}/20018_all_mariadb-10.0.20-without-clientlibs-tools.patch"
+)
+COMMON_DEPEND="
+ !bindist? ( >=sys-libs/readline-4.1:0= )
+ server? (
+ extraengine? (
+ odbc? ( dev-db/unixODBC:0= )
+ xml? ( dev-libs/libxml2:2= )
+ sys-libs/zlib[minizip]
+ )
+ oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
+ pam? ( virtual/pam:0= )
+ tokudb? ( app-arch/snappy )
+ )
+ >=dev-libs/libpcre-8.41-r1:3=[${MULTILIB_USEDEP}]
+"
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+ server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) )
+ ${COMMON_DEPEND}"
+RDEPEND="${RDEPEND} ${COMMON_DEPEND}
+ perl? ( !dev-db/mytop
+ virtual/perl-Getopt-Long
+ dev-perl/TermReadKey
+ virtual/perl-Term-ANSIColor
+ virtual/perl-Time-HiRes )
+ server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) )
+"
+MULTILIB_WRAPPED_HEADERS+=( /usr/include/mysql/mysql_version.h
+ /usr/include/mysql/private/probes_mysql_nodtrace.h
+ /usr/include/mysql/private/probes_mysql_dtrace.h )
+
+pkg_setup() {
+ java-pkg-opt-2_pkg_setup
+ mysql-multilib-r1_pkg_setup
+}
+
+pkg_preinst() {
+ java-pkg-opt-2_pkg_preinst
+ mysql-multilib-r1_pkg_preinst
+}
+
+src_prepare() {
+ java-pkg-opt-2_src_prepare
+ mysql-multilib-r1_src_prepare
+}
+
+src_configure(){
+ # bug 508724 mariadb cannot use ld.gold
+ tc-ld-disable-gold
+ local MYSQL_CMAKE_NATIVE_DEFINES=(
+ -DWITH_JEMALLOC=$(usex jemalloc system)
+ -DWITH_PCRE=system
+ )
+ if use server ; then
+ # Federated{,X} must be treated special otherwise they will not be built as plugins
+ if ! use extraengine ; then
+ MYSQL_CMAKE_NATIVE_DEFINES+=(
+ -DWITHOUT_FEDERATED=1
+ -DWITHOUT_FEDERATEDX=1 )
+ fi
+
+ # Connect with Zip is currently broken and does not compile
+ # Reported upstream https://jira.mariadb.org/browse/MDEV-11809
+
+ MYSQL_CMAKE_NATIVE_DEFINES+=(
+ $(mysql-cmake_use_plugin oqgraph OQGRAPH)
+ $(mysql-cmake_use_plugin sphinx SPHINX)
+ $(mysql-cmake_use_plugin tokudb TOKUDB)
+ $(mysql-cmake_use_plugin pam AUTH_PAM)
+ $(mysql-cmake_use_plugin extraengine SEQUENCE)
+ $(mysql-cmake_use_plugin extraengine SPIDER)
+ $(mysql-cmake_use_plugin extraengine CONNECT)
+ -DCONNECT_WITH_LIBXML2=$(usex xml)
+ -DCONNECT_WITH_ODBC=$(usex odbc)
+ -DCONNECT_WITH_JDBC=$(usex jdbc)
+ -DWITHOUT_MROONGA=1
+ )
+ fi
+ mysql-multilib-r1_src_configure
+}
+
+# Official test instructions:
+# USE='extraengine perl server openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mariadb-X.X.XX.ebuild \
+# digest clean package
+multilib_src_test() {
+
+ if ! multilib_is_native_abi ; then
+ einfo "Server tests not available on non-native abi".
+ return 0;
+ fi
+
+ local TESTDIR="${BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ if use server ; then
+
+ # 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 [[ $UID -eq 0 ]]; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+ has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ addpredict /this-dir-does-not-exist/t9.MYI
+
+ # Run CTest (test-units)
+ cmake-utils_src_test
+ retstatus_unit=$?
+ [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+ # Enable parallel testing, auto will try to detect number of cores
+ # You may set this by hand.
+ # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+ export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+ # create directories because mysqladmin might run out of order
+ mkdir -p "${T}"/var-tests{,/log}
+
+ # These are failing in MariaDB 10.0 for now and are believed to be
+ # false positives:
+ #
+ # main.information_schema, binlog.binlog_statement_insert_delayed,
+ # main.mysqld--help, funcs_1.is_triggers, funcs_1.is_tables_mysql,
+ # funcs_1.is_columns_mysql main.bootstrap
+ # fails due to USE=-latin1 / utf8 default
+ #
+ # main.mysql_client_test, main.mysql_client_test_nonblock
+ # main.mysql_client_test_comp:
+ # segfaults at random under Portage only, suspect resource limits.
+ #
+ # archive.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+ # fails due to bad cleanup of previous tests when run in parallel
+ # The tool is deprecated anyway
+ # Bug 532288
+
+#main.bootstrap \
+ for t in connect.drop-open-error ; do
+# main.mysql_client_test_comp \
+# binlog.binlog_statement_insert_delayed main.information_schema \
+# main.mysqld--help \
+# archive.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
+# funcs_1.is_triggers funcs_1.is_tables_mysql funcs_1.is_columns_mysql ; do
+ mysql-multilib-r1_disable_test "$t" "False positives in Gentoo"
+ done
+
+ # Run mysql tests
+ pushd "${TESTDIR}" || die
+
+ # run mysql-test tests
+ perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder
+
+ retstatus_tests=$?
+ [[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+ has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+ popd || die
+
+ # Cleanup is important for these testcases.
+ pkill -9 -f "${S}/ndb" 2>/dev/null
+ pkill -9 -f "${S}/sql" 2>/dev/null
+
+ failures=""
+ [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+ [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+ has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+ [[ -z "$failures" ]] || die "Test failures: $failures"
+ einfo "Tests successfully completed"
+
+ else
+ einfo "Skipping server tests due to minimal build."
+ fi
+}
diff --git a/dev-db/mariadb/mariadb-10.0.35-r2.ebuild b/dev-db/mariadb/mariadb-10.0.35-r2.ebuild
new file mode 100644
index 000000000000..894bbb803b7e
--- /dev/null
+++ b/dev-db/mariadb/mariadb-10.0.35-r2.ebuild
@@ -0,0 +1,844 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20180515-1334Z"
+SUBSLOT="18"
+
+JAVA_PKG_OPT_USE="jdbc"
+
+# Keeping eutils in EAPI=6 for emktemp in pkg_config
+
+inherit eutils flag-o-matic prefix toolchain-funcs java-pkg-opt-2 user cmake-utils multilib-build
+
+SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz "
+
+# Gentoo patches to MySQL
+if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
+ SRC_URI="${SRC_URI}
+ mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
+fi
+
+HOMEPAGE="https://mariadb.org/"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL"
+LICENSE="GPL-2"
+SLOT="0/${SUBSLOT:-0}"
+IUSE="bindist client-libs debug extraengine jdbc jemalloc latin1 libressl
+ numa odbc oqgraph pam +perl profiling selinux +server sphinx
+ static static-libs systemtap tcmalloc
+ test tokudb xml yassl"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="!bindist? ( bindist ) libressl? ( test )"
+
+REQUIRED_USE="jdbc? ( extraengine server !static )
+ server? ( tokudb? ( jemalloc !tcmalloc ) )
+ ?? ( tcmalloc jemalloc )
+ static? ( yassl !pam )"
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-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"
+
+if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
+ MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
+ inherit git-r3
+ EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
+ EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras"
+ EGIT_CLONE_TYPE=shallow
+else
+ MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
+fi
+
+PATCHES=(
+ "${MY_PATCH_DIR}/01050_all_mariadb_mysql_config_cleanup-5.5.41.patch"
+ "${MY_PATCH_DIR}/20006_all_cmake_elib-mariadb-10.0.33.patch"
+ "${MY_PATCH_DIR}/20009_all_mariadb_myodbc_symbol_fix-5.5.38.patch"
+ "${MY_PATCH_DIR}/20018_all_mariadb-10.0.20-without-clientlibs-tools.patch"
+)
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+COMMON_DEPEND="
+ kernel_linux? (
+ sys-process/procps:0=
+ dev-libs/libaio:0=
+ )
+ >=sys-apps/sed-4
+ >=sys-apps/texinfo-4.7-r1
+ jemalloc? ( dev-libs/jemalloc:0= )
+ tcmalloc? ( dev-util/google-perftools:0= )
+ systemtap? ( >=dev-util/systemtap-1.3:0= )
+ !yassl? (
+ !libressl? ( dev-libs/openssl:0= !>=dev-libs/openssl-1.1 )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ >=sys-libs/zlib-1.2.3:0=
+ sys-libs/ncurses:0=
+ !bindist? (
+ >=sys-libs/readline-4.1:0=
+ )
+ server? (
+ extraengine? (
+ odbc? ( dev-db/unixODBC:0= )
+ xml? ( dev-libs/libxml2:2= )
+ )
+ numa? ( sys-process/numactl )
+ oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
+ pam? ( virtual/pam:0= )
+ tokudb? ( app-arch/snappy )
+ )
+ >=dev-libs/libpcre-8.41-r1:3=
+ !client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
+"
+DEPEND="virtual/yacc
+ static? ( sys-libs/ncurses[static-libs] )
+ || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+ server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) )
+ ${COMMON_DEPEND}"
+RDEPEND="selinux? ( sec-policy/selinux-mysql )
+ client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
+ !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+ server? ( !prefix? ( dev-db/mysql-init-scripts ) )
+ ${COMMON_DEPEND}
+ perl? ( !dev-db/mytop
+ virtual/perl-Getopt-Long
+ dev-perl/TermReadKey
+ virtual/perl-Term-ANSIColor
+ virtual/perl-Time-HiRes )
+ server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) )
+"
+# 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 )"
+
+pkg_setup() {
+ if [[ ${MERGE_TYPE} != binary ]] ; then
+ local GCC_MAJOR_SET=$(gcc-major-version)
+ local GCC_MINOR_SET=$(gcc-minor-version)
+ if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \
+ ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+ eerror "${PN} with tokudb needs to be built with gcc-4.7 or later."
+ eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+ die
+ fi
+ # Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on
+ # non x86{,_64} arches
+ if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
+ ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+ eerror "${PN} needs to be built with gcc-4.7 or later."
+ eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+ die
+ fi
+ fi
+ java-pkg-opt-2_pkg_setup
+ if has test ${FEATURES} && \
+ use server && ! has userpriv ${FEATURES} ; then
+ eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+
+ # This should come after all of the die statements
+ enewgroup mysql 60 || die "problem adding 'mysql' group"
+ enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
+}
+
+pkg_preinst() {
+ java-pkg-opt-2_pkg_preinst
+}
+
+pkg_postinst() {
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ # Create log directory securely if it does not exist
+ [[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+ if use server ; then
+ if use pam; then
+ einfo
+ elog "This install includes the PAM authentication plugin."
+ elog "To activate and configure the PAM plugin, please read:"
+ elog "https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/"
+ einfo
+ fi
+
+ if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+ einfo
+ elog "You might want to run:"
+ elog "\"emerge --config =${CATEGORY}/${PF}\""
+ elog "if this is a new install."
+ elog
+ elog "If you are switching server implentations, you should run the"
+ elog "mysql_upgrade tool."
+ einfo
+ else
+ einfo
+ elog "If you are upgrading major versions, you should run the"
+ elog "mysql_upgrade tool."
+ einfo
+ fi
+
+ einfo
+ elog "Be sure to edit the my.cnf file to activate your cluster settings."
+ elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
+ elog "The first time the cluster is activated, you should add"
+ elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
+ elog "This option should then be removed for subsequent starts."
+ einfo
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ # Grab the patches
+ [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR%/}/mysql-extras" git-r3_src_unpack
+
+ mv -f "${WORKDIR%/}/${P}" "${S}" || die
+}
+
+src_prepare() {
+ _disable_engine() {
+ echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
+ }
+
+ _disable_plugin() {
+ echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
+ }
+
+ java-pkg-opt-2_src_prepare
+ if use tcmalloc; then
+ echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S%/}/sql/CMakeLists.txt" || die
+ fi
+
+ # Don't build bundled xz-utils for tokudb
+ echo > "${S%/}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
+ sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S%/}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
+ sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S%/}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
+
+ local plugin
+ local server_plugins=( handler_socket auth_socket feedback metadata_lock_info
+ locale_info qc_info server_audit semisync sql_errlog )
+ local test_plugins=( audit_null auth_examples daemon_example fulltext )
+ if ! use server; then # These plugins are for the server
+ for plugin in "${server_plugins[@]}" ; do
+ _disable_plugin "${plugin}"
+ done
+ fi
+
+ if ! use test; then # These plugins are only used during testing
+ for plugin in "${test_plugins[@]}" ; do
+ _disable_plugin "${plugin}"
+ done
+ fi
+
+ # Collides with mariadb-connector-c bug 655980
+ _disable_plugin auth_dialog
+
+ # Don't build Mroonga or example
+ _disable_engine mroonga
+ _disable_engine example
+
+ if ! use oqgraph ; then # avoids extra library checks
+ _disable_engine oqgraph
+ fi
+
+ cmake-utils_src_prepare
+}
+
+src_configure(){
+ # bug 508724 mariadb cannot use ld.gold
+ tc-ld-disable-gold
+ # Bug #114895, bug #110149
+ filter-flags "-O" "-O[01]"
+
+ append-cxxflags -felide-constructors
+
+ # 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')"
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr"
+ -DDEFAULT_SYSCONFDIR="${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/mariadb
+ -DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin
+ -DINSTALL_SCRIPTDIR=share/mariadb/scripts
+ -DINSTALL_MYSQLDATADIR="${EPREFIX%/}/var/lib/mysql"
+ -DINSTALL_SBINDIR=sbin
+ -DINSTALL_SUPPORTFILESDIR="${EPREFIX%/}/usr/share/mariadb"
+ -DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+ -DWITH_UNIT_TESTS=$(usex test ON OFF)
+ -DWITH_ZLIB=system
+ -DENABLED_LOCAL_INFILE=1
+ -DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
+ -DINSTALL_UNIX_ADDRDIR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
+ # 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)
+ -DWITHOUT_CLIENTLIBS=YES
+ -DWITH_READLINE=$(usex bindist 1 0)
+ -DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1)
+ -DENABLE_DTRACE=$(usex systemtap)
+ )
+ if use test ; then
+ mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mariadb/mysql-test )
+ else
+ mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+ fi
+
+ if ! use yassl ; then
+ mycmakeargs+=( -DWITH_SSL=system )
+ else
+ mycmakeargs+=( -DWITH_SSL=bundled )
+ fi
+
+ if use server ; then
+
+ # Federated{,X} must be treated special otherwise they will not be built as plugins
+ if ! use extraengine ; then
+ mycmakeargs+=(
+ -DWITHOUT_FEDERATED_STORAGE_ENGINE=1
+ -DWITHOUT_FEDERATEDX_STORAGE_ENGINE=1 )
+ fi
+
+ mycmakeargs+=(
+ -DWITH_JEMALLOC=$(usex jemalloc system)
+ -DWITH_PCRE=system
+ -D$(usex sphinx WITH WITHOUT)_SPHINX_STORAGE_ENGINE=1
+ -D$(usex tokudb WITH WITHOUT)_TOKUDB_STORAGE_ENGINE=1
+ -D$(usex oqgraph WITH WITHOUT)_AUTH_PAM=1
+ -D$(usex extraengine WITH WITHOUT)_SEQUENCE_STORAGE_ENGINE=1
+ -D$(usex extraengine WITH WITHOUT)_SPIDER_STORAGE_ENGINE=1
+ -D$(usex extraengine WITH WITHOUT)_CONNECT_STORAGE_ENGINE=1
+ -DCONNECT_WITH_LIBXML2=$(usex xml)
+ -DCONNECT_WITH_ODBC=$(usex odbc)
+ -DCONNECT_WITH_JDBC=$(usex jdbc)
+ # Build failure and autodep wrt bug 639144
+ -DCONNECT_WITH_MONGO=OFF
+ -DINSTALL_SQLBENCHDIR=share/mariadb
+ )
+
+ 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."
+
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+ -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+ )
+
+ elif ! use latin1 ; then
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=utf8
+ -DDEFAULT_COLLATION=utf8_general_ci
+ )
+ else
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=latin1
+ -DDEFAULT_COLLATION=latin1_swedish_ci
+ )
+ fi
+ mycmakeargs+=(
+ -DEXTRA_CHARSETS=all
+ -DDISABLE_SHARED=$(usex static YES NO)
+ -DWITH_EMBEDDED_SERVER=OFF
+ -DENABLED_PROFILING=$(usex profiling)
+ )
+
+ if use static; then
+ mycmakeargs+=( -DWITH_PIC=1 )
+ fi
+
+ if use jemalloc || use tcmalloc ; then
+ mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
+ fi
+
+ # Storage engines
+ mycmakeargs+=(
+ -DWITH_ARCHIVE_STORAGE_ENGINE=1
+ -DWITH_BLACKHOLE_STORAGE_ENGINE=1
+ -DWITH_CSV_STORAGE_ENGINE=1
+ -DWITH_HEAP_STORAGE_ENGINE=1
+ -DWITH_INNOBASE_STORAGE_ENGINE=1
+ -DWITH_MYISAMMRG_STORAGE_ENGINE=1
+ -DWITH_MYISAM_STORAGE_ENGINE=1
+ -DWITH_PARTITION_STORAGE_ENGINE=1
+ )
+
+ else
+ mycmakeargs+=(
+ -DWITHOUT_SERVER=1
+ -DEXTRA_CHARSETS=none
+ -DINSTALL_SQLBENCHDIR=
+ )
+ fi
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ # Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
+ if [[ -f "${ED%/}/usr/include/mysql/server/private/config.h" ]] ; then
+ rm "${ED%/}/usr/include/mysql/server/private/config.h" || die
+ fi
+
+ # 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 "${D%/}/${MY_SHAREDSTATEDIR}/mysql-test"
+ fi
+
+ # Configuration stuff
+ einfo "Building default configuration ..."
+ insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+ [[ -f "${S%/}/scripts/mysqlaccess.conf" ]] && doins "${S%/}"/scripts/mysqlaccess.conf
+ local mycnf_src="my.cnf-5.6-r1"
+ sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+ "${FILESDIR%/}/${mycnf_src}" \
+ > "${TMPDIR%/}/my.cnf.ok" || die
+ use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR%/}/my.cnf.ok"
+ if use latin1 ; then
+ sed -i \
+ -e "/character-set/s|utf8|latin1|g" \
+ "${TMPDIR%/}/my.cnf.ok" || die
+ fi
+ eprefixify "${TMPDIR%/}/my.cnf.ok"
+ newins "${TMPDIR}/my.cnf.ok" my.cnf
+
+ if use server ; then
+ einfo "Including support files and sample configurations"
+ docinto "support-files"
+ local script
+ for script in \
+ "${S%/}"/support-files/magic
+ do
+ [[ -f "$script" ]] && dodoc "${script}"
+ done
+
+ docinto "scripts"
+ for script in "${S%/}"/scripts/mysql* ; do
+ [[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
+ done
+ fi
+
+ #Remove mytop if perl is not selected
+ [[ -e "${ED%/}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED%/}/usr/bin/mytop"
+}
+
+# Official test instructions:
+# USE='extraengine perl server' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mariadb-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+ _disable_test() {
+ local rawtestname reason
+ rawtestname="${1}" ; shift
+ reason="${@}"
+ ewarn "test '${rawtestname}' disabled: '${reason}'"
+ echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+ }
+
+ local TESTDIR="${BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ if ! use server ; then
+ einfo "Skipping server tests due to minimal build."
+ return 0
+ fi
+
+ # 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 [[ $UID -eq 0 ]]; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+ has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+ # Run CTest (test-units)
+ cmake-utils_src_test
+ retstatus_unit=$?
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+ # Enable parallel testing, auto will try to detect number of cores
+ # You may set this by hand.
+ # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+ export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+ # 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"
+ # These are failing in MariaDB 10.0 for now and are believed to be
+ # false positives:
+ #
+ # main.mysql_client_test, main.mysql_client_test_nonblock
+ # main.mysql_client_test_comp:
+ # segfaults at random under Portage only, suspect resource limits.
+
+ local t
+ for t in main.mysql_client_test main.mysql_client_test_nonblock \
+ main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam \
+ rpl.rpl_semi_sync_uninstall_plugin ; do
+ _disable_test "$t" "False positives in Gentoo"
+ done
+
+ if ! use client-libs ; then
+ _disable_test main.plugin_auth "Needs client libraries built"
+ 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"
+}
+
+mysql_init_vars() {
+ MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mariadb"}
+ MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+ MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+ MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ MY_DATADIR=""
+ if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
+ MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+ | sed -ne '/datadir/s|^--datadir=||p' \
+ | tail -n1`
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
+ | sed -e 's/.*=\s*//' \
+ | tail -n1`
+ fi
+ fi
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ MY_DATADIR="${MY_LOCALSTATEDIR}"
+ einfo "Using default MY_DATADIR"
+ fi
+ elog "MySQL MY_DATADIR is ${MY_DATADIR}"
+
+ if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
+ if [[ -e "${MY_DATADIR}" ]] ; then
+ # If you get this and you're wondering about it, see bug #207636
+ elog "MySQL datadir found in ${MY_DATADIR}"
+ elog "A new one will not be created."
+ PREVIOUS_DATADIR="yes"
+ else
+ PREVIOUS_DATADIR="no"
+ fi
+ export PREVIOUS_DATADIR
+ fi
+ else
+ if [[ ${EBUILD_PHASE} == "config" ]]; then
+ local new_MY_DATADIR
+ new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+ | sed -ne '/datadir/s|^--datadir=||p' \
+ | tail -n1`
+
+ if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
+ ewarn "MySQL MY_DATADIR has changed"
+ ewarn "from ${MY_DATADIR}"
+ ewarn "to ${new_MY_DATADIR}"
+ MY_DATADIR="${new_MY_DATADIR}"
+ fi
+ fi
+ fi
+
+ export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+ export MY_LOCALSTATEDIR MY_LOGDIR
+ export MY_DATADIR
+}
+
+pkg_config() {
+ _getoptval() {
+ local mypd="${EROOT}"/usr/bin/my_print_defaults
+ local section="$1"
+ local flag="--${2}="
+ local extra_options="${3}"
+ "${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
+ }
+ local old_MY_DATADIR="${MY_DATADIR}"
+ local old_HOME="${HOME}"
+ # my_print_defaults needs to read stuff in $HOME/.my.cnf
+ export HOME=${EPREFIX}/root
+
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ [[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
+ if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
+ die "Minimal builds do NOT include the MySQL server"
+ fi
+
+ if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
+ local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
+ MY_DATADIR_s="${MY_DATADIR_s%%/}"
+ local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
+ old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
+
+ if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
+ if [[ -d "${MY_DATADIR_s}" ]]; then
+ ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
+ ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
+ else
+ elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
+ mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
+ || die "Moving MY_DATADIR failed"
+ fi
+ else
+ ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
+ if [[ -d "${MY_DATADIR_s}" ]]; then
+ ewarn "Attempting to use ${MY_DATADIR_s}"
+ else
+ eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
+ die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
+ fi
+ fi
+ fi
+
+ local pwd1="a"
+ local pwd2="b"
+ local maxtry=15
+
+ 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
+ MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
+ # These are dir+prefix
+ MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
+ MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+ MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
+ MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+
+ if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
+ einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
+ install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
+ fi
+ if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
+ einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
+ install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
+ fi
+ if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
+ einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
+ install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
+ fi
+
+ if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
+ ewarn "You have already a MySQL database in place."
+ ewarn "(${ROOT}/${MY_DATADIR}/*)"
+ ewarn "Please rename or delete it if you wish to replace it."
+ die "MySQL database already exists!"
+ fi
+
+ # 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 "${MYSQL_ROOT_PASSWORD}" ]; then
+
+ einfo "Please provide a password for the mysql 'root' user now"
+ einfo "or through the ${HOME}/.my.cnf file."
+ ewarn "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
+ fi
+
+ local options
+ local sqltmp="$(emktemp)"
+
+ # Fix bug 446200. Don't reference host my.cnf, needs to come first,
+ # see https://bugs.mysql.com/bug.php?id=31312
+ use prefix && options="${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
+ for opt in grant-tables 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}" && options="${options} ${optfull}"
+ done
+
+ einfo "Creating the mysql database and setting proper permissions on it ..."
+
+ # Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
+ PID_DIR="${EROOT}/var/run/mysqld"
+ if [[ ! -d "${PID_DIR}" ]]; then
+ install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
+ fi
+
+ if [[ ! -d "${MY_DATADIR}" ]]; then
+ install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
+ fi
+
+ pushd "${TMPDIR}" &>/dev/null || die
+
+ # Filling timezones, see
+ # https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+ "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
+
+ local cmd=( "${EROOT}usr/share/mariadb/scripts/mysql_install_db" )
+ [[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
+ cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
+ einfo "Command: ${cmd[*]}"
+ su -s /bin/sh -c "${cmd[*]}" mysql \
+ >"${TMPDIR}"/mysql_install_db.log 2>&1
+ if [ $? -ne 0 ]; then
+ grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
+ die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
+ fi
+ popd &>/dev/null || die
+ [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
+ || die "MySQL databases not installed"
+
+ use prefix || options="${options} --user=mysql"
+
+ local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
+ local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
+ local mysqld="${EROOT}/usr/sbin/mysqld \
+ ${options} \
+ --log-warnings=0 \
+ --basedir=${EROOT}/usr \
+ --datadir=${ROOT}/${MY_DATADIR} \
+ --max_allowed_packet=8M \
+ --net_buffer_length=16K \
+ --socket=${socket} \
+ --pid-file=${pidfile}
+ --tmpdir=${ROOT}/${MYSQL_TMPDIR}"
+ #einfo "About to start mysqld: ${mysqld}"
+ ebegin "Starting mysqld"
+ einfo "Command ${mysqld}"
+ ${mysqld} &
+ rc=$?
+ while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
+ maxtry=$((${maxtry}-1))
+ echo -n "."
+ sleep 1
+ done
+ eend $rc
+
+ if ! [[ -S "${socket}" ]]; then
+ die "Completely failed to start up mysqld with: ${mysqld}"
+ fi
+
+ ebegin "Setting root password"
+ # Do this from memory, as we don't want clear text passwords in temp files
+ local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
+ "${EROOT}/usr/bin/mysql" \
+ "--socket=${socket}" \
+ -hlocalhost \
+ -e "${sql}"
+ eend $?
+
+ if [[ -n "${sqltmp}" ]] ; then
+ ebegin "Loading \"zoneinfo\", this step may require a few seconds"
+ "${EROOT}/usr/bin/mysql" \
+ "--socket=${socket}" \
+ -hlocalhost \
+ -uroot \
+ --password="${MYSQL_ROOT_PASSWORD}" \
+ mysql < "${sqltmp}"
+ rc=$?
+ eend $?
+ [[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
+ fi
+
+ # Stop the server and cleanup
+ einfo "Stopping the server ..."
+ kill $(< "${pidfile}" )
+ rm -f "${sqltmp}"
+ wait %1
+ einfo "Done"
+}
diff --git a/dev-db/mariadb/mariadb-10.0.35.ebuild b/dev-db/mariadb/mariadb-10.0.35.ebuild
new file mode 100644
index 000000000000..e4d1ee85dcfc
--- /dev/null
+++ b/dev-db/mariadb/mariadb-10.0.35.ebuild
@@ -0,0 +1,210 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20170926-1321Z"
+SUBSLOT="18"
+MYSQL_PV_MAJOR="5.6"
+
+JAVA_PKG_OPT_USE="jdbc"
+
+inherit toolchain-funcs java-pkg-opt-2 mysql-multilib-r1
+
+HOMEPAGE="https://mariadb.org/"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL"
+
+IUSE="bindist jdbc odbc oqgraph pam sphinx tokudb xml"
+RESTRICT="!bindist? ( bindist )"
+
+REQUIRED_USE="jdbc? ( extraengine server !static ) server? ( tokudb? ( jemalloc !tcmalloc ) ) static? ( !pam )"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+PATCHES=(
+ "${MY_PATCH_DIR}/01050_all_mariadb_mysql_config_cleanup-5.5.41.patch"
+ "${MY_PATCH_DIR}/20006_all_cmake_elib-mariadb-10.0.33.patch"
+ "${MY_PATCH_DIR}/20009_all_mariadb_myodbc_symbol_fix-5.5.38.patch"
+ "${MY_PATCH_DIR}/20018_all_mariadb-10.0.20-without-clientlibs-tools.patch"
+)
+COMMON_DEPEND="
+ !bindist? ( >=sys-libs/readline-4.1:0= )
+ server? (
+ extraengine? (
+ odbc? ( dev-db/unixODBC:0= )
+ xml? ( dev-libs/libxml2:2= )
+ sys-libs/zlib[minizip]
+ )
+ oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
+ pam? ( virtual/pam:0= )
+ tokudb? ( app-arch/snappy )
+ )
+ >=dev-libs/libpcre-8.41-r1:3=[${MULTILIB_USEDEP}]
+ openssl? ( !>=dev-libs/openssl-1.1 )
+"
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+ server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) )
+ ${COMMON_DEPEND}"
+RDEPEND="${RDEPEND} ${COMMON_DEPEND}
+ perl? ( !dev-db/mytop
+ virtual/perl-Getopt-Long
+ dev-perl/TermReadKey
+ virtual/perl-Term-ANSIColor
+ virtual/perl-Time-HiRes )
+ server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) )
+"
+MULTILIB_WRAPPED_HEADERS+=( /usr/include/mysql/mysql_version.h
+ /usr/include/mysql/private/probes_mysql_nodtrace.h
+ /usr/include/mysql/private/probes_mysql_dtrace.h )
+
+pkg_setup() {
+ java-pkg-opt-2_pkg_setup
+ mysql-multilib-r1_pkg_setup
+}
+
+pkg_preinst() {
+ java-pkg-opt-2_pkg_preinst
+ mysql-multilib-r1_pkg_preinst
+}
+
+src_prepare() {
+ java-pkg-opt-2_src_prepare
+ mysql-multilib-r1_src_prepare
+}
+
+src_configure(){
+ # bug 508724 mariadb cannot use ld.gold
+ tc-ld-disable-gold
+ local MYSQL_CMAKE_NATIVE_DEFINES=(
+ -DWITH_JEMALLOC=$(usex jemalloc system)
+ -DWITH_PCRE=system
+ )
+ if use server ; then
+ # Federated{,X} must be treated special otherwise they will not be built as plugins
+ if ! use extraengine ; then
+ MYSQL_CMAKE_NATIVE_DEFINES+=(
+ -DWITHOUT_FEDERATED=1
+ -DWITHOUT_FEDERATEDX=1 )
+ fi
+
+ # Connect with Zip is currently broken and does not compile
+ # Reported upstream https://jira.mariadb.org/browse/MDEV-11809
+
+ MYSQL_CMAKE_NATIVE_DEFINES+=(
+ $(mysql-cmake_use_plugin oqgraph OQGRAPH)
+ $(mysql-cmake_use_plugin sphinx SPHINX)
+ $(mysql-cmake_use_plugin tokudb TOKUDB)
+ $(mysql-cmake_use_plugin pam AUTH_PAM)
+ $(mysql-cmake_use_plugin extraengine SEQUENCE)
+ $(mysql-cmake_use_plugin extraengine SPIDER)
+ $(mysql-cmake_use_plugin extraengine CONNECT)
+ -DCONNECT_WITH_LIBXML2=$(usex xml)
+ -DCONNECT_WITH_ODBC=$(usex odbc)
+ -DCONNECT_WITH_JDBC=$(usex jdbc)
+ -DWITHOUT_MROONGA=1
+ )
+ fi
+ mysql-multilib-r1_src_configure
+}
+
+# Official test instructions:
+# USE='extraengine perl server openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mariadb-X.X.XX.ebuild \
+# digest clean package
+multilib_src_test() {
+
+ if ! multilib_is_native_abi ; then
+ einfo "Server tests not available on non-native abi".
+ return 0;
+ fi
+
+ local TESTDIR="${BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ if use server ; then
+
+ # 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 [[ $UID -eq 0 ]]; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+ has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ addpredict /this-dir-does-not-exist/t9.MYI
+
+ # Run CTest (test-units)
+ cmake-utils_src_test
+ retstatus_unit=$?
+ [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+ # Enable parallel testing, auto will try to detect number of cores
+ # You may set this by hand.
+ # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+ export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+ # create directories because mysqladmin might run out of order
+ mkdir -p "${T}"/var-tests{,/log}
+
+ # These are failing in MariaDB 10.0 for now and are believed to be
+ # false positives:
+ #
+ # main.information_schema, binlog.binlog_statement_insert_delayed,
+ # main.mysqld--help, funcs_1.is_triggers, funcs_1.is_tables_mysql,
+ # funcs_1.is_columns_mysql main.bootstrap
+ # fails due to USE=-latin1 / utf8 default
+ #
+ # main.mysql_client_test, main.mysql_client_test_nonblock
+ # main.mysql_client_test_comp:
+ # segfaults at random under Portage only, suspect resource limits.
+ #
+ # archive.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+ # fails due to bad cleanup of previous tests when run in parallel
+ # The tool is deprecated anyway
+ # Bug 532288
+
+#main.bootstrap \
+ for t in connect.drop-open-error ; do
+# main.mysql_client_test_comp \
+# binlog.binlog_statement_insert_delayed main.information_schema \
+# main.mysqld--help \
+# archive.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
+# funcs_1.is_triggers funcs_1.is_tables_mysql funcs_1.is_columns_mysql ; do
+ mysql-multilib-r1_disable_test "$t" "False positives in Gentoo"
+ done
+
+ # Run mysql tests
+ pushd "${TESTDIR}" || die
+
+ # run mysql-test tests
+ perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder
+
+ retstatus_tests=$?
+ [[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+ has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+ popd || die
+
+ # Cleanup is important for these testcases.
+ pkill -9 -f "${S}/ndb" 2>/dev/null
+ pkill -9 -f "${S}/sql" 2>/dev/null
+
+ failures=""
+ [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+ [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+ has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+ [[ -z "$failures" ]] || die "Test failures: $failures"
+ einfo "Tests successfully completed"
+
+ else
+ einfo "Skipping server tests due to minimal build."
+ fi
+}
diff --git a/dev-db/mariadb/mariadb-10.1.29.ebuild b/dev-db/mariadb/mariadb-10.1.29.ebuild
new file mode 100644
index 000000000000..df0ee3106ab3
--- /dev/null
+++ b/dev-db/mariadb/mariadb-10.1.29.ebuild
@@ -0,0 +1,229 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20170926-1321Z"
+# The wsrep API version must match between upstream WSREP and sys-cluster/galera major number
+WSREP_REVISION="25"
+SUBSLOT="18"
+MYSQL_PV_MAJOR="5.6"
+
+JAVA_PKG_OPT_USE="jdbc"
+
+inherit toolchain-funcs java-pkg-opt-2 mysql-multilib-r1
+
+HOMEPAGE="https://mariadb.org/"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL"
+
+IUSE="+backup bindist cracklib galera kerberos innodb-lz4 innodb-lzo innodb-snappy jdbc mroonga odbc oqgraph pam sphinx sst-rsync sst-mariabackup sst-xtrabackup tokudb systemd xml"
+RESTRICT="!bindist? ( bindist )"
+
+REQUIRED_USE="jdbc? ( extraengine server !static ) server? ( tokudb? ( jemalloc !tcmalloc ) ) static? ( !pam )"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+
+PATCHES=(
+ "${MY_PATCH_DIR}"/20006_all_cmake_elib-mariadb-10.1.27.patch
+ "${MY_PATCH_DIR}"/20009_all_mariadb_myodbc_symbol_fix-5.5.38.patch
+ "${MY_PATCH_DIR}"/20015_all_mariadb-pkgconfig-location.patch
+ "${MY_PATCH_DIR}"/20018_all_mariadb-10.1.16-without-clientlibs-tools.patch
+ "${MY_PATCH_DIR}"/20025_all_mariadb-10.1.26-gssapi-detect.patch
+)
+
+COMMON_DEPEND="
+ mroonga? ( app-text/groonga-normalizer-mysql )
+ kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
+ !bindist? (
+ sys-libs/binutils-libs:0=
+ >=sys-libs/readline-4.1:0=
+ )
+ server? (
+ backup? ( app-arch/libarchive:0= )
+ cracklib? ( sys-libs/cracklib:0= )
+ extraengine? (
+ odbc? ( dev-db/unixODBC:0= )
+ xml? ( dev-libs/libxml2:2= )
+ sys-libs/zlib[minizip]
+ )
+ innodb-lz4? ( app-arch/lz4 )
+ innodb-lzo? ( dev-libs/lzo )
+ innodb-snappy? ( app-arch/snappy )
+ oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
+ pam? ( virtual/pam:0= )
+ systemd? ( sys-apps/systemd:= )
+ tokudb? ( app-arch/snappy )
+ )
+ >=dev-libs/libpcre-8.41-r1:3=
+"
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+ server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) )
+ ${COMMON_DEPEND}"
+RDEPEND="${RDEPEND} ${COMMON_DEPEND}
+ galera? (
+ sys-apps/iproute2
+ =sys-cluster/galera-${WSREP_REVISION}*
+ sst-rsync? ( sys-process/lsof )
+ sst-mariabackup? ( net-misc/socat[ssl] )
+ sst-xtrabackup? ( net-misc/socat[ssl] )
+ )
+ perl? ( !dev-db/mytop
+ virtual/perl-Getopt-Long
+ dev-perl/TermReadKey
+ virtual/perl-Term-ANSIColor
+ virtual/perl-Time-HiRes )
+ server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) )
+"
+# percona-xtrabackup-bin causes a circular dependency if DBD-mysql is not already installed
+PDEPEND="galera? ( sst-xtrabackup? ( || ( >=dev-db/percona-xtrabackup-bin-2.2.4 dev-db/percona-xtrabackup ) ) )"
+
+MULTILIB_WRAPPED_HEADERS+=( /usr/include/mysql/mysql_version.h
+ /usr/include/mysql/private/probes_mysql_nodtrace.h
+ /usr/include/mysql/private/probes_mysql_dtrace.h )
+
+pkg_setup() {
+ java-pkg-opt-2_pkg_setup
+ mysql-multilib-r1_pkg_setup
+}
+
+pkg_preinst() {
+ java-pkg-opt-2_pkg_preinst
+ mysql-multilib-r1_pkg_preinst
+}
+
+src_prepare() {
+ java-pkg-opt-2_src_prepare
+ mysql-multilib-r1_src_prepare
+}
+
+src_configure(){
+ # bug 508724 mariadb cannot use ld.gold
+ tc-ld-disable-gold
+
+ local MYSQL_CMAKE_NATIVE_DEFINES=(
+ -DWITH_JEMALLOC=$(usex jemalloc system)
+ -DWITH_PCRE=system
+ )
+ local MYSQL_CMAKE_EXTRA_DEFINES=(
+ -DPLUGIN_AUTH_GSSAPI_CLIENT=$(usex kerberos YES NO)
+ )
+ if use server ; then
+ # Federated{,X} must be treated special otherwise they will not be built as plugins
+ if ! use extraengine ; then
+ MYSQL_CMAKE_NATIVE_DEFINES+=(
+ -DPLUGIN_FEDERATED=NO
+ -DPLUGIN_FEDERATEDX=NO )
+ fi
+
+ MYSQL_CMAKE_NATIVE_DEFINES+=(
+ -DPLUGIN_OQGRAPH=$(usex oqgraph YES NO)
+ -DPLUGIN_SPHINX=$(usex sphinx YES NO)
+ -DPLUGIN_TOKUDB=$(usex tokudb YES NO)
+ -DPLUGIN_AUTH_PAM=$(usex pam YES NO)
+ -DPLUGIN_CRACKLIB_PASSWORD_CHECK=$(usex cracklib YES NO)
+ -DPLUGIN_CASSANDRA=NO
+ -DPLUGIN_SEQUENCE=$(usex extraengine YES NO)
+ -DPLUGIN_SPIDER=$(usex extraengine YES NO)
+ -DPLUGIN_CONNECT=$(usex extraengine YES NO)
+ -DCONNECT_WITH_MYSQL=1
+ -DCONNECT_WITH_LIBXML2=$(usex xml)
+ -DCONNECT_WITH_ODBC=$(usex odbc)
+ -DCONNECT_WITH_JDBC=$(usex jdbc)
+ -DWITH_WSREP=$(usex galera)
+ -DWITH_INNODB_LZ4=$(usex innodb-lz4 ON OFF)
+ -DWITH_INNODB_LZO=$(usex innodb-lzo ON OFF)
+ -DWITH_INNODB_SNAPPY=$(usex innodb-snappy ON OFF)
+ -DPLUGIN_MROONGA=$(usex mroonga YES NO)
+ -DPLUGIN_AUTH_GSSAPI=$(usex kerberos YES NO)
+ -DWITH_MARIABACKUP=$(usex backup ON OFF)
+ -DWITH_LIBARCHIVE=$(usex backup ON OFF)
+ )
+ fi
+ mysql-multilib-r1_src_configure
+}
+
+# Official test instructions:
+# USE='embedded extraengine perl server openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mariadb-X.X.XX.ebuild \
+# digest clean package
+multilib_src_test() {
+
+ if ! multilib_is_native_abi ; then
+ einfo "Server tests not available on non-native abi".
+ return 0;
+ fi
+
+ local TESTDIR="${BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ if ! use server ; then
+ einfo "Skipping server tests due to minimal build."
+ return 0
+ fi
+
+ # 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 [[ $UID -eq 0 ]]; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+ has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+ # Run CTest (test-units)
+ cmake-utils_src_test
+ retstatus_unit=$?
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+ # Enable parallel testing, auto will try to detect number of cores
+ # You may set this by hand.
+ # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+ export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+ # create directories because mysqladmin might run out of order
+ mkdir -p "${T}"/var-tests{,/log}
+
+ # Run mysql tests
+ pushd "${TESTDIR}" || die
+
+ # These are failing in MariaDB 10.0 for now and are believed to be
+ # false positives:
+ #
+ # main.mysql_client_test, main.mysql_client_test_nonblock
+ # main.mysql_client_test_comp:
+ # segfaults at random under Portage only, suspect resource limits.
+
+ local t
+ for t in plugins.cracklib_password_check plugins.two_password_validations ; do
+ mysql-multilib-r1_disable_test "$t" "False positive due to varying policies"
+ done
+
+ for t in main.mysql_client_test main.mysql_client_test_nonblock \
+ main.mysql_client_test_comp ; do
+ mysql-multilib-r1_disable_test "$t" "False positives in Gentoo"
+ done
+
+ # run mysql-test tests
+ perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder
+ retstatus_tests=$?
+
+ popd || 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" ]] || eerror "Test failures: $failures"
+ einfo "Tests successfully completed"
+}
diff --git a/dev-db/mariadb/mariadb-10.1.31-r1.ebuild b/dev-db/mariadb/mariadb-10.1.31-r1.ebuild
new file mode 100644
index 000000000000..e64c339ee6ef
--- /dev/null
+++ b/dev-db/mariadb/mariadb-10.1.31-r1.ebuild
@@ -0,0 +1,244 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20180515-0123Z"
+# The wsrep API version must match between upstream WSREP and sys-cluster/galera major number
+WSREP_REVISION="25"
+SUBSLOT="18"
+MYSQL_PV_MAJOR="5.6"
+
+JAVA_PKG_OPT_USE="jdbc"
+
+inherit toolchain-funcs java-pkg-opt-2 mysql-multilib-r1
+
+HOMEPAGE="https://mariadb.org/"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL"
+
+IUSE="+backup bindist cracklib galera kerberos innodb-lz4 innodb-lzo innodb-snappy jdbc mroonga numa odbc oqgraph pam sphinx sst-rsync sst-mariabackup sst-xtrabackup tokudb systemd xml"
+RESTRICT="!bindist? ( bindist )"
+
+REQUIRED_USE="jdbc? ( extraengine server !static ) server? ( tokudb? ( jemalloc !tcmalloc ) ) static? ( !pam )"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
+
+PATCHES=(
+ "${MY_PATCH_DIR}"/20006_all_cmake_elib-mariadb-10.1.27.patch
+ "${MY_PATCH_DIR}"/20009_all_mariadb_myodbc_symbol_fix-5.5.38.patch
+ "${MY_PATCH_DIR}"/20015_all_mariadb-pkgconfig-location.patch
+ "${MY_PATCH_DIR}"/20018_all_mariadb-10.1.16-without-clientlibs-tools.patch
+ "${MY_PATCH_DIR}"/20025_all_mariadb-10.1.26-gssapi-detect.patch
+ "${MY_PATCH_DIR}"/20029_all_mariadb-10.1.31-enable-numa.patch
+ "${MY_PATCH_DIR}"/20033_all_mariadb-10.1.31-xtradb-sst.patch
+ "${MY_PATCH_DIR}"/20035_all_mariadb-10.1-atomic-detection.patch
+)
+
+COMMON_DEPEND="
+ mroonga? ( app-text/groonga-normalizer-mysql )
+ kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
+ !bindist? (
+ sys-libs/binutils-libs:0=
+ >=sys-libs/readline-4.1:0=
+ )
+ server? (
+ backup? ( app-arch/libarchive:0= )
+ cracklib? ( sys-libs/cracklib:0= )
+ extraengine? (
+ odbc? ( dev-db/unixODBC:0= )
+ xml? ( dev-libs/libxml2:2= )
+ sys-libs/zlib[minizip]
+ )
+ innodb-lz4? ( app-arch/lz4 )
+ innodb-lzo? ( dev-libs/lzo )
+ innodb-snappy? ( app-arch/snappy )
+ numa? ( sys-process/numactl )
+ oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
+ pam? ( virtual/pam:0= )
+ systemd? ( sys-apps/systemd:= )
+ tokudb? ( app-arch/snappy )
+ )
+ >=dev-libs/libpcre-8.41-r1:3=
+"
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+ server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) )
+ ${COMMON_DEPEND}"
+RDEPEND="${RDEPEND} ${COMMON_DEPEND}
+ galera? (
+ sys-apps/iproute2
+ =sys-cluster/galera-${WSREP_REVISION}*
+ sst-rsync? ( sys-process/lsof )
+ sst-mariabackup? ( net-misc/socat[ssl] )
+ sst-xtrabackup? ( net-misc/socat[ssl] )
+ )
+ perl? ( !dev-db/mytop
+ virtual/perl-Getopt-Long
+ dev-perl/TermReadKey
+ virtual/perl-Term-ANSIColor
+ virtual/perl-Time-HiRes )
+ server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) )
+"
+# percona-xtrabackup-bin causes a circular dependency if DBD-mysql is not already installed
+PDEPEND="galera? ( sst-xtrabackup? ( || ( >=dev-db/percona-xtrabackup-bin-2.2.4 dev-db/percona-xtrabackup ) ) )"
+
+MULTILIB_WRAPPED_HEADERS+=( /usr/include/mysql/mysql_version.h
+ /usr/include/mysql/private/probes_mysql_nodtrace.h
+ /usr/include/mysql/private/probes_mysql_dtrace.h )
+
+pkg_setup() {
+ java-pkg-opt-2_pkg_setup
+ mysql-multilib-r1_pkg_setup
+}
+
+pkg_preinst() {
+ java-pkg-opt-2_pkg_preinst
+ mysql-multilib-r1_pkg_preinst
+}
+
+src_prepare() {
+ java-pkg-opt-2_src_prepare
+ mysql-multilib-r1_src_prepare
+}
+
+src_configure(){
+ # bug 508724 mariadb cannot use ld.gold
+ tc-ld-disable-gold
+
+ local MYSQL_CMAKE_NATIVE_DEFINES=(
+ -DWITH_JEMALLOC=$(usex jemalloc system)
+ -DWITH_PCRE=system
+ )
+ local MYSQL_CMAKE_EXTRA_DEFINES=(
+ -DPLUGIN_AUTH_GSSAPI_CLIENT=$(usex kerberos YES NO)
+ )
+ if use server ; then
+ # Federated{,X} must be treated special otherwise they will not be built as plugins
+ if ! use extraengine ; then
+ MYSQL_CMAKE_NATIVE_DEFINES+=(
+ -DPLUGIN_FEDERATED=NO
+ -DPLUGIN_FEDERATEDX=NO )
+ fi
+
+ MYSQL_CMAKE_NATIVE_DEFINES+=(
+ -DPLUGIN_OQGRAPH=$(usex oqgraph YES NO)
+ -DPLUGIN_SPHINX=$(usex sphinx YES NO)
+ -DPLUGIN_TOKUDB=$(usex tokudb YES NO)
+ -DPLUGIN_AUTH_PAM=$(usex pam YES NO)
+ -DPLUGIN_CRACKLIB_PASSWORD_CHECK=$(usex cracklib YES NO)
+ -DPLUGIN_CASSANDRA=NO
+ -DPLUGIN_SEQUENCE=$(usex extraengine YES NO)
+ -DPLUGIN_SPIDER=$(usex extraengine YES NO)
+ -DPLUGIN_CONNECT=$(usex extraengine YES NO)
+ -DCONNECT_WITH_MYSQL=1
+ -DCONNECT_WITH_LIBXML2=$(usex xml)
+ -DCONNECT_WITH_ODBC=$(usex odbc)
+ -DCONNECT_WITH_JDBC=$(usex jdbc)
+ # Build failure and autodep wrt bug 639144
+ -DCONNECT_WITH_MONGO=OFF
+ -DWITH_WSREP=$(usex galera)
+ -DWITH_INNODB_LZ4=$(usex innodb-lz4 ON OFF)
+ -DWITH_INNODB_LZO=$(usex innodb-lzo ON OFF)
+ -DWITH_INNODB_SNAPPY=$(usex innodb-snappy ON OFF)
+ -DPLUGIN_MROONGA=$(usex mroonga YES NO)
+ -DPLUGIN_AUTH_GSSAPI=$(usex kerberos YES NO)
+ -DWITH_MARIABACKUP=$(usex backup ON OFF)
+ -DWITH_LIBARCHIVE=$(usex backup ON OFF)
+ -DWITH_NUMA=$(usex numa ON OFF)
+ )
+ fi
+ mysql-multilib-r1_src_configure
+}
+
+# Official test instructions:
+# USE='extraengine perl server openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mariadb-X.X.XX.ebuild \
+# digest clean package
+multilib_src_test() {
+
+ if ! multilib_is_native_abi ; then
+ einfo "Server tests not available on non-native abi".
+ return 0;
+ fi
+
+ _disable_test() {
+ local rawtestname reason
+ rawtestname="${1}" ; shift
+ reason="${@}"
+ ewarn "test '${rawtestname}' disabled: '${reason}'"
+ echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+ }
+ local TESTDIR="${BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ if ! use server ; then
+ einfo "Skipping server tests due to minimal build."
+ return 0
+ fi
+
+ # 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 [[ $UID -eq 0 ]]; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+ has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+ # Run CTest (test-units)
+ cmake-utils_src_test
+ retstatus_unit=$?
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+ # Enable parallel testing, auto will try to detect number of cores
+ # You may set this by hand.
+ # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+ export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+ # create directories because mysqladmin might run out of order
+ mkdir -p "${T}"/var-tests{,/log}
+
+ # Run mysql tests
+ pushd "${TESTDIR}" || die
+
+ touch "${T}/disabled.def"
+ # These are failing in MariaDB 10.0 for now and are believed to be
+ # false positives:
+ #
+ # main.mysql_client_test, main.mysql_client_test_nonblock
+ # main.mysql_client_test_comp:
+ # segfaults at random under Portage only, suspect resource limits.
+
+ local t
+ for t in plugins.cracklib_password_check plugins.two_password_validations ; do
+ _disable_test "$t" "False positive due to varying policies"
+ done
+
+ for t in main.mysql_client_test main.mysql_client_test_nonblock \
+ main.mysql_client_test_comp ; do
+ _disable_test "$t" "False positives in Gentoo"
+ done
+
+ # run mysql-test tests
+ perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test-list="${T}/disabled.def"
+ retstatus_tests=$?
+
+ popd || 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" ]] || eerror "Test failures: $failures"
+ einfo "Tests successfully completed"
+}
diff --git a/dev-db/mariadb/mariadb-10.1.33.ebuild b/dev-db/mariadb/mariadb-10.1.33.ebuild
new file mode 100644
index 000000000000..e9a050b1fbd6
--- /dev/null
+++ b/dev-db/mariadb/mariadb-10.1.33.ebuild
@@ -0,0 +1,248 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20180515-0123Z"
+# The wsrep API version must match between upstream WSREP and sys-cluster/galera major number
+WSREP_REVISION="25"
+SUBSLOT="18"
+MYSQL_PV_MAJOR="5.6"
+
+JAVA_PKG_OPT_USE="jdbc"
+
+inherit toolchain-funcs java-pkg-opt-2 mysql-multilib-r1
+
+HOMEPAGE="https://mariadb.org/"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL"
+
+IUSE="+backup bindist cracklib galera kerberos innodb-lz4 innodb-lzo innodb-snappy jdbc mroonga numa odbc oqgraph pam sphinx sst-rsync sst-mariabackup sst-xtrabackup tokudb systemd xml"
+RESTRICT="!bindist? ( bindist )"
+
+REQUIRED_USE="jdbc? ( extraengine server !static ) server? ( tokudb? ( jemalloc !tcmalloc ) ) static? ( !pam )"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+if [[ ${MY_EXTRAS_VER} == "live" ]] ; then
+ MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
+else
+ MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
+fi
+
+PATCHES=(
+ "${MY_PATCH_DIR}"/20006_all_cmake_elib-mariadb-10.1.27.patch
+ "${MY_PATCH_DIR}"/20009_all_mariadb_myodbc_symbol_fix-5.5.38.patch
+ "${MY_PATCH_DIR}"/20015_all_mariadb-pkgconfig-location.patch
+ "${MY_PATCH_DIR}"/20018_all_mariadb-10.1.16-without-clientlibs-tools.patch
+ "${MY_PATCH_DIR}"/20025_all_mariadb-10.1.26-gssapi-detect.patch
+ "${MY_PATCH_DIR}"/20029_all_mariadb-10.1.31-enable-numa.patch
+ "${MY_PATCH_DIR}"/20035_all_mariadb-10.1-atomic-detection.patch
+)
+
+COMMON_DEPEND="
+ mroonga? ( app-text/groonga-normalizer-mysql )
+ kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
+ !bindist? (
+ sys-libs/binutils-libs:0=
+ >=sys-libs/readline-4.1:0=
+ )
+ server? (
+ backup? ( app-arch/libarchive:0= )
+ cracklib? ( sys-libs/cracklib:0= )
+ extraengine? (
+ odbc? ( dev-db/unixODBC:0= )
+ xml? ( dev-libs/libxml2:2= )
+ sys-libs/zlib[minizip]
+ )
+ innodb-lz4? ( app-arch/lz4 )
+ innodb-lzo? ( dev-libs/lzo )
+ innodb-snappy? ( app-arch/snappy )
+ numa? ( sys-process/numactl )
+ oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
+ pam? ( virtual/pam:0= )
+ systemd? ( sys-apps/systemd:= )
+ tokudb? ( app-arch/snappy )
+ )
+ >=dev-libs/libpcre-8.41-r1:3=
+ openssl? ( !>=dev-libs/openssl-1.1.0 )
+"
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+ server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) )
+ ${COMMON_DEPEND}"
+RDEPEND="${RDEPEND} ${COMMON_DEPEND}
+ galera? (
+ sys-apps/iproute2
+ =sys-cluster/galera-${WSREP_REVISION}*
+ sst-rsync? ( sys-process/lsof )
+ sst-mariabackup? ( net-misc/socat[ssl] )
+ sst-xtrabackup? ( net-misc/socat[ssl] )
+ )
+ perl? ( !dev-db/mytop
+ virtual/perl-Getopt-Long
+ dev-perl/TermReadKey
+ virtual/perl-Term-ANSIColor
+ virtual/perl-Time-HiRes )
+ server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) )
+"
+# percona-xtrabackup-bin causes a circular dependency if DBD-mysql is not already installed
+PDEPEND="galera? ( sst-xtrabackup? ( || ( >=dev-db/percona-xtrabackup-bin-2.2.4 dev-db/percona-xtrabackup ) ) )"
+
+MULTILIB_WRAPPED_HEADERS+=( /usr/include/mysql/mysql_version.h
+ /usr/include/mysql/private/probes_mysql_nodtrace.h
+ /usr/include/mysql/private/probes_mysql_dtrace.h )
+
+pkg_setup() {
+ java-pkg-opt-2_pkg_setup
+ mysql-multilib-r1_pkg_setup
+}
+
+pkg_preinst() {
+ java-pkg-opt-2_pkg_preinst
+ mysql-multilib-r1_pkg_preinst
+}
+
+src_prepare() {
+ java-pkg-opt-2_src_prepare
+ mysql-multilib-r1_src_prepare
+}
+
+src_configure(){
+ # bug 508724 mariadb cannot use ld.gold
+ tc-ld-disable-gold
+
+ local MYSQL_CMAKE_NATIVE_DEFINES=(
+ -DWITH_JEMALLOC=$(usex jemalloc system)
+ -DWITH_PCRE=system
+ )
+ local MYSQL_CMAKE_EXTRA_DEFINES=(
+ -DPLUGIN_AUTH_GSSAPI_CLIENT=$(usex kerberos YES NO)
+ )
+ if use server ; then
+ # Federated{,X} must be treated special otherwise they will not be built as plugins
+ if ! use extraengine ; then
+ MYSQL_CMAKE_NATIVE_DEFINES+=(
+ -DPLUGIN_FEDERATED=NO
+ -DPLUGIN_FEDERATEDX=NO )
+ fi
+
+ MYSQL_CMAKE_NATIVE_DEFINES+=(
+ -DPLUGIN_OQGRAPH=$(usex oqgraph YES NO)
+ -DPLUGIN_SPHINX=$(usex sphinx YES NO)
+ -DPLUGIN_TOKUDB=$(usex tokudb YES NO)
+ -DPLUGIN_AUTH_PAM=$(usex pam YES NO)
+ -DPLUGIN_CRACKLIB_PASSWORD_CHECK=$(usex cracklib YES NO)
+ -DPLUGIN_CASSANDRA=NO
+ -DPLUGIN_SEQUENCE=$(usex extraengine YES NO)
+ -DPLUGIN_SPIDER=$(usex extraengine YES NO)
+ -DPLUGIN_CONNECT=$(usex extraengine YES NO)
+ -DCONNECT_WITH_MYSQL=1
+ -DCONNECT_WITH_LIBXML2=$(usex xml)
+ -DCONNECT_WITH_ODBC=$(usex odbc)
+ -DCONNECT_WITH_JDBC=$(usex jdbc)
+ # Build failure and autodep wrt bug 639144
+ -DCONNECT_WITH_MONGO=OFF
+ -DWITH_WSREP=$(usex galera)
+ -DWITH_INNODB_LZ4=$(usex innodb-lz4 ON OFF)
+ -DWITH_INNODB_LZO=$(usex innodb-lzo ON OFF)
+ -DWITH_INNODB_SNAPPY=$(usex innodb-snappy ON OFF)
+ -DPLUGIN_MROONGA=$(usex mroonga YES NO)
+ -DPLUGIN_AUTH_GSSAPI=$(usex kerberos YES NO)
+ -DWITH_MARIABACKUP=$(usex backup ON OFF)
+ -DWITH_LIBARCHIVE=$(usex backup ON OFF)
+ -DWITH_NUMA=$(usex numa ON OFF)
+ )
+ fi
+ mysql-multilib-r1_src_configure
+}
+
+# Official test instructions:
+# USE='extraengine perl server openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mariadb-X.X.XX.ebuild \
+# digest clean package
+multilib_src_test() {
+
+ if ! multilib_is_native_abi ; then
+ einfo "Server tests not available on non-native abi".
+ return 0;
+ fi
+
+ _disable_test() {
+ local rawtestname reason
+ rawtestname="${1}" ; shift
+ reason="${@}"
+ ewarn "test '${rawtestname}' disabled: '${reason}'"
+ echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+ }
+ local TESTDIR="${BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ if ! use server ; then
+ einfo "Skipping server tests due to minimal build."
+ return 0
+ fi
+
+ # 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 [[ $UID -eq 0 ]]; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+ has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+ # Run CTest (test-units)
+ cmake-utils_src_test
+ retstatus_unit=$?
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+ # Enable parallel testing, auto will try to detect number of cores
+ # You may set this by hand.
+ # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+ export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+ # create directories because mysqladmin might run out of order
+ mkdir -p "${T}"/var-tests{,/log}
+
+ # Run mysql tests
+ pushd "${TESTDIR}" || die
+
+ touch "${T}/disabled.def"
+ # These are failing in MariaDB 10.0 for now and are believed to be
+ # false positives:
+ #
+ # main.mysql_client_test, main.mysql_client_test_nonblock
+ # main.mysql_client_test_comp:
+ # segfaults at random under Portage only, suspect resource limits.
+
+ local t
+ for t in plugins.cracklib_password_check plugins.two_password_validations ; do
+ _disable_test "$t" "False positive due to varying policies"
+ done
+
+ for t in main.mysql_client_test main.mysql_client_test_nonblock \
+ main.mysql_client_test_comp ; do
+ _disable_test "$t" "False positives in Gentoo"
+ done
+
+ # run mysql-test tests
+ perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test-list="${T}/disabled.def"
+ retstatus_tests=$?
+
+ popd || 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" ]] || eerror "Test failures: $failures"
+ einfo "Tests successfully completed"
+}
diff --git a/dev-db/mariadb/mariadb-10.1.34.ebuild b/dev-db/mariadb/mariadb-10.1.34.ebuild
new file mode 100644
index 000000000000..c4507c4f2773
--- /dev/null
+++ b/dev-db/mariadb/mariadb-10.1.34.ebuild
@@ -0,0 +1,881 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20180621-0218Z"
+SUBSLOT="18"
+
+JAVA_PKG_OPT_USE="jdbc"
+
+# Keeping eutils in EAPI=6 for emktemp in pkg_config
+
+inherit eutils systemd flag-o-matic prefix toolchain-funcs java-pkg-opt-2 user cmake-utils multilib-build
+
+SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz "
+
+# Gentoo patches to MySQL
+if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
+ SRC_URI="${SRC_URI}
+ mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
+fi
+
+HOMEPAGE="https://mariadb.org/"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL"
+LICENSE="GPL-2"
+SLOT="0/${SUBSLOT:-0}"
+IUSE="+backup bindist client-libs cracklib debug extraengine galera jdbc jemalloc kerberos
+ innodb-lz4 innodb-lzo innodb-snappy latin1 libressl mroonga numa odbc oqgraph pam
+ +perl profiling selinux +server sphinx sst-rsync sst-mariabackup sst-xtrabackup
+ systemd systemtap static static-libs tcmalloc test tokudb xml yassl"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="!bindist? ( bindist ) libressl? ( test )"
+
+REQUIRED_USE="jdbc? ( extraengine server !static )
+ server? ( tokudb? ( jemalloc !tcmalloc ) )
+ ?? ( tcmalloc jemalloc )
+ static? ( yassl !pam )"
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-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"
+
+if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
+ MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
+ inherit git-r3
+ EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
+ EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras"
+ EGIT_CLONE_TYPE=shallow
+else
+ MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
+fi
+
+PATCHES=(
+ "${MY_PATCH_DIR}"/20006_all_cmake_elib-mariadb-10.1.27.patch
+ "${MY_PATCH_DIR}"/20009_all_mariadb_myodbc_symbol_fix-5.5.38.patch
+ "${MY_PATCH_DIR}"/20015_all_mariadb-pkgconfig-location.patch
+ "${MY_PATCH_DIR}"/20018_all_mariadb-10.1.16-without-clientlibs-tools.patch
+ "${MY_PATCH_DIR}"/20025_all_mariadb-10.1.26-gssapi-detect.patch
+ "${MY_PATCH_DIR}"/20029_all_mariadb-10.1.31-enable-numa.patch
+ "${MY_PATCH_DIR}"/20035_all_mariadb-10.1-atomic-detection.patch
+)
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+COMMON_DEPEND="
+ kernel_linux? (
+ sys-process/procps:0=
+ dev-libs/libaio:0=
+ )
+ >=sys-apps/sed-4
+ >=sys-apps/texinfo-4.7-r1
+ jemalloc? ( dev-libs/jemalloc:0= )
+ tcmalloc? ( dev-util/google-perftools:0= )
+ systemtap? ( >=dev-util/systemtap-1.3:0= )
+ !yassl? (
+ !libressl? ( dev-libs/openssl:0= !>=dev-libs/openssl-1.1 )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ >=sys-libs/zlib-1.2.3:0=
+ sys-libs/ncurses:0=
+ !bindist? (
+ sys-libs/binutils-libs:0=
+ >=sys-libs/readline-4.1:0=
+ )
+ server? (
+ backup? ( app-arch/libarchive:0= )
+ cracklib? ( sys-libs/cracklib:0= )
+ extraengine? (
+ odbc? ( dev-db/unixODBC:0= )
+ xml? ( dev-libs/libxml2:2= )
+ sys-libs/zlib[minizip]
+ )
+ innodb-lz4? ( app-arch/lz4 )
+ innodb-lzo? ( dev-libs/lzo )
+ innodb-snappy? ( app-arch/snappy )
+ kerberos? ( virtual/krb5 )
+ mroonga? ( app-text/groonga-normalizer-mysql >=app-text/groonga-7.0.4 )
+ numa? ( sys-process/numactl )
+ oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
+ pam? ( virtual/pam:0= )
+ systemd? ( sys-apps/systemd:= )
+ tokudb? ( app-arch/snappy )
+ )
+ !yassl? ( !libressl? ( !>=dev-libs/openssl-1.1.0 ) )
+ >=dev-libs/libpcre-8.41-r1:3=
+ !client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
+"
+DEPEND="virtual/yacc
+ static? ( sys-libs/ncurses[static-libs] )
+ || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+ server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) )
+ ${COMMON_DEPEND}"
+RDEPEND="selinux? ( sec-policy/selinux-mysql )
+ client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
+ !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+ server? ( !prefix? ( dev-db/mysql-init-scripts ) )
+ ${COMMON_DEPEND}
+ server? ( galera? (
+ sys-apps/iproute2
+ =sys-cluster/galera-25*
+ sst-rsync? ( sys-process/lsof )
+ sst-mariabackup? ( net-misc/socat[ssl] )
+ sst-xtrabackup? ( net-misc/socat[ssl] )
+ ) )
+ perl? ( !dev-db/mytop
+ virtual/perl-Getopt-Long
+ dev-perl/TermReadKey
+ virtual/perl-Term-ANSIColor
+ virtual/perl-Time-HiRes )
+ server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) )
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+# percona-xtrabackup-bin causes a circular dependency if DBD-mysql is not already installed
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )
+ server? ( galera? ( sst-xtrabackup? ( || ( >=dev-db/percona-xtrabackup-bin-2.2.4 dev-db/percona-xtrabackup ) ) ) )"
+
+pkg_setup() {
+ if [[ ${MERGE_TYPE} != binary ]] ; then
+ local GCC_MAJOR_SET=$(gcc-major-version)
+ local GCC_MINOR_SET=$(gcc-minor-version)
+ if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \
+ ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+ eerror "${PN} with tokudb needs to be built with gcc-4.7 or later."
+ eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+ die
+ fi
+ # Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on
+ # non x86{,_64} arches
+ if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
+ ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+ eerror "${PN} needs to be built with gcc-4.7 or later."
+ eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+ die
+ fi
+ fi
+ java-pkg-opt-2_pkg_setup
+ if has test ${FEATURES} && \
+ use server && ! has userpriv ${FEATURES} ; then
+ eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+
+ # This should come after all of the die statements
+ enewgroup mysql 60 || die "problem adding 'mysql' group"
+ enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
+}
+
+pkg_preinst() {
+ java-pkg-opt-2_pkg_preinst
+}
+
+pkg_postinst() {
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ # Create log directory securely if it does not exist
+ [[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+ if use server ; then
+ if use pam; then
+ einfo
+ elog "This install includes the PAM authentication plugin."
+ elog "To activate and configure the PAM plugin, please read:"
+ elog "https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/"
+ einfo
+ fi
+
+ if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+ einfo
+ elog "You might want to run:"
+ elog "\"emerge --config =${CATEGORY}/${PF}\""
+ elog "if this is a new install."
+ elog
+ elog "If you are switching server implentations, you should run the"
+ elog "mysql_upgrade tool."
+ einfo
+ else
+ einfo
+ elog "If you are upgrading major versions, you should run the"
+ elog "mysql_upgrade tool."
+ einfo
+ fi
+
+ einfo
+ elog "Be sure to edit the my.cnf file to activate your cluster settings."
+ elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
+ elog "The first time the cluster is activated, you should add"
+ elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
+ elog "This option should then be removed for subsequent starts."
+ einfo
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ # Grab the patches
+ [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR%/}/mysql-extras" git-r3_src_unpack
+
+ mv -f "${WORKDIR%/}/${PN%%-galera}-${PV}" "${S}" || die
+}
+
+src_prepare() {
+ _disable_engine() {
+ echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
+ }
+
+ _disable_plugin() {
+ echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
+ }
+
+ java-pkg-opt-2_src_prepare
+ if use tcmalloc; then
+ echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S%/}/sql/CMakeLists.txt" || die
+ fi
+
+ # Don't build bundled xz-utils for tokudb
+ echo > "${S%/}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
+ sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S%/}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
+ sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S%/}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
+
+ local plugin
+ local server_plugins=( handler_socket auth_socket feedback metadata_lock_info
+ locale_info qc_info server_audit semisync sql_errlog )
+ local test_plugins=( audit_null auth_examples daemon_example fulltext )
+ if ! use server; then # These plugins are for the server
+ for plugin in "${server_plugins[@]}" ; do
+ _disable_plugin "${plugin}"
+ done
+ fi
+
+ if ! use test; then # These plugins are only used during testing
+ for plugin in "${test_plugins[@]}" ; do
+ _disable_plugin "${plugin}"
+ done
+ fi
+
+ # Collides with mariadb-connector-c bug 655980
+ _disable_plugin auth_dialog
+
+ # Avoid useless library checks
+ use mroonga || _disable_engine mroonga
+ use oqgraph || _disable_engine oqgraph
+ _disable_engine example
+
+ cmake-utils_src_prepare
+}
+
+src_configure(){
+ # bug 508724 mariadb cannot use ld.gold
+ tc-ld-disable-gold
+ # Bug #114895, bug #110149
+ filter-flags "-O" "-O[01]"
+
+ append-cxxflags -felide-constructors
+
+ # 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')"
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr"
+ -DDEFAULT_SYSCONFDIR="${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/mariadb
+ -DINSTALL_MYSQLTESTDIR=$(usex test 'share/mariadb/mysql-test' '')
+ -DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin
+ -DINSTALL_SCRIPTDIR=share/mariadb/scripts
+ -DINSTALL_MYSQLDATADIR="${EPREFIX%/}/var/lib/mysql"
+ -DINSTALL_SBINDIR=sbin
+ -DINSTALL_SUPPORTFILESDIR="${EPREFIX%/}/usr/share/mariadb"
+ -DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+ -DWITH_UNIT_TESTS=$(usex test ON OFF)
+ -DWITH_ZLIB=system
+ -DENABLED_LOCAL_INFILE=1
+ -DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
+ -DINSTALL_UNIX_ADDRDIR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
+ -DWITH_DEFAULT_COMPILER_OPTIONS=0
+ -DWITH_DEFAULT_FEATURE_SET=0
+ -DINSTALL_SYSTEMD_UNITDIR="$(systemd_get_systemunitdir)"
+ # 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)
+ -DWITHOUT_CLIENTLIBS=YES
+ -DWITH_READLINE=$(usex bindist 1 0)
+ -DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1)
+ -DENABLE_DTRACE=$(usex systemtap)
+ -DWITH_SSL=$(usex yassl bundled system)
+ )
+
+ if use server ; then
+
+ # Federated{,X} must be treated special otherwise they will not be built as plugins
+ if ! use extraengine ; then
+ mycmakeargs+=(
+ -DPLUGIN_FEDERATED=NO
+ -DPLUGIN_FEDERATEDX=NO )
+ fi
+
+ mycmakeargs+=(
+ -DWITH_JEMALLOC=$(usex jemalloc system)
+ -DWITH_PCRE=system
+ -DPLUGIN_OQGRAPH=$(usex oqgraph DYNAMIC NO)
+ -DPLUGIN_SPHINX=$(usex sphinx YES NO)
+ -DPLUGIN_TOKUDB=$(usex tokudb YES NO)
+ -DPLUGIN_AUTH_PAM=$(usex pam YES NO)
+ -DPLUGIN_CRACKLIB_PASSWORD_CHECK=$(usex cracklib YES NO)
+ -DPLUGIN_CASSANDRA=NO
+ -DPLUGIN_SEQUENCE=$(usex extraengine YES NO)
+ -DPLUGIN_SPIDER=$(usex extraengine YES NO)
+ -DPLUGIN_CONNECT=$(usex extraengine YES NO)
+ -DCONNECT_WITH_MYSQL=1
+ -DCONNECT_WITH_LIBXML2=$(usex xml)
+ -DCONNECT_WITH_ODBC=$(usex odbc)
+ -DCONNECT_WITH_JDBC=$(usex jdbc)
+ # Build failure and autodep wrt bug 639144
+ -DCONNECT_WITH_MONGO=OFF
+ -DWITH_WSREP=$(usex galera)
+ -DWITH_INNODB_LZ4=$(usex innodb-lz4 ON OFF)
+ -DWITH_INNODB_LZO=$(usex innodb-lzo ON OFF)
+ -DWITH_INNODB_SNAPPY=$(usex innodb-snappy ON OFF)
+ -DPLUGIN_MROONGA=$(usex mroonga DYNAMIC NO)
+ -DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO)
+ -DPLUGIN_AUTH_GSSAPI_CLIENT=NO
+ -DWITH_MARIABACKUP=$(usex backup ON OFF)
+ -DWITH_LIBARCHIVE=$(usex backup ON OFF)
+ -DWITH_SYSTEMD=$(usex systemd yes no)
+ -DWITH_NUMA=$(usex numa ON OFF)
+ -DINSTALL_SQLBENCHDIR=''
+ )
+
+ 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."
+
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+ -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+ )
+
+ elif ! use latin1 ; then
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=utf8
+ -DDEFAULT_COLLATION=utf8_general_ci
+ )
+ else
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=latin1
+ -DDEFAULT_COLLATION=latin1_swedish_ci
+ )
+ fi
+ mycmakeargs+=(
+ -DEXTRA_CHARSETS=all
+ -DMYSQL_USER=mysql
+ -DDISABLE_SHARED=$(usex static YES NO)
+ -DWITH_DEBUG=$(usex debug)
+ -DWITH_EMBEDDED_SERVER=OFF
+ -DENABLED_PROFILING=$(usex profiling)
+ )
+
+ if use static; then
+ mycmakeargs+=( -DWITH_PIC=1 )
+ fi
+
+ if use jemalloc || use tcmalloc ; then
+ mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
+ fi
+
+ # Storage engines
+ mycmakeargs+=(
+ -DWITH_ARCHIVE_STORAGE_ENGINE=1
+ -DWITH_BLACKHOLE_STORAGE_ENGINE=1
+ -DWITH_CSV_STORAGE_ENGINE=1
+ -DWITH_HEAP_STORAGE_ENGINE=1
+ -DWITH_INNOBASE_STORAGE_ENGINE=1
+ -DWITH_MYISAMMRG_STORAGE_ENGINE=1
+ -DWITH_MYISAM_STORAGE_ENGINE=1
+ -DWITH_PARTITION_STORAGE_ENGINE=1
+ )
+
+ else
+ mycmakeargs+=(
+ -DWITHOUT_SERVER=1
+ -DWITH_EMBEDDED_SERVER=OFF
+ -DEXTRA_CHARSETS=none
+ -DINSTALL_SQLBENCHDIR=
+ -DWITH_SYSTEMD=no
+ )
+ fi
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ # Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
+ if [[ -f "${ED}/usr/include/mysql/server/private/config.h" ]] ; then
+ rm "${ED}/usr/include/mysql/server/private/config.h" || die
+ fi
+
+ # 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 "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
+ fi
+
+ # Configuration stuff
+ einfo "Building default configuration ..."
+ insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+ [[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+ local mycnf_src="my.cnf-5.6-r1"
+ sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+ "${FILESDIR}/${mycnf_src}" \
+ > "${TMPDIR}/my.cnf.ok" || die
+ use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR}/my.cnf.ok"
+ if use latin1 ; then
+ sed -i \
+ -e "/character-set/s|utf8|latin1|g" \
+ "${TMPDIR}/my.cnf.ok" || die
+ fi
+ eprefixify "${TMPDIR}/my.cnf.ok"
+ newins "${TMPDIR}/my.cnf.ok" my.cnf
+
+ if use server ; then
+ einfo "Including support files and sample configurations"
+ docinto "support-files"
+ local script
+ for script in \
+ "${S}"/support-files/magic
+ do
+ [[ -f "$script" ]] && dodoc "${script}"
+ done
+
+ docinto "scripts"
+ for script in "${S}"/scripts/mysql* ; do
+ [[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
+ done
+ fi
+
+ #Remove mytop if perl is not selected
+ [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+}
+
+# Official test instructions:
+# USE='extraengine perl server' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mariadb-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+ _disable_test() {
+ local rawtestname reason
+ rawtestname="${1}" ; shift
+ reason="${@}"
+ ewarn "test '${rawtestname}' disabled: '${reason}'"
+ echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+ }
+
+ local TESTDIR="${BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ if ! use server ; then
+ einfo "Skipping server tests due to minimal build."
+ return 0
+ fi
+
+ # 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 [[ $UID -eq 0 ]]; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+ has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+ # Run CTest (test-units)
+# cmake-utils_src_test
+# retstatus_unit=$?
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+ # Enable parallel testing, auto will try to detect number of cores
+ # You may set this by hand.
+ # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+ export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+ # 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"
+ # These are failing in MariaDB 10.0 for now and are believed to be
+ # false positives:
+ #
+ # main.mysql_client_test, main.mysql_client_test_nonblock
+ # main.mysql_client_test_comp:
+ # segfaults at random under Portage only, suspect resource limits.
+
+ local t
+ for t in plugins.cracklib_password_check plugins.two_password_validations ; do
+ _disable_test "$t" "False positive due to varying policies"
+ done
+
+ for t in main.mysql_client_test main.mysql_client_test_nonblock \
+ rpl.rpl_semi_sync_uninstall_plugin \
+ main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam ; do
+ _disable_test "$t" "False positives in Gentoo"
+ done
+
+ if ! use client-libs ; then
+ _disable_test main.plugin_auth "Needs client libraries built"
+ 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"
+}
+
+mysql_init_vars() {
+ MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mariadb"}
+ MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+ MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+ MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ MY_DATADIR=""
+ if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
+ MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+ | sed -ne '/datadir/s|^--datadir=||p' \
+ | tail -n1`
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
+ | sed -e 's/.*=\s*//' \
+ | tail -n1`
+ fi
+ fi
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ MY_DATADIR="${MY_LOCALSTATEDIR}"
+ einfo "Using default MY_DATADIR"
+ fi
+ elog "MySQL MY_DATADIR is ${MY_DATADIR}"
+
+ if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
+ if [[ -e "${MY_DATADIR}" ]] ; then
+ # If you get this and you're wondering about it, see bug #207636
+ elog "MySQL datadir found in ${MY_DATADIR}"
+ elog "A new one will not be created."
+ PREVIOUS_DATADIR="yes"
+ else
+ PREVIOUS_DATADIR="no"
+ fi
+ export PREVIOUS_DATADIR
+ fi
+ else
+ if [[ ${EBUILD_PHASE} == "config" ]]; then
+ local new_MY_DATADIR
+ new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+ | sed -ne '/datadir/s|^--datadir=||p' \
+ | tail -n1`
+
+ if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
+ ewarn "MySQL MY_DATADIR has changed"
+ ewarn "from ${MY_DATADIR}"
+ ewarn "to ${new_MY_DATADIR}"
+ MY_DATADIR="${new_MY_DATADIR}"
+ fi
+ fi
+ fi
+
+ export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+ export MY_LOCALSTATEDIR MY_LOGDIR
+ export MY_DATADIR
+}
+
+pkg_config() {
+ _getoptval() {
+ local mypd="${EROOT}"/usr/bin/my_print_defaults
+ local section="$1"
+ local flag="--${2}="
+ local extra_options="${3}"
+ "${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
+ }
+ local old_MY_DATADIR="${MY_DATADIR}"
+ local old_HOME="${HOME}"
+ # my_print_defaults needs to read stuff in $HOME/.my.cnf
+ export HOME=${EPREFIX}/root
+
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ [[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
+ if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
+ die "Minimal builds do NOT include the MySQL server"
+ fi
+
+ if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
+ local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
+ MY_DATADIR_s="${MY_DATADIR_s%%/}"
+ local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
+ old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
+
+ if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
+ if [[ -d "${MY_DATADIR_s}" ]]; then
+ ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
+ ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
+ else
+ elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
+ mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
+ || die "Moving MY_DATADIR failed"
+ fi
+ else
+ ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
+ if [[ -d "${MY_DATADIR_s}" ]]; then
+ ewarn "Attempting to use ${MY_DATADIR_s}"
+ else
+ eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
+ die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
+ fi
+ fi
+ fi
+
+ local pwd1="a"
+ local pwd2="b"
+ local maxtry=15
+
+ 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
+ MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
+ # These are dir+prefix
+ MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
+ MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+ MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
+ MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+
+ if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
+ einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
+ install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
+ fi
+ if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
+ einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
+ install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
+ fi
+ if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
+ einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
+ install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
+ fi
+
+ if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
+ ewarn "You have already a MySQL database in place."
+ ewarn "(${ROOT}/${MY_DATADIR}/*)"
+ ewarn "Please rename or delete it if you wish to replace it."
+ die "MySQL database already exists!"
+ fi
+
+ # 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 "${MYSQL_ROOT_PASSWORD}" ]; then
+
+ einfo "Please provide a password for the mysql 'root' user now"
+ einfo "or through the ${HOME}/.my.cnf file."
+ ewarn "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
+ fi
+
+ local options
+ local sqltmp="$(emktemp)"
+
+ # Fix bug 446200. Don't reference host my.cnf, needs to come first,
+ # see https://bugs.mysql.com/bug.php?id=31312
+ use prefix && options="${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
+ for opt in grant-tables 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}" && options="${options} ${optfull}"
+ done
+
+ einfo "Creating the mysql database and setting proper permissions on it ..."
+
+ # Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
+ PID_DIR="${EROOT}/var/run/mysqld"
+ if [[ ! -d "${PID_DIR}" ]]; then
+ install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
+ fi
+
+ if [[ ! -d "${MY_DATADIR}" ]]; then
+ install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
+ fi
+
+ pushd "${TMPDIR}" &>/dev/null || die
+
+ # Filling timezones, see
+ # https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+ "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
+
+ local cmd=( "${EROOT}usr/share/mariadb/scripts/mysql_install_db" )
+ [[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
+ cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
+ einfo "Command: ${cmd[*]}"
+ su -s /bin/sh -c "${cmd[*]}" mysql \
+ >"${TMPDIR}"/mysql_install_db.log 2>&1
+ if [ $? -ne 0 ]; then
+ grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
+ die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
+ fi
+ popd &>/dev/null || die
+ [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
+ || die "MySQL databases not installed"
+
+ use prefix || options="${options} --user=mysql"
+
+ local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
+ local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
+ local mysqld="${EROOT}/usr/sbin/mysqld \
+ ${options} \
+ --log-warnings=0 \
+ --basedir=${EROOT}/usr \
+ --datadir=${ROOT}/${MY_DATADIR} \
+ --max_allowed_packet=8M \
+ --net_buffer_length=16K \
+ --socket=${socket} \
+ --pid-file=${pidfile}
+ --tmpdir=${ROOT}/${MYSQL_TMPDIR}"
+ #einfo "About to start mysqld: ${mysqld}"
+ ebegin "Starting mysqld"
+ einfo "Command ${mysqld}"
+ ${mysqld} &
+ rc=$?
+ while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
+ maxtry=$((${maxtry}-1))
+ echo -n "."
+ sleep 1
+ done
+ eend $rc
+
+ if ! [[ -S "${socket}" ]]; then
+ die "Completely failed to start up mysqld with: ${mysqld}"
+ fi
+
+ ebegin "Setting root password"
+ # Do this from memory, as we don't want clear text passwords in temp files
+ local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
+ "${EROOT}/usr/bin/mysql" \
+ "--socket=${socket}" \
+ -hlocalhost \
+ -e "${sql}"
+ eend $?
+
+ if [[ -n "${sqltmp}" ]] ; then
+ ebegin "Loading \"zoneinfo\", this step may require a few seconds"
+ "${EROOT}/usr/bin/mysql" \
+ "--socket=${socket}" \
+ -hlocalhost \
+ -uroot \
+ --password="${MYSQL_ROOT_PASSWORD}" \
+ mysql < "${sqltmp}"
+ rc=$?
+ eend $?
+ [[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
+ fi
+
+ # Stop the server and cleanup
+ einfo "Stopping the server ..."
+ kill $(< "${pidfile}" )
+ rm -f "${sqltmp}"
+ wait %1
+ einfo "Done"
+}
diff --git a/dev-db/mariadb/mariadb-10.2.15.ebuild b/dev-db/mariadb/mariadb-10.2.15.ebuild
new file mode 100644
index 000000000000..6e8b31cdccb1
--- /dev/null
+++ b/dev-db/mariadb/mariadb-10.2.15.ebuild
@@ -0,0 +1,1011 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20180515-1334Z"
+SUBSLOT="18"
+
+JAVA_PKG_OPT_USE="jdbc"
+
+# Keeping eutils in EAPI=6 for emktemp in pkg_config
+
+inherit eutils systemd flag-o-matic prefix toolchain-funcs \
+ java-pkg-opt-2 user cmake-utils multilib-minimal
+
+SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz "
+
+# Gentoo patches to MySQL
+if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
+ SRC_URI="${SRC_URI}
+ mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
+fi
+
+HOMEPAGE="https://mariadb.org/"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL"
+LICENSE="GPL-2 LGPL-2.1+"
+SLOT="0/${SUBSLOT:-0}"
+IUSE="+backup bindist client-libs cracklib debug extraengine galera innodb-lz4
+ innodb-lzo innodb-snappy jdbc jemalloc kerberos latin1 libressl mroonga
+ numa odbc oqgraph pam +perl profiling rocksdb selinux +server sphinx
+ sst-rsync sst-mariabackup sst-xtrabackup static static-libs systemd systemtap tcmalloc
+ test tokudb xml yassl"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="!bindist? ( bindist ) libressl? ( test )"
+
+REQUIRED_USE="jdbc? ( extraengine server !static )
+ server? ( tokudb? ( jemalloc !tcmalloc ) )
+ !server? ( !extraengine )
+ ?? ( tcmalloc jemalloc )
+ static? ( yassl !pam )"
+
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-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"
+
+if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
+ MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
+ inherit git-r3
+ EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
+ EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras"
+ EGIT_CLONE_TYPE=shallow
+else
+ MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
+fi
+
+PATCHES=(
+ "${MY_PATCH_DIR}"/20015_all_mariadb-pkgconfig-location.patch
+ "${MY_PATCH_DIR}"/20018_all_mariadb-10.2.9-without-clientlibs-tools.patch
+ "${MY_PATCH_DIR}"/20024_all_mariadb-10.2.6-mysql_st-regression.patch
+ "${MY_PATCH_DIR}"/20025_all_mariadb-10.2.6-gssapi-detect.patch
+ "${MY_PATCH_DIR}"/20035_all_mariadb-10.2-atomic-detection.patch
+)
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+# MULTILIB_USEDEP only set for libraries used by the client library
+COMMON_DEPEND="
+ kernel_linux? (
+ sys-process/procps:0=
+ dev-libs/libaio:0=
+ )
+ >=sys-apps/sed-4
+ >=sys-apps/texinfo-4.7-r1
+ jemalloc? ( dev-libs/jemalloc:0= )
+ tcmalloc? ( dev-util/google-perftools:0= )
+ systemtap? ( >=dev-util/systemtap-1.3:0= )
+ client-libs? ( >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?]
+ kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
+ yassl? ( net-libs/gnutls:0=[${MULTILIB_USEDEP},static-libs?] )
+ !yassl? (
+ !libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
+ libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
+ )
+ )
+ !client-libs? ( >=sys-libs/zlib-1.2.3:0= kerberos? ( virtual/krb5 )
+ yassl? ( net-libs/gnutls:0= )
+ !yassl? (
+ !libressl? ( >=dev-libs/openssl-1.0.0:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ )
+ sys-libs/ncurses:0=
+ !bindist? (
+ sys-libs/binutils-libs:0=
+ >=sys-libs/readline-4.1:0=
+ )
+ server? (
+ backup? ( app-arch/libarchive:0= )
+ cracklib? ( sys-libs/cracklib:0= )
+ extraengine? (
+ odbc? ( dev-db/unixODBC:0= )
+ xml? ( dev-libs/libxml2:2= )
+ )
+ innodb-lz4? ( app-arch/lz4 )
+ innodb-lzo? ( dev-libs/lzo )
+ innodb-snappy? ( app-arch/snappy )
+ mroonga? ( app-text/groonga-normalizer-mysql >=app-text/groonga-7.0.4 )
+ numa? ( sys-process/numactl )
+ oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
+ pam? ( virtual/pam:0= )
+ systemd? ( sys-apps/systemd:= )
+ tokudb? ( app-arch/snappy )
+ )
+ >=dev-libs/libpcre-8.41-r1:3=
+ !client-libs? ( dev-db/mariadb-connector-c[${MULTILIB_USEDEP}] dev-db/mysql-connector-c[${MULTILIB_USEDEP}] )
+"
+DEPEND="virtual/yacc
+ static? ( sys-libs/ncurses[static-libs] )
+ || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+ server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) )
+ ${COMMON_DEPEND}"
+RDEPEND="selinux? ( sec-policy/selinux-mysql )
+ client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
+ !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+ server? ( !prefix? ( dev-db/mysql-init-scripts ) )
+ !<virtual/mysql-5.6-r9
+ ${COMMON_DEPEND}
+ server? ( galera? (
+ sys-apps/iproute2
+ =sys-cluster/galera-25*
+ sst-rsync? ( sys-process/lsof )
+ sst-mariabackup? ( net-misc/socat[ssl] )
+ sst-xtrabackup? ( net-misc/socat[ssl] )
+ ) )
+ perl? ( !dev-db/mytop
+ virtual/perl-Getopt-Long
+ dev-perl/TermReadKey
+ virtual/perl-Term-ANSIColor
+ virtual/perl-Time-HiRes )
+ server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) )
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+# percona-xtrabackup-bin causes a circular dependency if DBD-mysql is not already installed
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )
+ server? ( ~virtual/mysql-5.6[static=]
+ galera? ( sst-xtrabackup? ( || ( >=dev-db/percona-xtrabackup-bin-2.2.4 dev-db/percona-xtrabackup ) ) ) )"
+
+pkg_setup() {
+ if [[ ${MERGE_TYPE} != binary ]] ; then
+ local GCC_MAJOR_SET=$(gcc-major-version)
+ local GCC_MINOR_SET=$(gcc-minor-version)
+ if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \
+ ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+ eerror "${PN} with tokudb needs to be built with gcc-4.7 or later."
+ eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+ die
+ fi
+ # Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on
+ # non x86{,_64} arches
+ if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
+ ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+ eerror "${PN} needs to be built with gcc-4.7 or later."
+ eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+ die
+ fi
+ fi
+ java-pkg-opt-2_pkg_setup
+ if has test ${FEATURES} && \
+ use server && ! has userpriv ${FEATURES} ; then
+ eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+
+ # This should come after all of the die statements
+ enewgroup mysql 60 || die "problem adding 'mysql' group"
+ enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
+}
+
+pkg_preinst() {
+ java-pkg-opt-2_pkg_preinst
+
+ # Here we need to see if the implementation switched client libraries
+ # We check if this is a new instance of the package and a client library already exists
+ local SHOW_ABI_MESSAGE libpath
+ if [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+ libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
+ elog "Due to ABI changes when switching between different client libraries,"
+ elog "revdep-rebuild must find and rebuild all packages linking to libmysqlclient."
+ elog "Please run: revdep-rebuild --library ${libpath}"
+ ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+ fi
+}
+
+pkg_postinst() {
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ # Create log directory securely if it does not exist
+ [[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+ if use server ; then
+ if use pam; then
+ einfo
+ elog "This install includes the PAM authentication plugin."
+ elog "To activate and configure the PAM plugin, please read:"
+ elog "https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/"
+ einfo
+ fi
+
+ if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+ einfo
+ elog "You might want to run:"
+ elog "\"emerge --config =${CATEGORY}/${PF}\""
+ elog "if this is a new install."
+ elog
+ elog "If you are switching server implentations, you should run the"
+ elog "mysql_upgrade tool."
+ einfo
+ else
+ einfo
+ elog "If you are upgrading major versions, you should run the"
+ elog "mysql_upgrade tool."
+ einfo
+ fi
+
+ if use galera ; then
+ einfo
+ elog "Be sure to edit the my.cnf file to activate your cluster settings."
+ elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
+ elog "The first time the cluster is activated, you should add"
+ elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
+ elog "This option should then be removed for subsequent starts."
+ einfo
+ fi
+ fi
+
+ # Note about configuration change
+ einfo
+ elog "This version of mariadb reorganizes the configuration from a single my.cnf"
+ elog "to several files in /etc/mysql/${PN}.d."
+ elog "Please backup any changes you made to /etc/mysql/my.cnf"
+ elog "and add them as a new file under /etc/mysql/${PN}.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 appropitate section headers, i.e. [mysqld]."
+ einfo
+}
+
+src_unpack() {
+ unpack ${A}
+ # Grab the patches
+ [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR%/}/mysql-extras" git-r3_src_unpack
+
+ mv -f "${WORKDIR%/}/${P}" "${S}" || die
+}
+
+src_prepare() {
+ java-pkg-opt-2_src_prepare
+ if use tcmalloc; then
+ echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt"
+ fi
+
+ # Don't build bundled xz-utils for tokudb
+ echo > "${S}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
+ sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
+ sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
+
+ # Remove the bundled groonga
+ # There is no CMake flag, it simply checks for existance
+ rm -r "${S}"/storage/mroonga/vendor/groonga || die "could not remove packaged groonga"
+
+ if ! use server; then
+ rm -r "${S}"/plugin/handler_socket || die
+ fi
+
+ cmake-utils_src_prepare
+}
+
+src_configure(){
+ # bug 508724 mariadb cannot use ld.gold
+ tc-ld-disable-gold
+ # Bug #114895, bug #110149
+ filter-flags "-O" "-O[01]"
+
+ append-cxxflags -felide-constructors
+
+ # bug #283926, with GCC4.4, this is required to get correct behavior.
+ append-flags -fno-strict-aliasing
+
+ if use client-libs ; then
+ multilib-minimal_src_configure
+ else
+ multilib_src_configure
+ fi
+}
+
+multilib_src_configure() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ if ! multilib_is_native_abi && ! use client-libs ; then
+ return
+ fi
+
+ CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+ # debug hack wrt #497532
+ mycmakeargs=(
+ -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
+ -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/mariadb
+ -DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin
+ -DINSTALL_SCRIPTDIR=share/mariadb/scripts
+ -DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+ -DINSTALL_SBINDIR=sbin
+ -DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mariadb"
+ -DWITH_COMMENT="Gentoo Linux ${PF}"
+ -DWITH_UNIT_TESTS=$(usex test ON OFF)
+ -DWITH_LIBEDIT=0
+ -DWITH_ZLIB=system
+ -DWITHOUT_LIBWRAP=1
+ -DENABLED_LOCAL_INFILE=1
+ -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+ -DINSTALL_UNIX_ADDRDIR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+ -DWITH_DEFAULT_COMPILER_OPTIONS=0
+ -DWITH_DEFAULT_FEATURE_SET=0
+ -DINSTALL_SYSTEMD_UNITDIR="$(systemd_get_systemunitdir)"
+ -DENABLE_STATIC_LIBS=$(usex static-libs ON OFF)
+ # 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)
+ -DPKG_CONFIG_EXECUTABLE="${EPREFIX}/usr/bin/$(tc-getPKG_CONFIG)"
+ -DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO)
+ -DAUTH_GSSAPI_PLUGIN_TYPE=$(usex kerberos DYNAMIC OFF)
+ -DCONC_WITH_EXTERNAL_ZLIB=YES
+ -DWITH_EXTERNAL_ZLIB=YES
+ -DSUFFIX_INSTALL_DIR=""
+ -DWITH_UNITTEST=OFF
+ )
+ if use test ; then
+ mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mariadb/mysql-test )
+ else
+ mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+ fi
+
+ if ! use yassl ; then
+ mycmakeargs+=( -DWITH_SSL=system )
+ else
+ mycmakeargs+=( -DWITH_SSL=bundled )
+ fi
+
+ if ! use client-libs ; then
+ mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+ fi
+
+ # bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
+ # systemtap only works on native ABI bug 530132
+ if multilib_is_native_abi; then
+ mycmakeargs+=(
+ -DWITH_READLINE=$(usex bindist 1 0)
+ -DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1)
+ -DENABLE_DTRACE=$(usex systemtap)
+ )
+ else
+ mycmakeargs+=(
+ -DWITHOUT_TOOLS=1
+ -DWITH_READLINE=1
+ -DNOT_FOR_DISTRIBUTION=0
+ -DENABLE_DTRACE=0
+ )
+ fi
+
+ if multilib_is_native_abi && use server ; then
+
+ # Federated{,X} must be treated special otherwise they will not be built as plugins
+ if ! use extraengine ; then
+ mycmakeargs+=(
+ -DPLUGIN_FEDERATED=NO
+ -DPLUGIN_FEDERATEDX=NO )
+ fi
+
+ mycmakeargs+=(
+ -DWITH_JEMALLOC=$(usex jemalloc system)
+ -DWITH_PCRE=system
+ -DPLUGIN_OQGRAPH=$(usex oqgraph DYNAMIC NO)
+ -DPLUGIN_SPHINX=$(usex sphinx YES NO)
+ -DPLUGIN_TOKUDB=$(usex tokudb YES NO)
+ -DPLUGIN_AUTH_PAM=$(usex pam YES NO)
+ -DPLUGIN_CRACKLIB_PASSWORD_CHECK=$(usex cracklib YES NO)
+ -DPLUGIN_CASSANDRA=NO
+ -DPLUGIN_SEQUENCE=$(usex extraengine YES NO)
+ -DPLUGIN_SPIDER=$(usex extraengine YES NO)
+ -DPLUGIN_CONNECT=$(usex extraengine YES NO)
+ -DCONNECT_WITH_MYSQL=1
+ -DCONNECT_WITH_LIBXML2=$(usex xml)
+ -DCONNECT_WITH_ODBC=$(usex odbc)
+ -DCONNECT_WITH_JDBC=$(usex jdbc)
+ # Build failure and autodep wrt bug 639144
+ -DCONNECT_WITH_MONGO=OFF
+ -DWITH_WSREP=$(usex galera)
+ -DWITH_INNODB_LZ4=$(usex innodb-lz4 ON OFF)
+ -DWITH_INNODB_LZO=$(usex innodb-lzo ON OFF)
+ -DWITH_INNODB_SNAPPY=$(usex innodb-snappy ON OFF)
+ -DPLUGIN_MROONGA=$(usex mroonga DYNAMIC NO)
+ -DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO)
+ -DWITH_MARIABACKUP=$(usex backup ON OFF)
+ -DWITH_LIBARCHIVE=$(usex backup ON OFF)
+ -DINSTALL_SQLBENCHDIR=share/mariadb
+ -DPLUGIN_ROCKSDB=$(usex rocksdb DYNAMIC NO)
+ # systemd is only linked to for server notification
+ -DWITH_SYSTEMD=$(usex systemd yes no)
+ -DWITH_NUMA=$(usex numa ON OFF)
+ )
+
+ # Workaround for MDEV-14524
+ use tokudb && mycmakeargs+=( -DTOKUDB_OK=1 )
+
+ if use test ; then
+ # This is needed for the new client lib which tests a real, open server
+ mycmakeargs+=( -DSKIP_TESTS=ON )
+ fi
+
+ 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."
+
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+ -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+ )
+
+ elif ! use latin1 ; then
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=utf8
+ -DDEFAULT_COLLATION=utf8_general_ci
+ )
+ else
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=latin1
+ -DDEFAULT_COLLATION=latin1_swedish_ci
+ )
+ fi
+ mycmakeargs+=(
+ -DEXTRA_CHARSETS=all
+ -DMYSQL_USER=mysql
+ -DDISABLE_SHARED=$(usex static YES NO)
+ -DWITH_DEBUG=$(usex debug)
+ -DWITH_EMBEDDED_SERVER=OFF
+ -DWITH_PROFILING=$(usex profiling)
+ )
+
+ if use static; then
+ mycmakeargs+=( -DWITH_PIC=1 )
+ fi
+
+ if use jemalloc || use tcmalloc ; then
+ mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
+ fi
+
+ # Storage engines
+ mycmakeargs+=(
+ -DWITH_ARCHIVE_STORAGE_ENGINE=1
+ -DWITH_BLACKHOLE_STORAGE_ENGINE=1
+ -DWITH_CSV_STORAGE_ENGINE=1
+ -DWITH_HEAP_STORAGE_ENGINE=1
+ -DWITH_INNOBASE_STORAGE_ENGINE=1
+ -DWITH_MYISAMMRG_STORAGE_ENGINE=1
+ -DWITH_MYISAM_STORAGE_ENGINE=1
+ -DWITH_PARTITION_STORAGE_ENGINE=1
+ )
+
+ else
+ mycmakeargs+=(
+ -DWITHOUT_SERVER=1
+ -DWITH_EMBEDDED_SERVER=OFF
+ -DEXTRA_CHARSETS=none
+ -DINSTALL_SQLBENCHDIR=
+ -DWITH_SYSTEMD=no
+ )
+ fi
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ if use client-libs ; then
+ multilib-minimal_src_compile
+ else
+ multilib_src_compile
+ fi
+}
+
+multilib_src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ local MULTILIB_WRAPPED_HEADERS
+ local MULTILIB_CHOST_TOOLS
+ if use client-libs ; then
+ # headers with ABI specific data
+ MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/mysql/server/my_config.h
+ /usr/include/mysql/server/private/embedded_priv.h
+ /usr/include/mysql/server/mysql_version.h
+ /usr/include/mariadb/mariadb_version.h
+ /usr/include/mysql/mariadb_version.h
+ /usr/include/mysql/server/private/probes_mysql_nodtrace.h
+ /usr/include/mysql/server/private/probes_mysql_dtrace.h )
+
+ # wrap the config scripts
+ MULTILIB_CHOST_TOOLS=( /usr/bin/mariadb_config /usr/bin/mysql_config )
+ multilib-minimal_src_install
+ else
+ multilib_src_install
+ multilib_src_install_all
+ fi
+}
+
+# Intentionally override eclass function
+multilib_src_install() {
+
+ cmake-utils_src_install
+
+ # Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
+ if [[ -f "${ED}/usr/include/mysql/server/private/config.h" ]] ; then
+ rm "${ED}/usr/include/mysql/server/private/config.h" || die
+ fi
+
+ if ! multilib_is_native_abi && use server ; then
+ insinto /usr/include/mysql/server/private
+ doins "${S}"/sql/*.h
+ fi
+
+ if use client-libs ; then
+ # Install compatible symlinks to libmysqlclient
+# use static-libs && dosym libmariadbclient.a "/usr/$(get_libdir)/libmysqlclient.a"
+# dosym libmariadb.so.3 "/usr/$(get_libdir)/libmysqlclient.so"
+ dosym libmariadb.so.3 "/usr/$(get_libdir)/libmysqlclient.so.${SUBSLOT}"
+ 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
+}
+
+multilib_src_install_all() {
+ # 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 "${D}/${MY_SHAREDSTATEDIR}/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-10.2" "${TMPDIR}/my.cnf" || die
+ eprefixify "${TMPDIR}/my.cnf"
+ doins "${TMPDIR}/my.cnf"
+ insinto "${MY_SYSCONFDIR#${EPREFIX}}/mariadb.d"
+ cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+ eprefixify "${TMPDIR}/50-distro-client.cnf"
+ doins "${TMPDIR}/50-distro-client.cnf"
+
+ if use server ; then
+ mycnf_src="my.cnf.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|utf8|latin1|g" \
+ "${TMPDIR}/my.cnf.ok" || die
+ fi
+ eprefixify "${TMPDIR}/my.cnf.ok"
+ newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+
+ einfo "Including support files and sample configurations"
+ docinto "support-files"
+ local script
+ for script in \
+ "${S}"/support-files/magic
+ do
+ [[ -f "$script" ]] && dodoc "${script}"
+ done
+
+ docinto "scripts"
+ for script in "${S}"/scripts/mysql* ; do
+ [[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
+ done
+ fi
+
+ #Remove mytop if perl is not selected
+ [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+}
+
+# Official test instructions:
+# USE='extraengine perl server static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mariadb-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+ _disable_test() {
+ local rawtestname reason
+ rawtestname="${1}" ; shift
+ reason="${@}"
+ ewarn "test '${rawtestname}' disabled: '${reason}'"
+ echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+ }
+
+ local TESTDIR="${BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ if ! use server ; then
+ einfo "Skipping server tests due to minimal build."
+ return 0
+ fi
+
+ # 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 [[ $UID -eq 0 ]]; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+ has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+ # Run CTest (test-units)
+ cmake-utils_src_test
+ retstatus_unit=$?
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+ # Enable parallel testing, auto will try to detect number of cores
+ # You may set this by hand.
+ # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+ export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+ # 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"
+ # These are failing in MariaDB 10.0 for now and are believed to be
+ # false positives:
+ #
+ # main.mysql_client_test, main.mysql_client_test_nonblock
+ # main.mysql_client_test_comp:
+ # segfaults at random under Portage only, suspect resource limits.
+
+ local t
+ for t in plugins.cracklib_password_check plugins.two_password_validations ; do
+ _disable_test "$t" "False positive due to varying policies"
+ done
+
+ for t in main.mysql_client_test main.mysql_client_test_nonblock \
+ main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam ; do
+ _disable_test "$t" "False positives in Gentoo"
+ done
+
+ if ! use client-libs ; then
+ _disable_test main.plugin_auth "Needs client libraries built"
+ 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"
+}
+
+mysql_init_vars() {
+ MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mariadb"}
+ MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+ MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+ MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ MY_DATADIR=""
+ if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
+ MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+ | sed -ne '/datadir/s|^--datadir=||p' \
+ | tail -n1`
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
+ | sed -e 's/.*=\s*//' \
+ | tail -n1`
+ fi
+ fi
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ MY_DATADIR="${MY_LOCALSTATEDIR}"
+ einfo "Using default MY_DATADIR"
+ fi
+ elog "MySQL MY_DATADIR is ${MY_DATADIR}"
+
+ if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
+ if [[ -e "${MY_DATADIR}" ]] ; then
+ # If you get this and you're wondering about it, see bug #207636
+ elog "MySQL datadir found in ${MY_DATADIR}"
+ elog "A new one will not be created."
+ PREVIOUS_DATADIR="yes"
+ else
+ PREVIOUS_DATADIR="no"
+ fi
+ export PREVIOUS_DATADIR
+ fi
+ else
+ if [[ ${EBUILD_PHASE} == "config" ]]; then
+ local new_MY_DATADIR
+ new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+ | sed -ne '/datadir/s|^--datadir=||p' \
+ | tail -n1`
+
+ if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
+ ewarn "MySQL MY_DATADIR has changed"
+ ewarn "from ${MY_DATADIR}"
+ ewarn "to ${new_MY_DATADIR}"
+ MY_DATADIR="${new_MY_DATADIR}"
+ fi
+ fi
+ fi
+
+ export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+ export MY_LOCALSTATEDIR MY_LOGDIR
+ export MY_DATADIR
+}
+
+pkg_config() {
+ _getoptval() {
+ local mypd="${EROOT}"/usr/bin/my_print_defaults
+ local section="$1"
+ local flag="--${2}="
+ local extra_options="${3}"
+ "${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
+ }
+ local old_MY_DATADIR="${MY_DATADIR}"
+ local old_HOME="${HOME}"
+ # my_print_defaults needs to read stuff in $HOME/.my.cnf
+ export HOME=${EPREFIX}/root
+
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ [[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
+ if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
+ die "Minimal builds do NOT include the MySQL server"
+ fi
+
+ if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
+ local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
+ MY_DATADIR_s="${MY_DATADIR_s%%/}"
+ local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
+ old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
+
+ if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
+ if [[ -d "${MY_DATADIR_s}" ]]; then
+ ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
+ ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
+ else
+ elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
+ mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
+ || die "Moving MY_DATADIR failed"
+ fi
+ else
+ ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
+ if [[ -d "${MY_DATADIR_s}" ]]; then
+ ewarn "Attempting to use ${MY_DATADIR_s}"
+ else
+ eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
+ die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
+ fi
+ fi
+ fi
+
+ local pwd1="a"
+ local pwd2="b"
+ local maxtry=15
+
+ 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
+ MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
+ # These are dir+prefix
+ MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
+ MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+ MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
+ MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+
+ if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
+ einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
+ install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
+ fi
+ if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
+ einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
+ install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
+ fi
+ if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
+ einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
+ install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
+ fi
+
+ if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
+ ewarn "You have already a MySQL database in place."
+ ewarn "(${ROOT}/${MY_DATADIR}/*)"
+ ewarn "Please rename or delete it if you wish to replace it."
+ die "MySQL database already exists!"
+ fi
+
+ # 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 "${MYSQL_ROOT_PASSWORD}" ]; then
+
+ einfo "Please provide a password for the mysql 'root' user now"
+ einfo "or through the ${HOME}/.my.cnf file."
+ ewarn "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
+ fi
+
+ local options
+ local sqltmp="$(emktemp)"
+
+ # Fix bug 446200. Don't reference host my.cnf, needs to come first,
+ # see https://bugs.mysql.com/bug.php?id=31312
+ use prefix && options="${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
+ for opt in grant-tables 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}" && options="${options} ${optfull}"
+ done
+
+ einfo "Creating the mysql database and setting proper permissions on it ..."
+
+ # Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
+ PID_DIR="${EROOT}/var/run/mysqld"
+ if [[ ! -d "${PID_DIR}" ]]; then
+ install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
+ fi
+
+ if [[ ! -d "${MY_DATADIR}" ]]; then
+ install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
+ fi
+
+ pushd "${TMPDIR}" &>/dev/null || die
+
+ # Filling timezones, see
+ # https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+ "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
+
+ local cmd=( "${EROOT}usr/share/mariadb/scripts/mysql_install_db" )
+ [[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
+ cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
+ einfo "Command: ${cmd[*]}"
+ su -s /bin/sh -c "${cmd[*]}" mysql \
+ >"${TMPDIR}"/mysql_install_db.log 2>&1
+ if [ $? -ne 0 ]; then
+ grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
+ die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
+ fi
+ popd &>/dev/null || die
+ [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
+ || die "MySQL databases not installed"
+
+ use prefix || options="${options} --user=mysql"
+
+ local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
+ local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
+ local mysqld="${EROOT}/usr/sbin/mysqld \
+ ${options} \
+ --log-warnings=0 \
+ --basedir=${EROOT}/usr \
+ --datadir=${ROOT}/${MY_DATADIR} \
+ --max_allowed_packet=8M \
+ --net_buffer_length=16K \
+ --socket=${socket} \
+ --pid-file=${pidfile}
+ --tmpdir=${ROOT}/${MYSQL_TMPDIR}"
+ #einfo "About to start mysqld: ${mysqld}"
+ ebegin "Starting mysqld"
+ einfo "Command ${mysqld}"
+ ${mysqld} &
+ rc=$?
+ while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
+ maxtry=$((${maxtry}-1))
+ echo -n "."
+ sleep 1
+ done
+ eend $rc
+
+ if ! [[ -S "${socket}" ]]; then
+ die "Completely failed to start up mysqld with: ${mysqld}"
+ fi
+
+ ebegin "Setting root password"
+ # Do this from memory, as we don't want clear text passwords in temp files
+ local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
+ "${EROOT}/usr/bin/mysql" \
+ "--socket=${socket}" \
+ -hlocalhost \
+ -e "${sql}"
+ eend $?
+
+ if [[ -n "${sqltmp}" ]] ; then
+ ebegin "Loading \"zoneinfo\", this step may require a few seconds"
+ "${EROOT}/usr/bin/mysql" \
+ "--socket=${socket}" \
+ -hlocalhost \
+ -uroot \
+ --password="${MYSQL_ROOT_PASSWORD}" \
+ mysql < "${sqltmp}"
+ rc=$?
+ eend $?
+ [[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
+ fi
+
+ # Stop the server and cleanup
+ einfo "Stopping the server ..."
+ kill $(< "${pidfile}" )
+ rm -f "${sqltmp}"
+ wait %1
+ einfo "Done"
+}
diff --git a/dev-db/mariadb/mariadb-10.2.16.ebuild b/dev-db/mariadb/mariadb-10.2.16.ebuild
new file mode 100644
index 000000000000..6e8b31cdccb1
--- /dev/null
+++ b/dev-db/mariadb/mariadb-10.2.16.ebuild
@@ -0,0 +1,1011 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20180515-1334Z"
+SUBSLOT="18"
+
+JAVA_PKG_OPT_USE="jdbc"
+
+# Keeping eutils in EAPI=6 for emktemp in pkg_config
+
+inherit eutils systemd flag-o-matic prefix toolchain-funcs \
+ java-pkg-opt-2 user cmake-utils multilib-minimal
+
+SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz "
+
+# Gentoo patches to MySQL
+if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
+ SRC_URI="${SRC_URI}
+ mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
+fi
+
+HOMEPAGE="https://mariadb.org/"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL"
+LICENSE="GPL-2 LGPL-2.1+"
+SLOT="0/${SUBSLOT:-0}"
+IUSE="+backup bindist client-libs cracklib debug extraengine galera innodb-lz4
+ innodb-lzo innodb-snappy jdbc jemalloc kerberos latin1 libressl mroonga
+ numa odbc oqgraph pam +perl profiling rocksdb selinux +server sphinx
+ sst-rsync sst-mariabackup sst-xtrabackup static static-libs systemd systemtap tcmalloc
+ test tokudb xml yassl"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="!bindist? ( bindist ) libressl? ( test )"
+
+REQUIRED_USE="jdbc? ( extraengine server !static )
+ server? ( tokudb? ( jemalloc !tcmalloc ) )
+ !server? ( !extraengine )
+ ?? ( tcmalloc jemalloc )
+ static? ( yassl !pam )"
+
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-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"
+
+if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
+ MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
+ inherit git-r3
+ EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
+ EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras"
+ EGIT_CLONE_TYPE=shallow
+else
+ MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
+fi
+
+PATCHES=(
+ "${MY_PATCH_DIR}"/20015_all_mariadb-pkgconfig-location.patch
+ "${MY_PATCH_DIR}"/20018_all_mariadb-10.2.9-without-clientlibs-tools.patch
+ "${MY_PATCH_DIR}"/20024_all_mariadb-10.2.6-mysql_st-regression.patch
+ "${MY_PATCH_DIR}"/20025_all_mariadb-10.2.6-gssapi-detect.patch
+ "${MY_PATCH_DIR}"/20035_all_mariadb-10.2-atomic-detection.patch
+)
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+# MULTILIB_USEDEP only set for libraries used by the client library
+COMMON_DEPEND="
+ kernel_linux? (
+ sys-process/procps:0=
+ dev-libs/libaio:0=
+ )
+ >=sys-apps/sed-4
+ >=sys-apps/texinfo-4.7-r1
+ jemalloc? ( dev-libs/jemalloc:0= )
+ tcmalloc? ( dev-util/google-perftools:0= )
+ systemtap? ( >=dev-util/systemtap-1.3:0= )
+ client-libs? ( >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?]
+ kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
+ yassl? ( net-libs/gnutls:0=[${MULTILIB_USEDEP},static-libs?] )
+ !yassl? (
+ !libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
+ libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
+ )
+ )
+ !client-libs? ( >=sys-libs/zlib-1.2.3:0= kerberos? ( virtual/krb5 )
+ yassl? ( net-libs/gnutls:0= )
+ !yassl? (
+ !libressl? ( >=dev-libs/openssl-1.0.0:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ )
+ sys-libs/ncurses:0=
+ !bindist? (
+ sys-libs/binutils-libs:0=
+ >=sys-libs/readline-4.1:0=
+ )
+ server? (
+ backup? ( app-arch/libarchive:0= )
+ cracklib? ( sys-libs/cracklib:0= )
+ extraengine? (
+ odbc? ( dev-db/unixODBC:0= )
+ xml? ( dev-libs/libxml2:2= )
+ )
+ innodb-lz4? ( app-arch/lz4 )
+ innodb-lzo? ( dev-libs/lzo )
+ innodb-snappy? ( app-arch/snappy )
+ mroonga? ( app-text/groonga-normalizer-mysql >=app-text/groonga-7.0.4 )
+ numa? ( sys-process/numactl )
+ oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
+ pam? ( virtual/pam:0= )
+ systemd? ( sys-apps/systemd:= )
+ tokudb? ( app-arch/snappy )
+ )
+ >=dev-libs/libpcre-8.41-r1:3=
+ !client-libs? ( dev-db/mariadb-connector-c[${MULTILIB_USEDEP}] dev-db/mysql-connector-c[${MULTILIB_USEDEP}] )
+"
+DEPEND="virtual/yacc
+ static? ( sys-libs/ncurses[static-libs] )
+ || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+ server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) )
+ ${COMMON_DEPEND}"
+RDEPEND="selinux? ( sec-policy/selinux-mysql )
+ client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
+ !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+ server? ( !prefix? ( dev-db/mysql-init-scripts ) )
+ !<virtual/mysql-5.6-r9
+ ${COMMON_DEPEND}
+ server? ( galera? (
+ sys-apps/iproute2
+ =sys-cluster/galera-25*
+ sst-rsync? ( sys-process/lsof )
+ sst-mariabackup? ( net-misc/socat[ssl] )
+ sst-xtrabackup? ( net-misc/socat[ssl] )
+ ) )
+ perl? ( !dev-db/mytop
+ virtual/perl-Getopt-Long
+ dev-perl/TermReadKey
+ virtual/perl-Term-ANSIColor
+ virtual/perl-Time-HiRes )
+ server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) )
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+# percona-xtrabackup-bin causes a circular dependency if DBD-mysql is not already installed
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )
+ server? ( ~virtual/mysql-5.6[static=]
+ galera? ( sst-xtrabackup? ( || ( >=dev-db/percona-xtrabackup-bin-2.2.4 dev-db/percona-xtrabackup ) ) ) )"
+
+pkg_setup() {
+ if [[ ${MERGE_TYPE} != binary ]] ; then
+ local GCC_MAJOR_SET=$(gcc-major-version)
+ local GCC_MINOR_SET=$(gcc-minor-version)
+ if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \
+ ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+ eerror "${PN} with tokudb needs to be built with gcc-4.7 or later."
+ eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+ die
+ fi
+ # Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on
+ # non x86{,_64} arches
+ if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
+ ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+ eerror "${PN} needs to be built with gcc-4.7 or later."
+ eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+ die
+ fi
+ fi
+ java-pkg-opt-2_pkg_setup
+ if has test ${FEATURES} && \
+ use server && ! has userpriv ${FEATURES} ; then
+ eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+
+ # This should come after all of the die statements
+ enewgroup mysql 60 || die "problem adding 'mysql' group"
+ enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
+}
+
+pkg_preinst() {
+ java-pkg-opt-2_pkg_preinst
+
+ # Here we need to see if the implementation switched client libraries
+ # We check if this is a new instance of the package and a client library already exists
+ local SHOW_ABI_MESSAGE libpath
+ if [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+ libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
+ elog "Due to ABI changes when switching between different client libraries,"
+ elog "revdep-rebuild must find and rebuild all packages linking to libmysqlclient."
+ elog "Please run: revdep-rebuild --library ${libpath}"
+ ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+ fi
+}
+
+pkg_postinst() {
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ # Create log directory securely if it does not exist
+ [[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+ if use server ; then
+ if use pam; then
+ einfo
+ elog "This install includes the PAM authentication plugin."
+ elog "To activate and configure the PAM plugin, please read:"
+ elog "https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/"
+ einfo
+ fi
+
+ if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+ einfo
+ elog "You might want to run:"
+ elog "\"emerge --config =${CATEGORY}/${PF}\""
+ elog "if this is a new install."
+ elog
+ elog "If you are switching server implentations, you should run the"
+ elog "mysql_upgrade tool."
+ einfo
+ else
+ einfo
+ elog "If you are upgrading major versions, you should run the"
+ elog "mysql_upgrade tool."
+ einfo
+ fi
+
+ if use galera ; then
+ einfo
+ elog "Be sure to edit the my.cnf file to activate your cluster settings."
+ elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
+ elog "The first time the cluster is activated, you should add"
+ elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
+ elog "This option should then be removed for subsequent starts."
+ einfo
+ fi
+ fi
+
+ # Note about configuration change
+ einfo
+ elog "This version of mariadb reorganizes the configuration from a single my.cnf"
+ elog "to several files in /etc/mysql/${PN}.d."
+ elog "Please backup any changes you made to /etc/mysql/my.cnf"
+ elog "and add them as a new file under /etc/mysql/${PN}.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 appropitate section headers, i.e. [mysqld]."
+ einfo
+}
+
+src_unpack() {
+ unpack ${A}
+ # Grab the patches
+ [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR%/}/mysql-extras" git-r3_src_unpack
+
+ mv -f "${WORKDIR%/}/${P}" "${S}" || die
+}
+
+src_prepare() {
+ java-pkg-opt-2_src_prepare
+ if use tcmalloc; then
+ echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt"
+ fi
+
+ # Don't build bundled xz-utils for tokudb
+ echo > "${S}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
+ sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
+ sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
+
+ # Remove the bundled groonga
+ # There is no CMake flag, it simply checks for existance
+ rm -r "${S}"/storage/mroonga/vendor/groonga || die "could not remove packaged groonga"
+
+ if ! use server; then
+ rm -r "${S}"/plugin/handler_socket || die
+ fi
+
+ cmake-utils_src_prepare
+}
+
+src_configure(){
+ # bug 508724 mariadb cannot use ld.gold
+ tc-ld-disable-gold
+ # Bug #114895, bug #110149
+ filter-flags "-O" "-O[01]"
+
+ append-cxxflags -felide-constructors
+
+ # bug #283926, with GCC4.4, this is required to get correct behavior.
+ append-flags -fno-strict-aliasing
+
+ if use client-libs ; then
+ multilib-minimal_src_configure
+ else
+ multilib_src_configure
+ fi
+}
+
+multilib_src_configure() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ if ! multilib_is_native_abi && ! use client-libs ; then
+ return
+ fi
+
+ CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+ # debug hack wrt #497532
+ mycmakeargs=(
+ -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
+ -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/mariadb
+ -DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin
+ -DINSTALL_SCRIPTDIR=share/mariadb/scripts
+ -DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+ -DINSTALL_SBINDIR=sbin
+ -DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mariadb"
+ -DWITH_COMMENT="Gentoo Linux ${PF}"
+ -DWITH_UNIT_TESTS=$(usex test ON OFF)
+ -DWITH_LIBEDIT=0
+ -DWITH_ZLIB=system
+ -DWITHOUT_LIBWRAP=1
+ -DENABLED_LOCAL_INFILE=1
+ -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+ -DINSTALL_UNIX_ADDRDIR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+ -DWITH_DEFAULT_COMPILER_OPTIONS=0
+ -DWITH_DEFAULT_FEATURE_SET=0
+ -DINSTALL_SYSTEMD_UNITDIR="$(systemd_get_systemunitdir)"
+ -DENABLE_STATIC_LIBS=$(usex static-libs ON OFF)
+ # 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)
+ -DPKG_CONFIG_EXECUTABLE="${EPREFIX}/usr/bin/$(tc-getPKG_CONFIG)"
+ -DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO)
+ -DAUTH_GSSAPI_PLUGIN_TYPE=$(usex kerberos DYNAMIC OFF)
+ -DCONC_WITH_EXTERNAL_ZLIB=YES
+ -DWITH_EXTERNAL_ZLIB=YES
+ -DSUFFIX_INSTALL_DIR=""
+ -DWITH_UNITTEST=OFF
+ )
+ if use test ; then
+ mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mariadb/mysql-test )
+ else
+ mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+ fi
+
+ if ! use yassl ; then
+ mycmakeargs+=( -DWITH_SSL=system )
+ else
+ mycmakeargs+=( -DWITH_SSL=bundled )
+ fi
+
+ if ! use client-libs ; then
+ mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+ fi
+
+ # bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
+ # systemtap only works on native ABI bug 530132
+ if multilib_is_native_abi; then
+ mycmakeargs+=(
+ -DWITH_READLINE=$(usex bindist 1 0)
+ -DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1)
+ -DENABLE_DTRACE=$(usex systemtap)
+ )
+ else
+ mycmakeargs+=(
+ -DWITHOUT_TOOLS=1
+ -DWITH_READLINE=1
+ -DNOT_FOR_DISTRIBUTION=0
+ -DENABLE_DTRACE=0
+ )
+ fi
+
+ if multilib_is_native_abi && use server ; then
+
+ # Federated{,X} must be treated special otherwise they will not be built as plugins
+ if ! use extraengine ; then
+ mycmakeargs+=(
+ -DPLUGIN_FEDERATED=NO
+ -DPLUGIN_FEDERATEDX=NO )
+ fi
+
+ mycmakeargs+=(
+ -DWITH_JEMALLOC=$(usex jemalloc system)
+ -DWITH_PCRE=system
+ -DPLUGIN_OQGRAPH=$(usex oqgraph DYNAMIC NO)
+ -DPLUGIN_SPHINX=$(usex sphinx YES NO)
+ -DPLUGIN_TOKUDB=$(usex tokudb YES NO)
+ -DPLUGIN_AUTH_PAM=$(usex pam YES NO)
+ -DPLUGIN_CRACKLIB_PASSWORD_CHECK=$(usex cracklib YES NO)
+ -DPLUGIN_CASSANDRA=NO
+ -DPLUGIN_SEQUENCE=$(usex extraengine YES NO)
+ -DPLUGIN_SPIDER=$(usex extraengine YES NO)
+ -DPLUGIN_CONNECT=$(usex extraengine YES NO)
+ -DCONNECT_WITH_MYSQL=1
+ -DCONNECT_WITH_LIBXML2=$(usex xml)
+ -DCONNECT_WITH_ODBC=$(usex odbc)
+ -DCONNECT_WITH_JDBC=$(usex jdbc)
+ # Build failure and autodep wrt bug 639144
+ -DCONNECT_WITH_MONGO=OFF
+ -DWITH_WSREP=$(usex galera)
+ -DWITH_INNODB_LZ4=$(usex innodb-lz4 ON OFF)
+ -DWITH_INNODB_LZO=$(usex innodb-lzo ON OFF)
+ -DWITH_INNODB_SNAPPY=$(usex innodb-snappy ON OFF)
+ -DPLUGIN_MROONGA=$(usex mroonga DYNAMIC NO)
+ -DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO)
+ -DWITH_MARIABACKUP=$(usex backup ON OFF)
+ -DWITH_LIBARCHIVE=$(usex backup ON OFF)
+ -DINSTALL_SQLBENCHDIR=share/mariadb
+ -DPLUGIN_ROCKSDB=$(usex rocksdb DYNAMIC NO)
+ # systemd is only linked to for server notification
+ -DWITH_SYSTEMD=$(usex systemd yes no)
+ -DWITH_NUMA=$(usex numa ON OFF)
+ )
+
+ # Workaround for MDEV-14524
+ use tokudb && mycmakeargs+=( -DTOKUDB_OK=1 )
+
+ if use test ; then
+ # This is needed for the new client lib which tests a real, open server
+ mycmakeargs+=( -DSKIP_TESTS=ON )
+ fi
+
+ 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."
+
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+ -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+ )
+
+ elif ! use latin1 ; then
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=utf8
+ -DDEFAULT_COLLATION=utf8_general_ci
+ )
+ else
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=latin1
+ -DDEFAULT_COLLATION=latin1_swedish_ci
+ )
+ fi
+ mycmakeargs+=(
+ -DEXTRA_CHARSETS=all
+ -DMYSQL_USER=mysql
+ -DDISABLE_SHARED=$(usex static YES NO)
+ -DWITH_DEBUG=$(usex debug)
+ -DWITH_EMBEDDED_SERVER=OFF
+ -DWITH_PROFILING=$(usex profiling)
+ )
+
+ if use static; then
+ mycmakeargs+=( -DWITH_PIC=1 )
+ fi
+
+ if use jemalloc || use tcmalloc ; then
+ mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
+ fi
+
+ # Storage engines
+ mycmakeargs+=(
+ -DWITH_ARCHIVE_STORAGE_ENGINE=1
+ -DWITH_BLACKHOLE_STORAGE_ENGINE=1
+ -DWITH_CSV_STORAGE_ENGINE=1
+ -DWITH_HEAP_STORAGE_ENGINE=1
+ -DWITH_INNOBASE_STORAGE_ENGINE=1
+ -DWITH_MYISAMMRG_STORAGE_ENGINE=1
+ -DWITH_MYISAM_STORAGE_ENGINE=1
+ -DWITH_PARTITION_STORAGE_ENGINE=1
+ )
+
+ else
+ mycmakeargs+=(
+ -DWITHOUT_SERVER=1
+ -DWITH_EMBEDDED_SERVER=OFF
+ -DEXTRA_CHARSETS=none
+ -DINSTALL_SQLBENCHDIR=
+ -DWITH_SYSTEMD=no
+ )
+ fi
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ if use client-libs ; then
+ multilib-minimal_src_compile
+ else
+ multilib_src_compile
+ fi
+}
+
+multilib_src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ local MULTILIB_WRAPPED_HEADERS
+ local MULTILIB_CHOST_TOOLS
+ if use client-libs ; then
+ # headers with ABI specific data
+ MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/mysql/server/my_config.h
+ /usr/include/mysql/server/private/embedded_priv.h
+ /usr/include/mysql/server/mysql_version.h
+ /usr/include/mariadb/mariadb_version.h
+ /usr/include/mysql/mariadb_version.h
+ /usr/include/mysql/server/private/probes_mysql_nodtrace.h
+ /usr/include/mysql/server/private/probes_mysql_dtrace.h )
+
+ # wrap the config scripts
+ MULTILIB_CHOST_TOOLS=( /usr/bin/mariadb_config /usr/bin/mysql_config )
+ multilib-minimal_src_install
+ else
+ multilib_src_install
+ multilib_src_install_all
+ fi
+}
+
+# Intentionally override eclass function
+multilib_src_install() {
+
+ cmake-utils_src_install
+
+ # Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
+ if [[ -f "${ED}/usr/include/mysql/server/private/config.h" ]] ; then
+ rm "${ED}/usr/include/mysql/server/private/config.h" || die
+ fi
+
+ if ! multilib_is_native_abi && use server ; then
+ insinto /usr/include/mysql/server/private
+ doins "${S}"/sql/*.h
+ fi
+
+ if use client-libs ; then
+ # Install compatible symlinks to libmysqlclient
+# use static-libs && dosym libmariadbclient.a "/usr/$(get_libdir)/libmysqlclient.a"
+# dosym libmariadb.so.3 "/usr/$(get_libdir)/libmysqlclient.so"
+ dosym libmariadb.so.3 "/usr/$(get_libdir)/libmysqlclient.so.${SUBSLOT}"
+ 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
+}
+
+multilib_src_install_all() {
+ # 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 "${D}/${MY_SHAREDSTATEDIR}/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-10.2" "${TMPDIR}/my.cnf" || die
+ eprefixify "${TMPDIR}/my.cnf"
+ doins "${TMPDIR}/my.cnf"
+ insinto "${MY_SYSCONFDIR#${EPREFIX}}/mariadb.d"
+ cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+ eprefixify "${TMPDIR}/50-distro-client.cnf"
+ doins "${TMPDIR}/50-distro-client.cnf"
+
+ if use server ; then
+ mycnf_src="my.cnf.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|utf8|latin1|g" \
+ "${TMPDIR}/my.cnf.ok" || die
+ fi
+ eprefixify "${TMPDIR}/my.cnf.ok"
+ newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+
+ einfo "Including support files and sample configurations"
+ docinto "support-files"
+ local script
+ for script in \
+ "${S}"/support-files/magic
+ do
+ [[ -f "$script" ]] && dodoc "${script}"
+ done
+
+ docinto "scripts"
+ for script in "${S}"/scripts/mysql* ; do
+ [[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
+ done
+ fi
+
+ #Remove mytop if perl is not selected
+ [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+}
+
+# Official test instructions:
+# USE='extraengine perl server static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mariadb-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+ _disable_test() {
+ local rawtestname reason
+ rawtestname="${1}" ; shift
+ reason="${@}"
+ ewarn "test '${rawtestname}' disabled: '${reason}'"
+ echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+ }
+
+ local TESTDIR="${BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ if ! use server ; then
+ einfo "Skipping server tests due to minimal build."
+ return 0
+ fi
+
+ # 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 [[ $UID -eq 0 ]]; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+ has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+ # Run CTest (test-units)
+ cmake-utils_src_test
+ retstatus_unit=$?
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+ # Enable parallel testing, auto will try to detect number of cores
+ # You may set this by hand.
+ # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+ export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+ # 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"
+ # These are failing in MariaDB 10.0 for now and are believed to be
+ # false positives:
+ #
+ # main.mysql_client_test, main.mysql_client_test_nonblock
+ # main.mysql_client_test_comp:
+ # segfaults at random under Portage only, suspect resource limits.
+
+ local t
+ for t in plugins.cracklib_password_check plugins.two_password_validations ; do
+ _disable_test "$t" "False positive due to varying policies"
+ done
+
+ for t in main.mysql_client_test main.mysql_client_test_nonblock \
+ main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam ; do
+ _disable_test "$t" "False positives in Gentoo"
+ done
+
+ if ! use client-libs ; then
+ _disable_test main.plugin_auth "Needs client libraries built"
+ 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"
+}
+
+mysql_init_vars() {
+ MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mariadb"}
+ MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+ MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+ MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ MY_DATADIR=""
+ if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
+ MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+ | sed -ne '/datadir/s|^--datadir=||p' \
+ | tail -n1`
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
+ | sed -e 's/.*=\s*//' \
+ | tail -n1`
+ fi
+ fi
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ MY_DATADIR="${MY_LOCALSTATEDIR}"
+ einfo "Using default MY_DATADIR"
+ fi
+ elog "MySQL MY_DATADIR is ${MY_DATADIR}"
+
+ if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
+ if [[ -e "${MY_DATADIR}" ]] ; then
+ # If you get this and you're wondering about it, see bug #207636
+ elog "MySQL datadir found in ${MY_DATADIR}"
+ elog "A new one will not be created."
+ PREVIOUS_DATADIR="yes"
+ else
+ PREVIOUS_DATADIR="no"
+ fi
+ export PREVIOUS_DATADIR
+ fi
+ else
+ if [[ ${EBUILD_PHASE} == "config" ]]; then
+ local new_MY_DATADIR
+ new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+ | sed -ne '/datadir/s|^--datadir=||p' \
+ | tail -n1`
+
+ if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
+ ewarn "MySQL MY_DATADIR has changed"
+ ewarn "from ${MY_DATADIR}"
+ ewarn "to ${new_MY_DATADIR}"
+ MY_DATADIR="${new_MY_DATADIR}"
+ fi
+ fi
+ fi
+
+ export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+ export MY_LOCALSTATEDIR MY_LOGDIR
+ export MY_DATADIR
+}
+
+pkg_config() {
+ _getoptval() {
+ local mypd="${EROOT}"/usr/bin/my_print_defaults
+ local section="$1"
+ local flag="--${2}="
+ local extra_options="${3}"
+ "${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
+ }
+ local old_MY_DATADIR="${MY_DATADIR}"
+ local old_HOME="${HOME}"
+ # my_print_defaults needs to read stuff in $HOME/.my.cnf
+ export HOME=${EPREFIX}/root
+
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ [[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
+ if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
+ die "Minimal builds do NOT include the MySQL server"
+ fi
+
+ if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
+ local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
+ MY_DATADIR_s="${MY_DATADIR_s%%/}"
+ local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
+ old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
+
+ if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
+ if [[ -d "${MY_DATADIR_s}" ]]; then
+ ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
+ ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
+ else
+ elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
+ mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
+ || die "Moving MY_DATADIR failed"
+ fi
+ else
+ ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
+ if [[ -d "${MY_DATADIR_s}" ]]; then
+ ewarn "Attempting to use ${MY_DATADIR_s}"
+ else
+ eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
+ die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
+ fi
+ fi
+ fi
+
+ local pwd1="a"
+ local pwd2="b"
+ local maxtry=15
+
+ 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
+ MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
+ # These are dir+prefix
+ MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
+ MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+ MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
+ MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+
+ if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
+ einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
+ install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
+ fi
+ if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
+ einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
+ install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
+ fi
+ if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
+ einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
+ install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
+ fi
+
+ if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
+ ewarn "You have already a MySQL database in place."
+ ewarn "(${ROOT}/${MY_DATADIR}/*)"
+ ewarn "Please rename or delete it if you wish to replace it."
+ die "MySQL database already exists!"
+ fi
+
+ # 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 "${MYSQL_ROOT_PASSWORD}" ]; then
+
+ einfo "Please provide a password for the mysql 'root' user now"
+ einfo "or through the ${HOME}/.my.cnf file."
+ ewarn "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
+ fi
+
+ local options
+ local sqltmp="$(emktemp)"
+
+ # Fix bug 446200. Don't reference host my.cnf, needs to come first,
+ # see https://bugs.mysql.com/bug.php?id=31312
+ use prefix && options="${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
+ for opt in grant-tables 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}" && options="${options} ${optfull}"
+ done
+
+ einfo "Creating the mysql database and setting proper permissions on it ..."
+
+ # Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
+ PID_DIR="${EROOT}/var/run/mysqld"
+ if [[ ! -d "${PID_DIR}" ]]; then
+ install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
+ fi
+
+ if [[ ! -d "${MY_DATADIR}" ]]; then
+ install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
+ fi
+
+ pushd "${TMPDIR}" &>/dev/null || die
+
+ # Filling timezones, see
+ # https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+ "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
+
+ local cmd=( "${EROOT}usr/share/mariadb/scripts/mysql_install_db" )
+ [[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
+ cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
+ einfo "Command: ${cmd[*]}"
+ su -s /bin/sh -c "${cmd[*]}" mysql \
+ >"${TMPDIR}"/mysql_install_db.log 2>&1
+ if [ $? -ne 0 ]; then
+ grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
+ die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
+ fi
+ popd &>/dev/null || die
+ [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
+ || die "MySQL databases not installed"
+
+ use prefix || options="${options} --user=mysql"
+
+ local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
+ local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
+ local mysqld="${EROOT}/usr/sbin/mysqld \
+ ${options} \
+ --log-warnings=0 \
+ --basedir=${EROOT}/usr \
+ --datadir=${ROOT}/${MY_DATADIR} \
+ --max_allowed_packet=8M \
+ --net_buffer_length=16K \
+ --socket=${socket} \
+ --pid-file=${pidfile}
+ --tmpdir=${ROOT}/${MYSQL_TMPDIR}"
+ #einfo "About to start mysqld: ${mysqld}"
+ ebegin "Starting mysqld"
+ einfo "Command ${mysqld}"
+ ${mysqld} &
+ rc=$?
+ while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
+ maxtry=$((${maxtry}-1))
+ echo -n "."
+ sleep 1
+ done
+ eend $rc
+
+ if ! [[ -S "${socket}" ]]; then
+ die "Completely failed to start up mysqld with: ${mysqld}"
+ fi
+
+ ebegin "Setting root password"
+ # Do this from memory, as we don't want clear text passwords in temp files
+ local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
+ "${EROOT}/usr/bin/mysql" \
+ "--socket=${socket}" \
+ -hlocalhost \
+ -e "${sql}"
+ eend $?
+
+ if [[ -n "${sqltmp}" ]] ; then
+ ebegin "Loading \"zoneinfo\", this step may require a few seconds"
+ "${EROOT}/usr/bin/mysql" \
+ "--socket=${socket}" \
+ -hlocalhost \
+ -uroot \
+ --password="${MYSQL_ROOT_PASSWORD}" \
+ mysql < "${sqltmp}"
+ rc=$?
+ eend $?
+ [[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
+ fi
+
+ # Stop the server and cleanup
+ einfo "Stopping the server ..."
+ kill $(< "${pidfile}" )
+ rm -f "${sqltmp}"
+ wait %1
+ einfo "Done"
+}
diff --git a/dev-db/mariadb/mariadb-10.3.6_rc.ebuild b/dev-db/mariadb/mariadb-10.3.6_rc.ebuild
new file mode 100644
index 000000000000..57430a63fa37
--- /dev/null
+++ b/dev-db/mariadb/mariadb-10.3.6_rc.ebuild
@@ -0,0 +1,1022 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20180515-1334Z"
+SUBSLOT="18"
+
+JAVA_PKG_OPT_USE="jdbc"
+
+# Keeping eutils in EAPI=6 for emktemp in pkg_config
+
+inherit eutils systemd flag-o-matic prefix toolchain-funcs \
+ java-pkg-opt-2 user cmake-utils multilib-minimal
+
+SRC_URI="https://downloads.mariadb.org/interstitial/${P/_rc/}/source/${P/_rc/}.tar.gz "
+
+# Gentoo patches to MySQL
+if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
+ SRC_URI="${SRC_URI}
+ mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
+fi
+
+HOMEPAGE="https://mariadb.org/"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL"
+LICENSE="GPL-2 LGPL-2.1+"
+SLOT="0/${SUBSLOT:-0}"
+IUSE="+backup bindist client-libs cracklib debug extraengine galera innodb-lz4
+ innodb-lzo innodb-snappy jdbc jemalloc kerberos latin1 libressl mroonga
+ numa odbc oqgraph pam +perl profiling rocksdb selinux +server sphinx
+ sst-rsync sst-mariabackup sst-xtrabackup static static-libs systemd systemtap tcmalloc
+ test tokudb xml yassl"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="!bindist? ( bindist ) libressl? ( test )"
+
+REQUIRED_USE="jdbc? ( extraengine server !static )
+ server? ( tokudb? ( jemalloc !tcmalloc ) )
+ !server? ( !extraengine )
+ ?? ( tcmalloc jemalloc )
+ static? ( yassl !pam )"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-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"
+
+if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
+ EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras"
+ EGIT_CLONE_TYPE=shallow
+ MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
+else
+ MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
+fi
+
+PATCHES=(
+ "${MY_PATCH_DIR}"/20015_all_mariadb-pkgconfig-location.patch
+ "${MY_PATCH_DIR}"/20018_all_mariadb-10.2.9-without-clientlibs-tools.patch
+ "${MY_PATCH_DIR}"/20024_all_mariadb-10.2.6-mysql_st-regression.patch
+ "${MY_PATCH_DIR}"/20025_all_mariadb-10.2.6-gssapi-detect.patch
+ "${MY_PATCH_DIR}"/20035_all_mariadb-10.3-atomic-detection.patch
+)
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+# MULTILIB_USEDEP only set for libraries used by the client library
+COMMON_DEPEND="
+ kernel_linux? (
+ sys-process/procps:0=
+ dev-libs/libaio:0=
+ )
+ >=sys-apps/sed-4
+ >=sys-apps/texinfo-4.7-r1
+ jemalloc? ( dev-libs/jemalloc:0= )
+ tcmalloc? ( dev-util/google-perftools:0= )
+ systemtap? ( >=dev-util/systemtap-1.3:0= )
+ client-libs? (
+ >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?]
+ kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
+ yassl? ( net-libs/gnutls:0=[${MULTILIB_USEDEP},static-libs?] )
+ !yassl? (
+ !libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
+ libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
+ )
+ )
+ !client-libs? (
+ >=sys-libs/zlib-1.2.3:0=
+ kerberos? ( virtual/krb5 )
+ yassl? ( net-libs/gnutls:0= )
+ !yassl? (
+ !libressl? ( >=dev-libs/openssl-1.0.0:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ )
+ sys-libs/ncurses:0=
+ !bindist? (
+ sys-libs/binutils-libs:0=
+ >=sys-libs/readline-4.1:0=
+ )
+ server? (
+ backup? ( app-arch/libarchive:0= )
+ cracklib? ( sys-libs/cracklib:0= )
+ extraengine? (
+ odbc? ( dev-db/unixODBC:0= )
+ xml? ( dev-libs/libxml2:2= )
+ )
+ innodb-lz4? ( app-arch/lz4 )
+ innodb-lzo? ( dev-libs/lzo )
+ innodb-snappy? ( app-arch/snappy )
+ mroonga? ( app-text/groonga-normalizer-mysql >=app-text/groonga-7.0.4 )
+ numa? ( sys-process/numactl )
+ oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
+ pam? ( virtual/pam:0= )
+ systemd? ( sys-apps/systemd:= )
+ tokudb? ( app-arch/snappy )
+ )
+ >=dev-libs/libpcre-8.41-r1:3=
+"
+DEPEND="virtual/yacc
+ static? ( sys-libs/ncurses[static-libs] )
+ || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+ server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) )
+ ${COMMON_DEPEND}"
+RDEPEND="selinux? ( sec-policy/selinux-mysql )
+ client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
+ !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+ server? ( !prefix? ( dev-db/mysql-init-scripts ) )
+ !<virtual/mysql-5.6-r11
+ ${COMMON_DEPEND}
+ server? ( galera? (
+ sys-apps/iproute2
+ =sys-cluster/galera-25*
+ sst-rsync? ( sys-process/lsof )
+ sst-mariabackup? ( net-misc/socat[ssl] )
+ sst-xtrabackup? ( net-misc/socat[ssl] )
+ ) )
+ perl? ( !dev-db/mytop
+ virtual/perl-Getopt-Long
+ dev-perl/TermReadKey
+ virtual/perl-Term-ANSIColor
+ virtual/perl-Time-HiRes )
+ server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) )
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+# percona-xtrabackup-bin causes a circular dependency if DBD-mysql is not already installed
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )
+ !client-libs? ( dev-db/mariadb-connector-c[${MULTILIB_USEDEP}] dev-db/mysql-connector-c[${MULTILIB_USEDEP}] )
+ server? ( ~virtual/mysql-5.6[static=]
+ galera? ( sst-xtrabackup? ( || ( >=dev-db/percona-xtrabackup-bin-2.2.4 dev-db/percona-xtrabackup ) ) ) )"
+
+pkg_setup() {
+ if [[ ${MERGE_TYPE} != binary ]] ; then
+ local GCC_MAJOR_SET=$(gcc-major-version)
+ local GCC_MINOR_SET=$(gcc-minor-version)
+ if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \
+ ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+ eerror "${PN} with tokudb needs to be built with gcc-4.7 or later."
+ eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+ die
+ fi
+ # Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on
+ # non x86{,_64} arches
+ if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
+ ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+ eerror "${PN} needs to be built with gcc-4.7 or later."
+ eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+ die
+ fi
+ fi
+ java-pkg-opt-2_pkg_setup
+ if has test ${FEATURES} && \
+ use server && ! has userpriv ${FEATURES} ; then
+ eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+
+ # This should come after all of the die statements
+ enewgroup mysql 60 || die "problem adding 'mysql' group"
+ enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
+}
+
+pkg_preinst() {
+ java-pkg-opt-2_pkg_preinst
+
+ # Here we need to see if the implementation switched client libraries
+ # We check if this is a new instance of the package and a client library already exists
+ local SHOW_ABI_MESSAGE libpath
+ if [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+ libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
+ elog "Due to ABI changes when switching between different client libraries,"
+ elog "revdep-rebuild must find and rebuild all packages linking to libmysqlclient."
+ elog "Please run: revdep-rebuild --library ${libpath}"
+ ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+ fi
+}
+
+pkg_postinst() {
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ # Create log directory securely if it does not exist
+ [[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+ if use server ; then
+ if use pam; then
+ einfo
+ elog "This install includes the PAM authentication plugin."
+ elog "To activate and configure the PAM plugin, please read:"
+ elog "https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/"
+ einfo
+ fi
+
+ if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+ einfo
+ elog "You might want to run:"
+ elog "\"emerge --config =${CATEGORY}/${PF}\""
+ elog "if this is a new install."
+ elog
+ elog "If you are switching server implentations, you should run the"
+ elog "mysql_upgrade tool."
+ einfo
+ else
+ einfo
+ elog "If you are upgrading major versions, you should run the"
+ elog "mysql_upgrade tool."
+ einfo
+ fi
+
+ if use galera ; then
+ einfo
+ elog "Be sure to edit the my.cnf file to activate your cluster settings."
+ elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
+ elog "The first time the cluster is activated, you should add"
+ elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
+ elog "This option should then be removed for subsequent starts."
+ einfo
+ fi
+ fi
+
+ # Note about configuration change
+ einfo
+ elog "This version of mariadb reorganizes the configuration from a single my.cnf"
+ elog "to several files in /etc/mysql/${PN}.d."
+ elog "Please backup any changes you made to /etc/mysql/my.cnf"
+ elog "and add them as a new file under /etc/mysql/${PN}.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 appropitate section headers, i.e. [mysqld]."
+ einfo
+}
+
+src_unpack() {
+
+ # Initialize the proper variables first
+ mysql_init_vars
+
+ unpack ${A}
+ # Grab the patches
+ [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
+
+ mv -f "${WORKDIR}/${P/_rc/}" "${S}" || die
+}
+
+src_prepare() {
+ java-pkg-opt-2_src_prepare
+ if use tcmalloc; then
+ echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt"
+ fi
+
+ # Don't build bundled xz-utils for tokudb
+ echo > "${S}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
+ sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
+ sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
+
+ # Remove the bundled groonga
+ # There is no CMake flag, it simply checks for existance
+ rm -r "${S}"/storage/mroonga/vendor/groonga || die "could not remove packaged groonga"
+
+ if ! use server; then
+ rm -r "${S}"/plugin/handler_socket || die
+ fi
+
+ cmake-utils_src_prepare
+}
+
+src_configure(){
+ # bug 508724 mariadb cannot use ld.gold
+ tc-ld-disable-gold
+ # Bug #114895, bug #110149
+ filter-flags "-O" "-O[01]"
+
+ append-cxxflags -felide-constructors
+
+ # bug #283926, with GCC4.4, this is required to get correct behavior.
+ append-flags -fno-strict-aliasing
+
+ if use client-libs ; then
+ multilib-minimal_src_configure
+ else
+ multilib_src_configure
+ fi
+}
+
+multilib_src_configure() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ if ! multilib_is_native_abi && ! use client-libs ; then
+ return
+ fi
+
+ CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+ # debug hack wrt #497532
+ mycmakeargs=(
+ -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
+ -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/mariadb
+ -DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin
+ -DINSTALL_SCRIPTDIR=share/mariadb/scripts
+ -DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+ -DINSTALL_SBINDIR=sbin
+ -DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mariadb"
+ -DWITH_COMMENT="Gentoo Linux ${PF}"
+ -DWITH_UNIT_TESTS=$(usex test ON OFF)
+ -DWITH_LIBEDIT=0
+ -DWITH_ZLIB=system
+ -DWITHOUT_LIBWRAP=1
+ -DENABLED_LOCAL_INFILE=1
+ -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+ -DINSTALL_UNIX_ADDRDIR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+ -DWITH_DEFAULT_COMPILER_OPTIONS=0
+ -DWITH_DEFAULT_FEATURE_SET=0
+ -DINSTALL_SYSTEMD_UNITDIR="$(systemd_get_systemunitdir)"
+ -DENABLE_STATIC_LIBS=$(usex static-libs ON OFF)
+ # 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)
+ -DPKG_CONFIG_EXECUTABLE="${EPREFIX}/usr/bin/$(tc-getPKG_CONFIG)"
+ -DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO)
+ -DAUTH_GSSAPI_PLUGIN_TYPE=$(usex kerberos DYNAMIC OFF)
+ -DCONC_WITH_EXTERNAL_ZLIB=YES
+ -DWITH_EXTERNAL_ZLIB=YES
+ -DSUFFIX_INSTALL_DIR=""
+ -DWITH_UNITTEST=OFF
+ )
+ if use test ; then
+ mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mariadb/mysql-test )
+ else
+ mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+ fi
+
+ if ! use yassl ; then
+ mycmakeargs+=( -DWITH_SSL=system )
+ else
+ mycmakeargs+=( -DWITH_SSL=bundled )
+ fi
+
+ if ! use client-libs ; then
+ mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+ fi
+
+ # bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
+ # systemtap only works on native ABI bug 530132
+ if multilib_is_native_abi; then
+ mycmakeargs+=(
+ -DWITH_READLINE=$(usex bindist 1 0)
+ -DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1)
+ -DENABLE_DTRACE=$(usex systemtap)
+ )
+ else
+ mycmakeargs+=(
+ -DWITHOUT_TOOLS=1
+ -DWITH_READLINE=1
+ -DNOT_FOR_DISTRIBUTION=0
+ -DENABLE_DTRACE=0
+ )
+ fi
+
+ if multilib_is_native_abi && use server ; then
+
+ # Federated{,X} must be treated special otherwise they will not be built as plugins
+ if ! use extraengine ; then
+ mycmakeargs+=(
+ -DPLUGIN_FEDERATED=NO
+ -DPLUGIN_FEDERATEDX=NO )
+ fi
+
+ mycmakeargs+=(
+ -DWITH_JEMALLOC=$(usex jemalloc system)
+ -DWITH_PCRE=system
+ -DPLUGIN_OQGRAPH=$(usex oqgraph DYNAMIC NO)
+ -DPLUGIN_SPHINX=$(usex sphinx YES NO)
+ -DPLUGIN_TOKUDB=$(usex tokudb YES NO)
+ -DPLUGIN_AUTH_PAM=$(usex pam YES NO)
+ -DPLUGIN_CRACKLIB_PASSWORD_CHECK=$(usex cracklib YES NO)
+ -DPLUGIN_CASSANDRA=NO
+ -DPLUGIN_SEQUENCE=$(usex extraengine YES NO)
+ -DPLUGIN_SPIDER=$(usex extraengine YES NO)
+ -DPLUGIN_CONNECT=$(usex extraengine YES NO)
+ -DCONNECT_WITH_MYSQL=1
+ -DCONNECT_WITH_LIBXML2=$(usex xml)
+ -DCONNECT_WITH_ODBC=$(usex odbc)
+ -DCONNECT_WITH_JDBC=$(usex jdbc)
+ # Build failure and autodep wrt bug 639144
+ -DCONNECT_WITH_MONGO=OFF
+ -DWITH_WSREP=$(usex galera)
+ -DWITH_INNODB_LZ4=$(usex innodb-lz4 ON OFF)
+ -DWITH_INNODB_LZO=$(usex innodb-lzo ON OFF)
+ -DWITH_INNODB_SNAPPY=$(usex innodb-snappy ON OFF)
+ -DPLUGIN_MROONGA=$(usex mroonga DYNAMIC NO)
+ -DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO)
+ -DWITH_MARIABACKUP=$(usex backup ON OFF)
+ -DWITH_LIBARCHIVE=$(usex backup ON OFF)
+ -DINSTALL_SQLBENCHDIR=share/mariadb
+ -DPLUGIN_ROCKSDB=$(usex rocksdb DYNAMIC NO)
+ # systemd is only linked to for server notification
+ -DWITH_SYSTEMD=$(usex systemd yes no)
+ -DWITH_NUMA=$(usex numa ON OFF)
+ )
+
+ # Workaround for MDEV-14524
+ use tokudb && mycmakeargs+=( -DTOKUDB_OK=1 )
+
+ if use test ; then
+ # This is needed for the new client lib which tests a real, open server
+ mycmakeargs+=( -DSKIP_TESTS=ON )
+ fi
+
+ 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."
+
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+ -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+ )
+
+ elif ! use latin1 ; then
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=utf8
+ -DDEFAULT_COLLATION=utf8_general_ci
+ )
+ else
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=latin1
+ -DDEFAULT_COLLATION=latin1_swedish_ci
+ )
+ fi
+ mycmakeargs+=(
+ -DEXTRA_CHARSETS=all
+ -DMYSQL_USER=mysql
+ -DDISABLE_SHARED=$(usex static YES NO)
+ -DWITH_DEBUG=$(usex debug)
+ -DWITH_EMBEDDED_SERVER=OFF
+ -DWITH_PROFILING=$(usex profiling)
+ )
+
+ if use static; then
+ mycmakeargs+=( -DWITH_PIC=1 )
+ fi
+
+ if use jemalloc || use tcmalloc ; then
+ mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
+ fi
+
+ # Storage engines
+ mycmakeargs+=(
+ -DWITH_ARCHIVE_STORAGE_ENGINE=1
+ -DWITH_BLACKHOLE_STORAGE_ENGINE=1
+ -DWITH_CSV_STORAGE_ENGINE=1
+ -DWITH_HEAP_STORAGE_ENGINE=1
+ -DWITH_INNOBASE_STORAGE_ENGINE=1
+ -DWITH_MYISAMMRG_STORAGE_ENGINE=1
+ -DWITH_MYISAM_STORAGE_ENGINE=1
+ -DWITH_PARTITION_STORAGE_ENGINE=1
+ )
+
+ else
+ mycmakeargs+=(
+ -DWITHOUT_SERVER=1
+ -DWITH_EMBEDDED_SERVER=OFF
+ -DEXTRA_CHARSETS=none
+ -DINSTALL_SQLBENCHDIR=
+ -DWITH_SYSTEMD=no
+ )
+ fi
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ if use client-libs ; then
+ multilib-minimal_src_compile
+ else
+ multilib_src_compile
+ fi
+}
+
+multilib_src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ local MULTILIB_WRAPPED_HEADERS
+ local MULTILIB_CHOST_TOOLS
+ if use client-libs ; then
+ # headers with ABI specific data
+ MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/mysql/server/my_config.h
+ /usr/include/mysql/server/private/embedded_priv.h
+ /usr/include/mysql/server/mysql_version.h
+ /usr/include/mariadb/mariadb_version.h
+ /usr/include/mysql/mariadb_version.h
+ /usr/include/mysql/server/private/probes_mysql_nodtrace.h
+ /usr/include/mysql/server/private/probes_mysql_dtrace.h )
+
+ # wrap the config scripts
+ MULTILIB_CHOST_TOOLS=( /usr/bin/mariadb_config /usr/bin/mysql_config )
+ multilib-minimal_src_install
+ else
+ multilib_src_install
+ multilib_src_install_all
+ fi
+}
+
+# Intentionally override eclass function
+multilib_src_install() {
+
+ cmake-utils_src_install
+
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ # Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
+ if [[ -f "${ED}/usr/include/mysql/server/private/config.h" ]] ; then
+ rm "${ED}/usr/include/mysql/server/private/config.h" || die
+ fi
+
+ if ! multilib_is_native_abi && use server ; then
+ insinto /usr/include/mysql/server/private
+ doins "${S}"/sql/*.h
+ fi
+
+ if use client-libs ; then
+ # Install compatible symlinks to libmysqlclient
+# use static-libs && dosym libmariadbclient.a "/usr/$(get_libdir)/libmysqlclient.a"
+# dosym libmariadb.so.3 "/usr/$(get_libdir)/libmysqlclient.so"
+ dosym libmariadb.so.3 "/usr/$(get_libdir)/libmysqlclient.so.${SUBSLOT}"
+ 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
+}
+
+multilib_src_install_all() {
+ # 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 "${D}/${MY_SHAREDSTATEDIR}/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-10.2" "${TMPDIR}/my.cnf" || die
+ eprefixify "${TMPDIR}/my.cnf"
+ doins "${TMPDIR}/my.cnf"
+ insinto "${MY_SYSCONFDIR#${EPREFIX}}/mariadb.d"
+ cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+ eprefixify "${TMPDIR}/50-distro-client.cnf"
+ doins "${TMPDIR}/50-distro-client.cnf"
+
+ if use server ; then
+ mycnf_src="my.cnf.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|utf8|latin1|g" \
+ "${TMPDIR}/my.cnf.ok" || die
+ fi
+ eprefixify "${TMPDIR}/my.cnf.ok"
+ newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+
+ einfo "Including support files and sample configurations"
+ docinto "support-files"
+ local script
+ for script in \
+ "${S}"/support-files/magic
+ do
+ [[ -f "$script" ]] && dodoc "${script}"
+ done
+
+ docinto "scripts"
+ for script in "${S}"/scripts/mysql* ; do
+ [[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
+ done
+ fi
+
+ #Remove mytop if perl is not selected
+ [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+}
+
+# Official test instructions:
+# USE='extraengine perl server static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mariadb-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+ _disable_test() {
+ local rawtestname reason
+ rawtestname="${1}" ; shift
+ reason="${@}"
+ ewarn "test '${rawtestname}' disabled: '${reason}'"
+ echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+ }
+
+ local TESTDIR="${BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ if ! use server ; then
+ einfo "Skipping server tests due to minimal build."
+ return 0
+ fi
+
+ # 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 [[ $UID -eq 0 ]]; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+ has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+ # Run CTest (test-units)
+ cmake-utils_src_test
+ retstatus_unit=$?
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+ # Enable parallel testing, auto will try to detect number of cores
+ # You may set this by hand.
+ # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+ export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+ # 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"
+ # These are failing in MariaDB 10.0 for now and are believed to be
+ # false positives:
+ #
+ # main.mysql_client_test, main.mysql_client_test_nonblock
+ # main.mysql_client_test_comp:
+ # segfaults at random under Portage only, suspect resource limits.
+
+ local t
+ for t in plugins.cracklib_password_check plugins.two_password_validations ; do
+ _disable_test "$t" "False positive due to varying policies"
+ done
+
+ for t in main.mysql_client_test main.mysql_client_test_nonblock \
+ main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam ; do
+ _disable_test "$t" "False positives in Gentoo"
+ done
+
+ if ! use client-libs ; then
+ _disable_test main.plugin_auth "Needs client libraries built"
+ 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"
+}
+
+mysql_init_vars() {
+ MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mariadb"}
+ MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+ MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+ MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ MY_DATADIR=""
+ if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
+ MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+ | sed -ne '/datadir/s|^--datadir=||p' \
+ | tail -n1`
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
+ | sed -e 's/.*=\s*//' \
+ | tail -n1`
+ fi
+ fi
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ MY_DATADIR="${MY_LOCALSTATEDIR}"
+ einfo "Using default MY_DATADIR"
+ fi
+ elog "MySQL MY_DATADIR is ${MY_DATADIR}"
+
+ if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
+ if [[ -e "${MY_DATADIR}" ]] ; then
+ # If you get this and you're wondering about it, see bug #207636
+ elog "MySQL datadir found in ${MY_DATADIR}"
+ elog "A new one will not be created."
+ PREVIOUS_DATADIR="yes"
+ else
+ PREVIOUS_DATADIR="no"
+ fi
+ export PREVIOUS_DATADIR
+ fi
+ else
+ if [[ ${EBUILD_PHASE} == "config" ]]; then
+ local new_MY_DATADIR
+ new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+ | sed -ne '/datadir/s|^--datadir=||p' \
+ | tail -n1`
+
+ if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
+ ewarn "MySQL MY_DATADIR has changed"
+ ewarn "from ${MY_DATADIR}"
+ ewarn "to ${new_MY_DATADIR}"
+ MY_DATADIR="${new_MY_DATADIR}"
+ fi
+ fi
+ fi
+
+ export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+ export MY_LOCALSTATEDIR MY_LOGDIR
+ export MY_DATADIR
+}
+
+pkg_config() {
+ _getoptval() {
+ local mypd="${EROOT}"/usr/bin/my_print_defaults
+ local section="$1"
+ local flag="--${2}="
+ local extra_options="${3}"
+ "${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
+ }
+ local old_MY_DATADIR="${MY_DATADIR}"
+ local old_HOME="${HOME}"
+ # my_print_defaults needs to read stuff in $HOME/.my.cnf
+ export HOME=${EPREFIX}/root
+
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ [[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
+ if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
+ die "Minimal builds do NOT include the MySQL server"
+ fi
+
+ if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
+ local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
+ MY_DATADIR_s="${MY_DATADIR_s%%/}"
+ local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
+ old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
+
+ if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
+ if [[ -d "${MY_DATADIR_s}" ]]; then
+ ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
+ ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
+ else
+ elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
+ mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
+ || die "Moving MY_DATADIR failed"
+ fi
+ else
+ ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
+ if [[ -d "${MY_DATADIR_s}" ]]; then
+ ewarn "Attempting to use ${MY_DATADIR_s}"
+ else
+ eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
+ die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
+ fi
+ fi
+ fi
+
+ local pwd1="a"
+ local pwd2="b"
+ local maxtry=15
+
+ 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
+ MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
+ # These are dir+prefix
+ MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
+ MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+ MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
+ MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+
+ if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
+ einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
+ install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
+ fi
+ if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
+ einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
+ install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
+ fi
+ if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
+ einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
+ install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
+ fi
+
+ if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
+ ewarn "You have already a MySQL database in place."
+ ewarn "(${ROOT}/${MY_DATADIR}/*)"
+ ewarn "Please rename or delete it if you wish to replace it."
+ die "MySQL database already exists!"
+ fi
+
+ # 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 "${MYSQL_ROOT_PASSWORD}" ]; then
+
+ einfo "Please provide a password for the mysql 'root' user now"
+ einfo "or through the ${HOME}/.my.cnf file."
+ ewarn "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
+ fi
+
+ local options
+ local sqltmp="$(emktemp)"
+
+ # Fix bug 446200. Don't reference host my.cnf, needs to come first,
+ # see https://bugs.mysql.com/bug.php?id=31312
+ use prefix && options="${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
+ for opt in grant-tables 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}" && options="${options} ${optfull}"
+ done
+
+ einfo "Creating the mysql database and setting proper permissions on it ..."
+
+ # Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
+ PID_DIR="${EROOT}/var/run/mysqld"
+ if [[ ! -d "${PID_DIR}" ]]; then
+ install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
+ fi
+
+ if [[ ! -d "${MY_DATADIR}" ]]; then
+ install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
+ fi
+
+ pushd "${TMPDIR}" &>/dev/null || die
+
+ # Filling timezones, see
+ # https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+ "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
+
+ local cmd=( "${EROOT}usr/share/mariadb/scripts/mysql_install_db" )
+ [[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
+ cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
+ einfo "Command: ${cmd[*]}"
+ su -s /bin/sh -c "${cmd[*]}" mysql \
+ >"${TMPDIR}"/mysql_install_db.log 2>&1
+ if [ $? -ne 0 ]; then
+ grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
+ die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
+ fi
+ popd &>/dev/null || die
+ [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
+ || die "MySQL databases not installed"
+
+ use prefix || options="${options} --user=mysql"
+
+ local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
+ local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
+ local mysqld="${EROOT}/usr/sbin/mysqld \
+ ${options} \
+ --log-warnings=0 \
+ --basedir=${EROOT}/usr \
+ --datadir=${ROOT}/${MY_DATADIR} \
+ --max_allowed_packet=8M \
+ --net_buffer_length=16K \
+ --socket=${socket} \
+ --pid-file=${pidfile}
+ --tmpdir=${ROOT}/${MYSQL_TMPDIR}"
+ #einfo "About to start mysqld: ${mysqld}"
+ ebegin "Starting mysqld"
+ einfo "Command ${mysqld}"
+ ${mysqld} &
+ rc=$?
+ while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
+ maxtry=$((${maxtry}-1))
+ echo -n "."
+ sleep 1
+ done
+ eend $rc
+
+ if ! [[ -S "${socket}" ]]; then
+ die "Completely failed to start up mysqld with: ${mysqld}"
+ fi
+
+ ebegin "Setting root password"
+ # Do this from memory, as we don't want clear text passwords in temp files
+ local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
+ "${EROOT}/usr/bin/mysql" \
+ "--socket=${socket}" \
+ -hlocalhost \
+ -e "${sql}"
+ eend $?
+
+ if [[ -n "${sqltmp}" ]] ; then
+ ebegin "Loading \"zoneinfo\", this step may require a few seconds"
+ "${EROOT}/usr/bin/mysql" \
+ "--socket=${socket}" \
+ -hlocalhost \
+ -uroot \
+ --password="${MYSQL_ROOT_PASSWORD}" \
+ mysql < "${sqltmp}"
+ rc=$?
+ eend $?
+ [[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
+ fi
+
+ # Stop the server and cleanup
+ einfo "Stopping the server ..."
+ kill $(< "${pidfile}" )
+ rm -f "${sqltmp}"
+ wait %1
+ einfo "Done"
+}
diff --git a/dev-db/mariadb/mariadb-10.3.7.ebuild b/dev-db/mariadb/mariadb-10.3.7.ebuild
new file mode 100644
index 000000000000..2f13d5760854
--- /dev/null
+++ b/dev-db/mariadb/mariadb-10.3.7.ebuild
@@ -0,0 +1,960 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20180529-0042Z"
+SUBSLOT="18"
+
+JAVA_PKG_OPT_USE="jdbc"
+
+# Keeping eutils in EAPI=6 for emktemp in pkg_config
+
+inherit eutils systemd flag-o-matic prefix toolchain-funcs \
+ java-pkg-opt-2 user cmake-utils multilib-build
+
+SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz "
+
+# Gentoo patches to MySQL
+if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
+ SRC_URI="${SRC_URI}
+ mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
+fi
+
+HOMEPAGE="https://mariadb.org/"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL"
+LICENSE="GPL-2 LGPL-2.1+"
+SLOT="0/${SUBSLOT:-0}"
+IUSE="+backup bindist client-libs cracklib debug extraengine galera innodb-lz4
+ innodb-lzo innodb-snappy jdbc jemalloc kerberos latin1 libressl mroonga
+ numa odbc oqgraph pam +perl profiling rocksdb selinux +server sphinx
+ sst-rsync sst-mariabackup sst-xtrabackup static static-libs systemd systemtap tcmalloc
+ test tokudb xml yassl"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="!bindist? ( bindist ) libressl? ( test )"
+
+REQUIRED_USE="jdbc? ( extraengine server !static )
+ server? ( tokudb? ( jemalloc !tcmalloc ) )
+ ?? ( tcmalloc jemalloc )
+ static? ( yassl !pam )"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-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"
+
+if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
+ EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras"
+ EGIT_CLONE_TYPE=shallow
+ MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
+else
+ MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
+fi
+
+PATCHES=(
+ "${MY_PATCH_DIR}"/20015_all_mariadb-pkgconfig-location.patch
+ "${MY_PATCH_DIR}"/20018_all_mariadb-10.2.16-without-clientlibs-tools.patch
+ "${MY_PATCH_DIR}"/20024_all_mariadb-10.2.6-mysql_st-regression.patch
+ "${MY_PATCH_DIR}"/20025_all_mariadb-10.2.6-gssapi-detect.patch
+ "${MY_PATCH_DIR}"/20035_all_mariadb-10.3-atomic-detection.patch
+)
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+# MULTILIB_USEDEP only set for libraries used by the client library
+COMMON_DEPEND="
+ kernel_linux? (
+ sys-process/procps:0=
+ dev-libs/libaio:0=
+ )
+ >=sys-apps/sed-4
+ >=sys-apps/texinfo-4.7-r1
+ jemalloc? ( dev-libs/jemalloc:0= )
+ tcmalloc? ( dev-util/google-perftools:0= )
+ systemtap? ( >=dev-util/systemtap-1.3:0= )
+ >=sys-libs/zlib-1.2.3:0=
+ kerberos? ( virtual/krb5 )
+ yassl? ( net-libs/gnutls:0= )
+ !yassl? (
+ !libressl? ( >=dev-libs/openssl-1.0.0:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ sys-libs/ncurses:0=
+ !bindist? (
+ sys-libs/binutils-libs:0=
+ >=sys-libs/readline-4.1:0=
+ )
+ server? (
+ backup? ( app-arch/libarchive:0= )
+ cracklib? ( sys-libs/cracklib:0= )
+ extraengine? (
+ odbc? ( dev-db/unixODBC:0= )
+ xml? ( dev-libs/libxml2:2= )
+ )
+ innodb-lz4? ( app-arch/lz4 )
+ innodb-lzo? ( dev-libs/lzo )
+ innodb-snappy? ( app-arch/snappy )
+ mroonga? ( app-text/groonga-normalizer-mysql >=app-text/groonga-7.0.4 )
+ numa? ( sys-process/numactl )
+ oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
+ pam? ( virtual/pam:0= )
+ systemd? ( sys-apps/systemd:= )
+ tokudb? ( app-arch/snappy )
+ )
+ >=dev-libs/libpcre-8.41-r1:3=
+ dev-db/mariadb-connector-c[${MULTILIB_USEDEP},static-libs?] dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
+"
+DEPEND="virtual/yacc
+ static? ( sys-libs/ncurses[static-libs] )
+ || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+ server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) )
+ ${COMMON_DEPEND}"
+RDEPEND="selinux? ( sec-policy/selinux-mysql )
+ !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+ server? ( !prefix? ( dev-db/mysql-init-scripts ) )
+ !<virtual/mysql-5.6-r11
+ ${COMMON_DEPEND}
+ server? ( galera? (
+ sys-apps/iproute2
+ =sys-cluster/galera-25*
+ sst-rsync? ( sys-process/lsof )
+ sst-mariabackup? ( net-misc/socat[ssl] )
+ sst-xtrabackup? ( net-misc/socat[ssl] )
+ ) )
+ perl? ( !dev-db/mytop
+ virtual/perl-Getopt-Long
+ dev-perl/TermReadKey
+ virtual/perl-Term-ANSIColor
+ virtual/perl-Time-HiRes )
+ server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) )
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+# percona-xtrabackup-bin causes a circular dependency if DBD-mysql is not already installed
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )
+ server? ( ~virtual/mysql-5.6[static=]
+ galera? ( sst-xtrabackup? ( || ( >=dev-db/percona-xtrabackup-bin-2.2.4 dev-db/percona-xtrabackup ) ) ) )"
+
+pkg_setup() {
+ if [[ ${MERGE_TYPE} != binary ]] ; then
+ local GCC_MAJOR_SET=$(gcc-major-version)
+ local GCC_MINOR_SET=$(gcc-minor-version)
+ if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \
+ ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+ eerror "${PN} with tokudb needs to be built with gcc-4.7 or later."
+ eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+ die
+ fi
+ # Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on
+ # non x86{,_64} arches
+ if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
+ ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+ eerror "${PN} needs to be built with gcc-4.7 or later."
+ eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+ die
+ fi
+ fi
+ java-pkg-opt-2_pkg_setup
+ if has test ${FEATURES} && \
+ use server && ! has userpriv ${FEATURES} ; then
+ eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+
+ # This should come after all of the die statements
+ enewgroup mysql 60 || die "problem adding 'mysql' group"
+ enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
+}
+
+pkg_preinst() {
+ java-pkg-opt-2_pkg_preinst
+
+ # Here we need to see if the implementation switched client libraries
+ # We check if this is a new instance of the package and a client library already exists
+ local SHOW_ABI_MESSAGE libpath
+ if [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+ libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
+ elog "Due to ABI changes when switching between different client libraries,"
+ elog "revdep-rebuild must find and rebuild all packages linking to libmysqlclient."
+ elog "Please run: revdep-rebuild --library ${libpath}"
+ ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+ fi
+}
+
+pkg_postinst() {
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ # Create log directory securely if it does not exist
+ [[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+ if use server ; then
+ if use pam; then
+ einfo
+ elog "This install includes the PAM authentication plugin."
+ elog "To activate and configure the PAM plugin, please read:"
+ elog "https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/"
+ einfo
+ fi
+
+ if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+ einfo
+ elog "You might want to run:"
+ elog "\"emerge --config =${CATEGORY}/${PF}\""
+ elog "if this is a new install."
+ elog
+ elog "If you are switching server implentations, you should run the"
+ elog "mysql_upgrade tool."
+ einfo
+ else
+ einfo
+ elog "If you are upgrading major versions, you should run the"
+ elog "mysql_upgrade tool."
+ einfo
+ fi
+
+ if use galera ; then
+ einfo
+ elog "Be sure to edit the my.cnf file to activate your cluster settings."
+ elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
+ elog "The first time the cluster is activated, you should add"
+ elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
+ elog "This option should then be removed for subsequent starts."
+ einfo
+ fi
+ fi
+
+ # Note about configuration change
+ einfo
+ elog "This version of mariadb reorganizes the configuration from a single my.cnf"
+ elog "to several files in /etc/mysql/${PN}.d."
+ elog "Please backup any changes you made to /etc/mysql/my.cnf"
+ elog "and add them as a new file under /etc/mysql/${PN}.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 appropitate section headers, i.e. [mysqld]."
+ einfo
+}
+
+src_unpack() {
+
+ # Initialize the proper variables first
+ mysql_init_vars
+
+ unpack ${A}
+ # Grab the patches
+ [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
+
+ mv -f "${WORKDIR}/${P/_rc/}" "${S}" || die
+}
+
+src_prepare() {
+ _disable_plugin() {
+ echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
+ }
+ _disable_engine() {
+ echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
+ }
+
+ java-pkg-opt-2_src_prepare
+ if use tcmalloc; then
+ echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt"
+ fi
+
+ # Don't build bundled xz-utils for tokudb
+ echo > "${S}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
+ sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
+ sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
+
+ local plugin
+ local server_plugins=( handler_socket auth_socket feedback metadata_lock_info
+ locale_info qc_info server_audit sql_errlog )
+ local test_plugins=( audit_null auth_examples daemon_example fulltext
+ debug_key_management example_key_management versioning )
+ if ! use server; then # These plugins are for the server
+ for plugin in "${server_plugins[@]}" ; do
+ _disable_plugin "${plugin}"
+ done
+ fi
+
+ if ! use test; then # These plugins are only used during testing
+ for plugin in "${test_plugins[@]}" ; do
+ _disable_plugin "${plugin}"
+ done
+ _disable_engine test_sql_discovery
+ fi
+
+ _disable_engine example
+
+ if ! use oqgraph ; then # avoids extra library checks
+ _disable_engine oqgraph
+ fi
+
+ if use mroonga ; then
+ # Remove the bundled groonga
+ # There is no CMake flag, it simply checks for existance
+ rm -r "${S}"/storage/mroonga/vendor/groonga || die "could not remove packaged groonga"
+ else
+ _disable_engine mroonga
+ fi
+
+ cmake-utils_src_prepare
+}
+
+src_configure(){
+ # bug 508724 mariadb cannot use ld.gold
+ tc-ld-disable-gold
+ # Bug #114895, bug #110149
+ filter-flags "-O" "-O[01]"
+
+ append-cxxflags -felide-constructors
+
+ # 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')"
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
+ -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/mariadb
+ -DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin
+ -DINSTALL_SCRIPTDIR=share/mariadb/scripts
+ -DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+ -DINSTALL_SBINDIR=sbin
+ -DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mariadb"
+ -DWITH_COMMENT="Gentoo Linux ${PF}"
+ -DWITH_UNIT_TESTS=$(usex test ON OFF)
+ -DWITH_LIBEDIT=0
+ -DWITH_ZLIB=system
+ -DWITHOUT_LIBWRAP=1
+ -DENABLED_LOCAL_INFILE=1
+ -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+ -DINSTALL_UNIX_ADDRDIR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+ -DWITH_DEFAULT_COMPILER_OPTIONS=0
+ -DWITH_DEFAULT_FEATURE_SET=0
+ -DINSTALL_SYSTEMD_UNITDIR="$(systemd_get_systemunitdir)"
+ # 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)
+ -DPKG_CONFIG_EXECUTABLE="${EPREFIX}/usr/bin/$(tc-getPKG_CONFIG)"
+ -DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO)
+ -DAUTH_GSSAPI_PLUGIN_TYPE=$(usex kerberos DYNAMIC OFF)
+ -DCONC_WITH_EXTERNAL_ZLIB=YES
+ -DWITH_EXTERNAL_ZLIB=YES
+ -DSUFFIX_INSTALL_DIR=""
+ -DWITH_UNITTEST=OFF
+ -DWITHOUT_CLIENTLIBS=YES
+ -DCLIENT_PLUGIN_DIALOG=OFF
+ -DCLIENT_PLUGIN_AUTH_GSSAPI_CLIENT=OFF
+ -DCLIENT_PLUGIN_MYSQL_CLEAR_PASSWORD=STATIC
+ )
+ if use test ; then
+ mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mariadb/mysql-test )
+ else
+ mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+ fi
+
+ if ! use yassl ; then
+ mycmakeargs+=( -DWITH_SSL=system -DCLIENT_PLUGIN_SHA256_PASSWORD=STATIC )
+ else
+ mycmakeargs+=( -DWITH_SSL=bundled )
+ fi
+
+ # bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
+ mycmakeargs+=(
+ -DWITH_READLINE=$(usex bindist 1 0)
+ -DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1)
+ -DENABLE_DTRACE=$(usex systemtap)
+ )
+
+ if use server ; then
+
+ # Federated{,X} must be treated special otherwise they will not be built as plugins
+ if ! use extraengine ; then
+ mycmakeargs+=(
+ -DPLUGIN_FEDERATED=NO
+ -DPLUGIN_FEDERATEDX=NO )
+ fi
+
+ mycmakeargs+=(
+ -DWITH_JEMALLOC=$(usex jemalloc system)
+ -DWITH_PCRE=system
+ -DPLUGIN_OQGRAPH=$(usex oqgraph DYNAMIC NO)
+ -DPLUGIN_SPHINX=$(usex sphinx YES NO)
+ -DPLUGIN_TOKUDB=$(usex tokudb YES NO)
+ -DPLUGIN_AUTH_PAM=$(usex pam YES NO)
+ -DPLUGIN_CRACKLIB_PASSWORD_CHECK=$(usex cracklib YES NO)
+ -DPLUGIN_CASSANDRA=NO
+ -DPLUGIN_SEQUENCE=$(usex extraengine YES NO)
+ -DPLUGIN_SPIDER=$(usex extraengine YES NO)
+ -DPLUGIN_CONNECT=$(usex extraengine YES NO)
+ -DCONNECT_WITH_MYSQL=1
+ -DCONNECT_WITH_LIBXML2=$(usex xml)
+ -DCONNECT_WITH_ODBC=$(usex odbc)
+ -DCONNECT_WITH_JDBC=$(usex jdbc)
+ # Build failure and autodep wrt bug 639144
+ -DCONNECT_WITH_MONGO=OFF
+ -DWITH_WSREP=$(usex galera)
+ -DWITH_INNODB_LZ4=$(usex innodb-lz4 ON OFF)
+ -DWITH_INNODB_LZO=$(usex innodb-lzo ON OFF)
+ -DWITH_INNODB_SNAPPY=$(usex innodb-snappy ON OFF)
+ -DPLUGIN_MROONGA=$(usex mroonga DYNAMIC NO)
+ -DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO)
+ -DWITH_MARIABACKUP=$(usex backup ON OFF)
+ -DWITH_LIBARCHIVE=$(usex backup ON OFF)
+ -DINSTALL_SQLBENCHDIR=""
+ -DPLUGIN_ROCKSDB=$(usex rocksdb DYNAMIC NO)
+ # systemd is only linked to for server notification
+ -DWITH_SYSTEMD=$(usex systemd yes no)
+ -DWITH_NUMA=$(usex numa ON OFF)
+ )
+
+ # Workaround for MDEV-14524
+ use tokudb && mycmakeargs+=( -DTOKUDB_OK=1 )
+
+ if use test ; then
+ # This is needed for the new client lib which tests a real, open server
+ mycmakeargs+=( -DSKIP_TESTS=ON )
+ fi
+
+ 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."
+
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+ -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+ )
+
+ elif ! use latin1 ; then
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=utf8
+ -DDEFAULT_COLLATION=utf8_general_ci
+ )
+ else
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=latin1
+ -DDEFAULT_COLLATION=latin1_swedish_ci
+ )
+ fi
+ mycmakeargs+=(
+ -DEXTRA_CHARSETS=all
+ -DMYSQL_USER=mysql
+ -DDISABLE_SHARED=$(usex static YES NO)
+ -DWITH_DEBUG=$(usex debug)
+ -DWITH_EMBEDDED_SERVER=OFF
+ -DWITH_PROFILING=$(usex profiling)
+ )
+
+ if use static; then
+ mycmakeargs+=( -DWITH_PIC=1 )
+ fi
+
+ if use jemalloc || use tcmalloc ; then
+ mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
+ fi
+
+ # Storage engines
+ mycmakeargs+=(
+ -DWITH_ARCHIVE_STORAGE_ENGINE=1
+ -DWITH_BLACKHOLE_STORAGE_ENGINE=1
+ -DWITH_CSV_STORAGE_ENGINE=1
+ -DWITH_HEAP_STORAGE_ENGINE=1
+ -DWITH_INNOBASE_STORAGE_ENGINE=1
+ -DWITH_MYISAMMRG_STORAGE_ENGINE=1
+ -DWITH_MYISAM_STORAGE_ENGINE=1
+ -DWITH_PARTITION_STORAGE_ENGINE=1
+ )
+
+ else
+ mycmakeargs+=(
+ -DWITHOUT_SERVER=1
+ -DWITH_EMBEDDED_SERVER=OFF
+ -DEXTRA_CHARSETS=none
+ -DINSTALL_SQLBENCHDIR=
+ -DWITH_SYSTEMD=no
+ )
+ fi
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ # Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
+ if [[ -f "${ED}/usr/include/mysql/server/private/config.h" ]] ; then
+ rm "${ED}/usr/include/mysql/server/private/config.h" || die
+ fi
+
+ # 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 "${D}/${MY_SHAREDSTATEDIR}/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-10.2" "${TMPDIR}/my.cnf" || die
+ eprefixify "${TMPDIR}/my.cnf"
+ doins "${TMPDIR}/my.cnf"
+ insinto "${MY_SYSCONFDIR#${EPREFIX}}/mariadb.d"
+ cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+ eprefixify "${TMPDIR}/50-distro-client.cnf"
+ doins "${TMPDIR}/50-distro-client.cnf"
+
+ if use server ; then
+ mycnf_src="my.cnf.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|utf8|latin1|g" \
+ "${TMPDIR}/my.cnf.ok" || die
+ fi
+ eprefixify "${TMPDIR}/my.cnf.ok"
+ newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+
+ einfo "Including support files and sample configurations"
+ docinto "support-files"
+ local script
+ for script in \
+ "${S}"/support-files/magic
+ do
+ [[ -f "$script" ]] && dodoc "${script}"
+ done
+
+ docinto "scripts"
+ for script in "${S}"/scripts/mysql* ; do
+ [[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
+ done
+ fi
+
+ #Remove mytop if perl is not selected
+ [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+}
+
+# Official test instructions:
+# USE='extraengine perl server' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mariadb-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+ _disable_test() {
+ local rawtestname reason
+ rawtestname="${1}" ; shift
+ reason="${@}"
+ ewarn "test '${rawtestname}' disabled: '${reason}'"
+ echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+ }
+
+ local TESTDIR="${BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ if ! use server ; then
+ einfo "Skipping server tests due to minimal build."
+ return 0
+ fi
+
+ # 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 [[ $UID -eq 0 ]]; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+ has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+ # Run CTest (test-units)
+ cmake-utils_src_test
+ retstatus_unit=$?
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+ # Enable parallel testing, auto will try to detect number of cores
+ # You may set this by hand.
+ # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+ export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+ # 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"
+ # These are failing in MariaDB 10.0 for now and are believed to be
+ # false positives:
+ #
+ # main.mysql_client_test, main.mysql_client_test_nonblock
+ # main.mysql_client_test_comp:
+ # segfaults at random under Portage only, suspect resource limits.
+
+ local t
+ for t in plugins.cracklib_password_check plugins.two_password_validations ; do
+ _disable_test "$t" "False positive due to varying policies"
+ done
+
+ for t in main.mysql_client_test main.mysql_client_test_nonblock \
+ main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam ; do
+ _disable_test "$t" "False positives in Gentoo"
+ done
+
+ _disable_test main.plugin_auth "Needs client libraries built"
+
+ # 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"
+}
+
+mysql_init_vars() {
+ MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mariadb"}
+ MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+ MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+ MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ MY_DATADIR=""
+ if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
+ MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+ | sed -ne '/datadir/s|^--datadir=||p' \
+ | tail -n1`
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
+ | sed -e 's/.*=\s*//' \
+ | tail -n1`
+ fi
+ fi
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ MY_DATADIR="${MY_LOCALSTATEDIR}"
+ einfo "Using default MY_DATADIR"
+ fi
+ elog "MySQL MY_DATADIR is ${MY_DATADIR}"
+
+ if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
+ if [[ -e "${MY_DATADIR}" ]] ; then
+ # If you get this and you're wondering about it, see bug #207636
+ elog "MySQL datadir found in ${MY_DATADIR}"
+ elog "A new one will not be created."
+ PREVIOUS_DATADIR="yes"
+ else
+ PREVIOUS_DATADIR="no"
+ fi
+ export PREVIOUS_DATADIR
+ fi
+ else
+ if [[ ${EBUILD_PHASE} == "config" ]]; then
+ local new_MY_DATADIR
+ new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+ | sed -ne '/datadir/s|^--datadir=||p' \
+ | tail -n1`
+
+ if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
+ ewarn "MySQL MY_DATADIR has changed"
+ ewarn "from ${MY_DATADIR}"
+ ewarn "to ${new_MY_DATADIR}"
+ MY_DATADIR="${new_MY_DATADIR}"
+ fi
+ fi
+ fi
+
+ export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+ export MY_LOCALSTATEDIR MY_LOGDIR
+ export MY_DATADIR
+}
+
+pkg_config() {
+ _getoptval() {
+ local mypd="${EROOT}"/usr/bin/my_print_defaults
+ local section="$1"
+ local flag="--${2}="
+ local extra_options="${3}"
+ "${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
+ }
+ local old_MY_DATADIR="${MY_DATADIR}"
+ local old_HOME="${HOME}"
+ # my_print_defaults needs to read stuff in $HOME/.my.cnf
+ export HOME=${EPREFIX}/root
+
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ [[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
+ if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
+ die "Minimal builds do NOT include the MySQL server"
+ fi
+
+ if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
+ local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
+ MY_DATADIR_s="${MY_DATADIR_s%%/}"
+ local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
+ old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
+
+ if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
+ if [[ -d "${MY_DATADIR_s}" ]]; then
+ ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
+ ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
+ else
+ elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
+ mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
+ || die "Moving MY_DATADIR failed"
+ fi
+ else
+ ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
+ if [[ -d "${MY_DATADIR_s}" ]]; then
+ ewarn "Attempting to use ${MY_DATADIR_s}"
+ else
+ eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
+ die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
+ fi
+ fi
+ fi
+
+ local pwd1="a"
+ local pwd2="b"
+ local maxtry=15
+
+ 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
+ MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
+ # These are dir+prefix
+ MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
+ MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+ MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
+ MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+
+ if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
+ einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
+ install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
+ fi
+ if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
+ einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
+ install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
+ fi
+ if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
+ einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
+ install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
+ fi
+
+ if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
+ ewarn "You have already a MySQL database in place."
+ ewarn "(${ROOT}/${MY_DATADIR}/*)"
+ ewarn "Please rename or delete it if you wish to replace it."
+ die "MySQL database already exists!"
+ fi
+
+ # 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 "${MYSQL_ROOT_PASSWORD}" ]; then
+
+ einfo "Please provide a password for the mysql 'root' user now"
+ einfo "or through the ${HOME}/.my.cnf file."
+ ewarn "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
+ fi
+
+ local options
+ local sqltmp="$(emktemp)"
+
+ # Fix bug 446200. Don't reference host my.cnf, needs to come first,
+ # see https://bugs.mysql.com/bug.php?id=31312
+ use prefix && options="${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
+ for opt in grant-tables 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}" && options="${options} ${optfull}"
+ done
+
+ einfo "Creating the mysql database and setting proper permissions on it ..."
+
+ # Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
+ PID_DIR="${EROOT}/var/run/mysqld"
+ if [[ ! -d "${PID_DIR}" ]]; then
+ install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
+ fi
+
+ if [[ ! -d "${MY_DATADIR}" ]]; then
+ install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
+ fi
+
+ pushd "${TMPDIR}" &>/dev/null || die
+
+ # Filling timezones, see
+ # https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+ "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
+
+ local cmd=( "${EROOT}usr/share/mariadb/scripts/mysql_install_db" )
+ [[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
+ cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
+ einfo "Command: ${cmd[*]}"
+ su -s /bin/sh -c "${cmd[*]}" mysql \
+ >"${TMPDIR}"/mysql_install_db.log 2>&1
+ if [ $? -ne 0 ]; then
+ grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
+ die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
+ fi
+ popd &>/dev/null || die
+ [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
+ || die "MySQL databases not installed"
+
+ use prefix || options="${options} --user=mysql"
+
+ local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
+ local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
+ local mysqld="${EROOT}/usr/sbin/mysqld \
+ ${options} \
+ --log-warnings=0 \
+ --basedir=${EROOT}/usr \
+ --datadir=${ROOT}/${MY_DATADIR} \
+ --max_allowed_packet=8M \
+ --net_buffer_length=16K \
+ --socket=${socket} \
+ --pid-file=${pidfile}
+ --tmpdir=${ROOT}/${MYSQL_TMPDIR}"
+ #einfo "About to start mysqld: ${mysqld}"
+ ebegin "Starting mysqld"
+ einfo "Command ${mysqld}"
+ ${mysqld} &
+ rc=$?
+ while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
+ maxtry=$((${maxtry}-1))
+ echo -n "."
+ sleep 1
+ done
+ eend $rc
+
+ if ! [[ -S "${socket}" ]]; then
+ die "Completely failed to start up mysqld with: ${mysqld}"
+ fi
+
+ ebegin "Setting root password"
+ # Do this from memory, as we don't want clear text passwords in temp files
+ local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
+ "${EROOT}/usr/bin/mysql" \
+ "--socket=${socket}" \
+ -hlocalhost \
+ -e "${sql}"
+ eend $?
+
+ if [[ -n "${sqltmp}" ]] ; then
+ ebegin "Loading \"zoneinfo\", this step may require a few seconds"
+ "${EROOT}/usr/bin/mysql" \
+ "--socket=${socket}" \
+ -hlocalhost \
+ -uroot \
+ --password="${MYSQL_ROOT_PASSWORD}" \
+ mysql < "${sqltmp}"
+ rc=$?
+ eend $?
+ [[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
+ fi
+
+ # Stop the server and cleanup
+ einfo "Stopping the server ..."
+ kill $(< "${pidfile}" )
+ rm -f "${sqltmp}"
+ wait %1
+ einfo "Done"
+}
diff --git a/dev-db/mariadb/mariadb-10.3.8.ebuild b/dev-db/mariadb/mariadb-10.3.8.ebuild
new file mode 100644
index 000000000000..2f13d5760854
--- /dev/null
+++ b/dev-db/mariadb/mariadb-10.3.8.ebuild
@@ -0,0 +1,960 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20180529-0042Z"
+SUBSLOT="18"
+
+JAVA_PKG_OPT_USE="jdbc"
+
+# Keeping eutils in EAPI=6 for emktemp in pkg_config
+
+inherit eutils systemd flag-o-matic prefix toolchain-funcs \
+ java-pkg-opt-2 user cmake-utils multilib-build
+
+SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz "
+
+# Gentoo patches to MySQL
+if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
+ SRC_URI="${SRC_URI}
+ mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
+fi
+
+HOMEPAGE="https://mariadb.org/"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL"
+LICENSE="GPL-2 LGPL-2.1+"
+SLOT="0/${SUBSLOT:-0}"
+IUSE="+backup bindist client-libs cracklib debug extraengine galera innodb-lz4
+ innodb-lzo innodb-snappy jdbc jemalloc kerberos latin1 libressl mroonga
+ numa odbc oqgraph pam +perl profiling rocksdb selinux +server sphinx
+ sst-rsync sst-mariabackup sst-xtrabackup static static-libs systemd systemtap tcmalloc
+ test tokudb xml yassl"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="!bindist? ( bindist ) libressl? ( test )"
+
+REQUIRED_USE="jdbc? ( extraengine server !static )
+ server? ( tokudb? ( jemalloc !tcmalloc ) )
+ ?? ( tcmalloc jemalloc )
+ static? ( yassl !pam )"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-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"
+
+if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
+ EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras"
+ EGIT_CLONE_TYPE=shallow
+ MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
+else
+ MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
+fi
+
+PATCHES=(
+ "${MY_PATCH_DIR}"/20015_all_mariadb-pkgconfig-location.patch
+ "${MY_PATCH_DIR}"/20018_all_mariadb-10.2.16-without-clientlibs-tools.patch
+ "${MY_PATCH_DIR}"/20024_all_mariadb-10.2.6-mysql_st-regression.patch
+ "${MY_PATCH_DIR}"/20025_all_mariadb-10.2.6-gssapi-detect.patch
+ "${MY_PATCH_DIR}"/20035_all_mariadb-10.3-atomic-detection.patch
+)
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+# MULTILIB_USEDEP only set for libraries used by the client library
+COMMON_DEPEND="
+ kernel_linux? (
+ sys-process/procps:0=
+ dev-libs/libaio:0=
+ )
+ >=sys-apps/sed-4
+ >=sys-apps/texinfo-4.7-r1
+ jemalloc? ( dev-libs/jemalloc:0= )
+ tcmalloc? ( dev-util/google-perftools:0= )
+ systemtap? ( >=dev-util/systemtap-1.3:0= )
+ >=sys-libs/zlib-1.2.3:0=
+ kerberos? ( virtual/krb5 )
+ yassl? ( net-libs/gnutls:0= )
+ !yassl? (
+ !libressl? ( >=dev-libs/openssl-1.0.0:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ sys-libs/ncurses:0=
+ !bindist? (
+ sys-libs/binutils-libs:0=
+ >=sys-libs/readline-4.1:0=
+ )
+ server? (
+ backup? ( app-arch/libarchive:0= )
+ cracklib? ( sys-libs/cracklib:0= )
+ extraengine? (
+ odbc? ( dev-db/unixODBC:0= )
+ xml? ( dev-libs/libxml2:2= )
+ )
+ innodb-lz4? ( app-arch/lz4 )
+ innodb-lzo? ( dev-libs/lzo )
+ innodb-snappy? ( app-arch/snappy )
+ mroonga? ( app-text/groonga-normalizer-mysql >=app-text/groonga-7.0.4 )
+ numa? ( sys-process/numactl )
+ oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
+ pam? ( virtual/pam:0= )
+ systemd? ( sys-apps/systemd:= )
+ tokudb? ( app-arch/snappy )
+ )
+ >=dev-libs/libpcre-8.41-r1:3=
+ dev-db/mariadb-connector-c[${MULTILIB_USEDEP},static-libs?] dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
+"
+DEPEND="virtual/yacc
+ static? ( sys-libs/ncurses[static-libs] )
+ || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+ server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) )
+ ${COMMON_DEPEND}"
+RDEPEND="selinux? ( sec-policy/selinux-mysql )
+ !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+ server? ( !prefix? ( dev-db/mysql-init-scripts ) )
+ !<virtual/mysql-5.6-r11
+ ${COMMON_DEPEND}
+ server? ( galera? (
+ sys-apps/iproute2
+ =sys-cluster/galera-25*
+ sst-rsync? ( sys-process/lsof )
+ sst-mariabackup? ( net-misc/socat[ssl] )
+ sst-xtrabackup? ( net-misc/socat[ssl] )
+ ) )
+ perl? ( !dev-db/mytop
+ virtual/perl-Getopt-Long
+ dev-perl/TermReadKey
+ virtual/perl-Term-ANSIColor
+ virtual/perl-Time-HiRes )
+ server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) )
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+# percona-xtrabackup-bin causes a circular dependency if DBD-mysql is not already installed
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )
+ server? ( ~virtual/mysql-5.6[static=]
+ galera? ( sst-xtrabackup? ( || ( >=dev-db/percona-xtrabackup-bin-2.2.4 dev-db/percona-xtrabackup ) ) ) )"
+
+pkg_setup() {
+ if [[ ${MERGE_TYPE} != binary ]] ; then
+ local GCC_MAJOR_SET=$(gcc-major-version)
+ local GCC_MINOR_SET=$(gcc-minor-version)
+ if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \
+ ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+ eerror "${PN} with tokudb needs to be built with gcc-4.7 or later."
+ eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+ die
+ fi
+ # Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on
+ # non x86{,_64} arches
+ if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
+ ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+ eerror "${PN} needs to be built with gcc-4.7 or later."
+ eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+ die
+ fi
+ fi
+ java-pkg-opt-2_pkg_setup
+ if has test ${FEATURES} && \
+ use server && ! has userpriv ${FEATURES} ; then
+ eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+
+ # This should come after all of the die statements
+ enewgroup mysql 60 || die "problem adding 'mysql' group"
+ enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
+}
+
+pkg_preinst() {
+ java-pkg-opt-2_pkg_preinst
+
+ # Here we need to see if the implementation switched client libraries
+ # We check if this is a new instance of the package and a client library already exists
+ local SHOW_ABI_MESSAGE libpath
+ if [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+ libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
+ elog "Due to ABI changes when switching between different client libraries,"
+ elog "revdep-rebuild must find and rebuild all packages linking to libmysqlclient."
+ elog "Please run: revdep-rebuild --library ${libpath}"
+ ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+ fi
+}
+
+pkg_postinst() {
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ # Create log directory securely if it does not exist
+ [[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+ if use server ; then
+ if use pam; then
+ einfo
+ elog "This install includes the PAM authentication plugin."
+ elog "To activate and configure the PAM plugin, please read:"
+ elog "https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/"
+ einfo
+ fi
+
+ if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+ einfo
+ elog "You might want to run:"
+ elog "\"emerge --config =${CATEGORY}/${PF}\""
+ elog "if this is a new install."
+ elog
+ elog "If you are switching server implentations, you should run the"
+ elog "mysql_upgrade tool."
+ einfo
+ else
+ einfo
+ elog "If you are upgrading major versions, you should run the"
+ elog "mysql_upgrade tool."
+ einfo
+ fi
+
+ if use galera ; then
+ einfo
+ elog "Be sure to edit the my.cnf file to activate your cluster settings."
+ elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
+ elog "The first time the cluster is activated, you should add"
+ elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
+ elog "This option should then be removed for subsequent starts."
+ einfo
+ fi
+ fi
+
+ # Note about configuration change
+ einfo
+ elog "This version of mariadb reorganizes the configuration from a single my.cnf"
+ elog "to several files in /etc/mysql/${PN}.d."
+ elog "Please backup any changes you made to /etc/mysql/my.cnf"
+ elog "and add them as a new file under /etc/mysql/${PN}.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 appropitate section headers, i.e. [mysqld]."
+ einfo
+}
+
+src_unpack() {
+
+ # Initialize the proper variables first
+ mysql_init_vars
+
+ unpack ${A}
+ # Grab the patches
+ [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
+
+ mv -f "${WORKDIR}/${P/_rc/}" "${S}" || die
+}
+
+src_prepare() {
+ _disable_plugin() {
+ echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
+ }
+ _disable_engine() {
+ echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
+ }
+
+ java-pkg-opt-2_src_prepare
+ if use tcmalloc; then
+ echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt"
+ fi
+
+ # Don't build bundled xz-utils for tokudb
+ echo > "${S}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
+ sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
+ sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
+
+ local plugin
+ local server_plugins=( handler_socket auth_socket feedback metadata_lock_info
+ locale_info qc_info server_audit sql_errlog )
+ local test_plugins=( audit_null auth_examples daemon_example fulltext
+ debug_key_management example_key_management versioning )
+ if ! use server; then # These plugins are for the server
+ for plugin in "${server_plugins[@]}" ; do
+ _disable_plugin "${plugin}"
+ done
+ fi
+
+ if ! use test; then # These plugins are only used during testing
+ for plugin in "${test_plugins[@]}" ; do
+ _disable_plugin "${plugin}"
+ done
+ _disable_engine test_sql_discovery
+ fi
+
+ _disable_engine example
+
+ if ! use oqgraph ; then # avoids extra library checks
+ _disable_engine oqgraph
+ fi
+
+ if use mroonga ; then
+ # Remove the bundled groonga
+ # There is no CMake flag, it simply checks for existance
+ rm -r "${S}"/storage/mroonga/vendor/groonga || die "could not remove packaged groonga"
+ else
+ _disable_engine mroonga
+ fi
+
+ cmake-utils_src_prepare
+}
+
+src_configure(){
+ # bug 508724 mariadb cannot use ld.gold
+ tc-ld-disable-gold
+ # Bug #114895, bug #110149
+ filter-flags "-O" "-O[01]"
+
+ append-cxxflags -felide-constructors
+
+ # 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')"
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
+ -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/mariadb
+ -DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin
+ -DINSTALL_SCRIPTDIR=share/mariadb/scripts
+ -DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+ -DINSTALL_SBINDIR=sbin
+ -DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mariadb"
+ -DWITH_COMMENT="Gentoo Linux ${PF}"
+ -DWITH_UNIT_TESTS=$(usex test ON OFF)
+ -DWITH_LIBEDIT=0
+ -DWITH_ZLIB=system
+ -DWITHOUT_LIBWRAP=1
+ -DENABLED_LOCAL_INFILE=1
+ -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+ -DINSTALL_UNIX_ADDRDIR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+ -DWITH_DEFAULT_COMPILER_OPTIONS=0
+ -DWITH_DEFAULT_FEATURE_SET=0
+ -DINSTALL_SYSTEMD_UNITDIR="$(systemd_get_systemunitdir)"
+ # 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)
+ -DPKG_CONFIG_EXECUTABLE="${EPREFIX}/usr/bin/$(tc-getPKG_CONFIG)"
+ -DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO)
+ -DAUTH_GSSAPI_PLUGIN_TYPE=$(usex kerberos DYNAMIC OFF)
+ -DCONC_WITH_EXTERNAL_ZLIB=YES
+ -DWITH_EXTERNAL_ZLIB=YES
+ -DSUFFIX_INSTALL_DIR=""
+ -DWITH_UNITTEST=OFF
+ -DWITHOUT_CLIENTLIBS=YES
+ -DCLIENT_PLUGIN_DIALOG=OFF
+ -DCLIENT_PLUGIN_AUTH_GSSAPI_CLIENT=OFF
+ -DCLIENT_PLUGIN_MYSQL_CLEAR_PASSWORD=STATIC
+ )
+ if use test ; then
+ mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mariadb/mysql-test )
+ else
+ mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+ fi
+
+ if ! use yassl ; then
+ mycmakeargs+=( -DWITH_SSL=system -DCLIENT_PLUGIN_SHA256_PASSWORD=STATIC )
+ else
+ mycmakeargs+=( -DWITH_SSL=bundled )
+ fi
+
+ # bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
+ mycmakeargs+=(
+ -DWITH_READLINE=$(usex bindist 1 0)
+ -DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1)
+ -DENABLE_DTRACE=$(usex systemtap)
+ )
+
+ if use server ; then
+
+ # Federated{,X} must be treated special otherwise they will not be built as plugins
+ if ! use extraengine ; then
+ mycmakeargs+=(
+ -DPLUGIN_FEDERATED=NO
+ -DPLUGIN_FEDERATEDX=NO )
+ fi
+
+ mycmakeargs+=(
+ -DWITH_JEMALLOC=$(usex jemalloc system)
+ -DWITH_PCRE=system
+ -DPLUGIN_OQGRAPH=$(usex oqgraph DYNAMIC NO)
+ -DPLUGIN_SPHINX=$(usex sphinx YES NO)
+ -DPLUGIN_TOKUDB=$(usex tokudb YES NO)
+ -DPLUGIN_AUTH_PAM=$(usex pam YES NO)
+ -DPLUGIN_CRACKLIB_PASSWORD_CHECK=$(usex cracklib YES NO)
+ -DPLUGIN_CASSANDRA=NO
+ -DPLUGIN_SEQUENCE=$(usex extraengine YES NO)
+ -DPLUGIN_SPIDER=$(usex extraengine YES NO)
+ -DPLUGIN_CONNECT=$(usex extraengine YES NO)
+ -DCONNECT_WITH_MYSQL=1
+ -DCONNECT_WITH_LIBXML2=$(usex xml)
+ -DCONNECT_WITH_ODBC=$(usex odbc)
+ -DCONNECT_WITH_JDBC=$(usex jdbc)
+ # Build failure and autodep wrt bug 639144
+ -DCONNECT_WITH_MONGO=OFF
+ -DWITH_WSREP=$(usex galera)
+ -DWITH_INNODB_LZ4=$(usex innodb-lz4 ON OFF)
+ -DWITH_INNODB_LZO=$(usex innodb-lzo ON OFF)
+ -DWITH_INNODB_SNAPPY=$(usex innodb-snappy ON OFF)
+ -DPLUGIN_MROONGA=$(usex mroonga DYNAMIC NO)
+ -DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO)
+ -DWITH_MARIABACKUP=$(usex backup ON OFF)
+ -DWITH_LIBARCHIVE=$(usex backup ON OFF)
+ -DINSTALL_SQLBENCHDIR=""
+ -DPLUGIN_ROCKSDB=$(usex rocksdb DYNAMIC NO)
+ # systemd is only linked to for server notification
+ -DWITH_SYSTEMD=$(usex systemd yes no)
+ -DWITH_NUMA=$(usex numa ON OFF)
+ )
+
+ # Workaround for MDEV-14524
+ use tokudb && mycmakeargs+=( -DTOKUDB_OK=1 )
+
+ if use test ; then
+ # This is needed for the new client lib which tests a real, open server
+ mycmakeargs+=( -DSKIP_TESTS=ON )
+ fi
+
+ 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."
+
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+ -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+ )
+
+ elif ! use latin1 ; then
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=utf8
+ -DDEFAULT_COLLATION=utf8_general_ci
+ )
+ else
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=latin1
+ -DDEFAULT_COLLATION=latin1_swedish_ci
+ )
+ fi
+ mycmakeargs+=(
+ -DEXTRA_CHARSETS=all
+ -DMYSQL_USER=mysql
+ -DDISABLE_SHARED=$(usex static YES NO)
+ -DWITH_DEBUG=$(usex debug)
+ -DWITH_EMBEDDED_SERVER=OFF
+ -DWITH_PROFILING=$(usex profiling)
+ )
+
+ if use static; then
+ mycmakeargs+=( -DWITH_PIC=1 )
+ fi
+
+ if use jemalloc || use tcmalloc ; then
+ mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
+ fi
+
+ # Storage engines
+ mycmakeargs+=(
+ -DWITH_ARCHIVE_STORAGE_ENGINE=1
+ -DWITH_BLACKHOLE_STORAGE_ENGINE=1
+ -DWITH_CSV_STORAGE_ENGINE=1
+ -DWITH_HEAP_STORAGE_ENGINE=1
+ -DWITH_INNOBASE_STORAGE_ENGINE=1
+ -DWITH_MYISAMMRG_STORAGE_ENGINE=1
+ -DWITH_MYISAM_STORAGE_ENGINE=1
+ -DWITH_PARTITION_STORAGE_ENGINE=1
+ )
+
+ else
+ mycmakeargs+=(
+ -DWITHOUT_SERVER=1
+ -DWITH_EMBEDDED_SERVER=OFF
+ -DEXTRA_CHARSETS=none
+ -DINSTALL_SQLBENCHDIR=
+ -DWITH_SYSTEMD=no
+ )
+ fi
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ # Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
+ if [[ -f "${ED}/usr/include/mysql/server/private/config.h" ]] ; then
+ rm "${ED}/usr/include/mysql/server/private/config.h" || die
+ fi
+
+ # 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 "${D}/${MY_SHAREDSTATEDIR}/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-10.2" "${TMPDIR}/my.cnf" || die
+ eprefixify "${TMPDIR}/my.cnf"
+ doins "${TMPDIR}/my.cnf"
+ insinto "${MY_SYSCONFDIR#${EPREFIX}}/mariadb.d"
+ cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+ eprefixify "${TMPDIR}/50-distro-client.cnf"
+ doins "${TMPDIR}/50-distro-client.cnf"
+
+ if use server ; then
+ mycnf_src="my.cnf.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|utf8|latin1|g" \
+ "${TMPDIR}/my.cnf.ok" || die
+ fi
+ eprefixify "${TMPDIR}/my.cnf.ok"
+ newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+
+ einfo "Including support files and sample configurations"
+ docinto "support-files"
+ local script
+ for script in \
+ "${S}"/support-files/magic
+ do
+ [[ -f "$script" ]] && dodoc "${script}"
+ done
+
+ docinto "scripts"
+ for script in "${S}"/scripts/mysql* ; do
+ [[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
+ done
+ fi
+
+ #Remove mytop if perl is not selected
+ [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+}
+
+# Official test instructions:
+# USE='extraengine perl server' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mariadb-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+ _disable_test() {
+ local rawtestname reason
+ rawtestname="${1}" ; shift
+ reason="${@}"
+ ewarn "test '${rawtestname}' disabled: '${reason}'"
+ echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+ }
+
+ local TESTDIR="${BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ if ! use server ; then
+ einfo "Skipping server tests due to minimal build."
+ return 0
+ fi
+
+ # 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 [[ $UID -eq 0 ]]; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+ has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+ # Run CTest (test-units)
+ cmake-utils_src_test
+ retstatus_unit=$?
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+ # Enable parallel testing, auto will try to detect number of cores
+ # You may set this by hand.
+ # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+ export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+ # 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"
+ # These are failing in MariaDB 10.0 for now and are believed to be
+ # false positives:
+ #
+ # main.mysql_client_test, main.mysql_client_test_nonblock
+ # main.mysql_client_test_comp:
+ # segfaults at random under Portage only, suspect resource limits.
+
+ local t
+ for t in plugins.cracklib_password_check plugins.two_password_validations ; do
+ _disable_test "$t" "False positive due to varying policies"
+ done
+
+ for t in main.mysql_client_test main.mysql_client_test_nonblock \
+ main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam ; do
+ _disable_test "$t" "False positives in Gentoo"
+ done
+
+ _disable_test main.plugin_auth "Needs client libraries built"
+
+ # 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"
+}
+
+mysql_init_vars() {
+ MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mariadb"}
+ MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+ MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+ MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ MY_DATADIR=""
+ if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
+ MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+ | sed -ne '/datadir/s|^--datadir=||p' \
+ | tail -n1`
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
+ | sed -e 's/.*=\s*//' \
+ | tail -n1`
+ fi
+ fi
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ MY_DATADIR="${MY_LOCALSTATEDIR}"
+ einfo "Using default MY_DATADIR"
+ fi
+ elog "MySQL MY_DATADIR is ${MY_DATADIR}"
+
+ if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
+ if [[ -e "${MY_DATADIR}" ]] ; then
+ # If you get this and you're wondering about it, see bug #207636
+ elog "MySQL datadir found in ${MY_DATADIR}"
+ elog "A new one will not be created."
+ PREVIOUS_DATADIR="yes"
+ else
+ PREVIOUS_DATADIR="no"
+ fi
+ export PREVIOUS_DATADIR
+ fi
+ else
+ if [[ ${EBUILD_PHASE} == "config" ]]; then
+ local new_MY_DATADIR
+ new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+ | sed -ne '/datadir/s|^--datadir=||p' \
+ | tail -n1`
+
+ if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
+ ewarn "MySQL MY_DATADIR has changed"
+ ewarn "from ${MY_DATADIR}"
+ ewarn "to ${new_MY_DATADIR}"
+ MY_DATADIR="${new_MY_DATADIR}"
+ fi
+ fi
+ fi
+
+ export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+ export MY_LOCALSTATEDIR MY_LOGDIR
+ export MY_DATADIR
+}
+
+pkg_config() {
+ _getoptval() {
+ local mypd="${EROOT}"/usr/bin/my_print_defaults
+ local section="$1"
+ local flag="--${2}="
+ local extra_options="${3}"
+ "${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
+ }
+ local old_MY_DATADIR="${MY_DATADIR}"
+ local old_HOME="${HOME}"
+ # my_print_defaults needs to read stuff in $HOME/.my.cnf
+ export HOME=${EPREFIX}/root
+
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ [[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
+ if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
+ die "Minimal builds do NOT include the MySQL server"
+ fi
+
+ if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
+ local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
+ MY_DATADIR_s="${MY_DATADIR_s%%/}"
+ local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
+ old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
+
+ if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
+ if [[ -d "${MY_DATADIR_s}" ]]; then
+ ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
+ ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
+ else
+ elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
+ mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
+ || die "Moving MY_DATADIR failed"
+ fi
+ else
+ ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
+ if [[ -d "${MY_DATADIR_s}" ]]; then
+ ewarn "Attempting to use ${MY_DATADIR_s}"
+ else
+ eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
+ die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
+ fi
+ fi
+ fi
+
+ local pwd1="a"
+ local pwd2="b"
+ local maxtry=15
+
+ 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
+ MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
+ # These are dir+prefix
+ MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
+ MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+ MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
+ MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+
+ if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
+ einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
+ install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
+ fi
+ if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
+ einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
+ install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
+ fi
+ if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
+ einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
+ install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
+ fi
+
+ if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
+ ewarn "You have already a MySQL database in place."
+ ewarn "(${ROOT}/${MY_DATADIR}/*)"
+ ewarn "Please rename or delete it if you wish to replace it."
+ die "MySQL database already exists!"
+ fi
+
+ # 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 "${MYSQL_ROOT_PASSWORD}" ]; then
+
+ einfo "Please provide a password for the mysql 'root' user now"
+ einfo "or through the ${HOME}/.my.cnf file."
+ ewarn "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
+ fi
+
+ local options
+ local sqltmp="$(emktemp)"
+
+ # Fix bug 446200. Don't reference host my.cnf, needs to come first,
+ # see https://bugs.mysql.com/bug.php?id=31312
+ use prefix && options="${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
+ for opt in grant-tables 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}" && options="${options} ${optfull}"
+ done
+
+ einfo "Creating the mysql database and setting proper permissions on it ..."
+
+ # Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
+ PID_DIR="${EROOT}/var/run/mysqld"
+ if [[ ! -d "${PID_DIR}" ]]; then
+ install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
+ fi
+
+ if [[ ! -d "${MY_DATADIR}" ]]; then
+ install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
+ fi
+
+ pushd "${TMPDIR}" &>/dev/null || die
+
+ # Filling timezones, see
+ # https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+ "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
+
+ local cmd=( "${EROOT}usr/share/mariadb/scripts/mysql_install_db" )
+ [[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
+ cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
+ einfo "Command: ${cmd[*]}"
+ su -s /bin/sh -c "${cmd[*]}" mysql \
+ >"${TMPDIR}"/mysql_install_db.log 2>&1
+ if [ $? -ne 0 ]; then
+ grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
+ die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
+ fi
+ popd &>/dev/null || die
+ [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
+ || die "MySQL databases not installed"
+
+ use prefix || options="${options} --user=mysql"
+
+ local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
+ local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
+ local mysqld="${EROOT}/usr/sbin/mysqld \
+ ${options} \
+ --log-warnings=0 \
+ --basedir=${EROOT}/usr \
+ --datadir=${ROOT}/${MY_DATADIR} \
+ --max_allowed_packet=8M \
+ --net_buffer_length=16K \
+ --socket=${socket} \
+ --pid-file=${pidfile}
+ --tmpdir=${ROOT}/${MYSQL_TMPDIR}"
+ #einfo "About to start mysqld: ${mysqld}"
+ ebegin "Starting mysqld"
+ einfo "Command ${mysqld}"
+ ${mysqld} &
+ rc=$?
+ while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
+ maxtry=$((${maxtry}-1))
+ echo -n "."
+ sleep 1
+ done
+ eend $rc
+
+ if ! [[ -S "${socket}" ]]; then
+ die "Completely failed to start up mysqld with: ${mysqld}"
+ fi
+
+ ebegin "Setting root password"
+ # Do this from memory, as we don't want clear text passwords in temp files
+ local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
+ "${EROOT}/usr/bin/mysql" \
+ "--socket=${socket}" \
+ -hlocalhost \
+ -e "${sql}"
+ eend $?
+
+ if [[ -n "${sqltmp}" ]] ; then
+ ebegin "Loading \"zoneinfo\", this step may require a few seconds"
+ "${EROOT}/usr/bin/mysql" \
+ "--socket=${socket}" \
+ -hlocalhost \
+ -uroot \
+ --password="${MYSQL_ROOT_PASSWORD}" \
+ mysql < "${sqltmp}"
+ rc=$?
+ eend $?
+ [[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
+ fi
+
+ # Stop the server and cleanup
+ einfo "Stopping the server ..."
+ kill $(< "${pidfile}" )
+ rm -f "${sqltmp}"
+ wait %1
+ einfo "Done"
+}
diff --git a/dev-db/mariadb/mariadb-5.5.60.ebuild b/dev-db/mariadb/mariadb-5.5.60.ebuild
new file mode 100644
index 000000000000..84fdbafdf4a2
--- /dev/null
+++ b/dev-db/mariadb/mariadb-5.5.60.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+MY_EXTRAS_VER="20160721-1526Z"
+
+# Build system
+BUILD="cmake"
+
+inherit toolchain-funcs mysql-v2
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+ ssl? ( !>=dev-libs/openssl-1.1 )"
+RDEPEND="${RDEPEND}"
+SLOT="0/18"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# Official test instructions:
+# USE='extraengine perl ssl static-libs community' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mariadb-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+ local TESTDIR="${BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ # 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 ! use "minimal" ; then
+
+ if [[ $UID -eq 0 ]]; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+ has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ addpredict /this-dir-does-not-exist/t9.MYI
+
+ # Run CTest (test-units)
+ cmake-utils_src_test
+ retstatus_unit=$?
+ [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+ # Enable parallel testing, auto will try to detect number of cores
+ # You may set this by hand.
+ # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+ export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+ # create directories because mysqladmin might right out of order
+ mkdir -p "${T}"/var-tests{,/log}
+
+ # create symlink for the tests to find the replace util
+ ln -s "${BUILD_DIR}/extra/replace" "${BUILD_DIR}/client/"
+
+ # These are failing in MariaDB 5.5 for now and are believed to be
+ # false positives:
+ #
+ # main.information_schema, binlog.binlog_statement_insert_delayed,
+ # main.mysqld--help, funcs_1.is_triggers, funcs_1.is_tables_mysql,
+ # funcs_1.is_columns_mysql
+ # fails due to USE=-latin1 / utf8 default
+ #
+ # main.mysql_client_test, main.mysql_client_test_nonblock:
+ # segfaults at random under Portage only, suspect resource limits.
+ #
+ # archive.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+ # fails due to bad cleanup of previous tests when run in parallel
+ # The tool is deprecated anyway
+ # Bug 532288
+
+ for t in main.mysql_client_test main.mysql_client_test_nonblock \
+ binlog.binlog_statement_insert_delayed main.information_schema \
+ main.mysqld--help \
+ archive.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
+ funcs_1.is_triggers funcs_1.is_tables_mysql funcs_1.is_columns_mysql ; do
+ mysql-v2_disable_test "$t" "False positives in Gentoo"
+ done
+
+ # Run mysql tests
+ pushd "${TESTDIR}"
+
+ # run mysql-test tests
+ perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+ --testcase-timeout=30
+ retstatus_tests=$?
+ [[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+ has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+ popd
+
+ # Cleanup is important for these testcases.
+ pkill -9 -f "${S}/ndb" 2>/dev/null
+ pkill -9 -f "${S}/sql" 2>/dev/null
+
+ failures=""
+ [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+ [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+ has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+ [[ -z "$failures" ]] || die "Test failures: $failures"
+ einfo "Tests successfully completed"
+
+ else
+
+ einfo "Skipping server tests due to minimal build."
+ fi
+}
diff --git a/dev-db/mariadb/metadata.xml b/dev-db/mariadb/metadata.xml
new file mode 100644
index 000000000000..dc1b8fcb633a
--- /dev/null
+++ b/dev-db/mariadb/metadata.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>mysql-bugs@gentoo.org</email>
+ <name>MySQL</name>
+ </maintainer>
+<use>
+ <flag name="backup">Build mariadb-backup which supports SST and hot backup of InnoDB, Aria and MyISAM including compression and encryption</flag>
+ <flag name="client-libs">Build the client libraries from the server package instead of the C Connector packages</flag>
+ <flag name="cluster">Add support for NDB clustering (deprecated)</flag>
+ <flag name="community">Enables the community features from upstream.</flag>
+ <flag name="embedded">Build embedded server (libmysqld)</flag>
+ <flag name="extraengine">Add support for alternative storage engines (Archive, CSV, Blackhole, Federated(X), Partition)</flag>
+ <flag name="galera">Enables galera replication</flag>
+ <flag name="innodb-lz4">Enables lz4 compression methods for InnoDB/XtraDB</flag>
+ <flag name="innodb-lzo">Enables lzo compression methods for InnoDB/XtraDB</flag>
+ <flag name="innodb-snappy">Enables snappy compression methods for InnoDB/XtraDB using <pkg>app-arch/snappy</pkg></flag>
+ <flag name="jdbc">Enable the CONNECT engine to access foreign databases via JDBC</flag>
+ <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for allocations.</flag>
+ <flag name="latin1">Use LATIN1 encoding instead of UTF8</flag>
+ <flag name="libressl">Enable SSL connections and crypto functions using <pkg>dev-libs/libressl</pkg></flag>
+ <flag name="max-idx-128">Raise the max index per table limit from 64 to 128</flag>
+ <flag name="minimal">Install client programs only, no server</flag>
+ <flag name="mroonga">Add support for the Mroonga engine for interfacing with the Groonga text search</flag>
+ <flag name="numa">Enable NUMA support using sys-process/numactl (NUMA kernel support is also required)</flag>
+ <flag name="openssl">Enable SSL connections and crypto functions using <pkg>dev-libs/openssl</pkg></flag>
+ <flag name="oqgraph">Add support for the Open Query GRAPH engine</flag>
+ <flag name="pam">Enable the optional PAM authentication plugin for the server</flag>
+ <flag name="profiling">Add support for statement profiling (requires USE=community).</flag>
+ <flag name="rocksdb">Add support for RocksDB; a key/value, LSM database optimized for flash storage</flag>
+ <flag name="server">Build the server program</flag>
+ <flag name="sphinx">Add suport for the sphinx full-text search engine</flag>
+ <flag name="sst-rsync">Add tools needed to support the rsync SST method</flag>
+ <flag name="sst-mariabackup">Add tools needed to support the mariabackup SST method</flag>
+ <flag name="sst-xtrabackup">Add tools needed to support the xtrabackup and xtrabackup-v2 SST methods</flag>
+ <flag name="systemtap">Build support for profiling and tracing using <pkg>dev-util/systemtap</pkg></flag>
+ <flag name="test">Install upstream testsuites for end use.</flag>
+ <flag name="tokudb">Add support for TokuDB storage engine</flag>
+ <flag name="yassl">Enable SSL connections and crypto functions using the bundled yaSSL</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-db/metadata.xml b/dev-db/metadata.xml
new file mode 100644
index 000000000000..7ef0dd98662b
--- /dev/null
+++ b/dev-db/metadata.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<catmetadata>
+ <longdescription lang="en">
+ The dev-db category contains libraries and utilities for database
+ related programming.
+ </longdescription>
+ <longdescription lang="de">
+ Die Kategorie dev-db enhält Bibliotheken und Werkzeuge für die
+ Datenbank-Programmierung.
+ </longdescription>
+ <longdescription lang="es">
+ La categoría dev-db contiene librerias y utilidades para programación
+ referente a bases de datos.
+ </longdescription>
+ <longdescription lang="ja">
+ dev-dbカテゴリーにはデータベース・プログラミングに関連したライブラリーと
+ ユーティリティが含まれます。
+ </longdescription>
+ <longdescription lang="nl">
+ De dev-db categorie bevat bibliotheken en hulpmiddelen voor het gebruik
+ van verschillende database-programmeertalen.
+ </longdescription>
+ <longdescription lang="vi">
+ Nhóm dev-db chứa các thư viện và tiện ích liên quan
+ đến Cơ sở dữ liệu.
+ </longdescription>
+ <longdescription lang="it">
+ La categoria dev-db contiene librerie ed utilità per la programmazione di basi di dati.
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria dev-db contém bibliotecas e utilitários para a
+ programação relacionada a bancos de dados.
+ </longdescription>
+ <longdescription lang="pl">
+ Kategoria dev-db zawiera biblioteki i narzędzia związane z
+ programowaniem związanym z bazami danych.
+ </longdescription>
+</catmetadata>
+
diff --git a/dev-db/metakit-2.4.9.7-r2 b/dev-db/metakit-2.4.9.7-r2
deleted file mode 100644
index c04df1cc6070..000000000000
--- a/dev-db/metakit-2.4.9.7-r2
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup
-DEPEND=python? ( python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] ) tcl? ( >=dev-lang/tcl-8.6:0= )
-DESCRIPTION=Embedded database library
-EAPI=5
-HOMEPAGE=http://www.equi4.com/metakit/
-IUSE=python static tcl python_targets_python2_7
-KEYWORDS=amd64 ppc x86
-LICENSE=MIT
-RDEPEND=python? ( python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] ) tcl? ( >=dev-lang/tcl-8.6:0= )
-REQUIRED_USE=python? ( python_targets_python2_7 )
-RESTRICT=test
-SLOT=0
-SRC_URI=http://www.equi4.com/pub/mk/metakit-2.4.9.7.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 python-single-r1 26fdbe5e685d53f67303a3a43d9e4848 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=a9a84210474e571d924c116b6553d797
diff --git a/dev-db/metakit/Manifest b/dev-db/metakit/Manifest
new file mode 100644
index 000000000000..49ea87413af7
--- /dev/null
+++ b/dev-db/metakit/Manifest
@@ -0,0 +1,5 @@
+AUX metakit-2.4.9.7-linking.patch 1802 BLAKE2B f1fce55fd9a8ea551752e290a86539c4f585ac3481965909428913b8a487adde302aa6b2c891516a4fff5dc27a1320eb25f1dca226133ed7eefd39f69bc33d23 SHA512 911675e8ed060ba662df4bed55a9357bcbebaecb5bf4abe37218f8030aa057c36ed01a851c6d266d8d8fdb94a81ee78d547d86b99f96f8e81809dc4d94209f37
+AUX metakit-2.4.9.7-tcltk86.patch 2449 BLAKE2B 69415f4525e47952fba3f22e10c502e56a550e549c88ce50d989bb6fdcc8f9bc5116960b33b6153d58ac3a87d484fe200f970eac9ca148f975552b5b22c691c3 SHA512 1d17157ea8e384bb9094ab937b1ac6854c5a140feb574fa53adf6fcc0dab4060a0f6da9008509f3d924bc1e0e84d6663778605ca506fdec99af39610f1f509b7
+DIST metakit-2.4.9.7.tar.gz 868310 BLAKE2B 2c32d17f8f7fcc709c6861834bc08b0dbeb009e73ade98b5103cdc9e58feb4318599ea0253c78e54093763796c16c55b26ca481e6cc883d482af55c3b5534a2f SHA512 94be6ae8ae5f1f24d255a427b0c01eccd2543cd49c5620df7c47f5bf09854ed464a01c52fc8441f7a8e9d5bdc8b966dc77ed34c15cbf9cdfe75a3063572cb8b9
+EBUILD metakit-2.4.9.7-r2.ebuild 1838 BLAKE2B f94ee1d7bdf5918b63abb2e69fa758c63bf01d6694d3945c78a76277b6f115a2e7ce0d0e21ecf046c932b3e6005b69673e088f0c5b93ac1159ba6ded2b0b991c SHA512 eb8b3e0e8305e44c751d46c468bb6719a89f8b5e8b206a80c61c3461437c6b65916167c31d031aaa30cb6cfa9913999dc5b413ca5bc2b069a15022080439ae91
+MISC metadata.xml 166 BLAKE2B c254f1fb642881aba57637be14fb0a89b10384f91a128feaec3a8c870d76efc2cbacb92caccc0dee2dd19a5ac5eaf8643080dafa05c4e2ac96a68568927e5afd SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84
diff --git a/dev-db/metakit/files/metakit-2.4.9.7-linking.patch b/dev-db/metakit/files/metakit-2.4.9.7-linking.patch
new file mode 100644
index 000000000000..55453a2d8e4a
--- /dev/null
+++ b/dev-db/metakit/files/metakit-2.4.9.7-linking.patch
@@ -0,0 +1,45 @@
+ unix/Makefile.in | 10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/unix/Makefile.in b/unix/Makefile.in
+index bf187ba..763558f 100755
+--- a/unix/Makefile.in
++++ b/unix/Makefile.in
+@@ -43,7 +43,7 @@ CXX_FLAGS = @CPPFLAGS@ @CXXFLAGS@ @MK_THREADS@ @SHLIB_CFLAGS@ \
+ # (e.g. in Mk4py). This does not affect standard operation, *only* errors.
+ # Happens in gcc 2.95.3, it has been disabled for now (even though slower).
+ #CXXFLAGS = -fomit-frame-pointer $(CXX_FLAGS)
+-CXXFLAGS = $(CXX_FLAGS)
++CXXFLAGS += -I$(srcdir)/../include
+ #CXXFLAGS = -Dq4_CHECK $(CXX_FLAGS)
+ #CXXFLAGS = -Wall -pedantic -Wno-unused $(CXX_FLAGS)
+
+@@ -134,24 +134,24 @@ libmk4$(LIB_SUFFIX): $(LOBJS)
+ ranlib $@
+
+ libmk4$(SHLIB_SUFFIX): $(LOBJS) $(LINK_SPECIAL_FILES)
+- $(SHLIB_LD) -o $@ $(LOBJS) $(LINK_SPECIAL_FLAGS)
++ $(SHLIB_LD) $(LDFLAGS) -o $@ $(LOBJS) $(LINK_SPECIAL_FLAGS)
+
+ Mk4tcl$(LIB_SUFFIX): mk4tcl.o mk4too.o $(LOBJS)
+ ar rcu $@ mk4tcl.o mk4too.o $(LOBJS)
+ ranlib $@
+
+ Mk4tcl$(SHLIB_SUFFIX): mk4tcl.o mk4too.o $(LOBJS) $(LINK_SPECIAL_FILES)
+- $(SHLIB_LD) -o $@ mk4tcl.o mk4too.o $(LOBJS) $(LINK_SPECIAL_FLAGS)
++ $(SHLIB_LD) $(LDFLAGS) -o $@ mk4tcl.o mk4too.o $(LOBJS) $(LINK_SPECIAL_FLAGS)
+
+ Mk4py$(LIB_SUFFIX): $(PYOBJS) $(LOBJS)
+ ar cru $@ $(PYOBJS) $(LOBJS)
+ ranlib $@
+
+ Mk4py$(SHLIB_SUFFIX): $(PYOBJS) $(LOBJS) $(LINK_SPECIAL_FILES)
+- $(SHLIB_LD) -o $@ $(PYOBJS) $(LOBJS) $(LINK_SPECIAL_FLAGS)
++ $(SHLIB_LD) $(LDFLAGS) -o $@ $(PYOBJS) -L. -lmk4 $(LINK_SPECIAL_FLAGS) $(PYTHON_LIB)
+
+ Mk4lua$(SHLIB_SUFFIX): mk4lua.o $(LOBJS) $(LINK_SPECIAL_FILES)
+- $(SHLIB_LD) -o $@ mk4lua.o $(LOBJS) $(LINK_SPECIAL_FLAGS)
++ $(SHLIB_LD) $(LDFLAGS) -o $@ mk4lua.o $(LOBJS) $(LINK_SPECIAL_FLAGS)
+
+ demo: $(srcdir)/../demos/demo.cpp libmk4$(LIBEXT)
+ $(CXX) $(CXX_SWITCHES) -o $@$(EXEEXT) \
diff --git a/dev-db/metakit/files/metakit-2.4.9.7-tcltk86.patch b/dev-db/metakit/files/metakit-2.4.9.7-tcltk86.patch
new file mode 100644
index 000000000000..cbf4ce3549f6
--- /dev/null
+++ b/dev-db/metakit/files/metakit-2.4.9.7-tcltk86.patch
@@ -0,0 +1,70 @@
+ tcl/mk4tcl.cpp | 10 +++++++---
+ tcl/mk4too.cpp | 6 +++++-
+ 2 files changed, 12 insertions(+), 4 deletions(-)
+
+diff --git a/tcl/mk4tcl.cpp b/tcl/mk4tcl.cpp
+index 049bf8e..8d2249e 100755
+--- a/tcl/mk4tcl.cpp
++++ b/tcl/mk4tcl.cpp
+@@ -28,6 +28,10 @@
+ #define MyInitStubs(x) 1
+ #endif
+
++#if 10 * TCL_MAJOR_VERSION + TCL_MINOR_VERSION < 86
++#define Tcl_GetErrorLine(interp) (interp)->errorLine
++#endif
++
+ // definition of valid property name - alpha numerics, underscore, percent,
+ // or any extended utf-8 character
+ #define ISNAME(c) (isalnum((c)) || (c) == '_' || (c) == '%' || (c) & 0x80)
+@@ -979,7 +983,7 @@ const c4_Property &AsProperty(Tcl_Obj *objPtr, const c4_View &view_) {
+ void *tag = (&view_[0])._seq; // horrific hack to get at c4_Sequence pointer
+ if (objPtr->typePtr != &mkPropertyType || objPtr
+ ->internalRep.twoPtrValue.ptr1 != tag) {
+- Tcl_ObjType *oldTypePtr = objPtr->typePtr;
++ CONST86 Tcl_ObjType *oldTypePtr = objPtr->typePtr;
+
+ char type = 'S';
+
+@@ -1083,7 +1087,7 @@ int SetCursorFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr) {
+ }
+
+ if (objPtr->typePtr != &mkCursorType) {
+- Tcl_ObjType *oldTypePtr = objPtr->typePtr;
++ CONST86 Tcl_ObjType *oldTypePtr = objPtr->typePtr;
+
+ const char *string = Tcl_GetStringFromObj(objPtr, 0);
+
+@@ -2156,7 +2160,7 @@ int MkTcl::LoopCmd() {
+ _error = TCL_OK;
+ else if (_error == TCL_ERROR) {
+ char msg[100];
+- sprintf(msg, "\n (\"mk::loop\" body line %d)", interp->errorLine);
++ sprintf(msg, "\n (\"mk::loop\" body line %d)", Tcl_GetErrorLine(interp));
+ Tcl_AddObjErrorInfo(interp, msg, - 1);
+ }
+ break;
+diff --git a/tcl/mk4too.cpp b/tcl/mk4too.cpp
+index 7c845c0..ffcbc4e 100644
+--- a/tcl/mk4too.cpp
++++ b/tcl/mk4too.cpp
+@@ -7,6 +7,10 @@
+ #include <stdio.h>
+ #include <string.h>
+
++#if 10 * TCL_MAJOR_VERSION + TCL_MINOR_VERSION < 86
++#define Tcl_GetErrorLine(interp) (interp)->errorLine
++#endif
++
+ ///////////////////////////////////////////////////////////////////////////////
+ // Defined in this file:
+
+@@ -612,7 +616,7 @@ int MkView::LoopCmd() {
+ _error = TCL_OK;
+ else if (_error == TCL_ERROR) {
+ char msg[100];
+- sprintf(msg, "\n (\"mk::loop\" body line %d)", interp->errorLine);
++ sprintf(msg, "\n (\"mk::loop\" body line %d)", Tcl_GetErrorLine(interp));
+ Tcl_AddObjErrorInfo(interp, msg, - 1);
+ }
+ break;
diff --git a/dev-db/metakit/metadata.xml b/dev-db/metakit/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/dev-db/metakit/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/dev-db/metakit/metakit-2.4.9.7-r2.ebuild b/dev-db/metakit/metakit-2.4.9.7-r2.ebuild
new file mode 100644
index 000000000000..6f734ed0c15c
--- /dev/null
+++ b/dev-db/metakit/metakit-2.4.9.7-r2.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils flag-o-matic multilib python-single-r1 toolchain-funcs
+
+DESCRIPTION="Embedded database library"
+HOMEPAGE="http://www.equi4.com/metakit/"
+SRC_URI="http://www.equi4.com/pub/mk/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="python static tcl"
+
+DEPEND="
+ python? ( ${PYTHON_DEPS} )
+ tcl? ( >=dev-lang/tcl-8.6:0= )"
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RESTRICT="test"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-linking.patch \
+ "${FILESDIR}"/${P}-tcltk86.patch
+}
+
+src_configure() {
+ local myconf mycxxflags
+ use tcl && myconf+=" --with-tcl=${EPREFIX}/usr/include,${EPREFIX}/usr/$(get_libdir)"
+ use static && myconf+=" --disable-shared"
+ use static || append-cxxflags -fPIC
+
+ CXXFLAGS="${CXXFLAGS} ${mycxxflags}" unix/configure \
+ ${myconf} \
+ --host=${CHOST} \
+ --prefix="${EPREFIX}/usr" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --infodir="${EPREFIX}/usr/share/info" \
+ --mandir="${EPREFIX}/usr/share/man"
+}
+
+src_compile() {
+ emake SHLIB_LD="$(tc-getCXX) -shared -Wl,-soname,libmk4.so.2.4"
+
+ if use python; then
+ emake \
+ SHLIB_LD="$(tc-getCXX) -shared" \
+ pyincludedir="$(python_get_includedir)" \
+ PYTHON_LIB="-l${EPYTHON}" \
+ python
+ fi
+}
+
+src_install () {
+ default
+
+ mv "${ED}"//usr/$(get_libdir)/libmk4.so{,.2.4}
+ dosym libmk4.so.2.4 /usr/$(get_libdir)/libmk4.so.2
+ dosym libmk4.so.2.4 /usr/$(get_libdir)/libmk4.so
+
+ if use python; then
+ mkdir -p "${D%/}$(python_get_sitedir)" || die
+ emake \
+ DESTDIR="${D}" \
+ pylibdir="$(python_get_sitedir)" \
+ install-python
+ fi
+
+ dohtml Metakit.html
+ dohtml -a html,gif,png,jpg -r doc/*
+}
diff --git a/dev-db/mongodb-3.0.14 b/dev-db/mongodb-3.0.14
deleted file mode 100644
index 768c731d7650..000000000000
--- a/dev-db/mongodb-3.0.14
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile install postinst preinst pretend setup test
-DEPEND=app-arch/snappy >=dev-cpp/yaml-cpp-0.5.1 >=dev-libs/boost-1.57[threads(+)] >=dev-libs/libpcre-8.39[cxx] dev-libs/snowball-stemmer net-libs/libpcap sys-libs/zlib mms-agent? ( app-admin/mms-agent ) ssl? ( !libressl? ( >=dev-libs/openssl-1.0.1g:0= ) libressl? ( dev-libs/libressl:0= ) ) >=sys-devel/gcc-4.8.2:* sys-libs/ncurses sys-libs/readline kerberos? ( dev-libs/cyrus-sasl[kerberos] ) >=dev-util/scons-2.3.0[python_targets_python2_7] virtual/pkgconfig
-DESCRIPTION=A high-performance, open source, schema-free document-oriented database
-EAPI=6
-HOMEPAGE=http://www.mongodb.org
-IUSE=debug kerberos libressl mms-agent ssl +tools
-KEYWORDS=amd64 x86
-LICENSE=AGPL-3 Apache-2.0
-PDEPEND=tools? ( >=app-admin/mongo-tools-3.0.14 )
-RDEPEND=app-arch/snappy >=dev-cpp/yaml-cpp-0.5.1 >=dev-libs/boost-1.57[threads(+)] >=dev-libs/libpcre-8.39[cxx] dev-libs/snowball-stemmer net-libs/libpcap sys-libs/zlib mms-agent? ( app-admin/mms-agent ) ssl? ( !libressl? ( >=dev-libs/openssl-1.0.1g:0= ) libressl? ( dev-libs/libressl:0= ) )
-SLOT=0
-SRC_URI=http://downloads.mongodb.org/src/mongodb-src-r3.0.14.tar.gz
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 scons-utils abbc7625ff457854eae0edaa1fd55cc7 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=c3dc23a16603633f83356d5e5bf7ffd3
diff --git a/dev-db/mongodb-3.0.15 b/dev-db/mongodb-3.0.15
deleted file mode 100644
index f4d246d2fbfd..000000000000
--- a/dev-db/mongodb-3.0.15
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile install postinst preinst pretend setup test
-DEPEND=app-arch/snappy >=dev-cpp/yaml-cpp-0.5.1 >=dev-libs/boost-1.57[threads(+)] >=dev-libs/libpcre-8.39[cxx] dev-libs/snowball-stemmer net-libs/libpcap sys-libs/zlib mms-agent? ( app-admin/mms-agent ) ssl? ( !libressl? ( >=dev-libs/openssl-1.0.1g:0= ) libressl? ( dev-libs/libressl:0= ) ) >=sys-devel/gcc-4.8.2:* sys-libs/ncurses sys-libs/readline kerberos? ( dev-libs/cyrus-sasl[kerberos] ) >=dev-util/scons-2.3.0[python_targets_python2_7] virtual/pkgconfig
-DESCRIPTION=A high-performance, open source, schema-free document-oriented database
-EAPI=6
-HOMEPAGE=http://www.mongodb.org
-IUSE=debug kerberos libressl mms-agent ssl +tools
-KEYWORDS=~amd64 ~x86
-LICENSE=AGPL-3 Apache-2.0
-PDEPEND=tools? ( >=app-admin/mongo-tools-3.0.15 )
-RDEPEND=app-arch/snappy >=dev-cpp/yaml-cpp-0.5.1 >=dev-libs/boost-1.57[threads(+)] >=dev-libs/libpcre-8.39[cxx] dev-libs/snowball-stemmer net-libs/libpcap sys-libs/zlib mms-agent? ( app-admin/mms-agent ) ssl? ( !libressl? ( >=dev-libs/openssl-1.0.1g:0= ) libressl? ( dev-libs/libressl:0= ) )
-SLOT=0
-SRC_URI=http://downloads.mongodb.org/src/mongodb-src-r3.0.15.tar.gz
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 scons-utils abbc7625ff457854eae0edaa1fd55cc7 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=c1f83b405175aa40d8e8aa94633c279d
diff --git a/dev-db/mongodb-3.2.17 b/dev-db/mongodb-3.2.17
deleted file mode 100644
index f4d81cf02e95..000000000000
--- a/dev-db/mongodb-3.2.17
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile install postinst preinst pretend setup test
-DEPEND=>=app-arch/snappy-1.1.2 >=dev-cpp/yaml-cpp-0.5.1 >=dev-libs/boost-1.57:=[threads(+)] >=dev-libs/libpcre-8.39[cxx] dev-libs/snowball-stemmer net-libs/libpcap >=sys-libs/zlib-1.2.8:= mms-agent? ( app-admin/mms-agent ) ssl? ( !libressl? ( >=dev-libs/openssl-1.0.1g:0= ) libressl? ( dev-libs/libressl:0= ) ) =dev-lang/python-2* <dev-util/scons-3 >=sys-devel/gcc-4.8.2:* sys-libs/ncurses sys-libs/readline debug? ( dev-util/valgrind ) kerberos? ( dev-libs/cyrus-sasl[kerberos] ) test? ( dev-python/pymongo dev-python/pyyaml ) || ( ( >=dev-lang/python-2.7.5-r2:2.7 >=dev-util/scons-2.3.0[python_targets_python2_7(-),python_single_target_python2_7(+)] ) ) virtual/pkgconfig
-DESCRIPTION=A high-performance, open source, schema-free document-oriented database
-EAPI=6
-HOMEPAGE=http://www.mongodb.org
-IUSE=debug kerberos libressl mms-agent ssl test +tools
-KEYWORDS=amd64 ~x86
-LICENSE=AGPL-3 Apache-2.0
-PDEPEND=tools? ( >=app-admin/mongo-tools-3.2.17 )
-RDEPEND=>=app-arch/snappy-1.1.2 >=dev-cpp/yaml-cpp-0.5.1 >=dev-libs/boost-1.57:=[threads(+)] >=dev-libs/libpcre-8.39[cxx] dev-libs/snowball-stemmer net-libs/libpcap >=sys-libs/zlib-1.2.8:= mms-agent? ( app-admin/mms-agent ) ssl? ( !libressl? ( >=dev-libs/openssl-1.0.1g:0= ) libressl? ( dev-libs/libressl:0= ) )
-SLOT=0
-SRC_URI=https://fastdl.mongodb.org/src/mongodb-src-r3.2.17.tar.gz
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-any-r1 6faea633ae2f79f6d55dcfd431b79fbf python-utils-r1 7db901256449fef43c3aaa4d486c1c63 scons-utils abbc7625ff457854eae0edaa1fd55cc7 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=05db0b017fcb81d63bf3d078d8d364ce
diff --git a/dev-db/mongodb-3.4.10 b/dev-db/mongodb-3.4.10
deleted file mode 100644
index ff1f619fd187..000000000000
--- a/dev-db/mongodb-3.4.10
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile install postinst preinst pretend setup test
-DEPEND=>=app-arch/snappy-1.1.3 >=dev-cpp/yaml-cpp-0.5.3 >=dev-libs/boost-1.60:=[threads(+)] >=dev-libs/libpcre-8.41[cxx] dev-libs/snowball-stemmer net-libs/libpcap >=sys-libs/zlib-1.2.8:= mms-agent? ( app-admin/mms-agent ) ssl? ( !libressl? ( >=dev-libs/openssl-1.0.1g:0= ) libressl? ( dev-libs/libressl:0= ) ) =dev-lang/python-2* <dev-util/scons-3 >=sys-devel/gcc-5.3.0:* sys-libs/ncurses sys-libs/readline debug? ( dev-util/valgrind ) kerberos? ( dev-libs/cyrus-sasl[kerberos] ) test? ( dev-python/pymongo dev-python/pyyaml ) || ( ( >=dev-lang/python-2.7.5-r2:2.7 >=dev-util/scons-2.3.0[python_targets_python2_7(-),python_single_target_python2_7(+)] ) ) virtual/pkgconfig
-DESCRIPTION=A high-performance, open source, schema-free document-oriented database
-EAPI=6
-HOMEPAGE=http://www.mongodb.org
-IUSE=debug kerberos libressl mms-agent ssl test +tools
-KEYWORDS=amd64
-LICENSE=AGPL-3 Apache-2.0
-PDEPEND=tools? ( >=app-admin/mongo-tools-3.4.10 )
-RDEPEND=>=app-arch/snappy-1.1.3 >=dev-cpp/yaml-cpp-0.5.3 >=dev-libs/boost-1.60:=[threads(+)] >=dev-libs/libpcre-8.41[cxx] dev-libs/snowball-stemmer net-libs/libpcap >=sys-libs/zlib-1.2.8:= mms-agent? ( app-admin/mms-agent ) ssl? ( !libressl? ( >=dev-libs/openssl-1.0.1g:0= ) libressl? ( dev-libs/libressl:0= ) )
-SLOT=0
-SRC_URI=https://fastdl.mongodb.org/src/mongodb-src-r3.4.10.tar.gz
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-any-r1 6faea633ae2f79f6d55dcfd431b79fbf python-utils-r1 7db901256449fef43c3aaa4d486c1c63 scons-utils abbc7625ff457854eae0edaa1fd55cc7 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=22a06b7ab80265d981020d4007964bec
diff --git a/dev-db/mongodb-3.4.13 b/dev-db/mongodb-3.4.13
deleted file mode 100644
index dfed98aa971a..000000000000
--- a/dev-db/mongodb-3.4.13
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare pretend setup test
-DEPEND=>=app-arch/snappy-1.1.3 >=dev-cpp/yaml-cpp-0.5.3 >=dev-libs/boost-1.60:=[threads(+)] >=dev-libs/libpcre-8.41[cxx] dev-libs/snowball-stemmer net-libs/libpcap >=sys-libs/zlib-1.2.8:= mms-agent? ( app-admin/mms-agent ) ssl? ( !libressl? ( >=dev-libs/openssl-1.0.1g:0= ) libressl? ( dev-libs/libressl:0= ) ) python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] <dev-util/scons-3 sys-libs/ncurses sys-libs/readline debug? ( dev-util/valgrind ) kerberos? ( dev-libs/cyrus-sasl[kerberos] ) test? ( dev-python/pymongo[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] dev-python/pyyaml[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] ) >=dev-util/scons-2.3.0[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] virtual/pkgconfig
-DESCRIPTION=A high-performance, open source, schema-free document-oriented database
-EAPI=6
-HOMEPAGE=https://www.mongodb.com
-IUSE=debug kerberos libressl mms-agent ssl test +tools python_targets_python2_7
-KEYWORDS=~amd64
-LICENSE=AGPL-3 Apache-2.0
-PDEPEND=tools? ( >=app-admin/mongo-tools-3.4.13 )
-RDEPEND=>=app-arch/snappy-1.1.3 >=dev-cpp/yaml-cpp-0.5.3 >=dev-libs/boost-1.60:=[threads(+)] >=dev-libs/libpcre-8.41[cxx] dev-libs/snowball-stemmer net-libs/libpcap >=sys-libs/zlib-1.2.8:= mms-agent? ( app-admin/mms-agent ) ssl? ( !libressl? ( >=dev-libs/openssl-1.0.1g:0= ) libressl? ( dev-libs/libressl:0= ) )
-SLOT=0
-SRC_URI=https://fastdl.mongodb.org/src/mongodb-src-r3.4.13.tar.gz
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-single-r1 26fdbe5e685d53f67303a3a43d9e4848 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 scons-utils abbc7625ff457854eae0edaa1fd55cc7 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=86110a70daadf078c2773bfc57b63f82
diff --git a/dev-db/mongodb-3.4.14 b/dev-db/mongodb-3.4.14
deleted file mode 100644
index 32b03792ebe1..000000000000
--- a/dev-db/mongodb-3.4.14
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare pretend setup test
-DEPEND=>=app-arch/snappy-1.1.3 >=dev-cpp/yaml-cpp-0.5.3 >=dev-libs/boost-1.60:=[threads(+)] >=dev-libs/libpcre-8.41[cxx] dev-libs/snowball-stemmer net-libs/libpcap >=sys-libs/zlib-1.2.8:= mms-agent? ( app-admin/mms-agent ) ssl? ( !libressl? ( >=dev-libs/openssl-1.0.1g:0= ) libressl? ( dev-libs/libressl:0= ) ) python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] <dev-util/scons-3 sys-libs/ncurses sys-libs/readline debug? ( dev-util/valgrind ) kerberos? ( dev-libs/cyrus-sasl[kerberos] ) test? ( dev-python/pymongo[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] dev-python/pyyaml[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] ) >=dev-util/scons-2.3.0[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] virtual/pkgconfig
-DESCRIPTION=A high-performance, open source, schema-free document-oriented database
-EAPI=6
-HOMEPAGE=https://www.mongodb.com
-IUSE=debug kerberos libressl mms-agent ssl test +tools python_targets_python2_7
-KEYWORDS=~amd64
-LICENSE=AGPL-3 Apache-2.0
-PDEPEND=tools? ( >=app-admin/mongo-tools-3.4.14 )
-RDEPEND=>=app-arch/snappy-1.1.3 >=dev-cpp/yaml-cpp-0.5.3 >=dev-libs/boost-1.60:=[threads(+)] >=dev-libs/libpcre-8.41[cxx] dev-libs/snowball-stemmer net-libs/libpcap >=sys-libs/zlib-1.2.8:= mms-agent? ( app-admin/mms-agent ) ssl? ( !libressl? ( >=dev-libs/openssl-1.0.1g:0= ) libressl? ( dev-libs/libressl:0= ) )
-SLOT=0
-SRC_URI=https://fastdl.mongodb.org/src/mongodb-src-r3.4.14.tar.gz
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-single-r1 26fdbe5e685d53f67303a3a43d9e4848 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 scons-utils abbc7625ff457854eae0edaa1fd55cc7 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=86110a70daadf078c2773bfc57b63f82
diff --git a/dev-db/mongodb-3.4.15 b/dev-db/mongodb-3.4.15
deleted file mode 100644
index 301f944e254f..000000000000
--- a/dev-db/mongodb-3.4.15
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare pretend setup test
-DEPEND=>=app-arch/snappy-1.1.3 >=dev-cpp/yaml-cpp-0.5.3 >=dev-libs/boost-1.60:=[threads(+)] >=dev-libs/libpcre-8.41[cxx] dev-libs/snowball-stemmer net-libs/libpcap >=sys-libs/zlib-1.2.8:= mms-agent? ( app-admin/mms-agent ) ssl? ( !libressl? ( >=dev-libs/openssl-1.0.1g:0= ) libressl? ( dev-libs/libressl:0= ) ) python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] <dev-util/scons-3 sys-libs/ncurses sys-libs/readline debug? ( dev-util/valgrind ) kerberos? ( dev-libs/cyrus-sasl[kerberos] ) test? ( dev-python/pymongo[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] dev-python/pyyaml[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] ) >=dev-util/scons-2.3.0[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] virtual/pkgconfig
-DESCRIPTION=A high-performance, open source, schema-free document-oriented database
-EAPI=6
-HOMEPAGE=https://www.mongodb.com
-IUSE=debug kerberos libressl mms-agent ssl test +tools python_targets_python2_7
-KEYWORDS=~amd64
-LICENSE=AGPL-3 Apache-2.0
-PDEPEND=tools? ( >=app-admin/mongo-tools-3.4.15 )
-RDEPEND=>=app-arch/snappy-1.1.3 >=dev-cpp/yaml-cpp-0.5.3 >=dev-libs/boost-1.60:=[threads(+)] >=dev-libs/libpcre-8.41[cxx] dev-libs/snowball-stemmer net-libs/libpcap >=sys-libs/zlib-1.2.8:= mms-agent? ( app-admin/mms-agent ) ssl? ( !libressl? ( >=dev-libs/openssl-1.0.1g:0= ) libressl? ( dev-libs/libressl:0= ) )
-SLOT=0
-SRC_URI=https://fastdl.mongodb.org/src/mongodb-src-r3.4.15.tar.gz
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-single-r1 26fdbe5e685d53f67303a3a43d9e4848 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 scons-utils abbc7625ff457854eae0edaa1fd55cc7 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=86110a70daadf078c2773bfc57b63f82
diff --git a/dev-db/mongodb-3.6.2-r1 b/dev-db/mongodb-3.6.2-r1
deleted file mode 100644
index ca0613642ea1..000000000000
--- a/dev-db/mongodb-3.6.2-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare pretend setup test
-DEPEND=>=app-arch/snappy-1.1.3 >=dev-cpp/yaml-cpp-0.5.3 >=dev-libs/boost-1.60:=[threads(+)] >=dev-libs/libpcre-8.41[cxx] dev-libs/snowball-stemmer net-libs/libpcap >=sys-libs/zlib-1.2.8:= mms-agent? ( app-admin/mms-agent ) ssl? ( !libressl? ( >=dev-libs/openssl-1.0.1g:0= ) libressl? ( dev-libs/libressl:0= ) ) python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] dev-python/cheetah[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] dev-python/pyyaml[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] virtual/python-typing[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] <dev-util/scons-3 sys-libs/ncurses sys-libs/readline debug? ( dev-util/valgrind ) kerberos? ( dev-libs/cyrus-sasl[kerberos] ) test? ( dev-python/pymongo[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] ) >=dev-util/scons-2.5.0[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] virtual/pkgconfig
-DESCRIPTION=A high-performance, open source, schema-free document-oriented database
-EAPI=6
-HOMEPAGE=https://www.mongodb.com
-IUSE=debug kerberos libressl mms-agent ssl test +tools python_targets_python2_7
-KEYWORDS=~amd64
-LICENSE=AGPL-3 Apache-2.0
-PDEPEND=tools? ( >=app-admin/mongo-tools-3.6.2 )
-RDEPEND=>=app-arch/snappy-1.1.3 >=dev-cpp/yaml-cpp-0.5.3 >=dev-libs/boost-1.60:=[threads(+)] >=dev-libs/libpcre-8.41[cxx] dev-libs/snowball-stemmer net-libs/libpcap >=sys-libs/zlib-1.2.8:= mms-agent? ( app-admin/mms-agent ) ssl? ( !libressl? ( >=dev-libs/openssl-1.0.1g:0= ) libressl? ( dev-libs/libressl:0= ) )
-SLOT=0
-SRC_URI=https://fastdl.mongodb.org/src/mongodb-src-r3.6.2.tar.gz
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-single-r1 26fdbe5e685d53f67303a3a43d9e4848 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 scons-utils abbc7625ff457854eae0edaa1fd55cc7 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=22e19879758855b6f4b0b1d569b43adf
diff --git a/dev-db/mongodb-3.6.3-r1 b/dev-db/mongodb-3.6.3-r1
deleted file mode 100644
index 549f4c9ec500..000000000000
--- a/dev-db/mongodb-3.6.3-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare pretend setup test
-DEPEND=>=app-arch/snappy-1.1.3 >=dev-cpp/yaml-cpp-0.5.3 >=dev-libs/boost-1.60:=[threads(+)] >=dev-libs/libpcre-8.41[cxx] dev-libs/snowball-stemmer net-libs/libpcap >=sys-libs/zlib-1.2.8:= mms-agent? ( app-admin/mms-agent ) ssl? ( !libressl? ( >=dev-libs/openssl-1.0.1g:0= ) libressl? ( dev-libs/libressl:0= ) ) python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] dev-python/cheetah[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] dev-python/pyyaml[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] virtual/python-typing[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] <dev-util/scons-3 sys-libs/ncurses sys-libs/readline debug? ( dev-util/valgrind ) kerberos? ( dev-libs/cyrus-sasl[kerberos] ) test? ( dev-python/pymongo[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] ) >=dev-util/scons-2.5.0[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] virtual/pkgconfig
-DESCRIPTION=A high-performance, open source, schema-free document-oriented database
-EAPI=6
-HOMEPAGE=https://www.mongodb.com
-IUSE=debug kerberos libressl mms-agent ssl test +tools python_targets_python2_7
-KEYWORDS=~amd64
-LICENSE=AGPL-3 Apache-2.0
-PDEPEND=tools? ( >=app-admin/mongo-tools-3.6.3 )
-RDEPEND=>=app-arch/snappy-1.1.3 >=dev-cpp/yaml-cpp-0.5.3 >=dev-libs/boost-1.60:=[threads(+)] >=dev-libs/libpcre-8.41[cxx] dev-libs/snowball-stemmer net-libs/libpcap >=sys-libs/zlib-1.2.8:= mms-agent? ( app-admin/mms-agent ) ssl? ( !libressl? ( >=dev-libs/openssl-1.0.1g:0= ) libressl? ( dev-libs/libressl:0= ) )
-SLOT=0
-SRC_URI=https://fastdl.mongodb.org/src/mongodb-src-r3.6.3.tar.gz
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-single-r1 26fdbe5e685d53f67303a3a43d9e4848 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 scons-utils abbc7625ff457854eae0edaa1fd55cc7 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=22e19879758855b6f4b0b1d569b43adf
diff --git a/dev-db/mongodb-3.6.4-r1 b/dev-db/mongodb-3.6.4-r1
deleted file mode 100644
index 7cade42f0168..000000000000
--- a/dev-db/mongodb-3.6.4-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare pretend setup test
-DEPEND=>=app-arch/snappy-1.1.3 >=dev-cpp/yaml-cpp-0.5.3 >=dev-libs/boost-1.60:=[threads(+)] >=dev-libs/libpcre-8.41[cxx] dev-libs/snowball-stemmer net-libs/libpcap >=sys-libs/zlib-1.2.8:= mms-agent? ( app-admin/mms-agent ) ssl? ( !libressl? ( >=dev-libs/openssl-1.0.1g:0= ) libressl? ( dev-libs/libressl:0= ) ) python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] dev-python/cheetah[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] dev-python/pyyaml[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] virtual/python-typing[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] <dev-util/scons-3 sys-libs/ncurses sys-libs/readline debug? ( dev-util/valgrind ) kerberos? ( dev-libs/cyrus-sasl[kerberos] ) test? ( dev-python/pymongo[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] ) >=dev-util/scons-2.5.0[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] virtual/pkgconfig
-DESCRIPTION=A high-performance, open source, schema-free document-oriented database
-EAPI=6
-HOMEPAGE=https://www.mongodb.com
-IUSE=debug kerberos libressl mms-agent ssl test +tools python_targets_python2_7
-KEYWORDS=~amd64
-LICENSE=AGPL-3 Apache-2.0
-PDEPEND=tools? ( >=app-admin/mongo-tools-3.6.4 )
-RDEPEND=>=app-arch/snappy-1.1.3 >=dev-cpp/yaml-cpp-0.5.3 >=dev-libs/boost-1.60:=[threads(+)] >=dev-libs/libpcre-8.41[cxx] dev-libs/snowball-stemmer net-libs/libpcap >=sys-libs/zlib-1.2.8:= mms-agent? ( app-admin/mms-agent ) ssl? ( !libressl? ( >=dev-libs/openssl-1.0.1g:0= ) libressl? ( dev-libs/libressl:0= ) )
-SLOT=0
-SRC_URI=https://fastdl.mongodb.org/src/mongodb-src-r3.6.4.tar.gz
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-single-r1 26fdbe5e685d53f67303a3a43d9e4848 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 scons-utils abbc7625ff457854eae0edaa1fd55cc7 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=22e19879758855b6f4b0b1d569b43adf
diff --git a/dev-db/mongodb-3.6.5-r1 b/dev-db/mongodb-3.6.5-r1
deleted file mode 100644
index 64717aabfff8..000000000000
--- a/dev-db/mongodb-3.6.5-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare pretend setup test
-DEPEND=>=app-arch/snappy-1.1.3 >=dev-cpp/yaml-cpp-0.5.3 >=dev-libs/boost-1.60:=[threads(+)] >=dev-libs/libpcre-8.41[cxx] dev-libs/snowball-stemmer net-libs/libpcap >=sys-libs/zlib-1.2.8:= mms-agent? ( app-admin/mms-agent ) ssl? ( !libressl? ( >=dev-libs/openssl-1.0.1g:0= ) libressl? ( dev-libs/libressl:0= ) ) python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] dev-python/cheetah[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] dev-python/pyyaml[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] virtual/python-typing[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] <dev-util/scons-3 sys-libs/ncurses sys-libs/readline debug? ( dev-util/valgrind ) kerberos? ( dev-libs/cyrus-sasl[kerberos] ) test? ( dev-python/pymongo[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] ) >=dev-util/scons-2.5.0[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] virtual/pkgconfig
-DESCRIPTION=A high-performance, open source, schema-free document-oriented database
-EAPI=6
-HOMEPAGE=https://www.mongodb.com
-IUSE=debug kerberos libressl mms-agent ssl test +tools python_targets_python2_7
-KEYWORDS=~amd64
-LICENSE=AGPL-3 Apache-2.0
-PDEPEND=tools? ( >=app-admin/mongo-tools-3.6.5 )
-RDEPEND=>=app-arch/snappy-1.1.3 >=dev-cpp/yaml-cpp-0.5.3 >=dev-libs/boost-1.60:=[threads(+)] >=dev-libs/libpcre-8.41[cxx] dev-libs/snowball-stemmer net-libs/libpcap >=sys-libs/zlib-1.2.8:= mms-agent? ( app-admin/mms-agent ) ssl? ( !libressl? ( >=dev-libs/openssl-1.0.1g:0= ) libressl? ( dev-libs/libressl:0= ) )
-SLOT=0
-SRC_URI=https://fastdl.mongodb.org/src/mongodb-src-r3.6.5.tar.gz
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-single-r1 26fdbe5e685d53f67303a3a43d9e4848 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 scons-utils abbc7625ff457854eae0edaa1fd55cc7 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=22e19879758855b6f4b0b1d569b43adf
diff --git a/dev-db/mongodb-4.0.0-r1 b/dev-db/mongodb-4.0.0-r1
deleted file mode 100644
index b01a36d92aeb..000000000000
--- a/dev-db/mongodb-4.0.0-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare pretend setup test
-DEPEND=>=app-arch/snappy-1.1.3 >=dev-cpp/yaml-cpp-0.5.3 >=dev-libs/boost-1.60:=[threads(+)] >=dev-libs/libpcre-8.41[cxx] dev-libs/snowball-stemmer net-libs/libpcap >=sys-libs/zlib-1.2.11:= mms-agent? ( app-admin/mms-agent ) ssl? ( !libressl? ( >=dev-libs/openssl-1.0.1g:0= ) libressl? ( dev-libs/libressl:0= ) ) python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] dev-python/cheetah[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] dev-python/pyyaml[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] virtual/python-typing[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] <dev-util/scons-3 sys-libs/ncurses sys-libs/readline debug? ( dev-util/valgrind ) kerberos? ( dev-libs/cyrus-sasl[kerberos] ) test? ( dev-python/pymongo[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] ) >=dev-util/scons-2.5.0[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] virtual/pkgconfig
-DESCRIPTION=A high-performance, open source, schema-free document-oriented database
-EAPI=6
-HOMEPAGE=https://www.mongodb.com
-IUSE=debug kerberos libressl mms-agent ssl test +tools python_targets_python2_7
-KEYWORDS=~amd64
-LICENSE=AGPL-3 Apache-2.0
-PDEPEND=tools? ( >=app-admin/mongo-tools-4.0.0 )
-RDEPEND=>=app-arch/snappy-1.1.3 >=dev-cpp/yaml-cpp-0.5.3 >=dev-libs/boost-1.60:=[threads(+)] >=dev-libs/libpcre-8.41[cxx] dev-libs/snowball-stemmer net-libs/libpcap >=sys-libs/zlib-1.2.11:= mms-agent? ( app-admin/mms-agent ) ssl? ( !libressl? ( >=dev-libs/openssl-1.0.1g:0= ) libressl? ( dev-libs/libressl:0= ) )
-SLOT=0
-SRC_URI=https://fastdl.mongodb.org/src/mongodb-src-r4.0.0.tar.gz
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-single-r1 26fdbe5e685d53f67303a3a43d9e4848 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 scons-utils abbc7625ff457854eae0edaa1fd55cc7 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=ef5984b6c1c0e5f1c207c1773b4a9399
diff --git a/dev-db/mongodb/Manifest b/dev-db/mongodb/Manifest
new file mode 100644
index 000000000000..740453c48b3f
--- /dev/null
+++ b/dev-db/mongodb/Manifest
@@ -0,0 +1,49 @@
+AUX mongodb-3.0.14-fix-scons.patch 1419 BLAKE2B da2aaf46a04a1fb345b8e44ca950d8e1b0de8e1699d47bf146e879f6461b8329a5900265a97710df5a8195283d21007dc9a1bd2b3ecebb113f718d0fd0ed74ba SHA512 2cf591ee25d33adf98ca6baeb086fb8677720809bc3e2b9398bba6ae84548b2aa3dfd57216e185fc6aa0aa185c9a906fe2a1b97bc81942560f02903b24f7bd25
+AUX mongodb-3.0.14-fix-std-string.patch 2341 BLAKE2B ae22f1c03e9230ee8dac8bacefcbd3dd193d8776dd2e86a761d5b0fe3bba823c3c1c8f9a0d2b91ff4aea0860c01289d7bc4b12fb91c02db72d0e4a755f40172f SHA512 1c1d46f4d058685371914ac70c8ad36fba387e9a140ddfd5650cf0411a73776d7b8ef6108a778eaeaa5ba22eba0e16b2301d257a47250a67e7e013d7bb402e47
+AUX mongodb-3.2.0-fix-scons.patch 1738 BLAKE2B 0e85c39637900a67c7a04396963624e9e53cc5d482eb177e7845e10817ce51bc0bec32f91c7ba31bc953d26f9b28f05dbf3ee2423e058c4ea49ac101ece95434 SHA512 04f95586b46960405b7b1906ea3c3c75d37d6831a458f619347ac028c77db5744131cb7bf39cdf62bf564500b1f6785e25b9a0c0526f126bf2072269385afe45
+AUX mongodb-3.2.10-boost-1.62.patch 702 BLAKE2B fb3822a1a212aae30f6fbb33a4a87f5f7d0992dfc94b95247e8a0253ed453035aa8f1ba3b9912d3cd1245561d4e529b4e29ab1cf109430c4d2fef51ca33c1bd8 SHA512 79edfd1a6eaba597b31a82e54722dccab288d8b8840a53f79140b5fca221b5acd9fbc770d99e46ea9fa0da502cdf18dd35d982c95a4aa341806c3d8b61fc732f
+AUX mongodb-3.2.16-Replace-string-with-explicit-std-string.patch 12636 BLAKE2B 21f04acd87242a11577a20cadde11a9cc994172532b933efba6e3f96ae6bb1aaa64ab271aaf7d286f84e77ae13a688682d19e815820d5ee3c64d8a605226adea SHA512 43a610b0c37c74576ef3e3df3734c4d9d904271dd3853003ff439f61099666a356ed5d4f046573a753c652dfe1e1c1607b1abe041482b740fe828f543272646c
+AUX mongodb-3.2.4-boost-1.60.patch 3352 BLAKE2B c008120ace4dc5507fd0de68caf12a79465f61345a68be8a98a0dc84fe457bc7f04d0f99b9eab6644df34ac79efad1e7b77134cd7a29c65485568bce9e2b59cc SHA512 260c3edc3a04f3fae9f18fb73b3ae027709aa019751627d1a24b2ee40a72f91ef9de64606aff32c0890861fc56ae3c80341ba87cd16fffdd009b4fa5089c70db
+AUX mongodb-3.4.0-fix-scons.patch 1411 BLAKE2B 6e5975b70ec7f281ea2cd101b16ee2849762fa1dd8427522eb3b01cd1738e60ece013bf23d07c180c58af024aebd141ca7fdf80bc240701f48556da46d3787ab SHA512 2e29c91a22663259d2f5413fbb2652702bceb122899e50a8969fb82d74a64a78649e79b005e20e6640740c089b1cee19080890eb8d9344c2ce355a977146b770
+AUX mongodb-3.4.6-sysmacros-include.patch 1419 BLAKE2B f07ab093f13ea2b9675538dc99e2e58f85019edffad05bbbf3032f85f8ef881020cc9bf25bc62ca13344e7b8b7dd3b04954c76974c512a41ea5a7a2045de2b34 SHA512 ab269ec003b74848f981021f5eb09e38216d75dd9d1b8a155068b2a335d9ec9d1f5f575028ae9b4b0d8745d15e464cb05b70aabc6c28c984115574c6747afc05
+AUX mongodb-3.4.7-no-boost-check.patch 641 BLAKE2B 0dc3a426b28cd80d7b3361ff9c6747aff64dd27c1bc01a9717c2dd1c160b66f53feb72fd2ead385c220ebe92a8c7b8fa6b04fb3fa8437dba17d5f8346665f6b8 SHA512 812eaaadb6f265cfc904e8f3a7ae8276e42e3968529914179efab5e44f1951ab46ac3bbcfb259f924b20a8ca61d2ebcf72b7103ea9d5f25594ff8e9e3e85836b
+AUX mongodb-3.6.1-fix-scons.patch 1207 BLAKE2B 3c47d72eb940d67f40e4a12becb6de469255446b74aa5e0b2f27e8e0021e77f1af9cce12ae26ed0b05871e995e29d3da1eaee718997bc6de6e62838285946094 SHA512 70efb9309ff5a2415cec6ddca694c33ebaba29d5fb959ecc79907218205a10d4e7329fe48c8c8515bda83751061245d41f4fb11a5d8cd0c80c1db61217acb90e
+AUX mongodb-3.6.1-no-compass.patch 2046 BLAKE2B e6b6977b69eb297c6a6340661f906e0206c2b68a1cebfd3c7ca01b27cc05562e0909531a2488159a54db32a05ec0cc4f81b4fe675db51bf3c30d66bc9d484c0b SHA512 5a7257a3670f40453c424ae2e6d2bbe0e3d1c795b57351c24a1b48ea4134146b08310d88a47cbb0c94a0a451a2c4a3c30fb10c44a1b9203681ee9cb5240db412
+AUX mongodb-4.0.0-no-compass.patch 2270 BLAKE2B 66659a18d46755e6661b57e2ba020d7b967c455b0bfd5d198e0efd5bab1c0fdbb5def66b9e9fb54b34eb415e9b9231dcb6ba4b943d674e09685b47333af31d22 SHA512 e3b3adae4991e7687b191651f4c93471042bc8f56c5977743afec573fe026df3af1459b8bcbdb4f9995ecfbf83785ad56ccf46d6756429164b1f49524a36fed7
+AUX mongodb.conf-r3 722 BLAKE2B c053bf101f5e3e38cc68f2bcbe7fb66ed9e55da9382d2412a497d68b478573390eddc5f284f76d56ca4792fe6241f6d1273a6585a98f96a1cb20530499a15904 SHA512 ef193bfed673477aa0e868114bd52be6675492c164f218c71ccd02c4a620b5c4799ea1d18df0c3f2b364027b9f25e60ac4475bb216b25e1dc10bfd00a9f5d45d
+AUX mongodb.confd-r2 549 BLAKE2B b43518e43d9c2fe030887cde657fdc08cdd15349cf12cfa1f0f4f0a0db568ba2ae3e3cdec1d04953e62d87feaea6bae969be03bb2270ca31bd9ebbe5e9c79416 SHA512 75f11e8350e98b90eccafd577d794e4b05f36ede8d95e7839e9fa1eb77ea7bd9cdd2fdd07719abb78a714cd7d72109c177d265d6417ef198a4217453c0a4db68
+AUX mongodb.confd-r3 473 BLAKE2B b9d812cfb424309e117cf5c43ba8ee7bd4dadac78d6ebd1b0d3c2cdd04d14b334c8f2e26ee24c5ede1a8fe6500bda1b39a5422a3bc1eb8a2c4a8dde038db7997 SHA512 8a90fb39ad16837458a2add25a9b9059e2b356794cfbf3cb35c9ecd6a584ee300c67b49b5261e062eaf7aac593588e2871e5cf76ab2287e58ea342436d0afe56
+AUX mongodb.initd-r2 654 BLAKE2B dac26431711bc4e4047075331c830e356a15b76ef67436f2e6b3984cffb6c9c47ae4196b788ab4b53695d5c2269c35b8ba475fa3ee3b5edf6b2c51944e576413 SHA512 566d47356ef956ee44b170b4498a6361583efea5a01cc3a7e0936c0abdff3100b535eb1259434bd7a68de354b75d165e543362bb93f1fb527b1605de23557398
+AUX mongodb.initd-r3 422 BLAKE2B 8c4e1a227f279e49a48b5cb7badfb18c805ce01d471f4fa8634a0d2e4b2ddc6c7e8ccc02fce682bd4fc4436f53ec86fa69a4c287a9b8924a67157e36854c24b9 SHA512 ebeefa1abefddd8d90fd09da035215c65d4f4fa374ec72db487fb7f457ff5a92c5b806743e58b1f6e97854d362b3b3699dba260bd3f8d0614b4cfc5de550f45b
+AUX mongodb.logrotate 205 BLAKE2B d47c211207e599d9b7f56dd9579d3a9eec577ad0efc07dd6980747b6aa59eec930b760f956dd6e180681c684e4507eb12cc88a985e506f77e0c3162ef7df4675 SHA512 8c089b1a11f494e4148fb4646265964c925bf937633a65e395ee1361d42facf837871dd493a9a2e0f480ae0e0829dbd3ed60794c5334e2716332e131fc5c2c51
+AUX mongodb.service 220 BLAKE2B ea55bb2f08066d7399e9e66f981f86395f6a177faa198c66f93ea2965ea80d61c170336a4f49fc7f1f855d3abd5e7cf3862d58a2be4a7708c0582fb4ff80b255 SHA512 177251404b2e818ae2b546fe8b13cb76e348c99e85c7bef22a04b0f07b600fd515a309ede50214f4198594388a6d2b31f46e945b9dae84aabb4dfa13b1123bb9
+AUX mongos.conf-r2 648 BLAKE2B 420bebfafc1ef4af4b90580077a803fe30f37d63eca6509e7381ca5fcf4e5bc31e136dfc72b653b4d942fdeda058f9fcecc3dcbec9c61e2c82ac3324b9fc0f44 SHA512 5aa8ced8d83572358e008c0df45dbe72a2e9c0003c9f49514d6b91bf9b75d4fb48b189ffe00d14e5675679943a05215a9873c5c9bde9ab1be4ed4813e75714e3
+AUX mongos.confd-r2 546 BLAKE2B 45203bdec8e30bbf97af6b02a66a366946c02f6820bc23486dcfc7ff87d9db771f8efa387e2afa77900ad68bdeeb327ed288af2d63a22000580f9f882c6ec571 SHA512 30e208690b5f28bd0442b7ed302d9be991aedd27203f24e5849201d33291ad7f0f9153ae3a00b55697d79a45c40d7b3792ff45f0c24ef2cf4e88222f88ea1400
+AUX mongos.confd-r3 470 BLAKE2B 9cf6f201d337430901d957a5a0811ff11ac2e81814aac2120c5018e6ec4c38b5ca22d19caea593834416c63609c69a8294227fb6b30200b41dfb29799cc5c1b4 SHA512 952fb9cf5d3eeea2006b101e23142e408c98d66d1f4f868f6ea5a4df6a6331ddcbcbdfb24f4b031c1a8c42652141a3684073b96dfc0b3fbd21dc6b5bcf0e36cb
+AUX mongos.initd-r2 654 BLAKE2B e1d87021c218adf49f2efbd3dc6d8afb94bc4f71e60d91df9c1338241b950f62ecb1d4a989cd559b39c4c05ed7084618e4f1ec4e5eb253fae0b62f03fc9696d9 SHA512 751ddcfa406d6683e33b484ae441f7c8502698b651a1ace9b77bc13be48cee1c1ad657c474764f06bd8ef4bff51cdb235929c8d41b669a326a6ab7d24647a2c5
+AUX mongos.initd-r3 422 BLAKE2B 90872d0d8cdc5e33e3eebee848f58a2db0511d48b496ba9318117b74ad9265ead53a21b7d1790729a62d61839099bee315ace8ff3646c01e096a943c2251bf88 SHA512 bf5897614d59c6b4e72529b126408a62ea37d9e9368e5ff69c8fcf2bad3ec09065cff09467f82117a892c51090018706d2f38c03cb9a974a61a49bd9efa0f144
+DIST mongodb-src-r3.0.14.tar.gz 28093922 BLAKE2B c36f1868aaf8d149550d9e8fcfa3598b917426f896cdb9e1d12fb047345011b06975719d24db3ffadadf6e1f6007a3e32768eaaa9da9ec8f340c7a49c9239b45 SHA512 477fab29ca0ad2a0f24b895e30dc4770af8d6a1a57f3c10a02a989b58dd22510db554da0418129d4e81958342ad169696eed4b86bf5aa73916c7cec879db1152
+DIST mongodb-src-r3.0.15.tar.gz 28096395 BLAKE2B 123194723e7f1057bc5497ce9bf51f8dd2d65495f6e2c84adde22e3b41cace9c0bce8134a7b85fa1c8e89ce953a3df780eae013d61bba44bbf9339c1e2e478af SHA512 21cec235a691dad7d1d2c625ef04a851b59223b8f2c0bdc979f2a0b8249ed46b4e62753fd595afa7b74bce13851d1f6547e54d8ffad8ba1f56e36db664f5b27e
+DIST mongodb-src-r3.2.17.tar.gz 29295394 BLAKE2B 3fa9d8fa0b50b72c3b2aa86980dd4d46bd053f23d044e321d6f98f5edb76c566bf00455cf745110a8c39355843664d9d1fbbdf554fc8696de73db2b270446adc SHA512 0d6a01278bc61805afd164e4a29abe150a5a96d551ed2c7c5d385b269924a7c5f065315e4f19c0ab070aa275ac03447959af45f33826457e5db0c5f98e623512
+DIST mongodb-src-r3.4.10.tar.gz 39959937 BLAKE2B f14f081525f694b939bc21f8cb6364c2a37573c0e1867322dd2062dc167b112751579c3e2d76730b3ff07b0c6bbfd36666bbea99162b7c10eef62d92eb1b0850 SHA512 6293dde40a8433477ba3b1cf77abbdb32b28ce58279cc616b488647c8ab71b5ab3eab2146058c4a74b9e00f0938f1415020e2f26ea01f2b29dd78a1a38d58c3a
+DIST mongodb-src-r3.4.13.tar.gz 39992720 BLAKE2B 5620711c5ffddd9a96c29be1f2801a37f30536d1b7afe5a7b339a41cacf1f97caf8d03aafdf1d6b71cc488e48f5066ebc49a63a6bf318483d552863cd47a0c0e SHA512 295dbb38d44c99e0dce46c5e4aa5d73c64d813a3767e71a7187aff05e30f896d283ca7ef19c0a7bbd036eecf3d419e38ea3bc7d98ba93d12296c49e565df0f66
+DIST mongodb-src-r3.4.14.tar.gz 40017360 BLAKE2B 617ebf0346b9ea5034d05ba607b21b745a44e70edb347c6bf0cd8b273b448caef7da2d5f11036d48add6f452883a9b15259fe8ad466e58199be5eb9512167b6d SHA512 f8c38d12e24ae332221db15aab646725ef666012837b8127a1ab128ac2d6da2ab702f3edd17fdf3e6a840f603c8c66acf2a87fe74adf30bd9c4fe6b873c98186
+DIST mongodb-src-r3.4.15.tar.gz 40063153 BLAKE2B 7912a1b0450337c8b9935deb6abfbda6080f8fec68222b6eb9fbbd278e4d8a1ffb873c7c4a63c78c3eadc722c694d4d48b3f5d9247531f1731d7713a527daec5 SHA512 8b29c1cef4c34e9c2e16bbaf50aa10574eb63c9692ab248849a0cc476acc637794c3be27df0663a27ee4ced28c6d80bb0e11ac00fcd6d0a8babfc835b78fce59
+DIST mongodb-src-r3.6.2.tar.gz 39999539 BLAKE2B 3e38917ebaf79b63bf054279fbb91a648fe52e69d8194998dc74453ad6766688929a80456f6cb4801f2806ac938a5dfc0407e5f46345b47a80ecce0ba03d7fde SHA512 7acfbcc68c1bd4e6e63eee09be1dfbb064be6f8b0144418105100a065f8162cafc9b776fe0429fd64c79b958561aa42d0bdef56588dda65acee27ccc98631f39
+DIST mongodb-src-r3.6.3.tar.gz 40093607 BLAKE2B bb21bf0487661eec6140ade22526617b26b2499bd36e138d955d14a4b13a0685ec7308bccfc11ef17c785cd8a71c5b6cd9d154d461b8973410b03952b93953ec SHA512 94aa9955f99d5f6bbbe65dc3755583952525398308ca7cb9224b91d1fa403de5bb3abb63a651583815cbecaff58966b5cfe7334a36ef6583f73d8c213410ddbc
+DIST mongodb-src-r3.6.4.tar.gz 40159916 BLAKE2B d3878d4e6bbf331de672768b2c92a4d71f758232170432d757f7e61849e6e1ef3b190e6a089101c9ea23c4ce23087c684c86fc6ea0f32f6fe052ce322d47e438 SHA512 02c2a697af9fdcbb16d19792be17d987e18c684418a63ed4750471c7ec22eb2eabf84e93cb1d298f67898b7e23687f668bb333c50ffc4e1b8adf8859f856ad95
+DIST mongodb-src-r3.6.5.tar.gz 40310152 BLAKE2B 72110ae47b17ec8b1f60636a5ef8491b076e1cc019513fd872ea38b3bb8393efff4bddc7b795b3da711f258d21be9fa23e24d396a9429349c51ce05fff180a53 SHA512 6ecb3140ee4a7929fabe62d698f23e87cb5030cf31abefe7f82374f407fb87dc05f712089998f96bc40e23698836a86e7f3590892bde9d2d6f2c4bcc15cc3ebf
+DIST mongodb-src-r4.0.0.tar.gz 49138467 BLAKE2B 616e267c737729103de544d82db60489e7a32c5f9847ffd2d643a9025c18aa867718216f5de9f18a93fb2a7930c3dbe9ec3850eef09dbec084570328a99f2865 SHA512 11d00cdde606cfea268471cffccedb6d003e421aeffda2303aff4d4126c386aaec50a1de733d7a1d5fb6605403cf9f2218dae50374c7b5e8625fa80317804589
+EBUILD mongodb-3.0.14.ebuild 4559 BLAKE2B e72ff73baaa3b6a5bb4bbb33f3153d2aeaa9458b6e7f48419f5fd0f9b7fe43dfbcd93bf0824555e688faa461839a8c3cb5e4d1a24219a395f1a245828d639777 SHA512 747424cae955229f6affd867961171d9ad3fe9c34553ddb94e034db76d4e389ba0c6dc47db23c291212b893b7377d1bfac52e79ae4ab1b9dfd8f4c89743e1a19
+EBUILD mongodb-3.0.15.ebuild 4561 BLAKE2B 85e994c18b57a0278059eb0e2e141842b551a96e1a030b5d84e0bb4c1524bacff7ed1a1576093b0336ed042f8bcbf01d37ba725392c077a400fdefc2705ec2ab SHA512 d5b77ede0ab5d9fa814542e831ec93d5854f0aaa55930c5e445410d347787be96294a741f30089764ea23cdab52413d1d82c6796b3d7133796d28de95726e294
+EBUILD mongodb-3.2.17.ebuild 5338 BLAKE2B fd327b1c5bb85e833782839e07b3379a103f0545fb9852cb06d7f6f0b3548b921dfce227d1882a1e448a533c043718c778e9141ec5715805a24c9e2fbf199fa1 SHA512 a439c32b20a81d1c8e199c8a6928aa75479562e6b33c0d7b50797181226a093f571a1caaab102569a9a308db18a73c51558657ccd4bcb1d7e137eb22fb363c4e
+EBUILD mongodb-3.4.10.ebuild 5133 BLAKE2B e6b3742a9bff53afd63eae4fe3b9574e43f7007dc1efc1687583b17820e812341f354e7dd7882762a871f1d5b1e2732a9cd20cff7981c05de4058c26c58f68d2 SHA512 737046d5ac14920014581840d3e53597e916cc4f1bbdfba850842718039c227c5cf3e5b62cd3f491e1221ff8fefd74fb3ea75ecafd6218c4036f4973316c56eb
+EBUILD mongodb-3.4.13.ebuild 4256 BLAKE2B e4caf3957d5bea1811879828abb9a1407afcb9646e4e91911369d8e43564412e0fa19ec84264d1ad5dbea758fb32c5dfe2fb4dca60636b7838f4c3d4ef3832d2 SHA512 dee3412d989c9d00e1097a2ebb8d05e7d77d14e8399d7bf570da37904ec90de86d62807383c95caa057b2c2cfe2057be0b208b262bf488687b201a2f38ea7bac
+EBUILD mongodb-3.4.14.ebuild 4256 BLAKE2B e4caf3957d5bea1811879828abb9a1407afcb9646e4e91911369d8e43564412e0fa19ec84264d1ad5dbea758fb32c5dfe2fb4dca60636b7838f4c3d4ef3832d2 SHA512 dee3412d989c9d00e1097a2ebb8d05e7d77d14e8399d7bf570da37904ec90de86d62807383c95caa057b2c2cfe2057be0b208b262bf488687b201a2f38ea7bac
+EBUILD mongodb-3.4.15.ebuild 4256 BLAKE2B e4caf3957d5bea1811879828abb9a1407afcb9646e4e91911369d8e43564412e0fa19ec84264d1ad5dbea758fb32c5dfe2fb4dca60636b7838f4c3d4ef3832d2 SHA512 dee3412d989c9d00e1097a2ebb8d05e7d77d14e8399d7bf570da37904ec90de86d62807383c95caa057b2c2cfe2057be0b208b262bf488687b201a2f38ea7bac
+EBUILD mongodb-3.6.2-r1.ebuild 4446 BLAKE2B 23e7edab8f84fac52f1dd5289017f6a27a6151deafd53cb8f0eccb229653704c780eda604bf3c08291d6cc7d20962d733c6b44e5ea659e0b5fb7e44ef8e0ed30 SHA512 70e7443ad7de93688bb58382f6a311500f580354111ce60f8bc0848862963e86be1d742fce95918f2fccce7583dc22e12940b1ca004e5f148fa0a72d512fe99a
+EBUILD mongodb-3.6.3-r1.ebuild 4446 BLAKE2B 23e7edab8f84fac52f1dd5289017f6a27a6151deafd53cb8f0eccb229653704c780eda604bf3c08291d6cc7d20962d733c6b44e5ea659e0b5fb7e44ef8e0ed30 SHA512 70e7443ad7de93688bb58382f6a311500f580354111ce60f8bc0848862963e86be1d742fce95918f2fccce7583dc22e12940b1ca004e5f148fa0a72d512fe99a
+EBUILD mongodb-3.6.4-r1.ebuild 4446 BLAKE2B 23e7edab8f84fac52f1dd5289017f6a27a6151deafd53cb8f0eccb229653704c780eda604bf3c08291d6cc7d20962d733c6b44e5ea659e0b5fb7e44ef8e0ed30 SHA512 70e7443ad7de93688bb58382f6a311500f580354111ce60f8bc0848862963e86be1d742fce95918f2fccce7583dc22e12940b1ca004e5f148fa0a72d512fe99a
+EBUILD mongodb-3.6.5-r1.ebuild 4446 BLAKE2B 23e7edab8f84fac52f1dd5289017f6a27a6151deafd53cb8f0eccb229653704c780eda604bf3c08291d6cc7d20962d733c6b44e5ea659e0b5fb7e44ef8e0ed30 SHA512 70e7443ad7de93688bb58382f6a311500f580354111ce60f8bc0848862963e86be1d742fce95918f2fccce7583dc22e12940b1ca004e5f148fa0a72d512fe99a
+EBUILD mongodb-4.0.0-r1.ebuild 4445 BLAKE2B b6e7e01a6fd89ac0db97172a6c8257232089b1bd2c22ef8c1e5d689827d8b9c4b4ba384b68b63e8bb3038a25d2592b3cd13e38bdf3930bfd962d57a7262fef4c SHA512 961fcccb68ae8364172471f985c46b8e4d04c57a9620661810587f7e069cf521c6c0f0a5c50e7d015cbef1ded0cdcb983890d0564c7f8a8706fe7c6e6cc44750
+MISC metadata.xml 1053 BLAKE2B f2104654da3600c3d10882bb600d9002c015c7fb5dcfc8bdb98ab1fcb06d384ead4af990d55d6596d4bd602e5c4e9978a11cc66382ee01bab006f817ba44bdc2 SHA512 9ab708e294e25487ceeeeac7500a64684c914e95aa593c3a1f06d845b6b629766a5b98d972bf0802f3713b89bd6c81e293fc45205604980164542442438b13a2
diff --git a/dev-db/mongodb/files/mongodb-3.0.14-fix-scons.patch b/dev-db/mongodb/files/mongodb-3.0.14-fix-scons.patch
new file mode 100644
index 000000000000..1db5d7695c72
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-3.0.14-fix-scons.patch
@@ -0,0 +1,36 @@
+diff --git a/SConstruct b/SConstruct
+--- a/SConstruct
++++ b/SConstruct
+@@ -1008,7 +1008,6 @@
+ # -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used.
+ env.Append( CCFLAGS=["-fPIC",
+ "-fno-strict-aliasing",
+- "-ggdb",
+ "-pthread",
+ "-Wall",
+ "-Wsign-compare",
+@@ -1016,13 +1015,13 @@
+ "-Winvalid-pch"] )
+ # env.Append( " -Wconversion" ) TODO: this doesn't really work yet
+ if linux or darwin:
+- env.Append( CCFLAGS=["-pipe"] )
+ if not has_option("disable-warnings-as-errors"):
+ env.Append( CCFLAGS=["-Werror"] )
+
+ env.Append( CPPDEFINES=["_FILE_OFFSET_BITS=64"] )
+- env.Append( CXXFLAGS=["-Wnon-virtual-dtor", "-Woverloaded-virtual"] )
+ env.Append( LINKFLAGS=["-fPIC", "-pthread"] )
++ env.Append( CXXFLAGS=os.environ['CXXFLAGS'] )
++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] )
+
+ # SERVER-9761: Ensure early detection of missing symbols in dependent libraries at program
+ # startup.
+@@ -1039,7 +1038,7 @@
+ if not darwin:
+ env.Append( LINKFLAGS=["-rdynamic"] )
+
+- env.Append( LIBS=[] )
++ env.Append( LIBS=['pcre', 'pcrecpp', 'snappy', 'yaml-cpp'] )
+
+ #make scons colorgcc friendly
+ for key in ('HOME', 'TERM'):
diff --git a/dev-db/mongodb/files/mongodb-3.0.14-fix-std-string.patch b/dev-db/mongodb/files/mongodb-3.0.14-fix-std-string.patch
new file mode 100644
index 000000000000..9de319bda9dd
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-3.0.14-fix-std-string.patch
@@ -0,0 +1,83 @@
+--- a/src/mongo/shell/bench.cpp 2017-09-20 19:12:20.893056990 +0200
++++ b/src/mongo/shell/bench.cpp 2017-09-20 19:14:08.165060566 +0200
+@@ -52,6 +52,9 @@
+ #include "mongo/util/time_support.h"
+ #include "mongo/util/version.h"
+
++#include <string>
++using namespace std;
++
+ // ---------------------------------
+ // ---- benchmarking system --------
+ // ---------------------------------
+--- a/src/mongo/db/dbwebserver.cpp 2017-09-20 19:24:50.042081961 +0200
++++ b/src/mongo/db/dbwebserver.cpp 2017-09-20 19:26:20.240084968 +0200
+@@ -58,6 +58,8 @@
+ #include "mongo/util/ramlog.h"
+ #include "mongo/util/version.h"
+
++#include <string>
++using namespace std;
+
+ namespace mongo {
+
+--- a/src/mongo/db/matcher/expression_leaf.cpp 2017-09-20 19:27:59.009088260 +0200
++++ b/src/mongo/db/matcher/expression_leaf.cpp 2017-09-20 19:28:31.082089329 +0200
+@@ -39,6 +39,9 @@
+ #include "mongo/db/jsobj.h"
+ #include "mongo/db/matcher/path.h"
+
++#include <string>
++using namespace std;
++
+ namespace mongo {
+
+ Status LeafMatchExpression::initPath(const StringData& path) {
+--- a/src/mongo/db/repl/master_slave.cpp 2017-09-20 19:30:04.569092445 +0200
++++ b/src/mongo/db/repl/master_slave.cpp 2017-09-20 19:31:19.145094931 +0200
+@@ -70,6 +70,9 @@
+ #include "mongo/util/exit.h"
+ #include "mongo/util/log.h"
+
++#include <string>
++using namespace std;
++
+ using boost::scoped_ptr;
+ using std::auto_ptr;
+ using std::cout;
+--- a/src/mongo/util/net/miniwebserver.cpp 2017-09-20 19:32:55.368098138 +0200
++++ b/src/mongo/util/net/miniwebserver.cpp 2017-09-20 19:33:57.128100197 +0200
+@@ -39,6 +39,9 @@
+ #include "mongo/util/hex.h"
+ #include "mongo/util/log.h"
+
++#include <string>
++using namespace std;
++
+ namespace mongo {
+
+ using boost::shared_ptr;
+--- a/src/mongo/s/config.cpp 2017-09-20 19:42:45.614117812 +0200
++++ b/src/mongo/s/config.cpp 2017-09-20 19:43:28.278119234 +0200
+@@ -60,6 +60,9 @@
+ #include "mongo/util/net/message.h"
+ #include "mongo/util/stringutils.h"
+
++#include <string>
++using namespace std;
++
+ namespace mongo {
+
+ using boost::scoped_ptr;
+--- a/src/mongo/s/grid.cpp 2017-09-20 19:51:07.684134547 +0200
++++ b/src/mongo/s/grid.cpp 2017-09-20 19:51:43.436135739 +0200
+@@ -55,6 +55,9 @@
+ #include "mongo/util/startup_test.h"
+ #include "mongo/util/stringutils.h"
+
++#include <string>
++using namespace std;
++
+ namespace mongo {
+
+ using std::endl;
diff --git a/dev-db/mongodb/files/mongodb-3.2.0-fix-scons.patch b/dev-db/mongodb/files/mongodb-3.2.0-fix-scons.patch
new file mode 100644
index 000000000000..8b29bd4a2a4f
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-3.2.0-fix-scons.patch
@@ -0,0 +1,49 @@
+From ab6f929ee4584f3f1a040e55a63f493603f228d2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Fri, 1 Jan 2016 10:27:35 +0100
+Subject: [PATCH] Fix build for Gentoo
+
+---
+ SConstruct | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/SConstruct b/SConstruct
+index 64c8387..fa9ab8b 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -1371,7 +1371,6 @@ if env.TargetOSIs('posix'):
+ env.Append( CCFLAGS=["-fno-omit-frame-pointer",
+ "-fPIC",
+ "-fno-strict-aliasing",
+- "-ggdb",
+ "-pthread",
+ "-Wall",
+ "-Wsign-compare",
+@@ -1382,8 +1381,9 @@ if env.TargetOSIs('posix'):
+ if not has_option("disable-warnings-as-errors"):
+ env.Append( CCFLAGS=["-Werror"] )
+
+- env.Append( CXXFLAGS=["-Wnon-virtual-dtor", "-Woverloaded-virtual"] )
+ env.Append( LINKFLAGS=["-fPIC", "-pthread"] )
++ env.Append( CXXFLAGS=os.environ['CXXFLAGS'] )
++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] )
+
+ # SERVER-9761: Ensure early detection of missing symbols in dependent libraries at program
+ # startup.
+@@ -1398,10 +1398,10 @@ if env.TargetOSIs('posix'):
+ env.Append( SHLINKFLAGS=["-Wl,-z,now"] )
+ env.Append( LINKFLAGS=["-rdynamic"] )
+
+- env.Append( LIBS=[] )
++ env.Append( LIBS=['pcre', 'pcrecpp', 'snappy', 'yaml-cpp'] )
+
+- #make scons colorgcc friendly
+- for key in ('HOME', 'TERM'):
++ #make scons colorgcc, distcc, ccache friendly
++ for key in ('HOME', 'PATH', 'TERM'):
+ try:
+ env['ENV'][key] = os.environ[key]
+ except KeyError:
+--
+2.6.4
+
diff --git a/dev-db/mongodb/files/mongodb-3.2.10-boost-1.62.patch b/dev-db/mongodb/files/mongodb-3.2.10-boost-1.62.patch
new file mode 100644
index 000000000000..30a3bdff45f8
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-3.2.10-boost-1.62.patch
@@ -0,0 +1,15 @@
+Derived from http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/databases/mongodb/patches/patch-src_mongo_db_fts_unicode_string.cpp v1.1
+
+* Fix build with boost 1.62.0
+
+--- a/src/mongo/db/fts/unicode/string.cpp 2016-09-26 12:10:04.000000000 +0000
++++ b/src/mongo/db/fts/unicode/string.cpp
+@@ -274,7 +274,7 @@ bool String::substrMatch(const std::stri
+
+ // Case sensitive and diacritic sensitive.
+ return boost::algorithm::boyer_moore_search(
+- haystack.begin(), haystack.end(), needle.begin(), needle.end()) != haystack.end();
++ haystack.begin(), haystack.end(), needle.begin(), needle.end()) != std::make_pair(haystack.end(), haystack.end());
+ }
+
+ } // namespace unicode
diff --git a/dev-db/mongodb/files/mongodb-3.2.16-Replace-string-with-explicit-std-string.patch b/dev-db/mongodb/files/mongodb-3.2.16-Replace-string-with-explicit-std-string.patch
new file mode 100644
index 000000000000..6067850ad0b2
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-3.2.16-Replace-string-with-explicit-std-string.patch
@@ -0,0 +1,283 @@
+diff -Nru mongodb-src-r3.2.16_orig/src/mongo/db/dbwebserver.cpp mongodb-src-r3.2.16/src/mongo/db/dbwebserver.cpp
+--- mongodb-src-r3.2.16_orig/src/mongo/db/dbwebserver.cpp 2017-07-14 22:36:01.000000000 +0200
++++ mongodb-src-r3.2.16/src/mongo/db/dbwebserver.cpp 2017-08-01 15:43:55.860712772 +0200
+@@ -69,6 +69,7 @@
+ using std::map;
+ using std::stringstream;
+ using std::vector;
++using std::string;
+
+ using namespace html;
+
+diff -Nru mongodb-src-r3.2.16_orig/src/mongo/db/matcher/expression_leaf.cpp mongodb-src-r3.2.16/src/mongo/db/matcher/expression_leaf.cpp
+--- mongodb-src-r3.2.16_orig/src/mongo/db/matcher/expression_leaf.cpp 2017-07-14 22:36:01.000000000 +0200
++++ mongodb-src-r3.2.16/src/mongo/db/matcher/expression_leaf.cpp 2017-08-01 15:46:17.070708001 +0200
+@@ -200,7 +200,7 @@
+ }
+
+ void ComparisonMatchExpression::toBSON(BSONObjBuilder* out) const {
+- string opString = "";
++ std::string opString = "";
+ switch (matchType()) {
+ case LT:
+ opString = "$lt";
+@@ -880,7 +880,7 @@
+ }
+
+ void BitTestMatchExpression::toBSON(BSONObjBuilder* out) const {
+- string opString = "";
++ std::string opString = "";
+
+ switch (matchType()) {
+ case BITS_ALL_SET:
+diff -Nru mongodb-src-r3.2.16_orig/src/mongo/db/repl/master_slave.cpp mongodb-src-r3.2.16/src/mongo/db/repl/master_slave.cpp
+--- mongodb-src-r3.2.16_orig/src/mongo/db/repl/master_slave.cpp 2017-07-14 22:36:01.000000000 +0200
++++ mongodb-src-r3.2.16/src/mongo/db/repl/master_slave.cpp 2017-08-01 15:54:45.140690837 +0200
+@@ -161,7 +161,7 @@
+
+ BSONObjBuilder dbsNextPassBuilder;
+ int n = 0;
+- for (set<string>::iterator i = addDbNextPass.begin(); i != addDbNextPass.end(); i++) {
++ for (set<std::string>::iterator i = addDbNextPass.begin(); i != addDbNextPass.end(); i++) {
+ n++;
+ dbsNextPassBuilder.appendBool(*i, 1);
+ }
+@@ -170,7 +170,7 @@
+
+ BSONObjBuilder incompleteCloneDbsBuilder;
+ n = 0;
+- for (set<string>::iterator i = incompleteCloneDbs.begin(); i != incompleteCloneDbs.end(); i++) {
++ for (set<std::string>::iterator i = incompleteCloneDbs.begin(); i != incompleteCloneDbs.end(); i++) {
+ n++;
+ incompleteCloneDbsBuilder.appendBool(*i, 1);
+ }
+@@ -181,7 +181,7 @@
+ }
+
+ void ReplSource::ensureMe(OperationContext* txn) {
+- string myname = getHostName();
++ std::string myname = getHostName();
+
+ // local.me is an identifier for a server for getLastError w:2+
+ bool exists = Helpers::getSingleton(txn, "local.me", _me);
+@@ -373,10 +373,10 @@
+ }
+
+ virtual bool run(OperationContext* txn,
+- const string& ns,
++ const std::string& ns,
+ BSONObj& cmdObj,
+ int options,
+- string& errmsg,
++ std::string& errmsg,
+ BSONObjBuilder& result) {
+ HandshakeArgs handshake;
+ Status status = handshake.initialize(cmdObj);
+@@ -393,7 +393,7 @@
+ } handshakeCmd;
+
+ bool replHandshake(DBClientConnection* conn, const OID& myRID) {
+- string myname = getHostName();
++ std::string myname = getHostName();
+
+ BSONObjBuilder cmd;
+ cmd.append("handshake", myRID);
+@@ -445,7 +445,7 @@
+ BSONElement e = i.next();
+ if (e.eoo())
+ break;
+- string name = e.embeddedObject().getField("name").valuestr();
++ std::string name = e.embeddedObject().getField("name").valuestr();
+ if (!e.embeddedObject().getBoolField("empty")) {
+ if (name != "local") {
+ if (only.empty() || only == name) {
+@@ -459,7 +459,7 @@
+ save(txn);
+ }
+
+-void ReplSource::resyncDrop(OperationContext* txn, const string& db) {
++void ReplSource::resyncDrop(OperationContext* txn, const std::string& db) {
+ log() << "resync: dropping database " << db;
+ OldClientContext ctx(txn, db);
+ dropDatabase(txn, ctx.db());
+@@ -502,13 +502,13 @@
+
+ static DatabaseIgnorer ___databaseIgnorer;
+
+-void DatabaseIgnorer::doIgnoreUntilAfter(const string& db, const Timestamp& futureOplogTime) {
++void DatabaseIgnorer::doIgnoreUntilAfter(const std::string& db, const Timestamp& futureOplogTime) {
+ if (futureOplogTime > _ignores[db]) {
+ _ignores[db] = futureOplogTime;
+ }
+ }
+
+-bool DatabaseIgnorer::ignoreAt(const string& db, const Timestamp& currentOplogTime) {
++bool DatabaseIgnorer::ignoreAt(const std::string& db, const Timestamp& currentOplogTime) {
+ if (_ignores[db].isNull()) {
+ return false;
+ }
+@@ -598,7 +598,7 @@
+
+ // The database is present on the master and no conflicting databases
+ // are present on the master. Drop any local conflicts.
+- for (set<string>::const_iterator i = duplicates.begin(); i != duplicates.end(); ++i) {
++ for (set<std::string>::const_iterator i = duplicates.begin(); i != duplicates.end(); ++i) {
+ ___databaseIgnorer.doIgnoreUntilAfter(*i, lastTime);
+ incompleteCloneDbs.erase(*i);
+ addDbNextPass.erase(*i);
+@@ -793,10 +793,10 @@
+ }
+
+ void ReplSource::syncToTailOfRemoteLog() {
+- string _ns = ns();
++ std::string _ns = ns();
+ BSONObjBuilder b;
+ if (!only.empty()) {
+- b.appendRegex("ns", string("^") + pcrecpp::RE::QuoteMeta(only));
++ b.appendRegex("ns", std::string("^") + pcrecpp::RE::QuoteMeta(only));
+ }
+ BSONObj last = oplogReader.findOne(_ns.c_str(), Query(b.done()).sort(BSON("$natural" << -1)));
+ if (!last.isEmpty()) {
+@@ -844,7 +844,7 @@
+ */
+ int ReplSource::_sync_pullOpLog(OperationContext* txn, int& nApplied) {
+ int okResultCode = 1;
+- string ns = string("local.oplog.$") + sourceName();
++ std::string ns = std::string("local.oplog.$") + sourceName();
+ LOG(2) << "sync_pullOpLog " << ns << " syncedTo:" << syncedTo.toStringLong() << '\n';
+
+ bool tailing = true;
+@@ -864,7 +864,7 @@
+ BSONElement e = i.next();
+ if (e.eoo())
+ break;
+- string name = e.embeddedObject().getField("name").valuestr();
++ std::string name = e.embeddedObject().getField("name").valuestr();
+ if (!e.embeddedObject().getBoolField("empty")) {
+ if (name != "local") {
+ if (only.empty() || only == name) {
+@@ -888,7 +888,7 @@
+ if (!only.empty()) {
+ // note we may here skip a LOT of data table scanning, a lot of work for the master.
+ // maybe append "\\." here?
+- query.appendRegex("ns", string("^") + pcrecpp::RE::QuoteMeta(only));
++ query.appendRegex("ns", std::string("^") + pcrecpp::RE::QuoteMeta(only));
+ }
+ BSONObj queryObj = query.done();
+ // e.g. queryObj = { ts: { $gte: syncedTo } }
+@@ -907,7 +907,7 @@
+
+ // show any deferred database creates from a previous pass
+ {
+- set<string>::iterator i = addDbNextPass.begin();
++ set<std::string>::iterator i = addDbNextPass.begin();
+ if (i != addDbNextPass.end()) {
+ BSONObjBuilder b;
+ b.append("ns", *i + '.');
+@@ -938,7 +938,7 @@
+ BSONObj op = oplogReader.next();
+ BSONElement ts = op.getField("ts");
+ if (ts.type() != Date && ts.type() != bsonTimestamp) {
+- string err = op.getStringField("$err");
++ std::string err = op.getStringField("$err");
+ if (!err.empty()) {
+ // 13051 is "tailable cursor requested on non capped collection"
+ if (op.getIntField("code") == 13051) {
+@@ -1106,7 +1106,7 @@
+
+ // FIXME Handle cases where this db isn't on default port, or default port is spec'd in
+ // hostName.
+- if ((string("localhost") == hostName || string("127.0.0.1") == hostName) &&
++ if ((std::string("localhost") == hostName || std::string("127.0.0.1") == hostName) &&
+ serverGlobalParams.port == ServerGlobalParams::DefaultDBPort) {
+ log() << "can't sync from self (localhost). sources configuration may be wrong." << endl;
+ sleepsecs(5);
+@@ -1251,7 +1251,7 @@
+ if (s) {
+ stringstream ss;
+ ss << "sleep " << s << " sec before next pass";
+- string msg = ss.str();
++ std::string msg = ss.str();
+ if (!serverGlobalParams.quiet)
+ log() << msg << endl;
+ ReplInfo r(msg.c_str());
+diff -Nru mongodb-src-r3.2.16_orig/src/mongo/shell/bench.cpp mongodb-src-r3.2.16/src/mongo/shell/bench.cpp
+--- mongodb-src-r3.2.16_orig/src/mongo/shell/bench.cpp 2017-07-14 22:36:01.000000000 +0200
++++ mongodb-src-r3.2.16/src/mongo/shell/bench.cpp 2017-08-01 16:20:20.864638957 +0200
+@@ -674,7 +674,7 @@
+ invariant(bsonTemplateEvaluator.setId(_id) == BsonTemplateEvaluator::StatusSuccess);
+
+ if (_config->username != "") {
+- string errmsg;
++ std::string errmsg;
+ if (!conn->auth("admin", _config->username, _config->password, errmsg)) {
+ uasserted(15931, "Authenticating to connection for _benchThread failed: " + errmsg);
+ }
+@@ -920,7 +920,7 @@
+
+ if (!result["err"].eoo() && result["err"].type() == String &&
+ (_config->throwGLE || op.throwGLE))
+- throw DBException((string) "From benchRun GLE" +
++ throw DBException((std::string) "From benchRun GLE" +
+ causedBy(result["err"].String()),
+ result["code"].eoo() ? 0 : result["code"].Int());
+ }
+@@ -987,7 +987,7 @@
+
+ if (!result["err"].eoo() && result["err"].type() == String &&
+ (_config->throwGLE || op.throwGLE))
+- throw DBException((string) "From benchRun GLE" +
++ throw DBException((std::string) "From benchRun GLE" +
+ causedBy(result["err"].String()),
+ result["code"].eoo() ? 0 : result["code"].Int());
+ }
+@@ -1035,7 +1035,7 @@
+
+ if (!result["err"].eoo() && result["err"].type() == String &&
+ (_config->throwGLE || op.throwGLE))
+- throw DBException((string) "From benchRun GLE " +
++ throw DBException((std::string) "From benchRun GLE " +
+ causedBy(result["err"].String()),
+ result["code"].eoo() ? 0 : result["code"].Int());
+ }
+@@ -1136,7 +1136,7 @@
+ try {
+ std::unique_ptr<DBClientBase> conn(_config->createConnection());
+ if (!_config->username.empty()) {
+- string errmsg;
++ std::string errmsg;
+ if (!conn->auth("admin", _config->username, _config->password, errmsg)) {
+ uasserted(15932, "Authenticating to connection for benchThread failed: " + errmsg);
+ }
+@@ -1168,7 +1168,7 @@
+ std::unique_ptr<DBClientBase> conn(_config->createConnection());
+ // Must authenticate to admin db in order to run serverStatus command
+ if (_config->username != "") {
+- string errmsg;
++ std::string errmsg;
+ if (!conn->auth("admin", _config->username, _config->password, errmsg)) {
+ uasserted(16704,
+ str::stream()
+@@ -1204,7 +1204,7 @@
+ {
+ std::unique_ptr<DBClientBase> conn(_config->createConnection());
+ if (_config->username != "") {
+- string errmsg;
++ std::string errmsg;
+ // this can only fail if admin access was revoked since start of run
+ if (!conn->auth("admin", _config->username, _config->password, errmsg)) {
+ uasserted(16705,
+diff -Nru mongodb-src-r3.2.16_orig/src/mongo/util/net/miniwebserver.cpp mongodb-src-r3.2.16/src/mongo/util/net/miniwebserver.cpp
+--- mongodb-src-r3.2.16_orig/src/mongo/util/net/miniwebserver.cpp 2017-07-14 22:36:01.000000000 +0200
++++ mongodb-src-r3.2.16/src/mongo/util/net/miniwebserver.cpp 2017-08-01 16:01:01.832678112 +0200
+@@ -45,8 +45,9 @@
+ using std::endl;
+ using std::stringstream;
+ using std::vector;
++using std::string;
+
+-MiniWebServer::MiniWebServer(const string& name, const string& ip, int port)
++MiniWebServer::MiniWebServer(const std::string& name, const std::string& ip, int port)
+ : Listener(name, ip, port, false) {}
+
+ string MiniWebServer::parseURL(const char* buf) {
diff --git a/dev-db/mongodb/files/mongodb-3.2.4-boost-1.60.patch b/dev-db/mongodb/files/mongodb-3.2.4-boost-1.60.patch
new file mode 100644
index 000000000000..41c9bd2ba85c
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-3.2.4-boost-1.60.patch
@@ -0,0 +1,84 @@
+Fix issues caused by boost::none changes.
+See also: https://bugs.gentoo.org/show_bug.cgi?id=578846
+Adapted from: https://github.com/mongodb/mongo/commit/92c3f80f384d2825efeabd0d26aa534c0deb6988
+
+--- mongodb-src-r3.2.4/src/mongo/db/ftdc/compressor.cpp
++++ mongodb-src-r3.2.4/src/mongo/db/ftdc/compressor.cpp
+@@ -47,7 +47,7 @@
+ if (_referenceDoc.isEmpty()) {
+ FTDCBSONUtil::extractMetricsFromDocument(sample, sample, &_metrics);
+ _reset(sample, date);
+- return {boost::none_t()};
++ return {boost::none};
+ }
+
+ _metrics.resize(0);
+@@ -107,7 +107,7 @@
+ }
+
+ // The buffer is not full, inform the caller
+- return {boost::none_t()};
++ return {boost::none};
+ }
+
+ StatusWith<std::tuple<ConstDataRange, Date_t>> FTDCCompressor::getCompressedSamples() {
+--- mongodb-src-r3.2.4/src/mongo/db/ftdc/compressor_test.cpp
++++ mongodb-src-r3.2.4/src/mongo/db/ftdc/compressor_test.cpp
+@@ -122,7 +122,7 @@
+ TestTie() : _compressor(&_config) {}
+
+ ~TestTie() {
+- validate(boost::none_t());
++ validate(boost::none);
+ }
+
+ StatusWith<boost::optional<std::tuple<ConstDataRange, FTDCCompressor::CompressorState, Date_t>>>
+--- mongodb-src-r3.2.4/src/mongo/db/ftdc/file_writer.cpp
++++ mongodb-src-r3.2.4/src/mongo/db/ftdc/file_writer.cpp
+@@ -205,7 +205,7 @@
+
+ Status FTDCFileWriter::close() {
+ if (_archiveStream.is_open()) {
+- Status s = flush(boost::none_t(), Date_t());
++ Status s = flush(boost::none, Date_t());
+
+ _archiveStream.close();
+
+--- mongodb-src-r3.2.4/src/mongo/util/concurrency/shared_mutex_win.hpp
++++ mongodb-src-r3.2.4/src/mongo/util/concurrency/shared_mutex_win.hpp
+@@ -175,7 +175,7 @@
+ return true;
+ }
+
+- unsigned long const res=detail::win32::WaitForSingleObject(unlock_sem,::boost::detail::get_milliseconds_until(wait_until));
++ unsigned long const res=WaitForSingleObject(unlock_sem,::boost::detail::get_milliseconds_until(wait_until));
+ if(res==detail::win32::timeout)
+ {
+ for(;;)
+@@ -328,7 +328,7 @@
+ {
+ return true;
+ }
+- unsigned long const wait_res=detail::win32::WaitForMultipleObjects(2,semaphores,true,::boost::detail::get_milliseconds_until(wait_until));
++ unsigned long const wait_res=WaitForMultipleObjects(2,semaphores,true,::boost::detail::get_milliseconds_until(wait_until));
+ if(wait_res==detail::win32::timeout)
+ {
+ for(;;)
+@@ -421,7 +421,7 @@
+ return;
+ }
+
+- BOOST_VERIFY(!detail::win32::WaitForSingleObject(unlock_sem,detail::win32::infinite));
++ BOOST_VERIFY(!WaitForSingleObject(unlock_sem,detail::win32::infinite));
+ }
+ }
+
+@@ -502,7 +502,7 @@
+ {
+ if(!last_reader)
+ {
+- BOOST_VERIFY(!detail::win32::WaitForSingleObject(upgrade_sem,detail::win32::infinite));
++ BOOST_VERIFY(!WaitForSingleObject(upgrade_sem,detail::win32::infinite));
+ }
+ break;
+ }
diff --git a/dev-db/mongodb/files/mongodb-3.4.0-fix-scons.patch b/dev-db/mongodb/files/mongodb-3.4.0-fix-scons.patch
new file mode 100644
index 000000000000..2dd751fad813
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-3.4.0-fix-scons.patch
@@ -0,0 +1,35 @@
+--- a/SConstruct 2016-12-27 11:10:06.801949538 +0100
++++ b/SConstruct 2016-12-27 11:12:40.426407713 +0100
+@@ -1557,7 +1557,6 @@
+ # -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used.
+ env.Append( CCFLAGS=["-fno-omit-frame-pointer",
+ "-fno-strict-aliasing",
+- "-ggdb",
+ "-pthread",
+ "-Wall",
+ "-Wsign-compare",
+@@ -1568,8 +1567,9 @@
+ if not has_option("disable-warnings-as-errors"):
+ env.Append( CCFLAGS=["-Werror"] )
+
+- env.Append( CXXFLAGS=["-Woverloaded-virtual"] )
+ env.Append( LINKFLAGS=["-pthread"] )
++ env.Append( CXXFLAGS=os.environ['CXXFLAGS'] )
++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] )
+
+ # SERVER-9761: Ensure early detection of missing symbols in dependent libraries at program
+ # startup.
+@@ -1579,10 +1579,10 @@
+ env.Append( LINKFLAGS=["-Wl,-z,now"] )
+ env.Append( LINKFLAGS=["-rdynamic"] )
+
+- env.Append( LIBS=[] )
++ env.Append( LIBS=['pcre', 'pcrecpp', 'snappy', 'yaml-cpp'] )
+
+- #make scons colorgcc friendly
+- for key in ('HOME', 'TERM'):
++ #make scons colorgcc, distcc, ccache friendly
++ for key in ('HOME', 'PATH', 'TERM'):
+ try:
+ env['ENV'][key] = os.environ[key]
+ except KeyError:
diff --git a/dev-db/mongodb/files/mongodb-3.4.6-sysmacros-include.patch b/dev-db/mongodb/files/mongodb-3.4.6-sysmacros-include.patch
new file mode 100644
index 000000000000..868ba73e4421
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-3.4.6-sysmacros-include.patch
@@ -0,0 +1,38 @@
+From e245cac2b3c18015dee8caddd449532785d15c2b Mon Sep 17 00:00:00 2001
+From: Jason Carey <jcarey@argv.me>
+Date: Mon, 26 Jun 2017 11:09:10 -0400
+Subject: [PATCH] SERVER-29855 Pull major/minor from sys/sysmacros.h
+
+Per newer versions of glibc:
+
+----
+error: In the GNU C Library, "major" is defined
+ by <sys/sysmacros.h>. For historical compatibility, it is
+ currently defined by <sys/types.h> as well, but we plan to
+ remove this soon. To use "major", include <sys/sysmacros.h>
+ directly. If you did not intend to use a system-defined macro
+ "major", you should undefine it after including <sys/types.h>. [-Werror]
+ string path = str::stream() << "/sys/dev/block/" << major(dev) << ':' << minor(dev)
+----
+
+Including <sys/sysmacros.h> appears to be the correct solution to quiet
+the warning
+---
+ src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp b/src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp
+index 5a784b25dc7..c43e148d3f4 100644
+--- a/src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp
++++ b/src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp
+@@ -36,6 +36,10 @@
+ #include <boost/filesystem/path.hpp>
+ #include <fstream>
+
++#ifdef __linux__
++#include <sys/sysmacros.h>
++#endif
++
+ #include "mongo/db/mongod_options.h"
+ #include "mongo/db/storage/mmap_v1/data_file_sync.h"
+ #include "mongo/db/storage/mmap_v1/dur.h"
diff --git a/dev-db/mongodb/files/mongodb-3.4.7-no-boost-check.patch b/dev-db/mongodb/files/mongodb-3.4.7-no-boost-check.patch
new file mode 100644
index 000000000000..1d908e73f438
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-3.4.7-no-boost-check.patch
@@ -0,0 +1,13 @@
+diff --git a/SConstruct b/SConstruct
+index df92e41659..2c387d5a24 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -2831,8 +2831,6 @@ def doConfigure(myenv):
+ if use_system_version_of_library("boost"):
+ if not conf.CheckCXXHeader( "boost/filesystem/operations.hpp" ):
+ myenv.ConfError("can't find boost headers")
+- if not conf.CheckBoostMinVersion():
+- myenv.ConfError("system's version of boost is too old. version 1.49 or better required")
+
+ # Note that on Windows with using-system-boost builds, the following
+ # FindSysLibDep calls do nothing useful (but nothing problematic either)
diff --git a/dev-db/mongodb/files/mongodb-3.6.1-fix-scons.patch b/dev-db/mongodb/files/mongodb-3.6.1-fix-scons.patch
new file mode 100644
index 000000000000..d7bfb35b00d5
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-3.6.1-fix-scons.patch
@@ -0,0 +1,32 @@
+diff --git a/SConstruct b/SConstruct
+index fe7975b..92659a7 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -1619,7 +1619,6 @@ if env.TargetOSIs('posix'):
+ # -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used.
+ env.Append( CCFLAGS=["-fno-omit-frame-pointer",
+ "-fno-strict-aliasing",
+- "-ggdb",
+ "-pthread",
+ "-Wall",
+ "-Wsign-compare",
+@@ -1631,6 +1630,8 @@ if env.TargetOSIs('posix'):
+ env.Append( CCFLAGS=["-Werror"] )
+
+ env.Append( CXXFLAGS=["-Woverloaded-virtual"] )
++ env.Append( CXXFLAGS=os.environ['CXXFLAGS'] )
++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] )
+ if env.ToolchainIs('clang'):
+ env.Append( CXXFLAGS=['-Werror=unused-result'] )
+
+@@ -1650,8 +1651,8 @@ if env.TargetOSIs('posix'):
+
+ env.Append( LIBS=[] )
+
+- #make scons colorgcc friendly
+- for key in ('HOME', 'TERM'):
++ #make scons colorgcc, distcc, ccache friendly
++ for key in ('HOME', 'PATH', 'TERM'):
+ try:
+ env['ENV'][key] = os.environ[key]
+ except KeyError:
diff --git a/dev-db/mongodb/files/mongodb-3.6.1-no-compass.patch b/dev-db/mongodb/files/mongodb-3.6.1-no-compass.patch
new file mode 100644
index 000000000000..133c10fd258b
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-3.6.1-no-compass.patch
@@ -0,0 +1,46 @@
+diff --git a/src/mongo/SConscript b/src/mongo/SConscript
+index 9cde728..e29664e 100644
+--- a/src/mongo/SConscript
++++ b/src/mongo/SConscript
+@@ -629,33 +629,6 @@ for full_dir, archive_dir in env["ARCHIVE_ADDITION_DIR_MAP"].items():
+ for target in env["DIST_BINARIES"]:
+ installBinary(env, "db/modules/" + target)
+
+-# Set the download url to the right place
+-compass_type = 'compass-community'
+-if 'enterprise' in env['MONGO_MODULES']:
+- compass_type = 'compass'
+-
+-compass_script = "install_compass"
+-if env.TargetOSIs('windows'):
+- # On windows the .in needs to be explicitly added to the file.
+- compass_script = "Install-Compass.ps1.in"
+-
+-compass_python_interpreter = '/usr/bin/env python2'
+-if env.TargetOSIs('darwin'):
+- compass_python_interpreter = '/usr/bin/env python'
+-
+-compass_installer = env.Substfile('#/src/mongo/installer/compass/' + compass_script,
+- SUBST_DICT=[
+- ('@compass_type@', compass_type),
+- ('@python_interpreter@', compass_python_interpreter),
+- ])
+-distBinaries.append(compass_installer)
+-
+-compass_script_installer = env.Install("$INSTALL_DIR/bin", compass_installer)
+-
+-if env.TargetOSIs('posix'):
+- env.AddPostAction( compass_script_installer, 'chmod 755 $TARGET' )
+- env.AddPostAction( compass_installer, 'chmod 755 $TARGET' )
+-
+ # "dist" target is valid only when --use-new-tools is specified
+ # Attempts to build release artifacts without tools must fail
+ if has_option("use-new-tools"):
+@@ -673,7 +646,6 @@ if has_option("use-new-tools"):
+ '--transform $BUILD_DIR/mongo=$SERVER_DIST_BASENAME/bin',
+ '--transform $BUILD_DIR/mongo/stripped/src/mongo-tools=$SERVER_DIST_BASENAME/bin',
+ '--transform src/mongo-tools=$SERVER_DIST_BASENAME/bin',
+- '--transform src/mongo/installer/compass=$SERVER_DIST_BASENAME/bin',
+ '${TEMPFILE(SOURCES[1:])}'
+ ],
+ ),
diff --git a/dev-db/mongodb/files/mongodb-4.0.0-no-compass.patch b/dev-db/mongodb/files/mongodb-4.0.0-no-compass.patch
new file mode 100644
index 000000000000..35e9c172e9e7
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-4.0.0-no-compass.patch
@@ -0,0 +1,57 @@
+diff --git a/src/mongo/SConscript b/src/mongo/SConscript
+index c8f925b7..0e4f99ad 100644
+--- a/src/mongo/SConscript
++++ b/src/mongo/SConscript
+@@ -671,44 +671,6 @@ for full_dir, archive_dir in env["ARCHIVE_ADDITION_DIR_MAP"].items():
+ for target in env["DIST_BINARIES"]:
+ installBinary(env, "db/modules/" + target)
+
+-# Set the download url to the right place
+-compass_type = 'compass-community'
+-if 'enterprise' in env['MONGO_MODULES']:
+- compass_type = 'compass'
+-
+-compass_script = "install_compass"
+-if env.TargetOSIs('windows'):
+- # On windows the .in needs to be explicitly added to the file.
+- compass_script = "Install-Compass.ps1.in"
+-
+-compass_python_interpreter = '/usr/bin/env python2'
+-if env.TargetOSIs('darwin'):
+- compass_python_interpreter = '/usr/bin/env python'
+-
+-compass_installer = env.Substfile('#/src/mongo/installer/compass/' + compass_script,
+- SUBST_DICT=[
+- ('@compass_type@', compass_type),
+- ('@python_interpreter@', compass_python_interpreter),
+- ])
+-distBinaries.append(compass_installer)
+-
+-if not hygienic:
+- compass_script_installer = env.Install("$INSTALL_DIR/bin", compass_installer)
+-else:
+- compass_script_installer = env.AutoInstall(
+- 'bin',
+- source=[
+- compass_installer,
+- ],
+- INSTALL_ALIAS=[
+- 'tools',
+- ],
+- )
+-
+-if env.TargetOSIs('posix'):
+- env.AddPostAction( compass_script_installer, 'chmod 755 $TARGET' )
+- env.AddPostAction( compass_installer, 'chmod 755 $TARGET' )
+-
+ # "dist" target is valid only when --use-new-tools is specified
+ # Attempts to build release artifacts without tools must fail
+ if has_option("use-new-tools"):
+@@ -726,7 +688,6 @@ if has_option("use-new-tools"):
+ '--transform $BUILD_DIR/mongo=$SERVER_DIST_BASENAME/bin',
+ '--transform $BUILD_DIR/mongo/stripped/src/mongo-tools=$SERVER_DIST_BASENAME/bin',
+ '--transform src/mongo-tools=$SERVER_DIST_BASENAME/bin',
+- '--transform src/mongo/installer/compass=$SERVER_DIST_BASENAME/bin',
+ '${TEMPFILE(SOURCES[1:])}'
+ ],
+ ),
diff --git a/dev-db/mongodb/files/mongodb.conf-r3 b/dev-db/mongodb/files/mongodb.conf-r3
new file mode 100644
index 000000000000..83b4cc0589ad
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb.conf-r3
@@ -0,0 +1,34 @@
+# !! IMPORTANT !!
+#
+# This file uses the YAML format as described in the documentation:
+# http://docs.mongodb.org/manual/reference/configuration-options/
+
+storage:
+ dbPath: "/var/lib/mongodb"
+ #engine: wiredTiger
+
+systemLog:
+ destination: file
+ path: "/var/log/mongodb/mongodb.log"
+ quiet: true
+ logAppend: true
+
+net:
+ port: 27017
+ bindIp: 127.0.0.1
+ #ssl:
+ # mode: disabled
+
+#security:
+ #keyFile:
+ #clusterAuthMode:
+
+#replication:
+ #replSetName:
+
+# Specifies one of the MongoDB parameters described here:
+# http://docs.mongodb.org/manual/reference/parameters/
+#
+# You can specify multiple setParameter fields such as:
+# setParameter: {enableTestCommands: 1}
+#setParameter:
diff --git a/dev-db/mongodb/files/mongodb.confd-r2 b/dev-db/mongodb/files/mongodb.confd-r2
new file mode 100644
index 000000000000..dddb67e9301d
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb.confd-r2
@@ -0,0 +1,12 @@
+# !! IMPORTANT !!
+#
+# This file is ONLY used to override some of the init script configuration.
+#
+# You should NOT use this file to configure your mongodb instance,
+# see the /etc/mongodb.conf file instead.
+#
+# Available init script modifiers :
+# - config_file : the configuration file to use (default : /etc/mongodb.conf)
+# - user : the user used to run your mongodb instance (default : mongodb)
+# - group : the group used to run your mongodb instance (default : mongodb)
+# - run_dir : the run directory for your PID files (default : /run/mongodb)
diff --git a/dev-db/mongodb/files/mongodb.confd-r3 b/dev-db/mongodb/files/mongodb.confd-r3
new file mode 100644
index 000000000000..e515d1ddc730
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb.confd-r3
@@ -0,0 +1,11 @@
+# !! IMPORTANT !!
+#
+# This file is ONLY used to override some of the init script configuration.
+#
+# You should NOT use this file to configure your mongodb instance,
+# see the /etc/mongodb.conf file instead.
+#
+# Available init script modifiers :
+# - config_file : the configuration file to use (default : /etc/mongodb.conf)
+# - user : the user used to run your mongodb instance (default : mongodb)
+# - group : the group used to run your mongodb instance (default : mongodb)
diff --git a/dev-db/mongodb/files/mongodb.initd-r2 b/dev-db/mongodb/files/mongodb.initd-r2
new file mode 100644
index 000000000000..27b9f2a43872
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb.initd-r2
@@ -0,0 +1,26 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+config_file=${config_file:-/etc/${SVCNAME}.conf}
+run_dir=${run_dir:-/run/mongodb}
+
+command="/usr/bin/mongod"
+command_args="--config ${config_file}"
+command_background="true"
+pidfile=${run_dir}/${SVCNAME}.pid
+user=${user:-mongodb}
+group=${group:-mongodb}
+start_stop_daemon_args="--user ${user} --group ${group}"
+
+depend() {
+ use net
+}
+
+start_pre() {
+ checkpath -d -m 0750 -o "${user}":"${group}" "${run_dir}"
+ if [ ! -f ${config_file} ]; then
+ eerror "Missing configuration file ${config_file}"
+ return 1
+ fi
+}
diff --git a/dev-db/mongodb/files/mongodb.initd-r3 b/dev-db/mongodb/files/mongodb.initd-r3
new file mode 100644
index 000000000000..778ef7482406
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb.initd-r3
@@ -0,0 +1,18 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+: ${config_file:="/etc/${RC_SVCNAME}.conf"}
+: ${user:=mongodb}
+: ${group:=mongodb}
+
+command="/usr/bin/mongod"
+command_args="--config ${config_file}"
+command_background="true"
+pidfile="/run/${RC_SVCNAME}.pid"
+command_user="${user}:${group}"
+required_files="${config_file}"
+
+depend() {
+ use net
+}
diff --git a/dev-db/mongodb/files/mongodb.logrotate b/dev-db/mongodb/files/mongodb.logrotate
new file mode 100644
index 000000000000..f95a438b5b2c
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb.logrotate
@@ -0,0 +1,13 @@
+# Default log rotation / compression keeps 1 year of logs.
+/var/log/mongodb/*.log {
+ daily
+ rotate 365
+ dateext
+ copytruncate
+ delaycompress
+ compress
+ notifempty
+ extension gz
+ sharedscripts
+ missingok
+}
diff --git a/dev-db/mongodb/files/mongodb.service b/dev-db/mongodb/files/mongodb.service
new file mode 100644
index 000000000000..78d551183838
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=High-performance, schema-free document-oriented database
+After=network.target
+
+[Service]
+User=mongodb
+ExecStart=/usr/bin/mongod --quiet --config /etc/mongodb.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/dev-db/mongodb/files/mongos.conf-r2 b/dev-db/mongodb/files/mongos.conf-r2
new file mode 100644
index 000000000000..fc0068962cfd
--- /dev/null
+++ b/dev-db/mongodb/files/mongos.conf-r2
@@ -0,0 +1,30 @@
+# !! IMPORTANT !!
+#
+# This file uses the YAML format as described in the documentation:
+# http://docs.mongodb.org/manual/reference/configuration-options/
+
+systemLog:
+ destination: file
+ path: "/var/log/mongodb/mongos.log"
+ quiet: true
+ logAppend: true
+
+net:
+ port: 27017
+ bindIp: 127.0.0.1
+ ssl:
+ mode: disabled
+
+#security:
+ #keyFile:
+ #clusterAuthMode:
+
+#sharding:
+ #configDB:
+
+# Specifies one of the MongoDB parameters described here:
+# http://docs.mongodb.org/manual/reference/parameters/
+#
+# You can specify multiple setParameter fields such as:
+# setParameter: {enableTestCommands: 1}
+#setParameter:
diff --git a/dev-db/mongodb/files/mongos.confd-r2 b/dev-db/mongodb/files/mongos.confd-r2
new file mode 100644
index 000000000000..0dc2a189ff67
--- /dev/null
+++ b/dev-db/mongodb/files/mongos.confd-r2
@@ -0,0 +1,12 @@
+# !! IMPORTANT !!
+#
+# This file is ONLY used to override some of the init script configuration.
+#
+# You should NOT use this file to configure your mongos instance,
+# see the /etc/mongos.conf file instead.
+#
+# Available init script modifiers :
+# - config_file : the configuration file to use (default : /etc/mongos.conf)
+# - user : the user used to run your mongodb instance (default : mongodb)
+# - group : the group used to run your mongodb instance (default : mongodb)
+# - run_dir : the run directory for your PID files (default : /run/mongodb)
diff --git a/dev-db/mongodb/files/mongos.confd-r3 b/dev-db/mongodb/files/mongos.confd-r3
new file mode 100644
index 000000000000..7f297dfd3e43
--- /dev/null
+++ b/dev-db/mongodb/files/mongos.confd-r3
@@ -0,0 +1,11 @@
+# !! IMPORTANT !!
+#
+# This file is ONLY used to override some of the init script configuration.
+#
+# You should NOT use this file to configure your mongos instance,
+# see the /etc/mongos.conf file instead.
+#
+# Available init script modifiers :
+# - config_file : the configuration file to use (default : /etc/mongos.conf)
+# - user : the user used to run your mongodb instance (default : mongodb)
+# - group : the group used to run your mongodb instance (default : mongodb)
diff --git a/dev-db/mongodb/files/mongos.initd-r2 b/dev-db/mongodb/files/mongos.initd-r2
new file mode 100644
index 000000000000..2e7db669a5e0
--- /dev/null
+++ b/dev-db/mongodb/files/mongos.initd-r2
@@ -0,0 +1,26 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+config_file=${config_file:-/etc/${SVCNAME}.conf}
+run_dir=${run_dir:-/run/mongodb}
+
+command="/usr/bin/mongos"
+command_args="--config ${config_file}"
+command_background="true"
+pidfile=${run_dir}/${SVCNAME}.pid
+user=${user:-mongodb}
+group=${group:-mongodb}
+start_stop_daemon_args="--user ${user} --group ${group}"
+
+depend() {
+ use net
+}
+
+start_pre() {
+ checkpath -d -m 0750 -o "${user}":"${group}" "${run_dir}"
+ if [ ! -f ${config_file} ]; then
+ eerror "Missing configuration file ${config_file}"
+ return 1
+ fi
+}
diff --git a/dev-db/mongodb/files/mongos.initd-r3 b/dev-db/mongodb/files/mongos.initd-r3
new file mode 100644
index 000000000000..cf5844ae30a9
--- /dev/null
+++ b/dev-db/mongodb/files/mongos.initd-r3
@@ -0,0 +1,18 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+: ${config_file:="/etc/${RC_SVCNAME}.conf"}
+: ${user:=mongodb}
+: ${group:=mongodb}
+
+command="/usr/bin/mongos"
+command_args="--config ${config_file}"
+command_background="true"
+pidfile="/run/${RC_SVCNAME}.pid"
+command_user="${user}:${group}"
+required_files="${config_file}"
+
+depend() {
+ use net
+}
diff --git a/dev-db/mongodb/metadata.xml b/dev-db/mongodb/metadata.xml
new file mode 100644
index 000000000000..9a81e6986392
--- /dev/null
+++ b/dev-db/mongodb/metadata.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>julien@thebault.co</email>
+ <name>Lujeni</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>ultrabug@gentoo.org</email>
+ <name>Alexys Jacob</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription lang="en">
+ MongoDB (from "humongous") is a scalable, high-performance, open source,
+ schema-free, document-oriented database. Written in C++, MongoDB features:
+
+ MongoDB bridges the gap between key-value stores (which are fast and highly
+ scalable) and traditional RDBMS systems (which provide structured schemas
+ and powerful queries).
+ </longdescription>
+ <use>
+ <flag name="mms-agent">Install the MongoDB Monitoring Service agent</flag>
+ <flag name="tools">Install the MongoDB tools (mongoimport, mongodump...) from <pkg>app-admin/mongo-tools</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-db/mongodb/mongodb-3.0.14.ebuild b/dev-db/mongodb/mongodb-3.0.14.ebuild
new file mode 100644
index 000000000000..97c48d9a1d0b
--- /dev/null
+++ b/dev-db/mongodb/mongodb-3.0.14.ebuild
@@ -0,0 +1,174 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+SCONS_MIN_VERSION="2.3.0"
+CHECKREQS_DISK_BUILD="2400M"
+CHECKREQS_DISK_USR="512M"
+CHECKREQS_MEMORY="1024M"
+
+inherit eutils flag-o-matic multilib pax-utils scons-utils systemd toolchain-funcs user versionator check-reqs
+
+MY_P=${PN}-src-r${PV/_rc/-rc}
+
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
+HOMEPAGE="http://www.mongodb.org"
+SRC_URI="http://downloads.mongodb.org/src/${MY_P}.tar.gz"
+
+LICENSE="AGPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug kerberos libressl mms-agent ssl +tools"
+
+RDEPEND="app-arch/snappy
+ >=dev-cpp/yaml-cpp-0.5.1
+ >=dev-libs/boost-1.57[threads(+)]
+ >=dev-libs/libpcre-8.39[cxx]
+ dev-libs/snowball-stemmer
+ net-libs/libpcap
+ sys-libs/zlib
+ mms-agent? ( app-admin/mms-agent )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ >=sys-devel/gcc-4.8.2:*
+ sys-libs/ncurses
+ sys-libs/readline
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] )"
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.0.14-fix-scons.patch"
+ "${FILESDIR}/${PN}-3.0.14-fix-std-string.patch"
+ "${FILESDIR}/${PN}-3.4.6-sysmacros-include.patch"
+)
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewgroup mongodb
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb
+
+ # Maintainer notes
+ #
+ # --use-system-tcmalloc is strongly NOT recommended:
+ # https://www.mongodb.org/about/contributors/tutorial/build-mongodb-from-source/
+ #
+ # --c++11 is required by scons instead of auto detection:
+ # https://jira.mongodb.org/browse/SERVER-19661
+
+ scons_opts=(
+ --variant-dir=build --cc=$(tc-getCC) --cxx=$(tc-getCXX) --c++11
+ --disable-warnings-as-errors
+ --use-system-boost
+ --use-system-pcre
+ --use-system-snappy
+ --use-system-stemmer
+ --use-system-yaml
+ )
+
+ if use debug; then
+ scons_opts+=( --dbg=on )
+ fi
+
+ if use prefix; then
+ scons_opts+=(
+ --cpppath="${EPREFIX}/usr/include )"
+ --libpath="${EPREFIX}/usr/$(get_libdir)"
+ )
+ fi
+
+ if use kerberos; then
+ scons_opts+=( --use-sasl-client )
+ fi
+
+ if use ssl; then
+ scons_opts+=( --ssl )
+ fi
+}
+
+src_compile() {
+ # respect mongoDB upstream's basic recommendations
+ # see bug #536688 and #526114
+ if ! use debug; then
+ filter-flags '-m*'
+ filter-flags '-O?'
+ fi
+ escons "${scons_opts[@]}" core tools || die
+}
+
+src_install() {
+ escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr || die
+
+ local x
+ for x in /var/{lib,log}/${PN}; do
+ keepdir "${x}"
+ fowners mongodb:mongodb "${x}"
+ done
+
+ doman debian/mongo*.1
+ dodoc README docs/building.md
+
+ newinitd "${FILESDIR}/${PN}.initd-r2" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r2" ${PN}
+ newinitd "${FILESDIR}/${PN/db/s}.initd-r2" ${PN/db/s}
+ newconfd "${FILESDIR}/${PN/db/s}.confd-r2" ${PN/db/s}
+
+ insinto /etc
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
+ newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ # see bug #526114
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
+}
+
+pkg_preinst() {
+ # wrt bug #461466
+ if [[ "$(get_libdir)" == "lib64" ]]; then
+ rmdir "${ED}"/usr/lib/ &>/dev/null
+ fi
+}
+
+src_test() {
+ escons "${scons_opts[@]}" unittests || die
+
+ # tests fail
+ sed -i '/\/util\/options_parser\/options_parser_test/d' build/unittests.txt || die
+ sed -i '/\/mongo\/server_options_test/d' build/unittests.txt || die
+
+ local x
+ while read x; do
+ einfo "Running test $x"
+ ./$x || die
+ done < build/unittests.txt
+}
+
+pkg_postinst() {
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 3.0 ${v}; then
+ ewarn "!! IMPORTANT !!"
+ ewarn " "
+ ewarn "${PN} configuration files have changed !"
+ ewarn " "
+ ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf"
+ ewarn " http://docs.mongodb.org/manual/reference/configuration-options/"
+ ewarn " "
+ ewarn "Make sure you also follow the upgrading process :"
+ ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/"
+ ewarn " "
+ ewarn "MongoDB 3.0 introduces the WiredTiger storage engine."
+ ewarn "WiredTiger is incompatible with MMAPv1 and you need to dump/reload your data if you want to use it."
+ ewarn "Once you have your data dumped, you need to set storage.engine: wiredTiger in /etc/${PN}.conf"
+ ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/#change-storage-engine-to-wiredtiger"
+ break
+ fi
+ done
+}
diff --git a/dev-db/mongodb/mongodb-3.0.15.ebuild b/dev-db/mongodb/mongodb-3.0.15.ebuild
new file mode 100644
index 000000000000..08741ca2af67
--- /dev/null
+++ b/dev-db/mongodb/mongodb-3.0.15.ebuild
@@ -0,0 +1,174 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+SCONS_MIN_VERSION="2.3.0"
+CHECKREQS_DISK_BUILD="2400M"
+CHECKREQS_DISK_USR="512M"
+CHECKREQS_MEMORY="1024M"
+
+inherit eutils flag-o-matic multilib pax-utils scons-utils systemd toolchain-funcs user versionator check-reqs
+
+MY_P=${PN}-src-r${PV/_rc/-rc}
+
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
+HOMEPAGE="http://www.mongodb.org"
+SRC_URI="http://downloads.mongodb.org/src/${MY_P}.tar.gz"
+
+LICENSE="AGPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug kerberos libressl mms-agent ssl +tools"
+
+RDEPEND="app-arch/snappy
+ >=dev-cpp/yaml-cpp-0.5.1
+ >=dev-libs/boost-1.57[threads(+)]
+ >=dev-libs/libpcre-8.39[cxx]
+ dev-libs/snowball-stemmer
+ net-libs/libpcap
+ sys-libs/zlib
+ mms-agent? ( app-admin/mms-agent )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ >=sys-devel/gcc-4.8.2:*
+ sys-libs/ncurses
+ sys-libs/readline
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] )"
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.0.14-fix-scons.patch"
+ "${FILESDIR}/${PN}-3.0.14-fix-std-string.patch"
+ "${FILESDIR}/${PN}-3.4.6-sysmacros-include.patch"
+)
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewgroup mongodb
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb
+
+ # Maintainer notes
+ #
+ # --use-system-tcmalloc is strongly NOT recommended:
+ # https://www.mongodb.org/about/contributors/tutorial/build-mongodb-from-source/
+ #
+ # --c++11 is required by scons instead of auto detection:
+ # https://jira.mongodb.org/browse/SERVER-19661
+
+ scons_opts=(
+ --variant-dir=build --cc=$(tc-getCC) --cxx=$(tc-getCXX) --c++11
+ --disable-warnings-as-errors
+ --use-system-boost
+ --use-system-pcre
+ --use-system-snappy
+ --use-system-stemmer
+ --use-system-yaml
+ )
+
+ if use debug; then
+ scons_opts+=( --dbg=on )
+ fi
+
+ if use prefix; then
+ scons_opts+=(
+ --cpppath="${EPREFIX}/usr/include )"
+ --libpath="${EPREFIX}/usr/$(get_libdir)"
+ )
+ fi
+
+ if use kerberos; then
+ scons_opts+=( --use-sasl-client )
+ fi
+
+ if use ssl; then
+ scons_opts+=( --ssl )
+ fi
+}
+
+src_compile() {
+ # respect mongoDB upstream's basic recommendations
+ # see bug #536688 and #526114
+ if ! use debug; then
+ filter-flags '-m*'
+ filter-flags '-O?'
+ fi
+ escons "${scons_opts[@]}" core tools || die
+}
+
+src_install() {
+ escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr || die
+
+ local x
+ for x in /var/{lib,log}/${PN}; do
+ keepdir "${x}"
+ fowners mongodb:mongodb "${x}"
+ done
+
+ doman debian/mongo*.1
+ dodoc README docs/building.md
+
+ newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
+ newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
+ newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
+
+ insinto /etc
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
+ newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ # see bug #526114
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
+}
+
+pkg_preinst() {
+ # wrt bug #461466
+ if [[ "$(get_libdir)" == "lib64" ]]; then
+ rmdir "${ED}"/usr/lib/ &>/dev/null
+ fi
+}
+
+src_test() {
+ escons "${scons_opts[@]}" unittests || die
+
+ # tests fail
+ sed -i '/\/util\/options_parser\/options_parser_test/d' build/unittests.txt || die
+ sed -i '/\/mongo\/server_options_test/d' build/unittests.txt || die
+
+ local x
+ while read x; do
+ einfo "Running test $x"
+ ./$x || die
+ done < build/unittests.txt
+}
+
+pkg_postinst() {
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 3.0 ${v}; then
+ ewarn "!! IMPORTANT !!"
+ ewarn " "
+ ewarn "${PN} configuration files have changed !"
+ ewarn " "
+ ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf"
+ ewarn " http://docs.mongodb.org/manual/reference/configuration-options/"
+ ewarn " "
+ ewarn "Make sure you also follow the upgrading process :"
+ ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/"
+ ewarn " "
+ ewarn "MongoDB 3.0 introduces the WiredTiger storage engine."
+ ewarn "WiredTiger is incompatible with MMAPv1 and you need to dump/reload your data if you want to use it."
+ ewarn "Once you have your data dumped, you need to set storage.engine: wiredTiger in /etc/${PN}.conf"
+ ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/#change-storage-engine-to-wiredtiger"
+ break
+ fi
+ done
+}
diff --git a/dev-db/mongodb/mongodb-3.2.17.ebuild b/dev-db/mongodb/mongodb-3.2.17.ebuild
new file mode 100644
index 000000000000..bda8f3b4e588
--- /dev/null
+++ b/dev-db/mongodb/mongodb-3.2.17.ebuild
@@ -0,0 +1,197 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+SCONS_MIN_VERSION="2.3.0"
+CHECKREQS_DISK_BUILD="2400M"
+CHECKREQS_DISK_USR="512M"
+CHECKREQS_MEMORY="1024M"
+
+inherit eutils flag-o-matic multilib multiprocessing pax-utils python-any-r1 scons-utils systemd toolchain-funcs user versionator check-reqs
+
+MY_P=${PN}-src-r${PV/_rc/-rc}
+
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
+HOMEPAGE="http://www.mongodb.org"
+SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
+
+LICENSE="AGPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 ~x86"
+IUSE="debug kerberos libressl mms-agent ssl test +tools"
+
+RDEPEND=">=app-arch/snappy-1.1.2
+ >=dev-cpp/yaml-cpp-0.5.1
+ >=dev-libs/boost-1.57:=[threads(+)]
+ >=dev-libs/libpcre-8.39[cxx]
+ dev-libs/snowball-stemmer
+ net-libs/libpcap
+ >=sys-libs/zlib-1.2.8:=
+ mms-agent? ( app-admin/mms-agent )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ =dev-lang/python-2*
+ <dev-util/scons-3
+ >=sys-devel/gcc-4.8.2:*
+ sys-libs/ncurses
+ sys-libs/readline
+ debug? ( dev-util/valgrind )
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] )
+ test? (
+ dev-python/pymongo
+ dev-python/pyyaml
+ )"
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.2.0-fix-scons.patch"
+ "${FILESDIR}/${PN}-3.2.4-boost-1.60.patch"
+ "${FILESDIR}/${PN}-3.2.10-boost-1.62.patch"
+ "${FILESDIR}/${PN}-3.2.16-Replace-string-with-explicit-std-string.patch"
+ "${FILESDIR}/${PN}-3.4.6-sysmacros-include.patch"
+)
+
+S=${WORKDIR}/${MY_P}
+
+pkg_pretend() {
+ if [[ ${REPLACING_VERSIONS} < 3.0 ]]; then
+ ewarn "To upgrade an existing MongoDB deployment to 3.2, you must be"
+ ewarn "running a 3.0-series release. Please update to the latest 3.0"
+ ewarn "release before continuing if wish to keep your data."
+ fi
+}
+
+pkg_setup() {
+ enewgroup mongodb
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb
+
+ # Maintainer notes
+ #
+ # --use-system-tcmalloc is strongly NOT recommended:
+ # https://www.mongodb.org/about/contributors/tutorial/build-mongodb-from-source/
+
+ scons_opts=(
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+
+ --disable-warnings-as-errors
+ --use-system-boost
+ --use-system-pcre
+ --use-system-snappy
+ --use-system-stemmer
+ --use-system-yaml
+ --use-system-zlib
+ )
+
+ # wiredtiger not supported on 32bit platforms #572166
+ use x86 && scons_opts+=( --wiredtiger=off )
+
+ if use debug; then
+ scons_opts+=( --dbg=on )
+ fi
+
+ if use prefix; then
+ scons_opts+=(
+ --cpppath="${EPREFIX}/usr/include"
+ --libpath="${EPREFIX}/usr/$(get_libdir)"
+ )
+ fi
+
+ if use kerberos; then
+ scons_opts+=( --use-sasl-client )
+ fi
+
+ if use ssl; then
+ scons_opts+=( --ssl )
+ fi
+
+ python-any-r1_pkg_setup
+}
+
+src_compile() {
+ # respect mongoDB upstream's basic recommendations
+ # see bug #536688 and #526114
+ if ! use debug; then
+ filter-flags '-m*'
+ filter-flags '-O?'
+ fi
+ escons "${scons_opts[@]}" core tools
+}
+
+src_install() {
+ escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
+
+ local x
+ for x in /var/{lib,log}/${PN}; do
+ keepdir "${x}"
+ fowners mongodb:mongodb "${x}"
+ fperms 0750 "${x}"
+ done
+
+ doman debian/mongo*.1
+ dodoc README docs/building.md
+
+ newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
+ newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
+ newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
+
+ insinto /etc
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
+ newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ # see bug #526114
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
+}
+
+pkg_preinst() {
+ # wrt bug #461466
+ if [[ "$(get_libdir)" == "lib64" ]]; then
+ rmdir "${ED}"/usr/lib/ &>/dev/null
+ fi
+}
+
+# FEATURES="test -usersandbox" emerge dev-db/mongodb
+src_test() {
+ "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
+}
+
+pkg_postinst() {
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 3.0 ${v}; then
+ ewarn "!! IMPORTANT !!"
+ ewarn " "
+ ewarn "${PN} configuration files have changed !"
+ ewarn " "
+ ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf"
+ ewarn " http://docs.mongodb.org/manual/reference/configuration-options/"
+ ewarn " "
+ ewarn "Make sure you also follow the upgrading process :"
+ ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/"
+ ewarn " "
+ ewarn "MongoDB 3.0 introduces the WiredTiger storage engine."
+ ewarn "WiredTiger is incompatible with MMAPv1 and you need to dump/reload your data if you want to use it."
+ ewarn "Once you have your data dumped, you need to set storage.engine: wiredTiger in /etc/${PN}.conf"
+ ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/#change-storage-engine-to-wiredtiger"
+ break
+ fi
+ done
+
+ ewarn "Make sure to read the release notes and follow the upgrade process:"
+ ewarn " https://docs.mongodb.org/manual/release-notes/3.2/"
+ ewarn " https://docs.mongodb.org/master/release-notes/3.2-upgrade/"
+ ewarn
+ ewarn " Starting in 3.2, MongoDB uses the WiredTiger as the default storage engine."
+}
diff --git a/dev-db/mongodb/mongodb-3.4.10.ebuild b/dev-db/mongodb/mongodb-3.4.10.ebuild
new file mode 100644
index 000000000000..18ea5f820117
--- /dev/null
+++ b/dev-db/mongodb/mongodb-3.4.10.ebuild
@@ -0,0 +1,194 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+SCONS_MIN_VERSION="2.3.0"
+CHECKREQS_DISK_BUILD="2400M"
+CHECKREQS_DISK_USR="512M"
+CHECKREQS_MEMORY="1024M"
+
+inherit eutils flag-o-matic multilib multiprocessing pax-utils python-any-r1 scons-utils systemd toolchain-funcs user versionator check-reqs
+
+MY_P=${PN}-src-r${PV/_rc/-rc}
+
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
+HOMEPAGE="http://www.mongodb.org"
+SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
+
+LICENSE="AGPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64"
+IUSE="debug kerberos libressl mms-agent ssl test +tools"
+
+RDEPEND=">=app-arch/snappy-1.1.3
+ >=dev-cpp/yaml-cpp-0.5.3
+ >=dev-libs/boost-1.60:=[threads(+)]
+ >=dev-libs/libpcre-8.41[cxx]
+ dev-libs/snowball-stemmer
+ net-libs/libpcap
+ >=sys-libs/zlib-1.2.8:=
+ mms-agent? ( app-admin/mms-agent )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ =dev-lang/python-2*
+ <dev-util/scons-3
+ >=sys-devel/gcc-5.3.0:*
+ sys-libs/ncurses
+ sys-libs/readline
+ debug? ( dev-util/valgrind )
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] )
+ test? (
+ dev-python/pymongo
+ dev-python/pyyaml
+ )"
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.2.10-boost-1.62.patch"
+ "${FILESDIR}/${PN}-3.4.0-fix-scons.patch"
+ "${FILESDIR}/${PN}-3.4.6-sysmacros-include.patch"
+ "${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
+)
+
+S=${WORKDIR}/${MY_P}
+
+pkg_pretend() {
+ if [[ ${REPLACING_VERSIONS} < 3.0 ]]; then
+ ewarn "To upgrade from a version earlier than the 3.0-series, you must"
+ ewarn "successively upgrade major releases until you have upgraded"
+ ewarn "to 3.2-series. Then upgrade to 3.4 series."
+ fi
+}
+
+pkg_setup() {
+ enewgroup mongodb
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb
+
+ # Maintainer notes
+ #
+ # --use-system-tcmalloc is strongly NOT recommended:
+ # https://www.mongodb.org/about/contributors/tutorial/build-mongodb-from-source/
+
+ scons_opts=(
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+
+ --disable-warnings-as-errors
+ --use-system-boost
+ --use-system-pcre
+ --use-system-snappy
+ --use-system-stemmer
+ --use-system-yaml
+ --use-system-zlib
+ )
+
+ if use debug; then
+ scons_opts+=( --dbg=on )
+ fi
+
+ if use prefix; then
+ scons_opts+=(
+ --cpppath="${EPREFIX}/usr/include"
+ --libpath="${EPREFIX}/usr/$(get_libdir)"
+ )
+ fi
+
+ if use kerberos; then
+ scons_opts+=( --use-sasl-client )
+ fi
+
+ if use ssl; then
+ scons_opts+=( --ssl )
+ fi
+
+ python-any-r1_pkg_setup
+}
+
+src_compile() {
+ # respect mongoDB upstream's basic recommendations
+ # see bug #536688 and #526114
+ if ! use debug; then
+ filter-flags '-m*'
+ filter-flags '-O?'
+ fi
+ escons "${scons_opts[@]}" core tools
+}
+
+src_install() {
+ escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
+
+ local x
+ for x in /var/{lib,log}/${PN}; do
+ keepdir "${x}"
+ fowners mongodb:mongodb "${x}"
+ fperms 0750 "${x}"
+ done
+
+ doman debian/mongo*.1
+ dodoc README docs/building.md
+
+ newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
+ newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
+ newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
+
+ insinto /etc
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
+ newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ # see bug #526114
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
+}
+
+pkg_preinst() {
+ # wrt bug #461466
+ if [[ "$(get_libdir)" == "lib64" ]]; then
+ rmdir "${ED}"/usr/lib/ &>/dev/null
+ fi
+}
+
+# FEATURES="test -usersandbox" emerge dev-db/mongodb
+src_test() {
+ # this one test fails
+ rm jstests/core/jsHeapLimit.js || die
+
+ "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
+}
+
+pkg_postinst() {
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 3.0 ${v}; then
+ ewarn "!! IMPORTANT !!"
+ ewarn " "
+ ewarn "${PN} configuration files have changed !"
+ ewarn " "
+ ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf"
+ ewarn " http://docs.mongodb.org/manual/reference/configuration-options/"
+ ewarn " "
+ ewarn "Make sure you also follow the upgrading process :"
+ ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/"
+ ewarn " "
+ ewarn "MongoDB 3.0 introduces the WiredTiger storage engine."
+ ewarn "WiredTiger is incompatible with MMAPv1 and you need to dump/reload your data if you want to use it."
+ ewarn "Once you have your data dumped, you need to set storage.engine: wiredTiger in /etc/${PN}.conf"
+ ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/#change-storage-engine-to-wiredtiger"
+ break
+ fi
+ done
+
+ ewarn "Make sure to read the release notes and follow the upgrade process:"
+ ewarn " https://docs.mongodb.org/manual/release-notes/3.4/"
+ ewarn " https://docs.mongodb.com/manual/release-notes/3.4/#upgrade-procedures"
+}
diff --git a/dev-db/mongodb/mongodb-3.4.13.ebuild b/dev-db/mongodb/mongodb-3.4.13.ebuild
new file mode 100644
index 000000000000..3869755fe9f4
--- /dev/null
+++ b/dev-db/mongodb/mongodb-3.4.13.ebuild
@@ -0,0 +1,167 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+SCONS_MIN_VERSION="2.3.0"
+CHECKREQS_DISK_BUILD="2400M"
+CHECKREQS_DISK_USR="512M"
+CHECKREQS_MEMORY="1024M"
+
+inherit check-reqs eutils flag-o-matic multilib multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user versionator
+
+MY_P=${PN}-src-r${PV/_rc/-rc}
+
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
+HOMEPAGE="https://www.mongodb.com"
+SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
+
+LICENSE="AGPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug kerberos libressl mms-agent ssl test +tools"
+
+RDEPEND=">=app-arch/snappy-1.1.3
+ >=dev-cpp/yaml-cpp-0.5.3
+ >=dev-libs/boost-1.60:=[threads(+)]
+ >=dev-libs/libpcre-8.41[cxx]
+ dev-libs/snowball-stemmer
+ net-libs/libpcap
+ >=sys-libs/zlib-1.2.8:=
+ mms-agent? ( app-admin/mms-agent )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ <dev-util/scons-3
+ sys-libs/ncurses
+ sys-libs/readline
+ debug? ( dev-util/valgrind )
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] )
+ test? (
+ dev-python/pymongo[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ )"
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.4.0-fix-scons.patch"
+ "${FILESDIR}/${PN}-3.4.6-sysmacros-include.patch"
+ "${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
+)
+
+S=${WORKDIR}/${MY_P}
+
+pkg_pretend() {
+ if [[ -n ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.2 ]]; then
+ ewarn "To upgrade from a version earlier than the 3.2-series, you must"
+ ewarn "successively upgrade major releases until you have upgraded"
+ ewarn "to 3.2-series. Then upgrade to 3.4 series."
+ fi
+}
+
+pkg_setup() {
+ enewgroup mongodb
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb
+
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # remove bundled libs
+ rm -rv src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die
+}
+
+src_configure() {
+ # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
+ # --use-system-icu fails tests
+ # --use-system-tcmalloc is strongly NOT recommended:
+
+ scons_opts=(
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+
+ --disable-warnings-as-errors
+ --use-system-boost
+ --use-system-pcre
+ --use-system-snappy
+ --use-system-stemmer
+ --use-system-yaml
+ --use-system-zlib
+ )
+
+ use debug && scons_opts+=( --dbg=on )
+ use kerberos && scons_opts+=( --use-sasl-client )
+ use ssl && scons_opts+=( --ssl )
+
+ # respect mongoDB upstream's basic recommendations
+ # see bug #536688 and #526114
+ if ! use debug; then
+ filter-flags '-m*'
+ filter-flags '-O?'
+ fi
+
+ default
+}
+
+src_compile() {
+ escons "${scons_opts[@]}" core tools
+}
+
+# FEATURES="test -usersandbox" emerge dev-db/mongodb
+src_test() {
+ # this one test fails
+ rm jstests/core/jsHeapLimit.js || die
+
+ "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
+}
+
+src_install() {
+ escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
+
+ local x
+ for x in /var/{lib,log}/${PN}; do
+ keepdir "${x}"
+ fowners mongodb:mongodb "${x}"
+ fperms 0750 "${x}"
+ done
+
+ doman debian/mongo*.1
+ dodoc README docs/building.md
+
+ newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
+ newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
+ newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
+
+ insinto /etc
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
+ newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ # see bug #526114
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
+}
+
+pkg_preinst() {
+ # wrt bug #461466
+ if [[ "$(get_libdir)" == "lib64" ]]; then
+ rmdir "${ED}"/usr/lib/ &>/dev/null
+ fi
+}
+
+pkg_postinst() {
+ ewarn "Make sure to read the release notes and follow the upgrade process:"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/#upgrade-procedures"
+}
diff --git a/dev-db/mongodb/mongodb-3.4.14.ebuild b/dev-db/mongodb/mongodb-3.4.14.ebuild
new file mode 100644
index 000000000000..3869755fe9f4
--- /dev/null
+++ b/dev-db/mongodb/mongodb-3.4.14.ebuild
@@ -0,0 +1,167 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+SCONS_MIN_VERSION="2.3.0"
+CHECKREQS_DISK_BUILD="2400M"
+CHECKREQS_DISK_USR="512M"
+CHECKREQS_MEMORY="1024M"
+
+inherit check-reqs eutils flag-o-matic multilib multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user versionator
+
+MY_P=${PN}-src-r${PV/_rc/-rc}
+
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
+HOMEPAGE="https://www.mongodb.com"
+SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
+
+LICENSE="AGPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug kerberos libressl mms-agent ssl test +tools"
+
+RDEPEND=">=app-arch/snappy-1.1.3
+ >=dev-cpp/yaml-cpp-0.5.3
+ >=dev-libs/boost-1.60:=[threads(+)]
+ >=dev-libs/libpcre-8.41[cxx]
+ dev-libs/snowball-stemmer
+ net-libs/libpcap
+ >=sys-libs/zlib-1.2.8:=
+ mms-agent? ( app-admin/mms-agent )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ <dev-util/scons-3
+ sys-libs/ncurses
+ sys-libs/readline
+ debug? ( dev-util/valgrind )
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] )
+ test? (
+ dev-python/pymongo[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ )"
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.4.0-fix-scons.patch"
+ "${FILESDIR}/${PN}-3.4.6-sysmacros-include.patch"
+ "${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
+)
+
+S=${WORKDIR}/${MY_P}
+
+pkg_pretend() {
+ if [[ -n ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.2 ]]; then
+ ewarn "To upgrade from a version earlier than the 3.2-series, you must"
+ ewarn "successively upgrade major releases until you have upgraded"
+ ewarn "to 3.2-series. Then upgrade to 3.4 series."
+ fi
+}
+
+pkg_setup() {
+ enewgroup mongodb
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb
+
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # remove bundled libs
+ rm -rv src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die
+}
+
+src_configure() {
+ # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
+ # --use-system-icu fails tests
+ # --use-system-tcmalloc is strongly NOT recommended:
+
+ scons_opts=(
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+
+ --disable-warnings-as-errors
+ --use-system-boost
+ --use-system-pcre
+ --use-system-snappy
+ --use-system-stemmer
+ --use-system-yaml
+ --use-system-zlib
+ )
+
+ use debug && scons_opts+=( --dbg=on )
+ use kerberos && scons_opts+=( --use-sasl-client )
+ use ssl && scons_opts+=( --ssl )
+
+ # respect mongoDB upstream's basic recommendations
+ # see bug #536688 and #526114
+ if ! use debug; then
+ filter-flags '-m*'
+ filter-flags '-O?'
+ fi
+
+ default
+}
+
+src_compile() {
+ escons "${scons_opts[@]}" core tools
+}
+
+# FEATURES="test -usersandbox" emerge dev-db/mongodb
+src_test() {
+ # this one test fails
+ rm jstests/core/jsHeapLimit.js || die
+
+ "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
+}
+
+src_install() {
+ escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
+
+ local x
+ for x in /var/{lib,log}/${PN}; do
+ keepdir "${x}"
+ fowners mongodb:mongodb "${x}"
+ fperms 0750 "${x}"
+ done
+
+ doman debian/mongo*.1
+ dodoc README docs/building.md
+
+ newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
+ newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
+ newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
+
+ insinto /etc
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
+ newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ # see bug #526114
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
+}
+
+pkg_preinst() {
+ # wrt bug #461466
+ if [[ "$(get_libdir)" == "lib64" ]]; then
+ rmdir "${ED}"/usr/lib/ &>/dev/null
+ fi
+}
+
+pkg_postinst() {
+ ewarn "Make sure to read the release notes and follow the upgrade process:"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/#upgrade-procedures"
+}
diff --git a/dev-db/mongodb/mongodb-3.4.15.ebuild b/dev-db/mongodb/mongodb-3.4.15.ebuild
new file mode 100644
index 000000000000..3869755fe9f4
--- /dev/null
+++ b/dev-db/mongodb/mongodb-3.4.15.ebuild
@@ -0,0 +1,167 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+SCONS_MIN_VERSION="2.3.0"
+CHECKREQS_DISK_BUILD="2400M"
+CHECKREQS_DISK_USR="512M"
+CHECKREQS_MEMORY="1024M"
+
+inherit check-reqs eutils flag-o-matic multilib multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user versionator
+
+MY_P=${PN}-src-r${PV/_rc/-rc}
+
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
+HOMEPAGE="https://www.mongodb.com"
+SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
+
+LICENSE="AGPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug kerberos libressl mms-agent ssl test +tools"
+
+RDEPEND=">=app-arch/snappy-1.1.3
+ >=dev-cpp/yaml-cpp-0.5.3
+ >=dev-libs/boost-1.60:=[threads(+)]
+ >=dev-libs/libpcre-8.41[cxx]
+ dev-libs/snowball-stemmer
+ net-libs/libpcap
+ >=sys-libs/zlib-1.2.8:=
+ mms-agent? ( app-admin/mms-agent )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ <dev-util/scons-3
+ sys-libs/ncurses
+ sys-libs/readline
+ debug? ( dev-util/valgrind )
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] )
+ test? (
+ dev-python/pymongo[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ )"
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.4.0-fix-scons.patch"
+ "${FILESDIR}/${PN}-3.4.6-sysmacros-include.patch"
+ "${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
+)
+
+S=${WORKDIR}/${MY_P}
+
+pkg_pretend() {
+ if [[ -n ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.2 ]]; then
+ ewarn "To upgrade from a version earlier than the 3.2-series, you must"
+ ewarn "successively upgrade major releases until you have upgraded"
+ ewarn "to 3.2-series. Then upgrade to 3.4 series."
+ fi
+}
+
+pkg_setup() {
+ enewgroup mongodb
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb
+
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # remove bundled libs
+ rm -rv src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die
+}
+
+src_configure() {
+ # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
+ # --use-system-icu fails tests
+ # --use-system-tcmalloc is strongly NOT recommended:
+
+ scons_opts=(
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+
+ --disable-warnings-as-errors
+ --use-system-boost
+ --use-system-pcre
+ --use-system-snappy
+ --use-system-stemmer
+ --use-system-yaml
+ --use-system-zlib
+ )
+
+ use debug && scons_opts+=( --dbg=on )
+ use kerberos && scons_opts+=( --use-sasl-client )
+ use ssl && scons_opts+=( --ssl )
+
+ # respect mongoDB upstream's basic recommendations
+ # see bug #536688 and #526114
+ if ! use debug; then
+ filter-flags '-m*'
+ filter-flags '-O?'
+ fi
+
+ default
+}
+
+src_compile() {
+ escons "${scons_opts[@]}" core tools
+}
+
+# FEATURES="test -usersandbox" emerge dev-db/mongodb
+src_test() {
+ # this one test fails
+ rm jstests/core/jsHeapLimit.js || die
+
+ "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
+}
+
+src_install() {
+ escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
+
+ local x
+ for x in /var/{lib,log}/${PN}; do
+ keepdir "${x}"
+ fowners mongodb:mongodb "${x}"
+ fperms 0750 "${x}"
+ done
+
+ doman debian/mongo*.1
+ dodoc README docs/building.md
+
+ newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
+ newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
+ newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
+
+ insinto /etc
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
+ newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ # see bug #526114
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
+}
+
+pkg_preinst() {
+ # wrt bug #461466
+ if [[ "$(get_libdir)" == "lib64" ]]; then
+ rmdir "${ED}"/usr/lib/ &>/dev/null
+ fi
+}
+
+pkg_postinst() {
+ ewarn "Make sure to read the release notes and follow the upgrade process:"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/#upgrade-procedures"
+}
diff --git a/dev-db/mongodb/mongodb-3.6.2-r1.ebuild b/dev-db/mongodb/mongodb-3.6.2-r1.ebuild
new file mode 100644
index 000000000000..5604f58eafb7
--- /dev/null
+++ b/dev-db/mongodb/mongodb-3.6.2-r1.ebuild
@@ -0,0 +1,170 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+SCONS_MIN_VERSION="2.5.0"
+CHECKREQS_DISK_BUILD="2400M"
+CHECKREQS_DISK_USR="512M"
+CHECKREQS_MEMORY="1024M"
+
+inherit check-reqs eutils flag-o-matic multilib multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user versionator
+
+MY_P=${PN}-src-r${PV/_rc/-rc}
+
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
+HOMEPAGE="https://www.mongodb.com"
+SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
+
+LICENSE="AGPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug kerberos libressl mms-agent ssl test +tools"
+
+RDEPEND=">=app-arch/snappy-1.1.3
+ >=dev-cpp/yaml-cpp-0.5.3
+ >=dev-libs/boost-1.60:=[threads(+)]
+ >=dev-libs/libpcre-8.41[cxx]
+ dev-libs/snowball-stemmer
+ net-libs/libpcap
+ >=sys-libs/zlib-1.2.8:=
+ mms-agent? ( app-admin/mms-agent )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ dev-python/cheetah[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ virtual/python-typing[${PYTHON_USEDEP}]
+ <dev-util/scons-3
+ sys-libs/ncurses
+ sys-libs/readline
+ debug? ( dev-util/valgrind )
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] )
+ test? (
+ dev-python/pymongo[${PYTHON_USEDEP}]
+ )"
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
+ "${FILESDIR}/${PN}-3.6.1-fix-scons.patch"
+ "${FILESDIR}/${PN}-3.6.1-no-compass.patch"
+)
+
+S=${WORKDIR}/${MY_P}
+
+pkg_pretend() {
+ if [[ -n ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.4 ]]; then
+ ewarn "To upgrade from a version earlier than the 3.4-series, you must"
+ ewarn "successively upgrade major releases until you have upgraded"
+ ewarn "to 3.4-series. Then upgrade to 3.6 series."
+ elif [[ -n ${REPLACING_VERSIONS} ]]; then
+ ewarn "Be sure to set featureCompatibilityVersion to 3.4 before upgrading."
+ fi
+}
+
+pkg_setup() {
+ enewgroup mongodb
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb
+
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # remove bundled libs
+ rm -rv src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die
+
+ # remove compass
+ rm -rv src/mongo/installer/compass || die
+}
+
+src_configure() {
+ # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
+ # --use-system-icu fails tests
+ # --use-system-tcmalloc is strongly NOT recommended:
+ scons_opts=(
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+
+ --disable-warnings-as-errors
+ --use-system-boost
+ --use-system-pcre
+ --use-system-snappy
+ --use-system-stemmer
+ --use-system-yaml
+ --use-system-zlib
+ )
+
+ use debug && scons_opts+=( --dbg=on )
+ use kerberos && scons_opts+=( --use-sasl-client )
+ use ssl && scons_opts+=( --ssl )
+
+ # respect mongoDB upstream's basic recommendations
+ # see bug #536688 and #526114
+ if ! use debug; then
+ filter-flags '-m*'
+ filter-flags '-O?'
+ fi
+
+ default
+}
+
+src_compile() {
+ escons "${scons_opts[@]}" core tools
+}
+
+# FEATURES="test -usersandbox" emerge dev-db/mongodb
+src_test() {
+ "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
+}
+
+src_install() {
+ escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
+
+ local x
+ for x in /var/{lib,log}/${PN}; do
+ keepdir "${x}"
+ fowners mongodb:mongodb "${x}"
+ fperms 0750 "${x}"
+ done
+
+ doman debian/mongo*.1
+ dodoc README docs/building.md
+
+ newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
+ newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
+ newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
+
+ insinto /etc
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
+ newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ # see bug #526114
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
+}
+
+pkg_preinst() {
+ # wrt bug #461466
+ if [[ "$(get_libdir)" == "lib64" ]]; then
+ rmdir "${ED}"/usr/lib/ &>/dev/null
+ fi
+}
+
+pkg_postinst() {
+ ewarn "Make sure to read the release notes and follow the upgrade process:"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/#upgrade-procedures"
+}
diff --git a/dev-db/mongodb/mongodb-3.6.3-r1.ebuild b/dev-db/mongodb/mongodb-3.6.3-r1.ebuild
new file mode 100644
index 000000000000..5604f58eafb7
--- /dev/null
+++ b/dev-db/mongodb/mongodb-3.6.3-r1.ebuild
@@ -0,0 +1,170 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+SCONS_MIN_VERSION="2.5.0"
+CHECKREQS_DISK_BUILD="2400M"
+CHECKREQS_DISK_USR="512M"
+CHECKREQS_MEMORY="1024M"
+
+inherit check-reqs eutils flag-o-matic multilib multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user versionator
+
+MY_P=${PN}-src-r${PV/_rc/-rc}
+
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
+HOMEPAGE="https://www.mongodb.com"
+SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
+
+LICENSE="AGPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug kerberos libressl mms-agent ssl test +tools"
+
+RDEPEND=">=app-arch/snappy-1.1.3
+ >=dev-cpp/yaml-cpp-0.5.3
+ >=dev-libs/boost-1.60:=[threads(+)]
+ >=dev-libs/libpcre-8.41[cxx]
+ dev-libs/snowball-stemmer
+ net-libs/libpcap
+ >=sys-libs/zlib-1.2.8:=
+ mms-agent? ( app-admin/mms-agent )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ dev-python/cheetah[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ virtual/python-typing[${PYTHON_USEDEP}]
+ <dev-util/scons-3
+ sys-libs/ncurses
+ sys-libs/readline
+ debug? ( dev-util/valgrind )
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] )
+ test? (
+ dev-python/pymongo[${PYTHON_USEDEP}]
+ )"
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
+ "${FILESDIR}/${PN}-3.6.1-fix-scons.patch"
+ "${FILESDIR}/${PN}-3.6.1-no-compass.patch"
+)
+
+S=${WORKDIR}/${MY_P}
+
+pkg_pretend() {
+ if [[ -n ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.4 ]]; then
+ ewarn "To upgrade from a version earlier than the 3.4-series, you must"
+ ewarn "successively upgrade major releases until you have upgraded"
+ ewarn "to 3.4-series. Then upgrade to 3.6 series."
+ elif [[ -n ${REPLACING_VERSIONS} ]]; then
+ ewarn "Be sure to set featureCompatibilityVersion to 3.4 before upgrading."
+ fi
+}
+
+pkg_setup() {
+ enewgroup mongodb
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb
+
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # remove bundled libs
+ rm -rv src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die
+
+ # remove compass
+ rm -rv src/mongo/installer/compass || die
+}
+
+src_configure() {
+ # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
+ # --use-system-icu fails tests
+ # --use-system-tcmalloc is strongly NOT recommended:
+ scons_opts=(
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+
+ --disable-warnings-as-errors
+ --use-system-boost
+ --use-system-pcre
+ --use-system-snappy
+ --use-system-stemmer
+ --use-system-yaml
+ --use-system-zlib
+ )
+
+ use debug && scons_opts+=( --dbg=on )
+ use kerberos && scons_opts+=( --use-sasl-client )
+ use ssl && scons_opts+=( --ssl )
+
+ # respect mongoDB upstream's basic recommendations
+ # see bug #536688 and #526114
+ if ! use debug; then
+ filter-flags '-m*'
+ filter-flags '-O?'
+ fi
+
+ default
+}
+
+src_compile() {
+ escons "${scons_opts[@]}" core tools
+}
+
+# FEATURES="test -usersandbox" emerge dev-db/mongodb
+src_test() {
+ "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
+}
+
+src_install() {
+ escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
+
+ local x
+ for x in /var/{lib,log}/${PN}; do
+ keepdir "${x}"
+ fowners mongodb:mongodb "${x}"
+ fperms 0750 "${x}"
+ done
+
+ doman debian/mongo*.1
+ dodoc README docs/building.md
+
+ newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
+ newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
+ newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
+
+ insinto /etc
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
+ newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ # see bug #526114
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
+}
+
+pkg_preinst() {
+ # wrt bug #461466
+ if [[ "$(get_libdir)" == "lib64" ]]; then
+ rmdir "${ED}"/usr/lib/ &>/dev/null
+ fi
+}
+
+pkg_postinst() {
+ ewarn "Make sure to read the release notes and follow the upgrade process:"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/#upgrade-procedures"
+}
diff --git a/dev-db/mongodb/mongodb-3.6.4-r1.ebuild b/dev-db/mongodb/mongodb-3.6.4-r1.ebuild
new file mode 100644
index 000000000000..5604f58eafb7
--- /dev/null
+++ b/dev-db/mongodb/mongodb-3.6.4-r1.ebuild
@@ -0,0 +1,170 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+SCONS_MIN_VERSION="2.5.0"
+CHECKREQS_DISK_BUILD="2400M"
+CHECKREQS_DISK_USR="512M"
+CHECKREQS_MEMORY="1024M"
+
+inherit check-reqs eutils flag-o-matic multilib multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user versionator
+
+MY_P=${PN}-src-r${PV/_rc/-rc}
+
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
+HOMEPAGE="https://www.mongodb.com"
+SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
+
+LICENSE="AGPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug kerberos libressl mms-agent ssl test +tools"
+
+RDEPEND=">=app-arch/snappy-1.1.3
+ >=dev-cpp/yaml-cpp-0.5.3
+ >=dev-libs/boost-1.60:=[threads(+)]
+ >=dev-libs/libpcre-8.41[cxx]
+ dev-libs/snowball-stemmer
+ net-libs/libpcap
+ >=sys-libs/zlib-1.2.8:=
+ mms-agent? ( app-admin/mms-agent )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ dev-python/cheetah[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ virtual/python-typing[${PYTHON_USEDEP}]
+ <dev-util/scons-3
+ sys-libs/ncurses
+ sys-libs/readline
+ debug? ( dev-util/valgrind )
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] )
+ test? (
+ dev-python/pymongo[${PYTHON_USEDEP}]
+ )"
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
+ "${FILESDIR}/${PN}-3.6.1-fix-scons.patch"
+ "${FILESDIR}/${PN}-3.6.1-no-compass.patch"
+)
+
+S=${WORKDIR}/${MY_P}
+
+pkg_pretend() {
+ if [[ -n ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.4 ]]; then
+ ewarn "To upgrade from a version earlier than the 3.4-series, you must"
+ ewarn "successively upgrade major releases until you have upgraded"
+ ewarn "to 3.4-series. Then upgrade to 3.6 series."
+ elif [[ -n ${REPLACING_VERSIONS} ]]; then
+ ewarn "Be sure to set featureCompatibilityVersion to 3.4 before upgrading."
+ fi
+}
+
+pkg_setup() {
+ enewgroup mongodb
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb
+
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # remove bundled libs
+ rm -rv src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die
+
+ # remove compass
+ rm -rv src/mongo/installer/compass || die
+}
+
+src_configure() {
+ # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
+ # --use-system-icu fails tests
+ # --use-system-tcmalloc is strongly NOT recommended:
+ scons_opts=(
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+
+ --disable-warnings-as-errors
+ --use-system-boost
+ --use-system-pcre
+ --use-system-snappy
+ --use-system-stemmer
+ --use-system-yaml
+ --use-system-zlib
+ )
+
+ use debug && scons_opts+=( --dbg=on )
+ use kerberos && scons_opts+=( --use-sasl-client )
+ use ssl && scons_opts+=( --ssl )
+
+ # respect mongoDB upstream's basic recommendations
+ # see bug #536688 and #526114
+ if ! use debug; then
+ filter-flags '-m*'
+ filter-flags '-O?'
+ fi
+
+ default
+}
+
+src_compile() {
+ escons "${scons_opts[@]}" core tools
+}
+
+# FEATURES="test -usersandbox" emerge dev-db/mongodb
+src_test() {
+ "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
+}
+
+src_install() {
+ escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
+
+ local x
+ for x in /var/{lib,log}/${PN}; do
+ keepdir "${x}"
+ fowners mongodb:mongodb "${x}"
+ fperms 0750 "${x}"
+ done
+
+ doman debian/mongo*.1
+ dodoc README docs/building.md
+
+ newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
+ newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
+ newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
+
+ insinto /etc
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
+ newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ # see bug #526114
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
+}
+
+pkg_preinst() {
+ # wrt bug #461466
+ if [[ "$(get_libdir)" == "lib64" ]]; then
+ rmdir "${ED}"/usr/lib/ &>/dev/null
+ fi
+}
+
+pkg_postinst() {
+ ewarn "Make sure to read the release notes and follow the upgrade process:"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/#upgrade-procedures"
+}
diff --git a/dev-db/mongodb/mongodb-3.6.5-r1.ebuild b/dev-db/mongodb/mongodb-3.6.5-r1.ebuild
new file mode 100644
index 000000000000..5604f58eafb7
--- /dev/null
+++ b/dev-db/mongodb/mongodb-3.6.5-r1.ebuild
@@ -0,0 +1,170 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+SCONS_MIN_VERSION="2.5.0"
+CHECKREQS_DISK_BUILD="2400M"
+CHECKREQS_DISK_USR="512M"
+CHECKREQS_MEMORY="1024M"
+
+inherit check-reqs eutils flag-o-matic multilib multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user versionator
+
+MY_P=${PN}-src-r${PV/_rc/-rc}
+
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
+HOMEPAGE="https://www.mongodb.com"
+SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
+
+LICENSE="AGPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug kerberos libressl mms-agent ssl test +tools"
+
+RDEPEND=">=app-arch/snappy-1.1.3
+ >=dev-cpp/yaml-cpp-0.5.3
+ >=dev-libs/boost-1.60:=[threads(+)]
+ >=dev-libs/libpcre-8.41[cxx]
+ dev-libs/snowball-stemmer
+ net-libs/libpcap
+ >=sys-libs/zlib-1.2.8:=
+ mms-agent? ( app-admin/mms-agent )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ dev-python/cheetah[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ virtual/python-typing[${PYTHON_USEDEP}]
+ <dev-util/scons-3
+ sys-libs/ncurses
+ sys-libs/readline
+ debug? ( dev-util/valgrind )
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] )
+ test? (
+ dev-python/pymongo[${PYTHON_USEDEP}]
+ )"
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
+ "${FILESDIR}/${PN}-3.6.1-fix-scons.patch"
+ "${FILESDIR}/${PN}-3.6.1-no-compass.patch"
+)
+
+S=${WORKDIR}/${MY_P}
+
+pkg_pretend() {
+ if [[ -n ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.4 ]]; then
+ ewarn "To upgrade from a version earlier than the 3.4-series, you must"
+ ewarn "successively upgrade major releases until you have upgraded"
+ ewarn "to 3.4-series. Then upgrade to 3.6 series."
+ elif [[ -n ${REPLACING_VERSIONS} ]]; then
+ ewarn "Be sure to set featureCompatibilityVersion to 3.4 before upgrading."
+ fi
+}
+
+pkg_setup() {
+ enewgroup mongodb
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb
+
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # remove bundled libs
+ rm -rv src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die
+
+ # remove compass
+ rm -rv src/mongo/installer/compass || die
+}
+
+src_configure() {
+ # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
+ # --use-system-icu fails tests
+ # --use-system-tcmalloc is strongly NOT recommended:
+ scons_opts=(
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+
+ --disable-warnings-as-errors
+ --use-system-boost
+ --use-system-pcre
+ --use-system-snappy
+ --use-system-stemmer
+ --use-system-yaml
+ --use-system-zlib
+ )
+
+ use debug && scons_opts+=( --dbg=on )
+ use kerberos && scons_opts+=( --use-sasl-client )
+ use ssl && scons_opts+=( --ssl )
+
+ # respect mongoDB upstream's basic recommendations
+ # see bug #536688 and #526114
+ if ! use debug; then
+ filter-flags '-m*'
+ filter-flags '-O?'
+ fi
+
+ default
+}
+
+src_compile() {
+ escons "${scons_opts[@]}" core tools
+}
+
+# FEATURES="test -usersandbox" emerge dev-db/mongodb
+src_test() {
+ "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
+}
+
+src_install() {
+ escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
+
+ local x
+ for x in /var/{lib,log}/${PN}; do
+ keepdir "${x}"
+ fowners mongodb:mongodb "${x}"
+ fperms 0750 "${x}"
+ done
+
+ doman debian/mongo*.1
+ dodoc README docs/building.md
+
+ newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
+ newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
+ newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
+
+ insinto /etc
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
+ newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ # see bug #526114
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
+}
+
+pkg_preinst() {
+ # wrt bug #461466
+ if [[ "$(get_libdir)" == "lib64" ]]; then
+ rmdir "${ED}"/usr/lib/ &>/dev/null
+ fi
+}
+
+pkg_postinst() {
+ ewarn "Make sure to read the release notes and follow the upgrade process:"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/#upgrade-procedures"
+}
diff --git a/dev-db/mongodb/mongodb-4.0.0-r1.ebuild b/dev-db/mongodb/mongodb-4.0.0-r1.ebuild
new file mode 100644
index 000000000000..46989477c500
--- /dev/null
+++ b/dev-db/mongodb/mongodb-4.0.0-r1.ebuild
@@ -0,0 +1,170 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+SCONS_MIN_VERSION="2.5.0"
+CHECKREQS_DISK_BUILD="2400M"
+CHECKREQS_DISK_USR="512M"
+CHECKREQS_MEMORY="1024M"
+
+inherit check-reqs eutils flag-o-matic multilib multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user versionator
+
+MY_P=${PN}-src-r${PV/_rc/-rc}
+
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
+HOMEPAGE="https://www.mongodb.com"
+SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
+
+LICENSE="AGPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug kerberos libressl mms-agent ssl test +tools"
+
+RDEPEND=">=app-arch/snappy-1.1.3
+ >=dev-cpp/yaml-cpp-0.5.3
+ >=dev-libs/boost-1.60:=[threads(+)]
+ >=dev-libs/libpcre-8.41[cxx]
+ dev-libs/snowball-stemmer
+ net-libs/libpcap
+ >=sys-libs/zlib-1.2.11:=
+ mms-agent? ( app-admin/mms-agent )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ dev-python/cheetah[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ virtual/python-typing[${PYTHON_USEDEP}]
+ <dev-util/scons-3
+ sys-libs/ncurses
+ sys-libs/readline
+ debug? ( dev-util/valgrind )
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] )
+ test? (
+ dev-python/pymongo[${PYTHON_USEDEP}]
+ )"
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
+ "${FILESDIR}/${PN}-3.6.1-fix-scons.patch"
+ "${FILESDIR}/${PN}-4.0.0-no-compass.patch"
+)
+
+S=${WORKDIR}/${MY_P}
+
+pkg_pretend() {
+ if [[ -n ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.6 ]]; then
+ ewarn "To upgrade from a version earlier than the 3.6-series, you must"
+ ewarn "successively upgrade major releases until you have upgraded"
+ ewarn "to 3.6-series. Then upgrade to 4.0 series."
+ elif [[ -n ${REPLACING_VERSIONS} ]]; then
+ ewarn "Be sure to set featureCompatibilityVersion to 3.6 before upgrading."
+ fi
+}
+
+pkg_setup() {
+ enewgroup mongodb
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb
+
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # remove bundled libs
+ rm -r src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die
+
+ # remove compass
+ rm -r src/mongo/installer/compass || die
+}
+
+src_configure() {
+ # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
+ # --use-system-icu fails tests
+ # --use-system-tcmalloc is strongly NOT recommended:
+ scons_opts=(
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+
+ --disable-warnings-as-errors
+ --use-system-boost
+ --use-system-pcre
+ --use-system-snappy
+ --use-system-stemmer
+ --use-system-yaml
+ --use-system-zlib
+ )
+
+ use debug && scons_opts+=( --dbg=on )
+ use kerberos && scons_opts+=( --use-sasl-client )
+ use ssl && scons_opts+=( --ssl )
+
+ # respect mongoDB upstream's basic recommendations
+ # see bug #536688 and #526114
+ if ! use debug; then
+ filter-flags '-m*'
+ filter-flags '-O?'
+ fi
+
+ default
+}
+
+src_compile() {
+ escons "${scons_opts[@]}" core tools
+}
+
+# FEATURES="test -usersandbox" emerge dev-db/mongodb
+src_test() {
+ "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
+}
+
+src_install() {
+ escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
+
+ local x
+ for x in /var/{lib,log}/${PN}; do
+ keepdir "${x}"
+ fowners mongodb:mongodb "${x}"
+ fperms 0750 "${x}"
+ done
+
+ doman debian/mongo*.1
+ dodoc README docs/building.md
+
+ newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
+ newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
+ newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
+
+ insinto /etc
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
+ newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ # see bug #526114
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
+}
+
+pkg_preinst() {
+ # wrt bug #461466
+ if [[ "$(get_libdir)" == "lib64" ]]; then
+ rmdir "${ED}"/usr/lib/ &>/dev/null
+ fi
+}
+
+pkg_postinst() {
+ ewarn "Make sure to read the release notes and follow the upgrade process:"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/#upgrade-procedures"
+}
diff --git a/dev-db/mtop-0.6.6-r3 b/dev-db/mtop-0.6.6-r3
deleted file mode 100644
index b0b0142cdf06..000000000000
--- a/dev-db/mtop-0.6.6-r3
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare test unpack
-DEPEND=dev-perl/Curses dev-perl/DBI dev-perl/DBD-mysql virtual/perl-libnet dev-lang/perl:=[-build(-)]
-DESCRIPTION=Mysql top monitors a MySQL server
-EAPI=5
-HOMEPAGE=http://mtop.sourceforge.net
-KEYWORDS=~amd64 ~ppc ~x86
-LICENSE=GPL-2
-RDEPEND=dev-perl/Curses dev-perl/DBI dev-perl/DBD-mysql virtual/perl-libnet dev-lang/perl:=[-build(-)]
-SLOT=0
-SRC_URI=mirror://sourceforge/mtop/mtop-0.6.6.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 perl-functions 01e8c68d5a528bbcda4d3c60205983df perl-module 863b35d127db98823d439f8d73c2d011 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=541b72bf1ad1eefceba3ac44369a4c62
diff --git a/dev-db/mtop/Manifest b/dev-db/mtop/Manifest
new file mode 100644
index 000000000000..68c6d029e5bc
--- /dev/null
+++ b/dev-db/mtop/Manifest
@@ -0,0 +1,4 @@
+AUX mtop-0.6.6-globalstatusfix.patch 623 BLAKE2B b64d931cb283da63d6aaf8affa21905c9289c681bd24a0ff5c690123e023e45cca9506a3d750a5871c07598b8672da504a1d5f7427ec9419005c05e0e9f3dffa SHA512 848de7bda1a79bbe51b139b149720872a57e4fa12161fc822e69f393586817acbe14571841df5d327297546b4ad3a2725b7cd8d1815f80ffc0a2dfcbb9ea5005
+DIST mtop-0.6.6.tar.gz 48161 BLAKE2B 6e1716d3b4b1617b1b78ae0bac3e363b17264bccd65a0b5831a7cf574fbf7826f5041829084c5af614d1f922eb368e33db8d31f0b12103d18661e7aaa6681616 SHA512 9befb1d44ef537c4abe0246ebbf20019499875d7e8efeac2fd1cf068dc577c2809bb0333ebf633982852446a0160d73ccfa0006dcfa42f7d95bbbf765f12ce17
+EBUILD mtop-0.6.6-r3.ebuild 689 BLAKE2B ea6a6304040b14c18ab9ec2b94e5510a46ff6ab19b2eda1f75b8b423de4192ad2965d74bf5810a28e03f89baa01fd4580153ec205faf9ab934d16a750faa63ed SHA512 fe88f9bc1fd7f454183317ddaf0a02929d124ebac5dae2ee0deee4d777e8ae42ad4817d655857aec45c6b72e6c783b7ec0a2407afad98923c2aeec648d6500c6
+MISC metadata.xml 317 BLAKE2B f81f748d63aadbfa6484a46c1f4506f163c547c8fb229d67e4a26e162ec8e0e2a43946bf06ab707e2ebc9db82b0e70763bb06e8c43a194f272d384898fcf8a77 SHA512 20fab32a55c5ac7cdec57d533376c1dc642e30e75e2d9289f815293e734b9e21c1047cf28bba9f75808a9f2c77992ca651ecd3a244849479ad43bfa7fe02ec8c
diff --git a/dev-db/mtop/files/mtop-0.6.6-globalstatusfix.patch b/dev-db/mtop/files/mtop-0.6.6-globalstatusfix.patch
new file mode 100644
index 000000000000..1d10acc42a99
--- /dev/null
+++ b/dev-db/mtop/files/mtop-0.6.6-globalstatusfix.patch
@@ -0,0 +1,12 @@
+diff -ur mtop-0.6.6/work/mtop-0.6.6/mtop.PL mtop-0.6.6-r1/work/mtop-0.6.6/mtop.PL
+--- mtop-0.6.6/work/mtop-0.6.6/mtop.PL 2004-09-13 00:22:03.000000000 +0200
++++ mtop-0.6.6-r1/work/mtop-0.6.6/mtop.PL 2009-12-08 15:04:56.000000000 +0100
+@@ -568,7 +568,7 @@
+ die "Unable to connect to mysql [", $DBI::errstr, "]\n";
+
+ my $st_procs = $dbh->prepare("show full processlist");
+-my $st_status = $dbh->prepare("show status");
++my $st_status = $dbh->prepare("show global status");
+ my $st_kill = $dbh->prepare("kill ?");
+ my $st_flush = $dbh->prepare("flush status");
+ my $st_vars = $dbh->prepare("show variables");
diff --git a/dev-db/mtop/metadata.xml b/dev-db/mtop/metadata.xml
new file mode 100644
index 000000000000..b42d9d75d4c9
--- /dev/null
+++ b/dev-db/mtop/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>mysql-bugs@gentoo.org</email>
+ <name>MySQL</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">mtop</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/mtop/mtop-0.6.6-r3.ebuild b/dev-db/mtop/mtop-0.6.6-r3.ebuild
new file mode 100644
index 000000000000..9a6df615b6d3
--- /dev/null
+++ b/dev-db/mtop/mtop-0.6.6-r3.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit perl-module
+
+DESCRIPTION="Mysql top monitors a MySQL server"
+HOMEPAGE="http://mtop.sourceforge.net"
+SRC_URI="mirror://sourceforge/mtop/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+DEPEND="dev-perl/Curses
+ dev-perl/DBI
+ dev-perl/DBD-mysql
+ virtual/perl-libnet"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}"/mtop-0.6.6-globalstatusfix.patch )
+DOCS=( ChangeLog README README.devel )
+
+warnmsg() {
+ einfo "Upstream no longer maintains mtop. You should consider dev-db/mytop instead."
+}
+
+pkg_postinst() {
+ warnmsg
+}
+
+pkg_preinst() {
+ warnmsg
+}
diff --git a/dev-db/mycli-1.10.0 b/dev-db/mycli-1.10.0
deleted file mode 100644
index 6022ec426a6e..000000000000
--- a/dev-db/mycli-1.10.0
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-python/setuptools[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_targets_python3_4? ( dev-lang/python:3.4 ) python_targets_python3_5? ( dev-lang/python:3.5 ) python_targets_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)]
-DESCRIPTION=CLI for MySQL Database with auto-completion and syntax highlighting
-EAPI=6
-HOMEPAGE=https://www.mycli.net
-IUSE=python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 python_targets_python3_6
-KEYWORDS=~amd64 ~x86
-LICENSE=BSD MIT
-RDEPEND=>=dev-python/click-4.1[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] >=dev-python/configobj-5.0.6[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] >=dev-python/prompt_toolkit-1.0.10[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] dev-python/pycryptodome[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] >=dev-python/pygments-2.0[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] >=dev-python/pymysql-0.6.7[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] >=dev-python/python-sqlparse-0.1.19[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_targets_python3_4? ( dev-lang/python:3.4 ) python_targets_python3_5? ( dev-lang/python:3.5 ) python_targets_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)]
-REQUIRED_USE=|| ( python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 python_targets_python3_6 )
-SLOT=0
-SRC_URI=https://github.com/dbcli/mycli/archive/v1.10.0.tar.gz -> mycli-1.10.0.tar.gz
-_eclasses_=distutils-r1 63fea93ca1cc4fdc5fa2247afc4e3a15 multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 python-r1 0b5829eb6369d7af3a834b6eed7b7107 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=8eab01aa3ac03ae6ef7cc61ef7c11028
diff --git a/dev-db/mycli-1.15.0-r2 b/dev-db/mycli-1.15.0-r2
deleted file mode 100644
index eede39706d76..000000000000
--- a/dev-db/mycli-1.15.0-r2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-python/setuptools[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_targets_python3_4? ( dev-lang/python:3.4 ) python_targets_python3_5? ( dev-lang/python:3.5 ) python_targets_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)]
-DESCRIPTION=CLI for MySQL Database with auto-completion and syntax highlighting
-EAPI=6
-HOMEPAGE=https://www.mycli.net
-IUSE=python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 python_targets_python3_6
-KEYWORDS=~amd64 ~x86
-LICENSE=BSD MIT
-RDEPEND=>=dev-python/cli_helpers-1.0.1[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] >=dev-python/click-4.1[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] >=dev-python/configobj-5.0.6[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] >=dev-python/cryptography-1.0.0[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] >=dev-python/prompt_toolkit-1.0.10[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] !>=dev-python/prompt_toolkit-1.1.0 >=dev-python/pygments-2.0[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] >=dev-python/pymysql-0.6.7[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] >=dev-python/python-sqlparse-0.2.2[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] !>=dev-python/python-sqlparse-0.3.0 python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_targets_python3_4? ( dev-lang/python:3.4 ) python_targets_python3_5? ( dev-lang/python:3.5 ) python_targets_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)]
-REQUIRED_USE=|| ( python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 python_targets_python3_6 )
-SLOT=0
-SRC_URI=https://github.com/dbcli/mycli/archive/v1.15.0.tar.gz -> mycli-1.15.0.tar.gz
-_eclasses_=distutils-r1 63fea93ca1cc4fdc5fa2247afc4e3a15 multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 python-r1 0b5829eb6369d7af3a834b6eed7b7107 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=2f45ce3f7a50fa0f816508c61bdf1c91
diff --git a/dev-db/mycli-1.7.1 b/dev-db/mycli-1.7.1
deleted file mode 100644
index 759837ecb95c..000000000000
--- a/dev-db/mycli-1.7.1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-python/setuptools[python_targets_python2_7(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-)] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_targets_python3_4? ( dev-lang/python:3.4 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-)]
-DESCRIPTION=CLI for MySQL Database with auto-completion and syntax highlighting
-EAPI=5
-HOMEPAGE=https://www.mycli.net
-IUSE=python_targets_python2_7 python_targets_python3_4
-KEYWORDS=~amd64 ~x86
-LICENSE=BSD MIT
-RDEPEND=>=dev-python/click-4.1[python_targets_python2_7(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-)] >=dev-python/configobj-5.0.6[python_targets_python2_7(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-)] >=dev-python/prompt_toolkit-1.0.0[python_targets_python2_7(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-)] >=dev-python/pycrypto-2.6.1[python_targets_python2_7(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-)] >=dev-python/pygments-2.0[python_targets_python2_7(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-)] >=dev-python/pymysql-0.6.6[python_targets_python2_7(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-)] >=dev-python/python-sqlparse-0.1.19[python_targets_python2_7(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-)] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_targets_python3_4? ( dev-lang/python:3.4 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-)]
-REQUIRED_USE=|| ( python_targets_python2_7 python_targets_python3_4 )
-SLOT=0
-SRC_URI=https://github.com/dbcli/mycli/archive/v1.7.1.tar.gz -> mycli-1.7.1.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 distutils-r1 63fea93ca1cc4fdc5fa2247afc4e3a15 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 preserve-libs ef207dc62baddfddfd39a164d9797648 python-r1 0b5829eb6369d7af3a834b6eed7b7107 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=fcad9eeb2dea6a59737b9dcdc1c682ca
diff --git a/dev-db/mycli-9999 b/dev-db/mycli-9999
deleted file mode 100644
index 6ea89eafe3b5..000000000000
--- a/dev-db/mycli-9999
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test unpack
-DEPEND=dev-python/setuptools[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_targets_python3_4? ( dev-lang/python:3.4 ) python_targets_python3_5? ( dev-lang/python:3.5 ) python_targets_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] >=dev-vcs/git-1.8.2.1[curl]
-DESCRIPTION=CLI for MySQL Database with auto-completion and syntax highlighting
-EAPI=6
-HOMEPAGE=https://www.mycli.net
-IUSE=python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 python_targets_python3_6
-LICENSE=BSD MIT
-RDEPEND=>=dev-python/click-4.1[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] >=dev-python/configobj-5.0.6[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] >=dev-python/cryptography-1.0.0[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] >=dev-python/prompt_toolkit-1.0.10[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] !>=dev-python/prompt_toolkit-1.1.0 >=dev-python/pygments-2.0[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] >=dev-python/pymysql-0.6.7[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] >=dev-python/python-sqlparse-0.2.2[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] !>=dev-python/python-sqlparse-0.3.0 python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_targets_python3_4? ( dev-lang/python:3.4 ) python_targets_python3_5? ( dev-lang/python:3.5 ) python_targets_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)]
-REQUIRED_USE=|| ( python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 python_targets_python3_6 )
-SLOT=0
-_eclasses_=distutils-r1 63fea93ca1cc4fdc5fa2247afc4e3a15 git-r3 8f6de46b0aa318aea0e8cac62ece098b multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 python-r1 0b5829eb6369d7af3a834b6eed7b7107 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=95d07d682ca254118c0b7d157fa65d98
diff --git a/dev-db/mycli/Manifest b/dev-db/mycli/Manifest
new file mode 100644
index 000000000000..17c6a9b96b98
--- /dev/null
+++ b/dev-db/mycli/Manifest
@@ -0,0 +1,9 @@
+AUX remove-tasks.patch 423 BLAKE2B d4259bb4d0ba1434fb88d25ae1f2bc4e81e89d81c9c2d45f1ac442b2de14d5b9e42ac7ad25a73c18a80570d20626db1c8070965f817f185d9de42bd9ff1605e7 SHA512 21e577769418867ce6a3ea71e8b8949c8974a2a0f1750a87df6f125e53dca04e5e93381324b1d6f9f99b7795bb2e13384619ea4664c3d2c77c5ec83ecd4e33c4
+DIST mycli-1.10.0.tar.gz 272722 BLAKE2B f2a4d7b76684718167fb6bb4f90a96a31b669cf1f35c266ed544d00b4fe4f9b0cb2c6d81e161d41f1df785e2dcf79056a675857f8400d8cd7811199ea00064b7 SHA512 d66866fd23ee2be3f1bb47d1414b8151c2b50e8844a2553e139f753ae55dd010d1c23aae7c5863891ea4f347b124145405dc7894efc27fc8fcb74127c14261f8
+DIST mycli-1.15.0.tar.gz 275065 BLAKE2B 47ae049a7a669d18fc2bb467dd4ee6d1bbe23a86115db6d1965c48c93a2a1be9bb8b4427b377f8ce935b957c854c1c4bf4a87fdea07f27329a13fd6a28b59559 SHA512 7a7d98220c4a679340dbf3c3c9fb3eaab7698f7abbe3e62835a03df10b59c79f0dfd916e9f7b39f12215063849ecadf9d08d086d14b00666b67bac1d092609f2
+DIST mycli-1.7.1.tar.gz 266597 BLAKE2B 8fc6006dbb85a7053d67040d492ba12619507160efd240fdb89125794a01fbb439756bdeb420c306a883db925f6ec7ae0c36657c4c4b2197cfb702fc77babcb1 SHA512 5c61fe67f3205dd1123ed8d38441cda0574db04dd46b7e075d216f7aa8cd856a2f06a1b4bf7dbe9fd0b07f3e91c151fe3f885d10d3db488b6c306e0ce9ac9e7c
+EBUILD mycli-1.10.0.ebuild 826 BLAKE2B 9180f33ae816809a14aeff8f2fa431d72c956af912a82ba0ed36a209fc6ccd9918f564ce948569fb70ac07cd26f8f3c152ee740da80a0f590bcec3eff1f2d78d SHA512 7ee091496ce1c8232cdcd341df556f1913ff70eeb872f71fdf83be842c5dcd04dd68752aa271bccd34473e747b802b13a3fe8dcff175d64362668c0ad2de6d4b
+EBUILD mycli-1.15.0-r2.ebuild 1002 BLAKE2B c8c7c5e457d86a1629face8f1e52eebf2339a140bac876740d68187420284785e15c5beacda85ac78306ce75ee37d37911e0b9f8322f99488ec4d1fadff39a89 SHA512 95d43f7dffbf9c22929a6437aa0e356888ca2b765ff836bef2bda8fc10f30226ab65933c0d917b9d5836d2e2dcc6a9e594f4d17818107347e945750b16da3bcf
+EBUILD mycli-1.7.1.ebuild 944 BLAKE2B 3bdc0bea132ab0d2bf92dc8c0839a12503a98a6f6569c62e5a9bdab2a671385808a74824a0d25872fd5e6d76de64e511a9e5dceef811462d17b680d9fe3589be SHA512 ff09a53cdbb658f2d8582420a4575429e994f0091b08c0665490544e78f0001256561b050af346994c8d4dc380ac6bd168c7323348fd8359be6cf3f42a0f815f
+EBUILD mycli-9999.ebuild 886 BLAKE2B e5f76d34d1e2f0ac2d07996ec65b206426514f785aa4fb0a4df36462988cf5e3e0caf54d4ff68cba6cac46dcf2c0f390f345df1ecb0b29b4e8c42ae8de97bf33 SHA512 10fa18abca114309e15da7cbea85eab8af522dd6a0539042a89fc29ebac6ca3f9ec87d7059440bb984251e284e5764a0f7bbdce83e2d3c5c6024aa623a1b7e7d
+MISC metadata.xml 322 BLAKE2B 16f308194537f996ff6a54d92c996267e2ea37d78d9377d3d3b5a6246ebf511c9dae536f03627a32885753a2d3943554a9748513a036ef6e10b952e5281ecfbe SHA512 ae5215f13b457aa43dc95d67bacc371292f0c8f6540dcb49633f0120232dbde7fe12479c3ff16c203b20ac96700be12c187444a768f50e319320684553509dd1
diff --git a/dev-db/mycli/files/remove-tasks.patch b/dev-db/mycli/files/remove-tasks.patch
new file mode 100644
index 000000000000..94502e6b656a
--- /dev/null
+++ b/dev-db/mycli/files/remove-tasks.patch
@@ -0,0 +1,15 @@
+diff --git a/setup.py b/setup.py
+index 882fe92..f0d28ab 100755
+--- a/setup.py
++++ b/setup.py
+@@ -36,10 +36,6 @@ setup(
+ install_requires=install_requirements,
+ entry_points={
+ 'console_scripts': ['mycli = mycli.main:cli'],
+- 'distutils.commands': [
+- 'lint = tasks:lint',
+- 'test = tasks:test',
+- ],
+ },
+ classifiers=[
+ 'Intended Audience :: Developers',
diff --git a/dev-db/mycli/metadata.xml b/dev-db/mycli/metadata.xml
new file mode 100644
index 000000000000..c80f94490085
--- /dev/null
+++ b/dev-db/mycli/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>grknight@gentoo.org</email>
+ <name>Brian Evans</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">dbcli/mycli</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/mycli/mycli-1.10.0.ebuild b/dev-db/mycli/mycli-1.10.0.ebuild
new file mode 100644
index 000000000000..5dd501996868
--- /dev/null
+++ b/dev-db/mycli/mycli-1.10.0.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+inherit distutils-r1
+
+DESCRIPTION="CLI for MySQL Database with auto-completion and syntax highlighting"
+
+HOMEPAGE="https://www.mycli.net"
+SRC_URI="https://github.com/dbcli/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="BSD MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+RDEPEND="
+ >=dev-python/click-4.1[${PYTHON_USEDEP}]
+ >=dev-python/configobj-5.0.6[${PYTHON_USEDEP}]
+ >=dev-python/prompt_toolkit-1.0.10[${PYTHON_USEDEP}]
+ dev-python/pycryptodome[${PYTHON_USEDEP}]
+ >=dev-python/pygments-2.0[${PYTHON_USEDEP}]
+ >=dev-python/pymysql-0.6.7[${PYTHON_USEDEP}]
+ >=dev-python/python-sqlparse-0.1.19[${PYTHON_USEDEP}]
+"
diff --git a/dev-db/mycli/mycli-1.15.0-r2.ebuild b/dev-db/mycli/mycli-1.15.0-r2.ebuild
new file mode 100644
index 000000000000..15039dd126a7
--- /dev/null
+++ b/dev-db/mycli/mycli-1.15.0-r2.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+inherit distutils-r1
+
+DESCRIPTION="CLI for MySQL Database with auto-completion and syntax highlighting"
+
+HOMEPAGE="https://www.mycli.net"
+SRC_URI="https://github.com/dbcli/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="BSD MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+RDEPEND="
+ >=dev-python/cli_helpers-1.0.1[${PYTHON_USEDEP}]
+ >=dev-python/click-4.1[${PYTHON_USEDEP}]
+ >=dev-python/configobj-5.0.6[${PYTHON_USEDEP}]
+ >=dev-python/cryptography-1.0.0[${PYTHON_USEDEP}]
+ >=dev-python/prompt_toolkit-1.0.10[${PYTHON_USEDEP}]
+ !>=dev-python/prompt_toolkit-1.1.0
+ >=dev-python/pygments-2.0[${PYTHON_USEDEP}]
+ >=dev-python/pymysql-0.6.7[${PYTHON_USEDEP}]
+ >=dev-python/python-sqlparse-0.2.2[${PYTHON_USEDEP}]
+ !>=dev-python/python-sqlparse-0.3.0
+"
+
+PATCHES=( "${FILESDIR}/remove-tasks.patch" )
diff --git a/dev-db/mycli/mycli-1.7.1.ebuild b/dev-db/mycli/mycli-1.7.1.ebuild
new file mode 100644
index 000000000000..687e4e87a094
--- /dev/null
+++ b/dev-db/mycli/mycli-1.7.1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_4} )
+inherit distutils-r1
+
+DESCRIPTION="CLI for MySQL Database with auto-completion and syntax highlighting"
+
+HOMEPAGE="https://www.mycli.net"
+SRC_URI="https://github.com/dbcli/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="BSD MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+RDEPEND="
+ >=dev-python/click-4.1[${PYTHON_USEDEP}]
+ >=dev-python/configobj-5.0.6[${PYTHON_USEDEP}]
+ >=dev-python/prompt_toolkit-1.0.0[${PYTHON_USEDEP}]
+ >=dev-python/pycrypto-2.6.1[${PYTHON_USEDEP}]
+ >=dev-python/pygments-2.0[${PYTHON_USEDEP}]
+ >=dev-python/pymysql-0.6.6[${PYTHON_USEDEP}]
+ >=dev-python/python-sqlparse-0.1.19[${PYTHON_USEDEP}]
+"
+
+src_prepare() {
+ rm mycli/packages/counter.py || die "Could not remove python 2.6 counter.py"
+ distutils-r1_src_prepare
+}
diff --git a/dev-db/mycli/mycli-9999.ebuild b/dev-db/mycli/mycli-9999.ebuild
new file mode 100644
index 000000000000..f3aa95b7cd28
--- /dev/null
+++ b/dev-db/mycli/mycli-9999.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+EGIT_REPO_URI="https://github.com/dbcli/mycli.git"
+inherit distutils-r1 git-r3
+
+DESCRIPTION="CLI for MySQL Database with auto-completion and syntax highlighting"
+
+HOMEPAGE="https://www.mycli.net"
+SRC_URI=""
+LICENSE="BSD MIT"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+RDEPEND="
+ >=dev-python/click-4.1[${PYTHON_USEDEP}]
+ >=dev-python/configobj-5.0.6[${PYTHON_USEDEP}]
+ >=dev-python/cryptography-1.0.0[${PYTHON_USEDEP}]
+ >=dev-python/prompt_toolkit-1.0.10[${PYTHON_USEDEP}]
+ !>=dev-python/prompt_toolkit-1.1.0
+ >=dev-python/pygments-2.0[${PYTHON_USEDEP}]
+ >=dev-python/pymysql-0.6.7[${PYTHON_USEDEP}]
+ >=dev-python/python-sqlparse-0.2.2[${PYTHON_USEDEP}]
+ !>=dev-python/python-sqlparse-0.3.0
+"
diff --git a/dev-db/mydumper-0.9.3-r1 b/dev-db/mydumper-0.9.3-r1
deleted file mode 100644
index c6ac3d6a3147..000000000000
--- a/dev-db/mydumper-0.9.3-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-libs/glib:= dev-libs/libpcre:= dev-libs/openssl:= sys-libs/zlib:= virtual/mysql virtual/pkgconfig doc? ( dev-python/sphinx ) sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=A high-performance multi-threaded backup (and restore) toolset for MySQL
-EAPI=6
-HOMEPAGE=https://github.com/maxbube/mydumper
-IUSE=doc
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-3
-RDEPEND=dev-libs/glib:= dev-libs/libpcre:= dev-libs/openssl:= sys-libs/zlib:= virtual/mysql
-SLOT=0
-SRC_URI=https://github.com/maxbube/mydumper/archive/v0.9.3.tar.gz -> mydumper-0.9.3.tar.gz
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=5459ed584a8aed4e67c3da0adbfe0fa9
diff --git a/dev-db/mydumper-0.9.5 b/dev-db/mydumper-0.9.5
deleted file mode 100644
index 6561f4f6163e..000000000000
--- a/dev-db/mydumper-0.9.5
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-libs/glib:= dev-libs/libpcre:= dev-libs/openssl:= sys-libs/zlib:= virtual/mysql virtual/pkgconfig doc? ( dev-python/sphinx ) sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=A high-performance multi-threaded backup (and restore) toolset for MySQL
-EAPI=6
-HOMEPAGE=https://github.com/maxbube/mydumper
-IUSE=doc
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-3
-RDEPEND=dev-libs/glib:= dev-libs/libpcre:= dev-libs/openssl:= sys-libs/zlib:= virtual/mysql
-SLOT=0
-SRC_URI=https://github.com/maxbube/mydumper/archive/v0.9.5.tar.gz -> mydumper-0.9.5.tar.gz
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=5a0fb45cc51a60aa399539602f4325ee
diff --git a/dev-db/mydumper/Manifest b/dev-db/mydumper/Manifest
new file mode 100644
index 000000000000..e597f188c9c4
--- /dev/null
+++ b/dev-db/mydumper/Manifest
@@ -0,0 +1,7 @@
+AUX mydumper-atomic.patch 948 BLAKE2B 78bc073083a44ad21346e419de6f76195d3e9c16877a7851db6cea6e738ddeee06ff8ce255d067a9321c8a687c2e99c3f36caa84d9a3ef017a045261f81d4f13 SHA512 6c9a9a8378aec435431ac84cc530b880616e5e1df823525eebe4f813c6e0e73eeb0408bff4379b295a1fb095c91a4b1eaea83aa4d8a7bb2e159143ce7a579a90
+AUX mydumper-mariadb-define.patch 766 BLAKE2B 26d8b037de5362bb456f19ed85d5b20cb901c63ed307b2377d58931d5fa8940bd3bb97632d3f9976bcb1723a36b8cebdc0a74723a555abc54800b3afe5fea673 SHA512 839061da9fcfc16d0729bf8ba62a5c22a03aba1c089006efd600020a8d618af0f8d962f6a3a92c5ff3acb9847d3a7944d865c035df93a567d7f21bb184e9dc53
+DIST mydumper-0.9.3.tar.gz 45320 BLAKE2B 6e6d4420ced29d4ea77aa257ee155ce0810fe7d0ac3bf22c22156dfcfba35a3c461e4115d5814b5e0050331151a5b0c3bd819c1ecc534b6644972bf76de5d004 SHA512 3bc2c85dbedf234aecca3b66f445e42bb7ddff83f914d5cc231f6a5755d1c2bf300ae9bf4bdea0717b45ea5338c6c336ec44f375dbf29570ed785ffddda53898
+DIST mydumper-0.9.5.tar.gz 60010 BLAKE2B f74a949712526b3fc3b1957c9f9dc5c5f820d88f781926331e751eb99e6315b37bd8f38ac8a0e1943485cc74fe9b14a7e74e955c77ceba6b10bb1e18a7720d75 SHA512 5b72234c88fd22c103afb9fa5a7c3c99d6585cb450b8cc7385cfd23ae2ce09c0848d15767a5957a7b8f87a7614bdb058dea8990f1a2a12300c2c74fc9da2de75
+EBUILD mydumper-0.9.3-r1.ebuild 1025 BLAKE2B bbaf77ab28323c82103b68aeee4222bf218554e45e05ae07467c18dc69e25f43ab2b1e70ddafa69cb8f2045d85c361511016de81c8d6aa20db7cdd25ffdbe614 SHA512 5b1a7b6669e4cfc85d0e32a9a5474de7dc00c27931c72219c1cd212139f616eaf492c76e749ea3cf94f88aa31d35455783b3ceb65943f9f82f34288dc037d64a
+EBUILD mydumper-0.9.5.ebuild 1026 BLAKE2B 6ded4d30e464888593beb8bf4d06441c02e17b28ff59ddb3aa9142b42dde1ccf00b05dac0977fe514d23e1be06099c217df778976a799451982bf9ac2948985c SHA512 37776222d7cc3cbcc5b520f1731d445841028aec63899a6bbfb2c1a931b78aef3987555404955f1c2742782cd599065eefbe04b6739460fc5642d4e0e606ba84
+MISC metadata.xml 448 BLAKE2B 141a4303111433ea46ec427dcf7942fae3165ea27b90c1d92f1fd4e4a82bbdea0476a7f5380250684ca763feb7ba7045bae9443329c260b0732452b3e639c5ea SHA512 192415f225533e6195856255483cb80c5da21f496bfe048518dbfccf8cdc049339ab5322d125e627a3a84fcdfb052012fd57cbe2083118917b35796f7a9e9353
diff --git a/dev-db/mydumper/files/mydumper-atomic.patch b/dev-db/mydumper/files/mydumper-atomic.patch
new file mode 100644
index 000000000000..405e6883fbcb
--- /dev/null
+++ b/dev-db/mydumper/files/mydumper-atomic.patch
@@ -0,0 +1,27 @@
+diff --git a/cmake/modules/FindMySQL.cmake b/cmake/modules/FindMySQL.cmake
+index 23470a8..2b8ae63 100644
+--- a/cmake/modules/FindMySQL.cmake
++++ b/cmake/modules/FindMySQL.cmake
+@@ -85,20 +85,8 @@ find_path(MYSQL_INCLUDE_DIR mysql.h
+
+ set(TMP_MYSQL_LIBRARIES "")
+ set(CMAKE_FIND_LIBRARY_SUFFIXES .so .a .lib .so.1)
+-foreach(MY_LIB ${MYSQL_ADD_LIBRARIES})
+- find_library("MYSQL_LIBRARIES_${MY_LIB}" NAMES ${MY_LIB}
+- HINTS
+- ${MYSQL_ADD_LIBRARY_PATH}
+- /usr/lib/mysql
+- /usr/lib
+- /usr/local/lib
+- /usr/local/lib/mysql
+- /usr/local/mysql/lib
+- )
+- list(APPEND TMP_MYSQL_LIBRARIES "${MYSQL_LIBRARIES_${MY_LIB}}")
+-endforeach(MY_LIB ${MYSQL_ADD_LIBRARIES})
+-
+-set(MYSQL_LIBRARIES ${TMP_MYSQL_LIBRARIES} CACHE FILEPATH INTERNAL)
++
++set(MYSQL_LIBRARIES ${MYSQL_ADD_LIBRARIES} CACHE FILEPATH INTERNAL)
+
+ if(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
+ set(MYSQL_FOUND TRUE CACHE INTERNAL "MySQL found")
diff --git a/dev-db/mydumper/files/mydumper-mariadb-define.patch b/dev-db/mydumper/files/mydumper-mariadb-define.patch
new file mode 100644
index 000000000000..ee39a33be818
--- /dev/null
+++ b/dev-db/mydumper/files/mydumper-mariadb-define.patch
@@ -0,0 +1,28 @@
+--- a/mydumper.c 2017-09-07 14:53:02.000000000 +0000
++++ b/mydumper.c 2017-10-25 14:53:46.614729185 +0000
+@@ -22,6 +22,11 @@
+ #define _FILE_OFFSET_BITS 64
+
+ #include <mysql.h>
++
++#if defined MARIADB_CLIENT_VERSION_STR && !defined MYSQL_SERVER_VERSION
++ #define MYSQL_SERVER_VERSION MARIADB_CLIENT_VERSION_STR
++#endif
++
+ #include <unistd.h>
+ #include <stdio.h>
+ #include <string.h>
+--- a/myloader.c 2017-09-07 14:53:02.000000000 +0000
++++ b/myloader.c 2017-10-25 14:55:34.677729185 +0000
+@@ -19,6 +19,11 @@
+ #define _FILE_OFFSET_BITS 64
+
+ #include <mysql.h>
++
++#if defined MARIADB_CLIENT_VERSION_STR && !defined MYSQL_SERVER_VERSION
++ #define MYSQL_SERVER_VERSION MARIADB_CLIENT_VERSION_STR
++#endif
++
+ #include <unistd.h>
+ #include <stdio.h>
+ #include <string.h>
diff --git a/dev-db/mydumper/metadata.xml b/dev-db/mydumper/metadata.xml
new file mode 100644
index 000000000000..b7a839d9622c
--- /dev/null
+++ b/dev-db/mydumper/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>hydrapolic@gmail.com</email>
+ <name>Tomáš Mózes</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">maxbube/mydumper</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/mydumper/mydumper-0.9.3-r1.ebuild b/dev-db/mydumper/mydumper-0.9.3-r1.ebuild
new file mode 100644
index 000000000000..f95deef1be62
--- /dev/null
+++ b/dev-db/mydumper/mydumper-0.9.3-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils
+
+DESCRIPTION="A high-performance multi-threaded backup (and restore) toolset for MySQL"
+HOMEPAGE="https://github.com/maxbube/mydumper"
+SRC_URI="https://github.com/maxbube/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+CDEPEND="dev-libs/glib:=
+ dev-libs/libpcre:=
+ dev-libs/openssl:=
+ sys-libs/zlib:=
+ virtual/mysql"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+ doc? ( dev-python/sphinx )"
+RDEPEND="${CDEPEND}"
+
+PATCHES=( "${FILESDIR}/${PN}-mariadb-define.patch" )
+
+src_prepare() {
+ # respect user cflags; do not expand ${CMAKE_C_FLAGS} (!)
+ sed -i -e 's:-Werror -O3 -g:${CMAKE_C_FLAGS}:' CMakeLists.txt || die
+
+ # fix doc install path
+ sed -i -e "s:share/doc/mydumper:share/doc/${PF}:" docs/CMakeLists.txt || die
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=("-DBUILD_DOCS=$(usex doc)")
+
+ cmake-utils_src_configure
+}
diff --git a/dev-db/mydumper/mydumper-0.9.5.ebuild b/dev-db/mydumper/mydumper-0.9.5.ebuild
new file mode 100644
index 000000000000..1bdc840bd0b9
--- /dev/null
+++ b/dev-db/mydumper/mydumper-0.9.5.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils
+
+DESCRIPTION="A high-performance multi-threaded backup (and restore) toolset for MySQL"
+HOMEPAGE="https://github.com/maxbube/mydumper"
+SRC_URI="https://github.com/maxbube/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+CDEPEND="dev-libs/glib:=
+ dev-libs/libpcre:=
+ dev-libs/openssl:=
+ sys-libs/zlib:=
+ virtual/mysql"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+ doc? ( dev-python/sphinx )"
+RDEPEND="${CDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-atomic.patch" #654314
+)
+
+src_prepare() {
+ # respect user cflags; do not expand ${CMAKE_C_FLAGS} (!)
+ sed -i -e 's:-Werror -O3 -g:${CMAKE_C_FLAGS}:' CMakeLists.txt || die
+
+ # fix doc install path
+ sed -i -e "s:share/doc/mydumper:share/doc/${PF}:" docs/CMakeLists.txt || die
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=("-DBUILD_DOCS=$(usex doc)")
+
+ cmake-utils_src_configure
+}
diff --git a/dev-db/myodbc-5.2.7-r1 b/dev-db/myodbc-5.2.7-r1
deleted file mode 100644
index 584adfcafec7..000000000000
--- a/dev-db/myodbc-5.2.7-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst prepare test
-DEPEND=dev-db/unixODBC[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ~virtual/libmysqlclient-18[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=ODBC driver for MySQL
-EAPI=5
-HOMEPAGE=http://www.mysql.com/products/myodbc/
-IUSE=abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=amd64 ppc x86
-LICENSE=GPL-2
-RDEPEND=dev-db/unixODBC[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ~virtual/libmysqlclient-18[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?]
-RESTRICT=primaryuri
-SLOT=5.2
-SRC_URI=mirror://mysql/Downloads/Connector-ODBC/5.2/mysql-connector-odbc-5.2.7-src.tar.gz
-_eclasses_=cmake-multilib 7bc2cc09a4a5082b915541d447be8e5e cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=ceab3ae8edb78036173da3626abf33e4
diff --git a/dev-db/myodbc-5.2.7-r3 b/dev-db/myodbc-5.2.7-r3
deleted file mode 100644
index 21ea4ba78931..000000000000
--- a/dev-db/myodbc-5.2.7-r3
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst prepare test
-DEPEND=dev-db/unixODBC[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ~virtual/libmysqlclient-18[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] !dev-db/mysql-connector-c !>=dev-db/mariadb-10.2.0 sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=ODBC driver for MySQL
-EAPI=6
-HOMEPAGE=http://www.mysql.com/products/myodbc/
-IUSE=abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=amd64 ~ppc ~x86
-LICENSE=GPL-2
-RDEPEND=dev-db/unixODBC[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ~virtual/libmysqlclient-18[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] !dev-db/mysql-connector-c !>=dev-db/mariadb-10.2.0
-RESTRICT=primaryuri
-SLOT=5.2
-SRC_URI=mirror://mysql/Downloads/Connector-ODBC/5.2/mysql-connector-odbc-5.2.7-src.tar.gz
-_eclasses_=cmake-multilib 7bc2cc09a4a5082b915541d447be8e5e cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=0065e5f49fa0b2d602d19e7f1073e17b
diff --git a/dev-db/myodbc-5.3.10-r2 b/dev-db/myodbc-5.3.10-r2
deleted file mode 100644
index 0208b444a646..000000000000
--- a/dev-db/myodbc-5.3.10-r2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst prepare test
-DEPEND=dev-db/unixODBC[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ~virtual/libmysqlclient-18[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] !>=dev-db/mariadb-10.2.0[client-libs(+)] !dev-db/mariadb-connector-c[mysqlcompat(-)] sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=ODBC driver for MySQL
-EAPI=6
-HOMEPAGE=http://www.mysql.com/products/myodbc/
-IUSE=abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=~amd64 ~ppc ~x86
-LICENSE=GPL-2
-RDEPEND=dev-db/unixODBC[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ~virtual/libmysqlclient-18[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] !>=dev-db/mariadb-10.2.0[client-libs(+)] !dev-db/mariadb-connector-c[mysqlcompat(-)]
-SLOT=5.3
-SRC_URI=https://dev.mysql.com/get/Downloads/Connector-ODBC/5.3/mysql-connector-odbc-5.3.10-src.tar.gz
-_eclasses_=cmake-multilib 7bc2cc09a4a5082b915541d447be8e5e cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=7ee8d53dcf08e238caede7058fab0ff6
diff --git a/dev-db/myodbc-5.3.9 b/dev-db/myodbc-5.3.9
deleted file mode 100644
index 5ba990c7dd3a..000000000000
--- a/dev-db/myodbc-5.3.9
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst test
-DESCRIPTION=ODBC driver for MySQL
-EAPI=6
-HOMEPAGE=http://www.mysql.com/products/myodbc/
-IUSE=abi_x86_32 abi_x86_64
-KEYWORDS=-* ~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=dev-db/unixODBC[abi_x86_32(-)?,abi_x86_64(-)?] sys-libs/zlib[abi_x86_32(-)?,abi_x86_64(-)?]
-REQUIRED_USE=|| ( abi_x86_32 abi_x86_64 )
-SLOT=5.3
-SRC_URI=amd64? ( https://cdn.mysql.com/Downloads/Connector-ODBC/5.3/mysql-connector-odbc-5.3.9-linux-debian9-x86-64bit.tar.gz abi_x86_32? ( https://cdn.mysql.com/Downloads/Connector-ODBC/5.3/mysql-connector-odbc-5.3.9-linux-debian9-x86-32bit.tar.gz ) ) x86? ( https://cdn.mysql.com/Downloads/Connector-ODBC/5.3/mysql-connector-odbc-5.3.9-linux-debian9-x86-32bit.tar.gz )
-_eclasses_=estack 43ddf5aaffa7a8d0482df54d25a66a1f multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=faf74e3cdc8ead59a29703dc54917131
diff --git a/dev-db/myodbc/Manifest b/dev-db/myodbc/Manifest
new file mode 100644
index 000000000000..c638da55a58f
--- /dev/null
+++ b/dev-db/myodbc/Manifest
@@ -0,0 +1,18 @@
+AUX 5.2.7-mariadb-dynamic-array.patch 3053 BLAKE2B 1c72b7318dcfd035655285c433a88d76d09200560db1530f76ab69e9ff765f17351b88aedabb297bb55f07aee5197cf29757534fc5373f95bad65fc49db93fe5 SHA512 26d35effbf4e74ef634c6e42dced40830402aa0925571f4bd55acd3dfe06f1c8c8f3bab4e9bb4bcd3f72dc87ecc3a093b984df4837548710899f97d8bdeca7b6
+AUX 5.2.7-my_malloc.patch 594 BLAKE2B c9d9aad2e9b9e3e2b30ff41e6ec68343557123517b808df6888d91f48e68cbb1de852f31b057dffea40264a717077e4bbce6f78438535eb11cb660986f469892 SHA512 bcd26b2f8de21404c741fec51bb7e7bec32a5d3fbc90471c157ee275dc6136a44a6ef4d2ad8dd170e2852679d3fcb0cc74cf4acca0570702206b4cded1cb1fa5
+AUX 5.2.7-r1-cxxlinkage.patch 1707 BLAKE2B aaf7ef0f319f2e00034307f51406c82580f5d257b61d722d7d610e731b9c549ff54b88279689c226df72837c5af35911ee1f4dd756b989f4018a78d3e3d5e940 SHA512 3d0f1839e1b200d7746d2c7161ee2a85813bf40517a70777d361e482efd6d6b0be88415d339d6dccc49de865a0d714fbbce2b74abb1bbc12c4f4681a5bd5abf8
+AUX 5.3-cmake-doc-path.patch 1480 BLAKE2B 5f89253a86fa97fbf4103fbe797f60449245195e9c8d0f6d7f065e654a402de0461459dd11d9d878f0794089261ee5ee9fac3240bf90f7c8382edb54d84b27a6 SHA512 aa2303161af2b53608acc127464951cf77492a1a90e869a58893ba10a014077d7f8f319325b77713fffceeaa002943f4ce52b6cb9571b0b3d3d7ab562601968d
+AUX 5.3.10-cxxlinkage.patch 1027 BLAKE2B b3df78658e4fb3243debb6f95cea6c5530db309ffc50f3a6afaff8bce143d147b4645a4bef4a54f6d04203ea132d4245812f5a2473ad7e9899f6e6b3c0799213 SHA512 f4d6df55313ccba995c8bd2e182397ce2652c2fbc0f0706474386654fb890fc47cad3a18f306206e840a47b729569e9a0ccb1cc2401c5280792afc4f544b41fd
+AUX 5.3.10-mariadb.patch 1744 BLAKE2B a9e33c86f999394d77757f69f1f314238123fa4158297961b4ce0f501e6fb743927e892c1f6640945842e843da56a826e5da1a968d84f7e5dcf3b2b4a590c0e8 SHA512 ebf62a2e0cc901fce81d0ad358f62d1c41494a5e35fb5a4df6913d1f4d5b8bbb638a23cabfe483818efa39688744b7be8b98d922b4bdff830de701c665da0fa0
+AUX cmake-doc-path.patch 1498 BLAKE2B b79110c92b7fc80c64fdf05b469c4bb333d68610ff4fadc78bd307689651e41bcd66f33fd782db1b69c863ef81faee3d5eb485d5c9bd284db8be3948d2bec7e7 SHA512 2e48af11efb55a1508402d5d1d717a3dfc9897bf0ccce5aa190792fb673ac78b27a9480e951a6347a2c8d0e2fe08a28c11fd08c55dbea835a93f525decaaf09e
+AUX odbc.ini.m4 406 BLAKE2B 3a20c28b1971753a14a4aa4d30efcc7de833488501a41d9404987567623d48250ce1daea1d3138adaef36741c4f2e0eafc60eba554e5262b45084f93f5205160 SHA512 84ab2a3aab594123d42b65205a7faf8e91fe9416a9e3c4c4c354533b9a298395f59172649c91dc0b671392bfbe5baeaddb6aa47119ce4c825917f3977d9dd521
+AUX odbcinst.ini.m4 118 BLAKE2B 6da835746e063f415ad7d640233cfd96e744cd56e12aaab4a21a2bf0bd5f1bd1e5c3d1c9a28522e3aa07c1261abac92301819d4112ac6a000a729aca9f7f7ad6 SHA512 6d929bbffd602a9f060a05998149a6b16334f8a5e3db30d02ff5d38c0065085d085042521e700b87a63766e32aa27ae92be72cef33c2a7aa8f6767b6b71c82c8
+DIST mysql-connector-odbc-5.2.7-src.tar.gz 606472 BLAKE2B 297f1ae57802f682616283bae9c3ff7ef88f8f016274884794f6b476bf9b92bc1da8af9cb89f41fa2a74238f91fbc39b9427529b806ac4ffb52aecd895cd8cd8 SHA512 f54ac8a23ade71da85e1335e95eccdccfd68a8687d17a584ced103812bdc5aee8014769a84eaa22724bb2cb23d34c7188c964d3283723defeaef5157a4b3c60f
+DIST mysql-connector-odbc-5.3.10-src.tar.gz 2646571 BLAKE2B e85e179ee8a54c8c98dd254e949c08227adc72141d52bc15935eafd60edaf95f47c12ca51fa9472ae29c761d5de2149277c58e6d3f02a566668be17f595ca7ba SHA512 ebe56b95a1690332959a7a37e8ed381b46730fb9f6fbd6522ddc1a6961e4c8cdac59681a957b33abeb6cae12f210278e4063daa59ce952d92acf427bc188e22b
+DIST mysql-connector-odbc-5.3.9-linux-debian9-x86-32bit.tar.gz 11501665 BLAKE2B e41dd65d940c0c91c67e6ec4c46ea2c3327e96d372c493635d05833862f2aa73919410a9e9a9c090a6fa65fd29e022a9b088c07a5e11089aee04b3b86005ad1e SHA512 02fcf6ac88f6052206aa55b6fc2b37f499da26e596e8e64b1c20e87dc4a24f745416da56c6e1268feff60321f54cb45864b8d34e055ea2f99da37b6efeedc844
+DIST mysql-connector-odbc-5.3.9-linux-debian9-x86-64bit.tar.gz 12013057 BLAKE2B e372cfb6ca49f9f01e9e60d7cd497fc009ec38dee76ca2cfb74cc95213b84ef1eebca85e1400f19c9715c0f9b2ef40fc212196e14189f5506be8d0e887507ce4 SHA512 b54ca167f762b4d8b988b4a91f14dc6a4bf49f55bc639ce8eecc9eba6c11400bd3494d74ef77ebe3348bdefd8fb5b8c1b62b3a6beebb926a1899da17ea4a1b44
+EBUILD myodbc-5.2.7-r1.ebuild 3300 BLAKE2B 9cc0f8a8ddf448c286594d7f27a85c113b98de2ded3eee1cc16661c54f48075fded3a8b0906a542a4a268e1144ab6d9c1b221d850b06faf9553bde8b4ca731bd SHA512 d8ffec3733dd3a811155fe03296081d3d54c17ed2d46b41e48213cf5f996ae7a4955d216355a8c0afa20142ccd243ebbbbfb8d40826fcd3f1a1e681b34126879
+EBUILD myodbc-5.2.7-r3.ebuild 3698 BLAKE2B 150992141e50dad64396392399791f02a8920485dae1d23c776a89cce3f648b9d0fac1c59202409be03c5bc27b7ca582d31ab1ff3480d9beef5847eda0e0380d SHA512 ee50335e1dff98d7b5b2a4248972c8423a4aaa8293a9404f659a789b9bb915f43e2d174482e07a9179af1cf6bf822de6a5a2e746f7410de7b06a350a3d03f9d2
+EBUILD myodbc-5.3.10-r2.ebuild 3591 BLAKE2B d4259c93e928c387bc72d5eeba31c2a574e7fcc4a5a302469959ef790b2ab492fa955ee959be8a709d44202ebcc2f8badca0427a40ce627c66e007c96ca4ceed SHA512 6c96641d40c7927aa9a80719d02eb80673f5b2845c465f3fcf11a10b3cc166124297c040d8ad7242dbc79d1ecba2fb8c4f15cc2944938ff53f795129cc6b1b04
+EBUILD myodbc-5.3.9.ebuild 3072 BLAKE2B 4922ed231672f11742590007b7b1f5c5dfa27263a6c98893b373793da06088f29c5401917179d479f4c57b24b2a1be9c3507caa752db79f3268fceff4719013d SHA512 4da8b034a745c453a310391a38e5cb1697bfa51838edc6903ee643e7dbe28fa5fb8f7d34264f88bb79b2aba83fa042212c0a2dd251c15150f7f0a2fcf561e052
+MISC metadata.xml 239 BLAKE2B c4d6706d083b72927d239f41a644a4009c054c1c1a388af7733d3a2daf47d354009eb472573304a6be272601f05535297bcd9ceaea811a741cd905577ffe53d1 SHA512 e6e2fafe2f503db1d12e3d2368a99631ee8d014b7ea802d9879e7e3e2c0f9378675fffccd78ed09b914ae781ac3902567b1a53a721906e3ea63ceb51d0a1654b
diff --git a/dev-db/myodbc/files/5.2.7-mariadb-dynamic-array.patch b/dev-db/myodbc/files/5.2.7-mariadb-dynamic-array.patch
new file mode 100644
index 000000000000..6cfe7cd274b3
--- /dev/null
+++ b/dev-db/myodbc/files/5.2.7-mariadb-dynamic-array.patch
@@ -0,0 +1,79 @@
+diff -aurN a/driver/catalog_no_i_s.c b/driver/catalog_no_i_s.c
+--- a/driver/catalog_no_i_s.c 2014-06-18 18:50:16.000000000 -0400
++++ b/driver/catalog_no_i_s.c 2014-08-20 14:08:33.997339096 -0400
+@@ -1093,7 +1093,11 @@
+ unsigned long *lengths;
+ SQLRETURN rc= SQL_SUCCESS;
+
++#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID > 100001
++ my_init_dynamic_array(&records, sizeof(MY_FOREIGN_KEY_FIELD), 0, 0, MYF(0));
++#else
+ my_init_dynamic_array(&records, sizeof(MY_FOREIGN_KEY_FIELD), 0, 0);
++#endif
+
+ /* Get the list of tables that match szCatalog and szTable */
+ pthread_mutex_lock(&stmt->dbc->lock);
+diff -aurN a/driver/desc.c b/driver/desc.c
+--- a/driver/desc.c 2014-06-18 18:50:16.000000000 -0400
++++ b/driver/desc.c 2014-08-20 14:07:37.409169269 -0400
+@@ -63,8 +63,12 @@
+ but in desc_get_rec we manually get a pointer to it. This avoids
+ having to call set_dynamic after modifying the DESCREC.
+ */
++#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID > 100001
++ if (my_init_dynamic_array(&desc->records, sizeof(DESCREC), 0, 0, MYF(0)))
++#else
+ if (my_init_dynamic_array(&desc->records, sizeof(DESCREC), 0, 0))
++#endif
+ {
+ x_free((char *)desc);
+ return NULL;
+ }
+@@ -995,9 +1003,15 @@
+
+ /* copy the records */
+ delete_dynamic(&dest->records);
++#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID > 100001
++ if (my_init_dynamic_array(&dest->records, sizeof(DESCREC),
++ src->records.max_element,
++ src->records.alloc_increment, MYF(0)))
++#else
+ if (my_init_dynamic_array(&dest->records, sizeof(DESCREC),
+ src->records.max_element,
+ src->records.alloc_increment))
++#endif
+ {
+ return set_desc_error(dest, "HY001",
+ "Memory allocation error",
+diff -aurN a/driver/handle.c b/driver/handle.c
+--- a/driver/handle.c 2014-06-18 18:50:16.000000000 -0400
++++ b/driver/handle.c 2014-08-20 14:05:00.364248403 -0400
+@@ -403,7 +403,11 @@
+ }
+ }
+
++#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID > 100001
++ my_init_dynamic_array(*param_bind, sizeof(MYSQL_BIND), elements, 10, MYF(0));
++#else
+ my_init_dynamic_array(*param_bind, sizeof(MYSQL_BIND), elements, 10);
++#endif
+ memset((*param_bind)->buffer, 0, sizeof(MYSQL_BIND) *
+ (*param_bind)->max_element);
+
+diff -aurN a/driver/parse.c b/driver/parse.c
+--- a/driver/parse.c 2014-06-18 18:50:16.000000000 -0400
++++ b/driver/parse.c 2014-08-20 14:03:54.336383876 -0400
+@@ -129,8 +129,13 @@
+
+ /* TODO: Store offsets rather than ptrs. In this case we will be fine
+ if work with copy of the originally parsed string */
++#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID > 100001
++ my_init_dynamic_array(&pq->token, sizeof(uint), 20, 10, MYF(0));
++ my_init_dynamic_array(&pq->param_pos, sizeof(uint), 10, 10, MYF(0));
++#else
+ my_init_dynamic_array(&pq->token, sizeof(uint), 20, 10);
+ my_init_dynamic_array(&pq->param_pos, sizeof(uint), 10, 10);
++#endif
+ }
+
+ return pq;
diff --git a/dev-db/myodbc/files/5.2.7-my_malloc.patch b/dev-db/myodbc/files/5.2.7-my_malloc.patch
new file mode 100644
index 000000000000..bc6c65ef3011
--- /dev/null
+++ b/dev-db/myodbc/files/5.2.7-my_malloc.patch
@@ -0,0 +1,18 @@
+diff -Brau a/util/odbcinstw.c b/util/odbcinstw.c
+--- a/util/odbcinstw.c 2014-04-23 21:54:40.000000000 +0200
++++ b/util/odbcinstw.c 2015-05-08 15:29:09.400568356 +0200
+@@ -68,13 +68,7 @@
+
+ if (lpszRetBuffer && cbRetBuffer)
+ {
+- ret= malloc(cbRetBuffer + 1);
+- /*
+- We cannot rely on getting correct results from the next call of
+- SQLGetPrivateProfileString. So, taking precautions against unititialized
+- values in the allocated buffer.
+- */
+- memset(ret, 0, cbRetBuffer + 1);
++ ret= my_malloc(cbRetBuffer + 1, MYF(MY_ZEROFILL));
+ }
+ else
+ ret= NULL;
diff --git a/dev-db/myodbc/files/5.2.7-r1-cxxlinkage.patch b/dev-db/myodbc/files/5.2.7-r1-cxxlinkage.patch
new file mode 100644
index 000000000000..2bdb4a581c89
--- /dev/null
+++ b/dev-db/myodbc/files/5.2.7-r1-cxxlinkage.patch
@@ -0,0 +1,40 @@
+diff -uarN a/cmake/FindMySQL.cmake b/cmake/FindMySQL.cmake
+--- a/cmake/FindMySQL.cmake 2014-06-18 18:50:16.000000000 -0400
++++ b/cmake/FindMySQL.cmake 2014-08-20 10:05:00.191485304 -0400
+@@ -105,16 +105,16 @@
+ # Finally remove the dot
+ STRING(REGEX REPLACE "[.]" "" MYSQL_NUM_VERSION "${MYSQL_NUM_VERSION}")
+
+- IF(MYSQL_CXX_LINKAGE OR MYSQL_NUM_VERSION GREATER 50603)
++ IF(MYSQL_CXX_LINKAGE)
+ EXECUTE_PROCESS(COMMAND ${MYSQL_CONFIG_EXECUTABLE} "--cxxflags"
+ OUTPUT_VARIABLE _mysql_config_output
+ )
+ SET(MYSQL_CXX_LINKAGE 1)
+- ELSE (MYSQL_CXX_LINKAGE OR MYSQL_NUM_VERSION GREATER 50603)
++ ELSE (MYSQL_CXX_LINKAGE)
+ EXECUTE_PROCESS(COMMAND ${MYSQL_CONFIG_EXECUTABLE} "--cflags"
+ OUTPUT_VARIABLE _mysql_config_output
+ )
+- ENDIF(MYSQL_CXX_LINKAGE OR MYSQL_NUM_VERSION GREATER 50603)
++ ENDIF(MYSQL_CXX_LINKAGE)
+
+ # Remove the stl4port dependency
+ STRING(REGEX REPLACE "-library=stlport4" "" _mysql_config_output "${_mysql_config_output}")
+diff -aurN mysql-connector-odbc-5.2.7-src.orig/CMakeLists.txt mysql-connector-odbc-5.2.7-src/CMakeLists.txt
+--- a/CMakeLists.txt 2014-08-27 13:51:27.050553560 -0400
++++ b/CMakeLists.txt 2014-08-27 13:55:41.702359680 -0400
+@@ -256,10 +256,9 @@
+ SET(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")
+ SET(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/lib")
+
+-SET(LIB_SUBDIR "lib")
+-IF(RPM_BUILD AND CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64|ppc64|ppc64p7|s390x|sparc64)")
+- SET(LIB_SUBDIR "lib64")
+-ENDIF()
++IF(NOT LIB_SUBDIR)
++ MESSAGE(ERROR "LIB_SUBDIR is not set")
++ENDIF(NOT LIB_SUBDIR)
+ MESSAGE(STATUS "Installation library subdir: ${LIB_SUBDIR}")
+
+ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
diff --git a/dev-db/myodbc/files/5.3-cmake-doc-path.patch b/dev-db/myodbc/files/5.3-cmake-doc-path.patch
new file mode 100644
index 000000000000..54f35d41d96a
--- /dev/null
+++ b/dev-db/myodbc/files/5.3-cmake-doc-path.patch
@@ -0,0 +1,43 @@
+=== modified file 'CMakeLists.txt'
+--- a/CMakeLists.txt 2013-03-09 09:51:06 +0000
++++ b/CMakeLists.txt 2013-03-09 11:05:27 +0000
+@@ -33,6 +33,12 @@
+
+ INCLUDE(version.cmake)
+
++IF(WITH_DOCUMENTATION_INSTALL_PATH)
++ set(DOCUMENTATION_INSTALL_PATH ${WITH_DOCUMENTATION_INSTALL_PATH})
++ELSE(WITH_DOCUMENTATION_INSTALL_PATH)
++ set(DOCUMENTATION_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/share/doc/myodbc-${CONNECTOR_MAJOR}.${CONNECTOR_MINOR})
++ENDIF(WITH_DOCUMENTATION_INSTALL_PATH)
++
+ #Default is to build both drivers
+ IF(UNICODE OR NOT ANSI)
+ MESSAGE(STATUS "Configuring to build Unicode driver")
+@@ -329,19 +335,17 @@
+
+ ELSE(WIN32)
+
+- INSTALL(FILES ChangeLog DESTINATION .)
+- INSTALL(FILES README DESTINATION .)
+- INSTALL(FILES README.debug DESTINATION .)
+- INSTALL(FILES INSTALL DESTINATION .)
++ INSTALL(FILES ChangeLog DESTINATION ${DOCUMENTATION_INSTALL_PATH})
++ INSTALL(FILES README DESTINATION ${DOCUMENTATION_INSTALL_PATH})
++ INSTALL(FILES README.debug DESTINATION ${DOCUMENTATION_INSTALL_PATH})
++ INSTALL(FILES INSTALL DESTINATION ${DOCUMENTATION_INSTALL_PATH})
+ IF(EXISTS "${CMAKE_SOURCE_DIR}/COPYING")
+- INSTALL(FILES COPYING DESTINATION .)
+ ELSE()
+- INSTALL(FILES LICENSE.mysql DESTINATION .)
+ ENDIF()
+
+ ENDIF(WIN32)
+
+-INSTALL(FILES Licenses_for_Third-Party_Components.txt DESTINATION .)
++INSTALL(FILES Licenses_for_Third-Party_Components.txt DESTINATION ${DOCUMENTATION_INSTALL_PATH})
+
+ INCLUDE(CPack)
+
+
+
diff --git a/dev-db/myodbc/files/5.3.10-cxxlinkage.patch b/dev-db/myodbc/files/5.3.10-cxxlinkage.patch
new file mode 100644
index 000000000000..796a13754f86
--- /dev/null
+++ b/dev-db/myodbc/files/5.3.10-cxxlinkage.patch
@@ -0,0 +1,29 @@
+diff -aurN a/cmake/FindMySQL.cmake b/cmake/FindMySQL.cmake
+--- a/cmake/FindMySQL.cmake 2016-11-29 07:40:13.000000000 -0500
++++ b/cmake/FindMySQL.cmake 2017-02-17 13:59:18.115389096 -0500
+@@ -747,7 +747,7 @@
+ endif()
+
+ if(NOT MYSQL_CXXFLAGS)
+- if(MYSQL_CXX_LINKAGE OR MYSQL_VERSION_ID GREATER 50603)
++ if(MYSQL_CXX_LINKAGE)
+ _mysql_conf(MYSQL_CXXFLAGS "--cxxflags")
+ set(MYSQL_CXX_LINKAGE 1)
+ else()
+diff -aurN a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt 2018-02-10 21:41:13.161553751 -0500
++++ b/CMakeLists.txt 2018-02-10 21:45:20.038398824 -0500
+@@ -379,10 +379,9 @@
+ SET(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")
+ SET(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/lib")
+
+-SET(LIB_SUBDIR "lib")
+-IF(RPM_BUILD AND CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64|ppc64|ppc64p7|s390x|sparc64)")
+- SET(LIB_SUBDIR "lib64")
+-ENDIF()
++IF(NOT LIB_SUBDIR)
++ MESSAGE(ERROR "LIB_SUBDIR is not set")
++ENDIF(NOT LIB_SUBDIR)
+
+ MESSAGE(STATUS "Installation library subdir: ${LIB_SUBDIR}")
+
diff --git a/dev-db/myodbc/files/5.3.10-mariadb.patch b/dev-db/myodbc/files/5.3.10-mariadb.patch
new file mode 100644
index 000000000000..c860349e4b71
--- /dev/null
+++ b/dev-db/myodbc/files/5.3.10-mariadb.patch
@@ -0,0 +1,58 @@
+--- a/include/sys_main.h 2018-01-19 05:36:38.000000000 -0500
++++ b/include/sys_main.h 2018-03-01 11:40:04.554713079 -0500
+@@ -20,6 +20,8 @@
+ extern "C" {
+ #endif
+
++#include "sys/mysql/psi/psi_memory.h"
++
+ #define MY_FAE 8 /* Fatal if any error */
+ #define MY_WME 16 /* Write message on error */
+ #define MY_ZEROFILL 32 /* my_malloc(), fill array with zero */
+--- a/driver/connect.c 2018-01-19 05:36:38.000000000 -0500
++++ b/driver/connect.c 2018-03-01 11:39:51.458676373 -0500
+@@ -179,7 +179,7 @@
+ /* Set other connection options */
+
+ if (ds->allow_big_results || ds->safe)
+-#if MYSQL_VERSION_ID >= 50709
++#if MYSQL_VERSION_ID >= 50709 && !defined(MARIADB_BASE_VERSION)
+ mysql_options(mysql, MYSQL_OPT_MAX_ALLOWED_PACKET, &max_long);
+ #else
+ /* max_allowed_packet is a magical mysql macro. */
+@@ -252,7 +252,7 @@
+ ds_get_utf8attr(ds->rsakey, &ds->rsakey8));
+ }
+ #endif
+-#if MYSQL_VERSION_ID >= 50710
++#if MYSQL_VERSION_ID >= 50710 && !defined(MARIADB_BASE_VERSION)
+ {
+ char tls_options[128] = { 0 };
+ if (!ds->no_tls_1)
+@@ -323,7 +323,7 @@
+ #endif
+
+ mysql->options.use_ssl = !ds->disable_ssl_default;
+-#if MYSQL_VERSION_ID >= 50703
++#if MYSQL_VERSION_ID >= 50703 && !defined(MARIADB_BASE_VERSION)
+ {
+ if (ds->ssl_enforce)
+ {
+@@ -332,7 +332,7 @@
+ }
+ #endif
+
+-#if MYSQL_VERSION_ID >= 50711
++#if MYSQL_VERSION_ID >= 50711 && !defined(MARIADB_BASE_VERSION)
+ if (ds->sslmode)
+ {
+ unsigned int mode = 0;
+@@ -510,7 +510,7 @@
+ }
+ }
+
+-#if MYSQL_VERSION_ID >= 50709
++#if MYSQL_VERSION_ID >= 50709 && !defined(MARIADB_BASE_VERSION)
+ mysql_get_option(mysql, MYSQL_OPT_NET_BUFFER_LENGTH, &dbc->net_buffer_len);
+ #else
+ // for older versions just use net_buffer_length() macro
diff --git a/dev-db/myodbc/files/cmake-doc-path.patch b/dev-db/myodbc/files/cmake-doc-path.patch
new file mode 100644
index 000000000000..c7f7d9d37ce7
--- /dev/null
+++ b/dev-db/myodbc/files/cmake-doc-path.patch
@@ -0,0 +1,43 @@
+=== modified file 'CMakeLists.txt'
+--- CMakeLists.txt 2013-03-09 09:51:06 +0000
++++ CMakeLists.txt 2013-03-09 11:05:27 +0000
+@@ -33,6 +33,12 @@
+ SET(CONNECTOR_MAJOR "5")
+ SET(CONNECTOR_MINOR "2")
+
++IF(WITH_DOCUMENTATION_INSTALL_PATH)
++ set(DOCUMENTATION_INSTALL_PATH ${WITH_DOCUMENTATION_INSTALL_PATH})
++ELSE(WITH_DOCUMENTATION_INSTALL_PATH)
++ set(DOCUMENTATION_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/share/doc/myodbc-${CONNECTOR_MAJOR}.${CONNECTOR_MINOR})
++ENDIF(WITH_DOCUMENTATION_INSTALL_PATH)
++
+ IF(CONNECTOR_MINOR LESS 10)
+ SET(CONNECTOR_MINOR_PADDED "0${CONNECTOR_MINOR}")
+ ELSE(CONNECTOR_MINOR LESS 10)
+@@ -329,19 +335,17 @@
+
+ ELSE(WIN32)
+
+- INSTALL(FILES ChangeLog DESTINATION .)
+- INSTALL(FILES README DESTINATION .)
+- INSTALL(FILES README.debug DESTINATION .)
+- INSTALL(FILES INSTALL DESTINATION .)
++ INSTALL(FILES ChangeLog DESTINATION ${DOCUMENTATION_INSTALL_PATH})
++ INSTALL(FILES README DESTINATION ${DOCUMENTATION_INSTALL_PATH})
++ INSTALL(FILES README.debug DESTINATION ${DOCUMENTATION_INSTALL_PATH})
++ INSTALL(FILES INSTALL DESTINATION ${DOCUMENTATION_INSTALL_PATH})
+ IF(EXISTS "${CMAKE_SOURCE_DIR}/COPYING")
+- INSTALL(FILES COPYING DESTINATION .)
+ ELSE()
+- INSTALL(FILES LICENSE.mysql DESTINATION .)
+ ENDIF()
+
+ ENDIF(WIN32)
+
+-INSTALL(FILES Licenses_for_Third-Party_Components.txt DESTINATION .)
++INSTALL(FILES Licenses_for_Third-Party_Components.txt DESTINATION ${DOCUMENTATION_INSTALL_PATH})
+
+ INCLUDE(CPack)
+
+
+
diff --git a/dev-db/myodbc/files/odbc.ini.m4 b/dev-db/myodbc/files/odbc.ini.m4
new file mode 100644
index 000000000000..4255730a3e21
--- /dev/null
+++ b/dev-db/myodbc/files/odbc.ini.m4
@@ -0,0 +1,17 @@
+# vim:ts=4 noexpandtab ft=dosini:
+#
+[ODBC Data Sources]
+__PN__-test = MySQL ODBC __PF__ Driver Testing DSN
+
+# see http://www.mysql.com/products/myodbc/faq_toc.html
+# for details about the following entry
+[__PN__-test]
+Description = MySQL ODBC __PF__ Driver Testing DSN
+Driver = __PN__
+Socket = /var/run/mysqld/mysqld.sock
+Server = localhost
+User = root
+Database = test
+Option = 3
+#Port =
+#Password =
diff --git a/dev-db/myodbc/files/odbcinst.ini.m4 b/dev-db/myodbc/files/odbcinst.ini.m4
new file mode 100644
index 000000000000..744503c5ac05
--- /dev/null
+++ b/dev-db/myodbc/files/odbcinst.ini.m4
@@ -0,0 +1,5 @@
+# vim:ts=4 noexpandtab ft=dosini:
+#
+[__PN__]
+Description = MySQL ODBC __PF__ Driver
+Driver = /usr/lib/libmyodbc3.so
diff --git a/dev-db/myodbc/metadata.xml b/dev-db/myodbc/metadata.xml
new file mode 100644
index 000000000000..709689b06053
--- /dev/null
+++ b/dev-db/myodbc/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>mysql-bugs@gentoo.org</email>
+ <name>MySQL</name>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-db/myodbc/myodbc-5.2.7-r1.ebuild b/dev-db/myodbc/myodbc-5.2.7-r1.ebuild
new file mode 100644
index 000000000000..2698ccabd5da
--- /dev/null
+++ b/dev-db/myodbc/myodbc-5.2.7-r1.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit cmake-multilib eutils flag-o-matic versionator
+
+MAJOR="$(get_version_component_range 1-2 $PV)"
+MY_PN="mysql-connector-odbc"
+MY_P="${MY_PN}-${PV/_p/r}-src"
+
+DESCRIPTION="ODBC driver for MySQL"
+HOMEPAGE="http://www.mysql.com/products/myodbc/"
+SRC_URI="mirror://mysql/Downloads/Connector-ODBC/${MAJOR}/${MY_P}.tar.gz"
+RESTRICT="primaryuri"
+
+LICENSE="GPL-2"
+SLOT="${MAJOR}"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+RDEPEND="
+ dev-db/unixODBC[${MULTILIB_USEDEP}]
+ ~virtual/libmysqlclient-18[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}"
+S=${WORKDIR}/${MY_P}
+
+# Careful!
+DRIVER_NAME="${PN}-${SLOT}"
+
+src_prepare() {
+ # Remove Tests
+ sed -i -e "s/ADD_SUBDIRECTORY(test)//" \
+ "${S}/CMakeLists.txt"
+
+ # Fix as-needed on the installer binary
+ echo "TARGET_LINK_LIBRARIES(myodbc-installer odbc)" >> "${S}/installer/CMakeLists.txt"
+
+ # Patch document path so it doesn't install files to /usr
+ epatch "${FILESDIR}/cmake-doc-path.patch" \
+ "${FILESDIR}/${PVR}-cxxlinkage.patch" \
+ "${FILESDIR}/${PV}-mariadb-dynamic-array.patch"
+
+ # Fix undefined references due to standards change
+ append-cflags -std=gnu89
+}
+
+multilib_src_configure() {
+ # The RPM_BUILD flag does nothing except install to /usr/lib64 when "x86_64"
+ # MYSQL_CXX_LINKAGE expects "mysql_config --cxxflags" which doesn't exist on MariaDB
+ mycmakeargs+=(
+ -DMYSQL_CXX_LINKAGE=0
+ -DWITH_UNIXODBC=1
+ -DMYSQLCLIENT_LIB_NAME="libmysqlclient.so"
+ -DWITH_DOCUMENTATION_INSTALL_PATH=/usr/share/doc/${PF}
+ -DMYSQL_LIB_DIR="${ROOT}/usr/$(get_libdir)"
+ -DLIB_SUBDIR="$(get_libdir)"
+ )
+ cmake-utils_src_configure
+}
+
+multilib_src_install_all() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ dodir /usr/share/${PN}-${SLOT}
+ for i in odbc.ini odbcinst.ini; do
+ einfo "Building $i"
+ sed \
+ -e "s,__PN__,${DRIVER_NAME},g" \
+ -e "s,__PF__,${MAJOR},g" \
+ -e "s,libmyodbc3.so,libmyodbc${SLOT:0:1}a.so,g" \
+ >"${D}"/usr/share/${PN}-${SLOT}/${i} \
+ <"${FILESDIR}"/${i}.m4 \
+ || die "Failed to build $i"
+ done;
+ mv "${D}/usr/bin/myodbc-installer" \
+ "${D}/usr/bin/myodbc-installer-${MAJOR}" || die "failed to move slotted binary"
+}
+
+pkg_config() {
+
+ [ "${ROOT}" != "/" ] && \
+ die 'Sorry, non-standard ROOT setting is not supported :-('
+
+ local msg='MySQL ODBC driver'
+ local drivers=$(/usr/bin/odbcinst -q -d)
+
+ if echo $drivers | grep -vq "^\[${DRIVER_NAME}\]$" ; then
+ ebegin "Installing ${msg}"
+ /usr/bin/odbcinst -i -d -f /usr/share/${PN}-${SLOT}/odbcinst.ini
+ rc=$?
+ eend $rc
+ [ $rc -ne 0 ] && die
+ else
+ einfo "Skipping already installed ${msg}"
+ fi
+
+ local sources=$(/usr/bin/odbcinst -q -s)
+ msg='sample MySQL ODBC DSN'
+ if echo $sources | grep -vq "^\[${DRIVER_NAME}-test\]$"; then
+ ebegin "Installing ${msg}"
+ /usr/bin/odbcinst -i -s -l -f /usr/share/${PN}-${SLOT}/odbc.ini
+ rc=$?
+ eend $rc
+ [ $rc -ne 0 ] && die
+ else
+ einfo "Skipping already installed ${msg}"
+ fi
+}
+
+pkg_postinst() {
+
+ elog "If this is a new install, please run the following command"
+ elog "to configure the MySQL ODBC drivers and sources:"
+ elog "emerge --config =${CATEGORY}/${PF}"
+ elog "Please note that the driver name used to form the DSN now includes the SLOT."
+ elog "The myodbc-install utility is installed as myodbc-install-${MAJOR}"
+}
diff --git a/dev-db/myodbc/myodbc-5.2.7-r3.ebuild b/dev-db/myodbc/myodbc-5.2.7-r3.ebuild
new file mode 100644
index 000000000000..f44807fe599e
--- /dev/null
+++ b/dev-db/myodbc/myodbc-5.2.7-r3.ebuild
@@ -0,0 +1,131 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit cmake-multilib flag-o-matic versionator
+
+MAJOR="$(get_version_component_range 1-2 $PV)"
+MY_PN="mysql-connector-odbc"
+MY_P="${MY_PN}-${PV/_p/r}-src"
+
+DESCRIPTION="ODBC driver for MySQL"
+HOMEPAGE="http://www.mysql.com/products/myodbc/"
+SRC_URI="mirror://mysql/Downloads/Connector-ODBC/${MAJOR}/${MY_P}.tar.gz"
+RESTRICT="primaryuri"
+
+LICENSE="GPL-2"
+SLOT="${MAJOR}"
+KEYWORDS="amd64 ~ppc ~x86"
+IUSE=""
+
+# Does not build with mysql-connector-c
+RDEPEND="
+ dev-db/unixODBC[${MULTILIB_USEDEP}]
+ ~virtual/libmysqlclient-18[${MULTILIB_USEDEP}]
+ !dev-db/mysql-connector-c
+ !>=dev-db/mariadb-10.2.0
+"
+DEPEND="${RDEPEND}"
+S=${WORKDIR}/${MY_P}
+
+# Careful!
+DRIVER_NAME="${PN}-${SLOT}"
+
+src_prepare() {
+ # Remove Tests
+ sed -i -e "s/ADD_SUBDIRECTORY(test)//" \
+ "${S}/CMakeLists.txt"
+
+ # Fix as-needed on the installer binary
+ echo "TARGET_LINK_LIBRARIES(myodbc-installer odbc)" >> "${S}/installer/CMakeLists.txt"
+
+ # Patch document path so it doesn't install files to /usr
+ local FILES=( "${FILESDIR}/cmake-doc-path.patch"
+ "${FILESDIR}/${PV}-r1-cxxlinkage.patch"
+ "${FILESDIR}/${PV}-mariadb-dynamic-array.patch"
+ "${FILESDIR}/${PV}-my_malloc.patch" )
+
+ # Fix undefined references due to standards change
+ append-cflags -std=gnu89
+
+ MYSQL_SERVER_INCLUDE=$(mysql_config --include | cut -d ' ' -f 1)
+ append-cflags "${MYSQL_SERVER_INCLUDE}/server"
+
+ append-cppflags -DSTACK_DIRECTION=1
+
+ cmake-utils_src_prepare
+}
+
+multilib_src_configure() {
+ # The RPM_BUILD flag does nothing except install to /usr/lib64 when "x86_64"
+ # MYSQL_CXX_LINKAGE expects "mysql_config --cxxflags" which doesn't exist on MariaDB
+ mycmakeargs+=(
+ -DMYSQL_CXX_LINKAGE=0
+ -DWITH_UNIXODBC=1
+ -DMYSQLCLIENT_LIB_NAME="libmysqlclient.so"
+ -DWITH_DOCUMENTATION_INSTALL_PATH=/usr/share/doc/${PF}
+ -DMYSQL_LIB_DIR="${ROOT}/usr/$(get_libdir)"
+ -DLIB_SUBDIR="$(get_libdir)"
+ -DNO_THREADS=ON
+ )
+ cmake-utils_src_configure
+}
+
+multilib_src_install_all() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ dodir /usr/share/${PN}-${SLOT}
+ for i in odbc.ini odbcinst.ini; do
+ einfo "Building $i"
+ sed \
+ -e "s,__PN__,${DRIVER_NAME},g" \
+ -e "s,__PF__,${MAJOR},g" \
+ -e "s,libmyodbc3.so,libmyodbc${SLOT:0:1}a.so,g" \
+ -e "s,lib/libmyodbc,$(get_libdir)/${DRIVER_NAME}/libmyodbc,g" \
+ >"${D}"/usr/share/${PN}-${SLOT}/${i} \
+ <"${FILESDIR}"/${i}.m4 \
+ || die "Failed to build $i"
+ done;
+ mv "${D}/usr/bin/myodbc-installer" \
+ "${D}/usr/bin/myodbc-installer-${MAJOR}" || die "failed to move slotted binary"
+}
+
+pkg_config() {
+
+ [ "${ROOT}" != "/" ] && \
+ die 'Sorry, non-standard ROOT setting is not supported :-('
+
+ local msg='MySQL ODBC driver'
+ local drivers=$(/usr/bin/odbcinst -q -d)
+
+ if echo $drivers | grep -vq "^\[${DRIVER_NAME}\]$" ; then
+ ebegin "Installing ${msg}"
+ /usr/bin/odbcinst -i -d -f /usr/share/${PN}-${SLOT}/odbcinst.ini
+ rc=$?
+ eend $rc
+ [ $rc -ne 0 ] && die
+ else
+ einfo "Skipping already installed ${msg}"
+ fi
+
+ local sources=$(/usr/bin/odbcinst -q -s)
+ msg='sample MySQL ODBC DSN'
+ if echo $sources | grep -vq "^\[${DRIVER_NAME}-test\]$"; then
+ ebegin "Installing ${msg}"
+ /usr/bin/odbcinst -i -s -l -f /usr/share/${PN}-${SLOT}/odbc.ini
+ rc=$?
+ eend $rc
+ [ $rc -ne 0 ] && die
+ else
+ einfo "Skipping already installed ${msg}"
+ fi
+}
+
+pkg_postinst() {
+
+ elog "If this is a new install, please run the following command"
+ elog "to configure the MySQL ODBC drivers and sources:"
+ elog "emerge --config =${CATEGORY}/${PF}"
+ elog "Please note that the driver name used to form the DSN now includes the SLOT."
+ elog "The myodbc-install utility is installed as myodbc-install-${MAJOR}"
+}
diff --git a/dev-db/myodbc/myodbc-5.3.10-r2.ebuild b/dev-db/myodbc/myodbc-5.3.10-r2.ebuild
new file mode 100644
index 000000000000..1172fce91be0
--- /dev/null
+++ b/dev-db/myodbc/myodbc-5.3.10-r2.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# Build is broken with ninja
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit cmake-multilib flag-o-matic versionator
+
+MAJOR="$(get_version_component_range 1-2 $PV)"
+MY_PN="mysql-connector-odbc"
+MY_P="${MY_PN}-${PV/_p/r}-src"
+
+DESCRIPTION="ODBC driver for MySQL"
+HOMEPAGE="http://www.mysql.com/products/myodbc/"
+SRC_URI="https://dev.mysql.com/get/Downloads/Connector-ODBC/${MAJOR}/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="${MAJOR}"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+# Does not build with libmariadb
+RDEPEND="
+ dev-db/unixODBC[${MULTILIB_USEDEP}]
+ ~virtual/libmysqlclient-18[${MULTILIB_USEDEP}]
+ !>=dev-db/mariadb-10.2.0[client-libs(+)]
+ !dev-db/mariadb-connector-c[mysqlcompat(-)]
+"
+DEPEND="${RDEPEND}"
+S=${WORKDIR}/${MY_P}
+
+# Careful!
+DRIVER_NAME="${PN}-${SLOT}"
+
+# Patch document path so it doesn't install files to /usr
+PATCHES=(
+ "${FILESDIR}/${MAJOR}-cmake-doc-path.patch"
+ "${FILESDIR}/5.3.10-cxxlinkage.patch"
+ "${FILESDIR}/5.3.10-mariadb.patch"
+)
+
+src_prepare() {
+ # Remove Tests
+ sed -i -e "s/ADD_SUBDIRECTORY(test)//" \
+ "${S}/CMakeLists.txt"
+
+ # Fix as-needed on the installer binary
+# echo "TARGET_LINK_LIBRARIES(myodbc-installer odbc)" >> "${S}/installer/CMakeLists.txt"
+
+ cmake-utils_src_prepare
+}
+
+multilib_src_configure() {
+ # MYSQL_CXX_LINKAGE expects "mysql_config --cxxflags" which doesn't exist on MariaDB
+ mycmakeargs+=(
+ -DMYSQL_CXX_LINKAGE=0
+ -DWITH_UNIXODBC=1
+ -DWITH_DOCUMENTATION_INSTALL_PATH=/usr/share/doc/${PF}
+ -DMYSQL_LIB_DIR="${EPREFIX}/usr/$(get_libdir)"
+ -DLIB_SUBDIR="$(get_libdir)/${PN}-${MAJOR}"
+ -DMYSQL_INCLUDE_DIR="$(mysql_config --variable=pkgincludedir)"
+ -DMYSQLCLIENT_NO_THREADS=ON
+ -DDISABLE_GUI=ON
+ # The NUMA and LIBWRAP options are not really used.
+ # They are just copied from the server code
+ -DWITH_NUMA=OFF
+ -DWITH_LIBWRAP=OFF
+ )
+ cmake-utils_src_configure
+}
+
+multilib_src_install_all() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ dodir /usr/share/${PN}-${SLOT}
+ for i in odbc.ini odbcinst.ini; do
+ einfo "Building $i"
+ sed \
+ -e "s,__PN__,${DRIVER_NAME},g" \
+ -e "s,__PF__,${MAJOR},g" \
+ -e "s,lib/libmyodbc3.so,$(get_libdir)/${PN}-${MAJOR}/libmyodbc${SLOT:0:1}a.so,g" \
+ >"${D}"/usr/share/${PN}-${SLOT}/${i} \
+ <"${FILESDIR}"/${i}.m4 \
+ || die "Failed to build $i"
+ done;
+ mv "${D}/usr/bin/myodbc-installer" \
+ "${D}/usr/bin/myodbc-installer-${MAJOR}" || die "failed to move slotted binary"
+}
+
+pkg_config() {
+
+ [ "${ROOT}" != "/" ] && \
+ die 'Sorry, non-standard ROOT setting is not supported :-('
+
+ local msg='MySQL ODBC driver'
+ local drivers=$(/usr/bin/odbcinst -q -d)
+
+ if echo $drivers | grep -vq "^\[${DRIVER_NAME}\]$" ; then
+ ebegin "Installing ${msg}"
+ /usr/bin/odbcinst -i -d -f /usr/share/${PN}-${SLOT}/odbcinst.ini
+ rc=$?
+ eend $rc
+ [ $rc -ne 0 ] && die
+ else
+ einfo "Skipping already installed ${msg}"
+ fi
+
+ local sources=$(/usr/bin/odbcinst -q -s)
+ msg='sample MySQL ODBC DSN'
+ if echo $sources | grep -vq "^\[${DRIVER_NAME}-test\]$"; then
+ ebegin "Installing ${msg}"
+ /usr/bin/odbcinst -i -s -l -f /usr/share/${PN}-${SLOT}/odbc.ini
+ rc=$?
+ eend $rc
+ [ $rc -ne 0 ] && die
+ else
+ einfo "Skipping already installed ${msg}"
+ fi
+}
+
+pkg_postinst() {
+
+ elog "If this is a new install, please run the following command"
+ elog "to configure the MySQL ODBC drivers and sources:"
+ elog "emerge --config =${CATEGORY}/${PF}"
+ elog "Please note that the driver name used to form the DSN now includes the SLOT."
+ elog "The myodbc-install utility is installed as myodbc-install-${MAJOR}"
+}
diff --git a/dev-db/myodbc/myodbc-5.3.9.ebuild b/dev-db/myodbc/myodbc-5.3.9.ebuild
new file mode 100644
index 000000000000..bcdb2f0d975c
--- /dev/null
+++ b/dev-db/myodbc/myodbc-5.3.9.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MULTILIB_COMPAT=( abi_x86_{32,64} )
+inherit multilib-minimal versionator
+
+MAJOR="$(get_version_component_range 1-2 $PV)"
+MY_PN="mysql-connector-odbc"
+MY_P="${MY_PN}-${PV/_p/r}-linux-debian9-x86"
+
+DESCRIPTION="ODBC driver for MySQL"
+HOMEPAGE="http://www.mysql.com/products/myodbc/"
+BASE_URI="https://cdn.mysql.com/Downloads/Connector-ODBC/${MAJOR}/${MY_P}"
+#https://cdn.mysql.com//Downloads/Connector-ODBC/5.3/mysql-connector-odbc-5.3.8-linux-debian8-x86-64bit.tar.gz
+SRC_URI="amd64? ( ${BASE_URI}-64bit.tar.gz abi_x86_32? ( ${BASE_URI}-32bit.tar.gz ) )
+ x86? ( ${BASE_URI}-32bit.tar.gz )"
+
+LICENSE="GPL-2"
+SLOT="${MAJOR}"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ dev-db/unixODBC[${MULTILIB_USEDEP}]
+ sys-libs/zlib[${MULTILIB_USEDEP}]"
+S=${WORKDIR}
+
+#src_configure(){ :; }
+
+src_compile(){ :; }
+
+multilib_src_install() {
+ cd "${S}" || die
+ local prefix
+ if use amd64 && multilib_is_native_abi ; then
+ prefix="${MY_P}-64bit"
+ else
+ prefix="${MY_P}-32bit"
+ fi
+ exeinto /usr/$(get_libdir)/${PN}-${MAJOR}
+ doexe ${prefix}/lib/libmyodbc5a.so ${prefix}/lib/libmyodbc5w.so
+# use gtk && doexe ${prefix}/lib/libmyodbc5S.so
+}
+
+multilib_src_install_all() {
+ local DRIVER_NAME="${PN}-${SLOT}"
+ local prefix
+ if use amd64 ; then
+ prefix="${MY_P}-64bit"
+ else
+ prefix="${MY_P}-32bit"
+ fi
+ exeinto /usr/bin
+ newexe "${prefix}/bin/myodbc-installer" myodbc-installer-${MAJOR}
+
+ dodir /usr/share/${PN}-${SLOT}
+ for i in odbc.ini odbcinst.ini; do
+ einfo "Building $i"
+ sed \
+ -e "s,__PN__,${DRIVER_NAME},g" \
+ -e "s,__PF__,${MAJOR},g" \
+ -e "s,libmyodbc3.so,libmyodbc${SLOT:0:1}a.so,g" \
+ -e "s,lib/libmyodbc,$(get_libdir)/${DRIVER_NAME}/libmyodbc,g" \
+ >"${D}/usr/share/${DRIVER_NAME}/${i}" \
+ <"${FILESDIR}"/${i}.m4 \
+ || die "Failed to build $i"
+ done;
+
+ dodoc ${prefix}/{ChangeLog,INSTALL,README,Licenses_for_Third-Party_Components.txt}
+}
+
+pkg_config() {
+
+ [ "${ROOT}" != "/" ] && \
+ die 'Sorry, non-standard ROOT setting is not supported :-('
+
+ local msg='MySQL ODBC driver'
+ local drivers=$(/usr/bin/odbcinst -q -d)
+
+ if echo $drivers | grep -vq "^\[${DRIVER_NAME}\]$" ; then
+ ebegin "Installing ${msg}"
+ /usr/bin/odbcinst -i -d -f /usr/share/${PN}-${SLOT}/odbcinst.ini
+ rc=$?
+ eend $rc
+ [ $rc -ne 0 ] && die
+ else
+ einfo "Skipping already installed ${msg}"
+ fi
+
+ local sources=$(/usr/bin/odbcinst -q -s)
+ msg='sample MySQL ODBC DSN'
+ if echo $sources | grep -vq "^\[${DRIVER_NAME}-test\]$"; then
+ ebegin "Installing ${msg}"
+ /usr/bin/odbcinst -i -s -l -f /usr/share/${PN}-${SLOT}/odbc.ini
+ rc=$?
+ eend $rc
+ [ $rc -ne 0 ] && die
+ else
+ einfo "Skipping already installed ${msg}"
+ fi
+}
+
+pkg_postinst() {
+
+ elog "If this is a new install, please run the following command"
+ elog "to configure the MySQL ODBC drivers and sources:"
+ elog "emerge --config =${CATEGORY}/${PF}"
+ elog "Please note that the driver name used to form the DSN now includes the SLOT."
+ elog "The myodbc-install utility is installed as myodbc-install-${MAJOR}"
+}
diff --git a/dev-db/mysql++-2.3.2 b/dev-db/mysql++-2.3.2
deleted file mode 100644
index 80f108158fca..000000000000
--- a/dev-db/mysql++-2.3.2
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=configure install prepare
-DEPEND=>=virtual/mysql-4.0 >=sys-devel/gcc-3
-DESCRIPTION=C++ API interface to the MySQL database
-EAPI=5
-HOMEPAGE=http://tangentsoft.net/mysql++/
-KEYWORDS=alpha amd64 hppa ~mips ppc sparc x86
-LICENSE=LGPL-2
-RDEPEND=>=virtual/mysql-4.0
-SLOT=0
-SRC_URI=http://www.tangentsoft.net/mysqlpp/releases/mysql++-2.3.2.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=749d6d858b3b9b1e4084012f41c4ff06
diff --git a/dev-db/mysql++-3.1.0 b/dev-db/mysql++-3.1.0
deleted file mode 100644
index 70ff3e164d3b..000000000000
--- a/dev-db/mysql++-3.1.0
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=configure install prepare
-DEPEND=>=virtual/mysql-4.0 || ( >=sys-devel/gcc-3 >=sys-devel/gcc-apple-4 )
-DESCRIPTION=C++ API interface to the MySQL database
-EAPI=5
-HOMEPAGE=http://tangentsoft.net/mysql++/
-KEYWORDS=alpha amd64 hppa ~mips ppc sparc x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos
-LICENSE=LGPL-2
-RDEPEND=>=virtual/mysql-4.0
-SLOT=0/3
-SRC_URI=http://www.tangentsoft.net/mysqlpp/releases/mysql++-3.1.0.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=ff0bd128288afbd62bfa5e4e9a475b8a
diff --git a/dev-db/mysql++-3.2.1 b/dev-db/mysql++-3.2.1
deleted file mode 100644
index d8fb0bdb3b4c..000000000000
--- a/dev-db/mysql++-3.2.1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=configure install prepare
-DEPEND=>=virtual/mysql-4.0
-DESCRIPTION=C++ API interface to the MySQL database
-EAPI=5
-HOMEPAGE=http://tangentsoft.net/mysql++/
-KEYWORDS=alpha amd64 hppa ~mips ppc sparc x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos
-LICENSE=LGPL-2
-RDEPEND=>=virtual/mysql-4.0
-SLOT=0/3
-SRC_URI=http://www.tangentsoft.net/mysqlpp/releases/mysql++-3.2.1.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=2299d1a76ead152a79250691144bf036
diff --git a/dev-db/mysql++-3.2.2 b/dev-db/mysql++-3.2.2
deleted file mode 100644
index d139bae9d522..000000000000
--- a/dev-db/mysql++-3.2.2
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=configure install prepare
-DEPEND=virtual/libmysqlclient:=
-DESCRIPTION=C++ API interface to the MySQL database
-EAPI=5
-HOMEPAGE=http://tangentsoft.net/mysql++/
-KEYWORDS=~alpha ~amd64 ~hppa ~mips ~ppc ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos
-LICENSE=LGPL-2
-RDEPEND=virtual/libmysqlclient:=
-SLOT=0/3
-SRC_URI=http://www.tangentsoft.net/mysqlpp/releases/mysql++-3.2.2.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=ddfc5378f3288aa17512293dc1a8a994
diff --git a/dev-db/mysql++-3.2.3 b/dev-db/mysql++-3.2.3
deleted file mode 100644
index 8b4f849e5632..000000000000
--- a/dev-db/mysql++-3.2.3
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=configure install prepare
-DEPEND=virtual/libmysqlclient:= >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=C++ API interface to the MySQL database
-EAPI=6
-HOMEPAGE=http://tangentsoft.net/mysql++/
-IUSE=doc
-KEYWORDS=~alpha ~amd64 ~hppa ~mips ~ppc ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos
-LICENSE=LGPL-2
-RDEPEND=virtual/libmysqlclient:=
-SLOT=0/3
-SRC_URI=http://www.tangentsoft.net/mysqlpp/releases/mysql++-3.2.3.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=839877cc4a10a64414e4725dc9ba018c
diff --git a/dev-db/mysql++/Manifest b/dev-db/mysql++/Manifest
new file mode 100644
index 000000000000..0a5131ccab28
--- /dev/null
+++ b/dev-db/mysql++/Manifest
@@ -0,0 +1,16 @@
+AUX mysql++-2.3.2-gcc-4.3.patch 358 BLAKE2B 708dd145194b3faed302109cfe11e48d9a65975e7ffc64e45907d92cdad9d438de20cd1101aa0e015d0f304762e03b8d4e4aac4e000bcfcd465855a5800c54ce SHA512 09ef458ea4e85e251bca585fec84b53c5b7937d06b9843ddb7d12fef9250c042a46738f6fa27866e171f0107de48df9b5b22416c0eeb86eebdff583438404a51
+AUX mysql++-3.0-gcc-as-needed.patch 7699 BLAKE2B 8ff80be42eb855c6ad78c9f6d73b6092f02e955b314ab914a0f52e3065a2ecf558230f4c1c1eb11860957674e855a2122aec59abf79d6e4ea213bd25c0031b93 SHA512 937cceaa198a42a69fbaad2019de4f825f60cbf2443cb07f85b9fa0555711f7639f47b7aa2442d68b4d6e8c40a99c78a930e76ae26e28900f885d35a7e7679c6
+AUX mysql++-3.2.1-gold.patch 196 BLAKE2B d4bd1e259cdd8a4c52f0900ddc42a0001156f94e3aaf7d62515c120316b7affc821a3e7c30ecbcb7e2d4611154d54462531e4e87cf609734a0761c3d41ac41e6 SHA512 34cd99548f5f23371fd02074017329ec4814c59ab02b114a6fd4c811d30015e1e3192a8d5d6a6847f57a076dd606d44e74d69dae6f5581d5b8d252ea359ce658
+AUX mysql++-3.2.3-as-needed.patch 19502 BLAKE2B e3c65824c54c8bb0a06f88ab75a60103c47103d21b8a0de74e5f0cd0a824f27de375464c9c8b6bd0ec705f02a026f2d7ceae2656195d8d5e4b88ff10604bf708 SHA512 7b8674d6e1b3ce462e01f2f2d32782c83cdd56ec6288855ea5ff419afc8b139530e1ae4dc104475786856cda4834b11cec3342b8d0447d14f1ae3e77a61580c9
+AUX mysql++-3.2.3-mariadb-10.2.patch 630 BLAKE2B ca95d9f9d62368b91ecab34a8a78a52240908bc27536430de6d8610361e69de95746ae6f1e3f9a7ace2e995fb21d41c06a9bceec668ae9cbdc7ba1ccd034d1ac SHA512 550e5adbdaf04dd6460aeafd0e6cad6cd29124c85f4222216574cc41c7df8559b33ce3eda484eba620a7b97c16bc63e56e744770feccf92348ff066173ad8297
+DIST mysql++-2.3.2.tar.gz 1627115 BLAKE2B 058ed41485474e4283a7200aa57398e85162f697f017ccfde7974b85457bb827d17bfdd522ef46818d42a75751a0eeb6ade39ded73e0265ee6811eb2769df3ea SHA512 b546c8369550e541c1a0b1b0e301fdd298a771cb709ad6c6ea3450a8f8bbe7533989a82d1c19cd9bf9a261d7a1fc4c3760919d3d5e3e43b5d698b75b7abf07f7
+DIST mysql++-3.1.0.tar.gz 1944101 BLAKE2B dabfa6491c2535fa974c6ee679d5130853dff1fe8530fc6e0ce1cd2762447c2430f9ccbd45dbfd0c67dfee8019d0446cb04b440d1352813dc76962ca8fea5b80 SHA512 bb57bbf03c80edabff701132877f407ecfa1b76958d7655415c59ec939e80fbe250951a16c3d5ea6988dd2c778b623605cb65bf810501f392be2f6b6ad07ad90
+DIST mysql++-3.2.1.tar.gz 2256735 BLAKE2B 8d5e713926a405fa9b93af690554595d8cc79cc25af216103df241f549fd93e7fa051ef5f1a27e7c67825408b8310886bedaeb69bd80b6ea6cf1c320a94cc9d2 SHA512 936021dcf8568d3ee0c935e5c552acc6fd2b57849d1cc60e68b45b690d798d7bfbc1dedc04e21417d1b4c27017b471e4f6cb70de7f1904949b9222090a777de9
+DIST mysql++-3.2.2.tar.gz 3257359 BLAKE2B 180ffaa4d5a198795386f46a6be3bc6f50ded373057b5c6fe618ae3d0976ced8288647bc1beac64fbd7c93aab5f2a79ced4ecc947101e3118b39aa0b40b1eb1a SHA512 eb4250394027f1baafa660711d8221c9eb3a70ff2a37331c58807a97a67b84f792290b24830e851b2421f6ccf2867e9f3597af3af41530256c44521a4c4a55b1
+DIST mysql++-3.2.3.tar.gz 3241023 BLAKE2B 5faa5711c7ed7c64346013bd1ca6e7dc20e5b23d33983a719c892bbd1002f3986206df6cfef54316f11aa480f18dbc0a2cf6944f9572f3a7dca24cdb73099eb9 SHA512 b6b0a9856ede9e5e08be0f5ed1689b1256f8cf31c3afbb9c9e7f68d0734380e25909ef31cd04be6b253c86b2f881df10f3793a2d3e32042375dbbab4b0700d0a
+EBUILD mysql++-2.3.2.ebuild 1317 BLAKE2B ad98d1f0e15bccd6e8ca66359e24e657d732a238e81bfffc8292b2fe6d5fc18dba15bd765acae2926d9e71647ffe493100abb6a5de98ac54d9bed336fb01dc44 SHA512 353023121c04882aad8a0c674ade803111e6922bfb9974d91b65179af23a264d5767404ef2eb77e50a685c89d55509196e21a8c397d98d072ab797458d2a81df
+EBUILD mysql++-3.1.0.ebuild 1238 BLAKE2B 5b6a96a7a9b263d06a762b38ab5daabf07116e74ae35fa3500f732d4f3c5120121aaa413142304912c95c9dae73af58d43e0246c6b32f89207059733caa4fa81 SHA512 cbd918e3719d0ddb12da283c9f555cea25737ba38ba0e42912e9f8eb134ddafba3f4e0ff13665d3b9336a039f3ff43adbdb969e4a0a3953283d652836de1d3b1
+EBUILD mysql++-3.2.1.ebuild 901 BLAKE2B 0e6c3feef947f749d7124284dad8ce91d14fed57d7a24730482dea19646a8b675113577138d4d81dd3e803df74f13a91fe40b1959fa145bf676b8d301a24d588 SHA512 6a2029dab230cf4c1e4c344362ef7ae8204775a1dd898da6d5bbe274c3b5ad1b1d223eb6e4b4c5915b87b7c6b401c40b3630c8aa0546d4c0192ba418f4d1cf31
+EBUILD mysql++-3.2.2.ebuild 853 BLAKE2B d2ed354d375d69fd73f15aa497dd3e0bb21fcc6c5784141b2585277f345e3147f37910e26a453c749d6cfcb578f6afb97e8baa65ca8ed967a39c78dc1211b50a SHA512 f617976eaef20a31071983c10ea89ecff0f8cd440c0a040f6b419fd2e109229d0db4bff08dbbdc01ff17937a7ab46f17560b3c81cf18226d08a3739c92ca475d
+EBUILD mysql++-3.2.3.ebuild 1565 BLAKE2B 609c5e41804c0ae8520779c3723b56b766c4bf95e52e645ede9f7ac85e843738c3ebcc4f3deee9f35eafb29ed90a88359b7d78628ad8e0228c5dc5bd7ef967ae SHA512 98660ccefd411d7aa549d05264438be54f0bfdd101c4d85f46a5eea431b9efd4d9ec3385842e5342e8c993a69c12b13a7e655d046d62defa397f9244c9b7634b
+MISC metadata.xml 239 BLAKE2B c4d6706d083b72927d239f41a644a4009c054c1c1a388af7733d3a2daf47d354009eb472573304a6be272601f05535297bcd9ceaea811a741cd905577ffe53d1 SHA512 e6e2fafe2f503db1d12e3d2368a99631ee8d014b7ea802d9879e7e3e2c0f9378675fffccd78ed09b914ae781ac3902567b1a53a721906e3ea63ceb51d0a1654b
diff --git a/dev-db/mysql++/files/mysql++-2.3.2-gcc-4.3.patch b/dev-db/mysql++/files/mysql++-2.3.2-gcc-4.3.patch
new file mode 100644
index 000000000000..f9456e8f88e5
--- /dev/null
+++ b/dev-db/mysql++/files/mysql++-2.3.2-gcc-4.3.patch
@@ -0,0 +1,11 @@
+diff -Naur mysql++-2.3.2-orig/lib/const_string.h mysql++-2.3.2/lib/const_string.h
+--- mysql++-2.3.2-orig/lib/const_string.h 2008-03-22 16:16:39.000000000 -0600
++++ mysql++-2.3.2/lib/const_string.h 2008-03-22 16:18:47.000000000 -0600
+@@ -35,6 +35,7 @@
+ #include <iostream>
+ #include <stdexcept>
+ #include <string>
++#include <cstring>
+
+ namespace mysqlpp {
+
diff --git a/dev-db/mysql++/files/mysql++-3.0-gcc-as-needed.patch b/dev-db/mysql++/files/mysql++-3.0-gcc-as-needed.patch
new file mode 100644
index 000000000000..d240761ec7a8
--- /dev/null
+++ b/dev-db/mysql++/files/mysql++-3.0-gcc-as-needed.patch
@@ -0,0 +1,130 @@
+=== modified file 'lib/refcounted.h'
+--- a/lib/refcounted.h 2012-10-18 11:37:55.322732178 -0300
++++ b/lib/refcounted.h 2012-10-18 11:40:10.303349659 -0300
+@@ -29,6 +29,7 @@
+ #define MYSQLPP_REFCOUNTED_H
+
+ #include <memory>
++#include <cstddef>
+
+ namespace mysqlpp {
+
+=== modified file 'ssx/genv2.cpp'
+--- a/ssx/genv2.cpp 2013-02-14 12:29:16.523261203 -0500
++++ b/ssx/genv2.cpp 2013-02-14 12:29:29.983070930 -0500
+@@ -35,6 +35,7 @@
+ #include <iostream>
+ #include <fstream>
+ #include <typeinfo>
++#include <cstring>
+
+ using namespace std;
+
+== modified file 'Makefile.in'
+--- a/Makefile.in 2013-02-14 13:14:10.954718894 -0500
++++ b/Makefile.in 2013-02-14 13:15:23.463679996 -0500
+@@ -471,87 +471,87 @@
+ $(RANLIB) $@
+
+ ssqlsxlat$(EXEEXT): $(SSQLSXLAT_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3) $(LIBPREFIX)mysqlpp_ssqls2parse$(LIBEXT)
+- $(CXX) -o $@ $(SSQLSXLAT_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp -lmysqlpp_ssqls2parse $(LIBS)
++ $(CXX) -o $@ $(SSQLSXLAT_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp -lmysqlpp_ssqls2parse $(LDFLAGS) $(LIBS)
+
+ $(__ssqlsxlat___mac_setfilecmd)
+
+ test_array_index$(EXEEXT): $(TEST_ARRAY_INDEX_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TEST_ARRAY_INDEX_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TEST_ARRAY_INDEX_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp $(LDFLAGS) $(LIBS)
+
+ $(__test_array_index___mac_setfilecmd)
+
+ test_cpool$(EXEEXT): $(TEST_CPOOL_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TEST_CPOOL_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TEST_CPOOL_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp $(LDFLAGS) $(LIBS)
+
+ $(__test_cpool___mac_setfilecmd)
+
+ test_datetime$(EXEEXT): $(TEST_DATETIME_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TEST_DATETIME_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TEST_DATETIME_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp $(LDFLAGS) $(LIBS)
+
+ $(__test_datetime___mac_setfilecmd)
+
+ test_inttypes$(EXEEXT): $(TEST_INTTYPES_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TEST_INTTYPES_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TEST_INTTYPES_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp $(LDFLAGS) $(LIBS)
+
+ $(__test_inttypes___mac_setfilecmd)
+
+ test_insertpolicy$(EXEEXT): $(TEST_INSERTPOLICY_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TEST_INSERTPOLICY_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TEST_INSERTPOLICY_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp $(LDFLAGS) $(LIBS)
+
+ $(__test_insertpolicy___mac_setfilecmd)
+
+ test_manip$(EXEEXT): $(TEST_MANIP_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TEST_MANIP_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TEST_MANIP_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp $(LDFLAGS) $(LIBS)
+
+ $(__test_manip___mac_setfilecmd)
+
+ test_null_comparison$(EXEEXT): $(TEST_NULL_COMPARISON_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TEST_NULL_COMPARISON_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TEST_NULL_COMPARISON_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp $(LDFLAGS) $(LIBS)
+
+ $(__test_null_comparison___mac_setfilecmd)
+
+ test_query_copy$(EXEEXT): $(TEST_QUERY_COPY_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TEST_QUERY_COPY_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TEST_QUERY_COPY_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp $(LDFLAGS) $(LIBS)
+
+ $(__test_query_copy___mac_setfilecmd)
+
+ test_qssqls$(EXEEXT): $(TEST_QSSQLS_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TEST_QSSQLS_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TEST_QSSQLS_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp $(LDFLAGS) $(LIBS)
+
+ $(__test_qssqls___mac_setfilecmd)
+
+ test_qstream$(EXEEXT): $(TEST_QSTREAM_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TEST_QSTREAM_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TEST_QSTREAM_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp $(LDFLAGS) $(LIBS)
+
+ $(__test_qstream___mac_setfilecmd)
+
+ test_sqlstream$(EXEEXT): $(TEST_SQLSTREAM_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TEST_SQLSTREAM_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TEST_SQLSTREAM_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp $(LDFLAGS) $(LIBS)
+
+ $(__test_sqlstream___mac_setfilecmd)
+
+ test_ssqls2$(EXEEXT): $(TEST_SSQLS2_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3) $(LIBPREFIX)mysqlpp_ssqls2parse$(LIBEXT)
+- $(CXX) -o $@ $(TEST_SSQLS2_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp -lmysqlpp_ssqls2parse $(LIBS)
++ $(CXX) -o $@ $(TEST_SSQLS2_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp -lmysqlpp_ssqls2parse $(LDFLAGS) $(LIBS)
+
+ $(__test_ssqls2___mac_setfilecmd)
+
+ test_string$(EXEEXT): $(TEST_STRING_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TEST_STRING_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TEST_STRING_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp $(LDFLAGS) $(LIBS)
+
+ $(__test_string___mac_setfilecmd)
+
+ test_tcp$(EXEEXT): $(TEST_TCP_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TEST_TCP_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TEST_TCP_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp $(LDFLAGS) $(LIBS)
+
+ $(__test_tcp___mac_setfilecmd)
+
+ test_uds$(EXEEXT): $(TEST_UDS_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TEST_UDS_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TEST_UDS_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp $(LDFLAGS) $(LIBS)
+
+ $(__test_uds___mac_setfilecmd)
+
+ test_wnp$(EXEEXT): $(TEST_WNP_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TEST_WNP_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TEST_WNP_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp $(LDFLAGS) $(LIBS)
+
+ $(__test_wnp___mac_setfilecmd)
+
diff --git a/dev-db/mysql++/files/mysql++-3.2.1-gold.patch b/dev-db/mysql++/files/mysql++-3.2.1-gold.patch
new file mode 100644
index 000000000000..8e10752b7f0e
--- /dev/null
+++ b/dev-db/mysql++/files/mysql++-3.2.1-gold.patch
@@ -0,0 +1,11 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -36,7 +36,7 @@
+ CXX = @CXX@
+ CXXFLAGS = @CXXFLAGS@
+ CPPFLAGS = @CPPFLAGS@
+-LDFLAGS = @LDFLAGS@
++LDFLAGS = @LDFLAGS@ @PTHREAD_CFLAGS@
+
+ ### Variables: ###
+
diff --git a/dev-db/mysql++/files/mysql++-3.2.3-as-needed.patch b/dev-db/mysql++/files/mysql++-3.2.3-as-needed.patch
new file mode 100644
index 000000000000..f4172076eec0
--- /dev/null
+++ b/dev-db/mysql++/files/mysql++-3.2.3-as-needed.patch
@@ -0,0 +1,254 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -529,87 +529,87 @@
+ $(RANLIB) $@
+
+ ssqlsxlat$(EXEEXT): $(SSQLSXLAT_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3) $(LIBPREFIX)mysqlpp_ssqls2parse$(LIBEXT)
+- $(CXX) -o $@ $(SSQLSXLAT_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp -lmysqlpp_ssqls2parse -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(SSQLSXLAT_OBJECTS) $(LDFLAGS) -L. -lmysqlpp -lmysqlpp_ssqls2parse -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__ssqlsxlat___mac_setfilecmd)
+
+ test_array_index$(EXEEXT): $(TEST_ARRAY_INDEX_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TEST_ARRAY_INDEX_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TEST_ARRAY_INDEX_OBJECTS) $(LDFLAGS) -L. -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__test_array_index___mac_setfilecmd)
+
+ test_cpool$(EXEEXT): $(TEST_CPOOL_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TEST_CPOOL_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TEST_CPOOL_OBJECTS) $(LDFLAGS) -L. -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__test_cpool___mac_setfilecmd)
+
+ test_datetime$(EXEEXT): $(TEST_DATETIME_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TEST_DATETIME_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TEST_DATETIME_OBJECTS) $(LDFLAGS) -L. -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__test_datetime___mac_setfilecmd)
+
+ test_inttypes$(EXEEXT): $(TEST_INTTYPES_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TEST_INTTYPES_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TEST_INTTYPES_OBJECTS) $(LDFLAGS) -L. -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__test_inttypes___mac_setfilecmd)
+
+ test_insertpolicy$(EXEEXT): $(TEST_INSERTPOLICY_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TEST_INSERTPOLICY_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TEST_INSERTPOLICY_OBJECTS) $(LDFLAGS) -L. -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__test_insertpolicy___mac_setfilecmd)
+
+ test_manip$(EXEEXT): $(TEST_MANIP_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TEST_MANIP_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TEST_MANIP_OBJECTS) $(LDFLAGS) -L. -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__test_manip___mac_setfilecmd)
+
+ test_null_comparison$(EXEEXT): $(TEST_NULL_COMPARISON_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TEST_NULL_COMPARISON_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TEST_NULL_COMPARISON_OBJECTS) $(LDFLAGS) -L. -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__test_null_comparison___mac_setfilecmd)
+
+ test_query_copy$(EXEEXT): $(TEST_QUERY_COPY_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TEST_QUERY_COPY_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TEST_QUERY_COPY_OBJECTS) $(LDFLAGS) -L. -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__test_query_copy___mac_setfilecmd)
+
+ test_qssqls$(EXEEXT): $(TEST_QSSQLS_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TEST_QSSQLS_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TEST_QSSQLS_OBJECTS) $(LDFLAGS) -L. -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__test_qssqls___mac_setfilecmd)
+
+ test_qstream$(EXEEXT): $(TEST_QSTREAM_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TEST_QSTREAM_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TEST_QSTREAM_OBJECTS) $(LDFLAGS) -L. -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__test_qstream___mac_setfilecmd)
+
+ test_sqlstream$(EXEEXT): $(TEST_SQLSTREAM_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TEST_SQLSTREAM_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TEST_SQLSTREAM_OBJECTS) $(LDFLAGS) -L. -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__test_sqlstream___mac_setfilecmd)
+
+ test_ssqls2$(EXEEXT): $(TEST_SSQLS2_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3) $(LIBPREFIX)mysqlpp_ssqls2parse$(LIBEXT)
+- $(CXX) -o $@ $(TEST_SSQLS2_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp -lmysqlpp_ssqls2parse -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TEST_SSQLS2_OBJECTS) $(LDFLAGS) -L. -lmysqlpp -lmysqlpp_ssqls2parse -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__test_ssqls2___mac_setfilecmd)
+
+ test_string$(EXEEXT): $(TEST_STRING_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TEST_STRING_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TEST_STRING_OBJECTS) $(LDFLAGS) -L. -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__test_string___mac_setfilecmd)
+
+ test_tcp$(EXEEXT): $(TEST_TCP_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TEST_TCP_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TEST_TCP_OBJECTS) $(LDFLAGS) -L. -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__test_tcp___mac_setfilecmd)
+
+ test_uds$(EXEEXT): $(TEST_UDS_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TEST_UDS_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TEST_UDS_OBJECTS) $(LDFLAGS) -L. -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__test_uds___mac_setfilecmd)
+
+ test_wnp$(EXEEXT): $(TEST_WNP_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TEST_WNP_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TEST_WNP_OBJECTS) $(LDFLAGS) -L. -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__test_wnp___mac_setfilecmd)
+
+@@ -619,122 +619,122 @@
+ $(RANLIB) $@
+
+ cgi_jpeg$(EXEEXT): $(CGI_JPEG_OBJECTS) $(LIBPREFIX)mysqlpp_excommon$(LIBEXT) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(CGI_JPEG_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp_excommon -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(CGI_JPEG_OBJECTS) $(LDFLAGS) -L. -lmysqlpp_excommon -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__cgi_jpeg___mac_setfilecmd)
+
+ cpool$(EXEEXT): $(CPOOL_OBJECTS) $(LIBPREFIX)mysqlpp_excommon$(LIBEXT) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(CPOOL_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp_excommon -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(CPOOL_OBJECTS) $(LDFLAGS) -L. -lmysqlpp_excommon -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__cpool___mac_setfilecmd)
+
+ dbinfo$(EXEEXT): $(DBINFO_OBJECTS) $(LIBPREFIX)mysqlpp_excommon$(LIBEXT) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(DBINFO_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp_excommon -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(DBINFO_OBJECTS) $(LDFLAGS) -L. -lmysqlpp_excommon -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__dbinfo___mac_setfilecmd)
+
+ deadlock$(EXEEXT): $(DEADLOCK_OBJECTS) $(LIBPREFIX)mysqlpp_excommon$(LIBEXT) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(DEADLOCK_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp_excommon -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(DEADLOCK_OBJECTS) $(LDFLAGS) -L. -lmysqlpp_excommon -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__deadlock___mac_setfilecmd)
+
+ fieldinf$(EXEEXT): $(FIELDINF_OBJECTS) $(LIBPREFIX)mysqlpp_excommon$(LIBEXT) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(FIELDINF_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp_excommon -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(FIELDINF_OBJECTS) $(LDFLAGS) -L. -lmysqlpp_excommon -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__fieldinf___mac_setfilecmd)
+
+ for_each$(EXEEXT): $(FOR_EACH_OBJECTS) $(LIBPREFIX)mysqlpp_excommon$(LIBEXT) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(FOR_EACH_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp_excommon -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(FOR_EACH_OBJECTS) $(LDFLAGS) -L. -lmysqlpp_excommon -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__for_each___mac_setfilecmd)
+
+ load_jpeg$(EXEEXT): $(LOAD_JPEG_OBJECTS) $(LIBPREFIX)mysqlpp_excommon$(LIBEXT) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(LOAD_JPEG_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp_excommon -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(LOAD_JPEG_OBJECTS) $(LDFLAGS) -L. -lmysqlpp_excommon -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__load_jpeg___mac_setfilecmd)
+
+ multiquery$(EXEEXT): $(MULTIQUERY_OBJECTS) $(LIBPREFIX)mysqlpp_excommon$(LIBEXT) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(MULTIQUERY_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp_excommon -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(MULTIQUERY_OBJECTS) $(LDFLAGS) -L. -lmysqlpp_excommon -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__multiquery___mac_setfilecmd)
+
+ resetdb$(EXEEXT): $(RESETDB_OBJECTS) $(LIBPREFIX)mysqlpp_excommon$(LIBEXT) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(RESETDB_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp_excommon -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(RESETDB_OBJECTS) $(LDFLAGS) -L. -lmysqlpp_excommon -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__resetdb___mac_setfilecmd)
+
+ simple1$(EXEEXT): $(SIMPLE1_OBJECTS) $(LIBPREFIX)mysqlpp_excommon$(LIBEXT) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(SIMPLE1_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp_excommon -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(SIMPLE1_OBJECTS) $(LDFLAGS) -L. -lmysqlpp_excommon -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__simple1___mac_setfilecmd)
+
+ simple2$(EXEEXT): $(SIMPLE2_OBJECTS) $(LIBPREFIX)mysqlpp_excommon$(LIBEXT) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(SIMPLE2_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp_excommon -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(SIMPLE2_OBJECTS) $(LDFLAGS) -L. -lmysqlpp_excommon -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__simple2___mac_setfilecmd)
+
+ simple3$(EXEEXT): $(SIMPLE3_OBJECTS) $(LIBPREFIX)mysqlpp_excommon$(LIBEXT) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(SIMPLE3_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp_excommon -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(SIMPLE3_OBJECTS) $(LDFLAGS) -L. -lmysqlpp_excommon -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__simple3___mac_setfilecmd)
+
+ ssqls1$(EXEEXT): $(SSQLS1_OBJECTS) $(LIBPREFIX)mysqlpp_excommon$(LIBEXT) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(SSQLS1_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp_excommon -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(SSQLS1_OBJECTS) $(LDFLAGS) -L. -lmysqlpp_excommon -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__ssqls1___mac_setfilecmd)
+
+ ssqls2$(EXEEXT): $(SSQLS2_OBJECTS) $(LIBPREFIX)mysqlpp_excommon$(LIBEXT) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(SSQLS2_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp_excommon -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(SSQLS2_OBJECTS) $(LDFLAGS) -L. -lmysqlpp_excommon -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__ssqls2___mac_setfilecmd)
+
+ ssqls3$(EXEEXT): $(SSQLS3_OBJECTS) $(LIBPREFIX)mysqlpp_excommon$(LIBEXT) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(SSQLS3_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp_excommon -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(SSQLS3_OBJECTS) $(LDFLAGS) -L. -lmysqlpp_excommon -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__ssqls3___mac_setfilecmd)
+
+ ssqls4$(EXEEXT): $(SSQLS4_OBJECTS) $(LIBPREFIX)mysqlpp_excommon$(LIBEXT) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(SSQLS4_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp_excommon -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(SSQLS4_OBJECTS) $(LDFLAGS) -L. -lmysqlpp_excommon -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__ssqls4___mac_setfilecmd)
+
+ ssqls5$(EXEEXT): $(SSQLS5_OBJECTS) $(LIBPREFIX)mysqlpp_excommon$(LIBEXT) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(SSQLS5_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp_excommon -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(SSQLS5_OBJECTS) $(LDFLAGS) -L. -lmysqlpp_excommon -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__ssqls5___mac_setfilecmd)
+
+ ssqls6$(EXEEXT): $(SSQLS6_OBJECTS) $(LIBPREFIX)mysqlpp_excommon$(LIBEXT) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(SSQLS6_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp_excommon -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(SSQLS6_OBJECTS) $(LDFLAGS) -L. -lmysqlpp_excommon -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__ssqls6___mac_setfilecmd)
+
+ store_if$(EXEEXT): $(STORE_IF_OBJECTS) $(LIBPREFIX)mysqlpp_excommon$(LIBEXT) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(STORE_IF_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp_excommon -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(STORE_IF_OBJECTS) $(LDFLAGS) -L. -lmysqlpp_excommon -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__store_if___mac_setfilecmd)
+
+ tquery1$(EXEEXT): $(TQUERY1_OBJECTS) $(LIBPREFIX)mysqlpp_excommon$(LIBEXT) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TQUERY1_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp_excommon -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TQUERY1_OBJECTS) $(LDFLAGS) -L. -lmysqlpp_excommon -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__tquery1___mac_setfilecmd)
+
+ tquery2$(EXEEXT): $(TQUERY2_OBJECTS) $(LIBPREFIX)mysqlpp_excommon$(LIBEXT) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TQUERY2_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp_excommon -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TQUERY2_OBJECTS) $(LDFLAGS) -L. -lmysqlpp_excommon -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__tquery2___mac_setfilecmd)
+
+ tquery3$(EXEEXT): $(TQUERY3_OBJECTS) $(LIBPREFIX)mysqlpp_excommon$(LIBEXT) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TQUERY3_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp_excommon -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TQUERY3_OBJECTS) $(LDFLAGS) -L. -lmysqlpp_excommon -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__tquery3___mac_setfilecmd)
+
+ tquery4$(EXEEXT): $(TQUERY4_OBJECTS) $(LIBPREFIX)mysqlpp_excommon$(LIBEXT) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TQUERY4_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp_excommon -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TQUERY4_OBJECTS) $(LDFLAGS) -L. -lmysqlpp_excommon -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__tquery4___mac_setfilecmd)
+
+ transaction$(EXEEXT): $(TRANSACTION_OBJECTS) $(LIBPREFIX)mysqlpp_excommon$(LIBEXT) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3)
+- $(CXX) -o $@ $(TRANSACTION_OBJECTS) -L@MYSQL_C_LIB_DIR@ -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp_excommon -lmysqlpp $(LIBS)
++ $(CXX) -o $@ $(TRANSACTION_OBJECTS) $(LDFLAGS) -L. -lmysqlpp_excommon -lmysqlpp $(LIBS) -L@MYSQL_C_LIB_DIR@ -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@
+
+ $(__transaction___mac_setfilecmd)
+
diff --git a/dev-db/mysql++/files/mysql++-3.2.3-mariadb-10.2.patch b/dev-db/mysql++/files/mysql++-3.2.3-mariadb-10.2.patch
new file mode 100644
index 000000000000..ff814650e001
--- /dev/null
+++ b/dev-db/mysql++/files/mysql++-3.2.3-mariadb-10.2.patch
@@ -0,0 +1,29 @@
+--- a/lib/dbdriver.cpp
++++ b/lib/dbdriver.cpp
+@@ -257,7 +257,11 @@
+ }
+
+ if ((n == 1) &&
++#ifdef CLIENT_LONG_PASSWORD
+ (o >= CLIENT_LONG_PASSWORD) &&
++#else
++ (o >= CLIENT_MYSQL) &&
++#endif
+ #if MYSQL_VERSION_ID > 40000 // highest flag value varies by version
+ (o <= CLIENT_MULTI_RESULTS)
+ #else
+--- a/lib/common.h
++++ b/lib/common.h
+@@ -130,12 +130,6 @@
+ #define MYSQLPP_PATH_SEPARATOR '/'
+ #endif
+
+-#if defined(MYSQLPP_MYSQL_HEADERS_BURIED)
+-# include <mysql/mysql_version.h>
+-#else
+-# include <mysql_version.h>
+-#endif
+-
+ namespace mysqlpp {
+
+ /// \brief Alias for 'true', to make code requesting exceptions more
diff --git a/dev-db/mysql++/metadata.xml b/dev-db/mysql++/metadata.xml
new file mode 100644
index 000000000000..709689b06053
--- /dev/null
+++ b/dev-db/mysql++/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>mysql-bugs@gentoo.org</email>
+ <name>MySQL</name>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-db/mysql++/mysql++-2.3.2.ebuild b/dev-db/mysql++/mysql++-2.3.2.ebuild
new file mode 100644
index 000000000000..7167c329599b
--- /dev/null
+++ b/dev-db/mysql++/mysql++-2.3.2.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="C++ API interface to the MySQL database"
+HOMEPAGE="http://tangentsoft.net/mysql++/"
+SRC_URI="http://www.tangentsoft.net/mysqlpp/releases/${P}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ~mips ppc sparc x86"
+IUSE=""
+
+RDEPEND=">=virtual/mysql-4.0"
+DEPEND="${RDEPEND}
+ >=sys-devel/gcc-3"
+
+src_prepare() {
+
+ epatch "${FILESDIR}"/${P}-gcc-4.3.patch
+
+ for i in "${S}"/lib/*.h ; do
+ sed -i \
+ -e '/#include </s,mysql.h,mysql/mysql.h,g' \
+ -e '/#include </s,mysql_version.h,mysql/mysql_version.h,g' \
+ "${i}" || die "Failed to sed ${i} for fixing MySQL includes"
+ done
+}
+
+src_configure() {
+ local myconf
+ # we want C++ exceptions turned on
+ myconf="--enable-exceptions"
+ # give threads a try
+ myconf="${myconf} --enable-thread-check"
+ # not including the directives to where MySQL is because it seems to
+ # find it just fine without
+
+ # force the cflags into place otherwise they get totally ignored by
+ # configure
+ CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \
+ econf ${myconf}
+}
+
+src_install() {
+ default
+ # install the docs and HTML pages
+ dodoc README* CREDITS ChangeLog HACKERS Wishlist
+ dohtml -r doc/html/*
+ rm -r doc/html || die
+ dodoc -r doc/*
+}
diff --git a/dev-db/mysql++/mysql++-3.1.0.ebuild b/dev-db/mysql++/mysql++-3.1.0.ebuild
new file mode 100644
index 000000000000..b945531b392b
--- /dev/null
+++ b/dev-db/mysql++/mysql++-3.1.0.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils
+
+DESCRIPTION="C++ API interface to the MySQL database"
+HOMEPAGE="http://tangentsoft.net/mysql++/"
+SRC_URI="http://www.tangentsoft.net/mysqlpp/releases/${P}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0/3"
+KEYWORDS="alpha amd64 hppa ~mips ppc sparc x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE=""
+
+RDEPEND=">=virtual/mysql-4.0"
+DEPEND="${RDEPEND}
+ || ( >=sys-devel/gcc-3 >=sys-devel/gcc-apple-4 )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-3.0-gcc-as-needed.patch
+ epatch "${FILESDIR}"/${PN}-3.2.1-gold.patch
+
+ for i in "${S}"/lib/*.h ; do
+ sed -i \
+ -e '/#include </s,mysql.h,mysql/mysql.h,g' \
+ -e '/#include </s,mysql_version.h,mysql/mysql_version.h,g' \
+ "${i}"
+ done
+ epatch_user
+}
+
+src_configure() {
+ local myconf
+ use prefix || local EPREFIX=
+ myconf="--enable-thread-check --with-mysql=${EPREFIX}/usr"
+
+ CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \
+ econf ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ # install the docs and HTML pages
+ dodoc README* CREDITS* ChangeLog HACKERS.txt Wishlist doc/ssqls-pretty
+ dodoc -r doc/pdf/ doc/refman/ doc/userman/
+ dohtml -r doc/html/
+}
diff --git a/dev-db/mysql++/mysql++-3.2.1.ebuild b/dev-db/mysql++/mysql++-3.2.1.ebuild
new file mode 100644
index 000000000000..1ea7dc61f868
--- /dev/null
+++ b/dev-db/mysql++/mysql++-3.2.1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils
+
+DESCRIPTION="C++ API interface to the MySQL database"
+HOMEPAGE="http://tangentsoft.net/mysql++/"
+SRC_URI="http://www.tangentsoft.net/mysqlpp/releases/${P}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0/3"
+KEYWORDS="alpha amd64 hppa ~mips ppc sparc x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE=""
+
+RDEPEND=">=virtual/mysql-4.0"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-gold.patch"
+ epatch_user
+ sed -i -e "s/mysqlclient_r/mysqlclient/" "${S}/configure" || die
+}
+
+src_configure() {
+ local myconf="--enable-thread-check --with-mysql=${EPREFIX}/usr"
+ econf ${myconf}
+}
+
+src_install() {
+ default
+ # install the docs and HTML pages
+ dodoc CREDITS* HACKERS.txt Wishlist doc/ssqls-pretty
+ dodoc -r doc/pdf/ doc/refman/ doc/userman/
+ dohtml -r doc/html/
+}
diff --git a/dev-db/mysql++/mysql++-3.2.2.ebuild b/dev-db/mysql++/mysql++-3.2.2.ebuild
new file mode 100644
index 000000000000..a7f6809512a8
--- /dev/null
+++ b/dev-db/mysql++/mysql++-3.2.2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils
+
+DESCRIPTION="C++ API interface to the MySQL database"
+HOMEPAGE="http://tangentsoft.net/mysql++/"
+SRC_URI="http://www.tangentsoft.net/mysqlpp/releases/${P}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0/3"
+KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE=""
+
+RDEPEND="virtual/libmysqlclient:="
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-3.2.1-gold.patch"
+ epatch_user
+}
+
+src_configure() {
+ local myconf="--enable-thread-check --with-mysql=${EPREFIX}/usr"
+ econf ${myconf}
+}
+
+src_install() {
+ default
+ # install the docs and HTML pages
+ dodoc CREDITS* HACKERS.txt Wishlist doc/ssqls-pretty
+ dodoc -r doc/pdf/ doc/refman/ doc/userman/
+ dohtml -r doc/html/
+}
diff --git a/dev-db/mysql++/mysql++-3.2.3.ebuild b/dev-db/mysql++/mysql++-3.2.3.ebuild
new file mode 100644
index 000000000000..83594c55eda5
--- /dev/null
+++ b/dev-db/mysql++/mysql++-3.2.3.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools libtool flag-o-matic
+
+DESCRIPTION="C++ API interface to the MySQL database"
+HOMEPAGE="http://tangentsoft.net/mysql++/"
+SRC_URI="http://www.tangentsoft.net/mysqlpp/releases/${P}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0/3"
+KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="doc"
+
+RDEPEND="virtual/libmysqlclient:="
+DEPEND="${RDEPEND}"
+DOCS=( CREDITS.txt HACKERS.txt Wishlist doc/ssqls-pretty )
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.2.1-gold.patch
+ "${FILESDIR}"/${PN}-3.2.3-mariadb-10.2.patch
+ "${FILESDIR}"/${PN}-3.2.3-as-needed.patch
+)
+
+src_prepare() {
+ # Bug filed upstream about deprecated std::auto_ptr
+ append-cxxflags $(test-flags-CXX -Wno-deprecated-declarations)
+ # Bad symlink for libtool in the archive
+ rm "${S}/ltmain.sh" || die
+
+ default
+
+ _elibtoolize --auto-ltdl --install --copy --force
+ elibtoolize
+ # Current MySQL libraries are always with threads and slowly being removed
+ sed -i -e "s/mysqlclient_r/mysqlclient/" "${S}/configure" || die
+ rm "${S}/doc/"README-*-RPM.txt || die
+}
+
+src_configure() {
+ local myconf=(
+ --enable-thread-check
+ --with-mysql="${EPREFIX}/usr"
+ --with-mysql-lib="${EPREFIX}$(mysql_config --variable=pkglibdir)"
+ --with-mysql-include="${EPREFIX}$(mysql_config --variable=pkgincludedir)"
+ )
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ default
+ # install the docs and HTML pages
+ use doc && dodoc -r doc/pdf/ doc/refman/ doc/userman/ doc/html/
+}
diff --git a/dev-db/mysql-5.5.60 b/dev-db/mysql-5.5.60
deleted file mode 100644
index 11f541ddc581..000000000000
--- a/dev-db/mysql-5.5.60
+++ /dev/null
@@ -1,16 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst postrm preinst prepare setup test unpack
-DEPEND=|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) sys-devel/make >=dev-util/cmake-3.9.6 ssl? ( >=dev-libs/openssl-0.9.6d:0 ) kernel_linux? ( sys-process/procps ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 >=sys-libs/zlib-1.2.3 !bindist? ( >=sys-libs/readline-4.1:0 ) !dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster jemalloc? ( dev-libs/jemalloc[static-libs?] ) tcmalloc? ( dev-util/google-perftools ) >=sys-libs/zlib-1.2.3[static-libs?] ssl? ( >=dev-libs/openssl-0.9.6d[static-libs?] ) systemtap? ( >=dev-util/systemtap-1.3 ) kernel_linux? ( dev-libs/libaio ) virtual/yacc static? ( sys-libs/ncurses[static-libs] ) >=dev-util/cmake-2.4.3 >=dev-util/cmake-2.6.3
-DESCRIPTION=A fast, multi-threaded, multi-user SQL database server
-EAPI=5
-HOMEPAGE=https://www.mysql.com/
-IUSE=bindist debug embedded minimal +perl selinux ssl static static-libs test latin1 extraengine cluster max-idx-128 +community profiling jemalloc tcmalloc systemtap
-KEYWORDS=~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris
-LICENSE=GPL-2
-PDEPEND=perl? ( >=dev-perl/DBD-mysql-2.9004 ) ~virtual/mysql-5.5
-RDEPEND=ssl? ( >=dev-libs/openssl-0.9.6d:0 ) kernel_linux? ( sys-process/procps ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 >=sys-libs/zlib-1.2.3 !bindist? ( >=sys-libs/readline-4.1:0 ) !dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster jemalloc? ( dev-libs/jemalloc[static-libs?] ) tcmalloc? ( dev-util/google-perftools ) >=sys-libs/zlib-1.2.3[static-libs?] ssl? ( >=dev-libs/openssl-0.9.6d[static-libs?] ) systemtap? ( >=dev-util/systemtap-1.3 ) kernel_linux? ( dev-libs/libaio ) !minimal? ( !prefix? ( dev-db/mysql-init-scripts ) ) selinux? ( sec-policy/selinux-mysql )
-REQUIRED_USE=tcmalloc? ( !jemalloc ) jemalloc? ( !tcmalloc ) minimal? ( !cluster !extraengine !embedded ) static? ( !ssl )
-RESTRICT=!bindist? ( bindist )
-SLOT=0/18
-SRC_URI=http://downloads.mysql.com/archives/mysql-5.5/mysql-5.5.60.tar.gz https://downloads.skysql.com/files/mysql-5.5/mysql-5.5.60.tar.gz mirror://mysql/Downloads/MySQL-5.5/mysql-5.5.60.tar.gz mirror://gentoo/mysql-extras-20180214-0024Z.tar.bz2 https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-20180214-0024Z.tar.bz2 https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-20180214-0024Z.tar.bz2 https://dev.gentoo.org/~grknight/distfiles/mysql-extras-20180214-0024Z.tar.bz2
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 mysql-cmake 39849cc54381eee7c8d7333058ea7132 mysql-v2 af0178e9946ce2a0df18ca31f697e949 mysql_fx fd803e05287868299aac78823b68920e ninja-utils d2e7e7d290428bb25c56dcf2502badc1 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=07cbb0e0242e923123546310c177ca0f
diff --git a/dev-db/mysql-5.6.38 b/dev-db/mysql-5.6.38
deleted file mode 100644
index 6629d2af2897..000000000000
--- a/dev-db/mysql-5.6.38
+++ /dev/null
@@ -1,16 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst preinst prepare pretend setup test unpack
-DEPEND=numa? ( sys-process/numactl:= ) || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) test? ( dev-perl/JSON ) virtual/pkgconfig sys-devel/make >=dev-util/cmake-3.9.6 kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 !dev-db/mariadb-native-client[mysqlcompat] jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) openssl? ( >=dev-libs/openssl-1.0.0:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) >=sys-libs/zlib-1.2.3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] sys-libs/ncurses:0= virtual/yacc static? ( sys-libs/ncurses[static-libs] )
-DESCRIPTION=A fast, multi-threaded, multi-user SQL database server
-EAPI=6
-HOMEPAGE=https://www.mysql.com/
-IUSE=numa abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64 debug embedded extraengine jemalloc latin1 libressl +openssl +perl profiling selinux +server systemtap static static-libs tcmalloc test yassl
-KEYWORDS=alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris
-LICENSE=GPL-2
-PDEPEND=perl? ( >=dev-perl/DBD-mysql-2.9004 ) server? ( ~virtual/mysql-5.6[embedded=,static=] ) virtual/libmysqlclient:0/18[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs=]
-RDEPEND=numa? ( sys-process/numactl:= ) kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 !dev-db/mariadb-native-client[mysqlcompat] jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) openssl? ( >=dev-libs/openssl-1.0.0:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) >=sys-libs/zlib-1.2.3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] sys-libs/ncurses:0= selinux? ( sec-policy/selinux-mysql ) !dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster server? ( !prefix? ( dev-db/mysql-init-scripts ) ) !<virtual/mysql-5.6-r4
-REQUIRED_USE=^^ ( yassl openssl libressl ) !server? ( !extraengine !embedded ) ?? ( tcmalloc jemalloc ) static? ( !libressl !openssl yassl )
-RESTRICT=libressl? ( test )
-SLOT=0/18
-SRC_URI=http://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.38.tar.gz http://downloads.mysql.com/archives/MySQL-5.6/mysql-5.6.38.tar.gz mirror://gentoo/mysql-extras-20171121-1518Z.tar.bz2 https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-20171121-1518Z.tar.bz2 https://dev.gentoo.org/~grknight/distfiles/mysql-extras-20171121-1518Z.tar.bz2 https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-20171121-1518Z.tar.bz2 https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-20171121-1518Z.tar.bz2
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 multiprocessing cac3169468f893670dac3e7cb940e045 mysql-multilib-r1 9823899e303dd74138fef85f4a116e13 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=2f744da3036539745af1aa839736a90d
diff --git a/dev-db/mysql-5.6.39 b/dev-db/mysql-5.6.39
deleted file mode 100644
index 3b632e70c32b..000000000000
--- a/dev-db/mysql-5.6.39
+++ /dev/null
@@ -1,16 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst preinst prepare pretend setup test unpack
-DEPEND=numa? ( sys-process/numactl:= ) || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) test? ( dev-perl/JSON ) virtual/pkgconfig sys-devel/make >=dev-util/cmake-3.9.6 kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 !dev-db/mariadb-native-client[mysqlcompat] jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) openssl? ( >=dev-libs/openssl-1.0.0:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) >=sys-libs/zlib-1.2.3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] sys-libs/ncurses:0= virtual/yacc static? ( sys-libs/ncurses[static-libs] )
-DESCRIPTION=A fast, multi-threaded, multi-user SQL database server
-EAPI=6
-HOMEPAGE=https://www.mysql.com/
-IUSE=numa abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64 debug embedded extraengine jemalloc latin1 libressl +openssl +perl profiling selinux +server systemtap static static-libs tcmalloc test yassl
-KEYWORDS=alpha amd64 arm ~hppa ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris
-LICENSE=GPL-2
-PDEPEND=perl? ( >=dev-perl/DBD-mysql-2.9004 ) server? ( ~virtual/mysql-5.6[embedded=,static=] ) virtual/libmysqlclient:0/18[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs=]
-RDEPEND=numa? ( sys-process/numactl:= ) kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 !dev-db/mariadb-native-client[mysqlcompat] jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) openssl? ( >=dev-libs/openssl-1.0.0:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) >=sys-libs/zlib-1.2.3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] sys-libs/ncurses:0= selinux? ( sec-policy/selinux-mysql ) !dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster server? ( !prefix? ( dev-db/mysql-init-scripts ) ) !<virtual/mysql-5.6-r4
-REQUIRED_USE=^^ ( yassl openssl libressl ) !server? ( !extraengine !embedded ) ?? ( tcmalloc jemalloc ) static? ( !libressl !openssl yassl )
-RESTRICT=libressl? ( test )
-SLOT=0/18
-SRC_URI=http://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.39.tar.gz http://downloads.mysql.com/archives/MySQL-5.6/mysql-5.6.39.tar.gz mirror://gentoo/mysql-extras-20180214-0024Z.tar.bz2 https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-20180214-0024Z.tar.bz2 https://dev.gentoo.org/~grknight/distfiles/mysql-extras-20180214-0024Z.tar.bz2 https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-20180214-0024Z.tar.bz2 https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-20180214-0024Z.tar.bz2
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 multiprocessing cac3169468f893670dac3e7cb940e045 mysql-multilib-r1 9823899e303dd74138fef85f4a116e13 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=c42721a8e1d4eb1877966f1fab08ea78
diff --git a/dev-db/mysql-5.6.40 b/dev-db/mysql-5.6.40
deleted file mode 100644
index ecdae105f526..000000000000
--- a/dev-db/mysql-5.6.40
+++ /dev/null
@@ -1,16 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst preinst prepare pretend setup test unpack
-DEPEND=numa? ( sys-process/numactl:= ) || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) test? ( dev-perl/JSON ) virtual/pkgconfig sys-devel/make >=dev-util/cmake-3.9.6 kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 !dev-db/mariadb-native-client[mysqlcompat] jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) openssl? ( >=dev-libs/openssl-1.0.0:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) >=sys-libs/zlib-1.2.3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] sys-libs/ncurses:0= virtual/yacc static? ( sys-libs/ncurses[static-libs] )
-DESCRIPTION=A fast, multi-threaded, multi-user SQL database server
-EAPI=6
-HOMEPAGE=https://www.mysql.com/
-IUSE=numa abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64 debug embedded extraengine jemalloc latin1 libressl +openssl +perl profiling selinux +server systemtap static static-libs tcmalloc test yassl
-KEYWORDS=~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris
-LICENSE=GPL-2
-PDEPEND=perl? ( >=dev-perl/DBD-mysql-2.9004 ) server? ( ~virtual/mysql-5.6[embedded=,static=] ) virtual/libmysqlclient:0/18[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs=]
-RDEPEND=numa? ( sys-process/numactl:= ) kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 !dev-db/mariadb-native-client[mysqlcompat] jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) openssl? ( >=dev-libs/openssl-1.0.0:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) >=sys-libs/zlib-1.2.3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] sys-libs/ncurses:0= selinux? ( sec-policy/selinux-mysql ) !dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster server? ( !prefix? ( dev-db/mysql-init-scripts ) ) !<virtual/mysql-5.6-r4
-REQUIRED_USE=^^ ( yassl openssl libressl ) !server? ( !extraengine !embedded ) ?? ( tcmalloc jemalloc ) static? ( !libressl !openssl yassl )
-RESTRICT=libressl? ( test )
-SLOT=0/18
-SRC_URI=http://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.40.tar.gz http://downloads.mysql.com/archives/MySQL-5.6/mysql-5.6.40.tar.gz mirror://gentoo/mysql-extras-20180214-0024Z.tar.bz2 https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-20180214-0024Z.tar.bz2 https://dev.gentoo.org/~grknight/distfiles/mysql-extras-20180214-0024Z.tar.bz2 https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-20180214-0024Z.tar.bz2 https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-20180214-0024Z.tar.bz2
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 multiprocessing cac3169468f893670dac3e7cb940e045 mysql-multilib-r1 9823899e303dd74138fef85f4a116e13 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=995aae18b36ca3a5a0450adf63b2140d
diff --git a/dev-db/mysql-5.7.22 b/dev-db/mysql-5.7.22
deleted file mode 100644
index d76005d61614..000000000000
--- a/dev-db/mysql-5.7.22
+++ /dev/null
@@ -1,16 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst preinst prepare setup test unpack
-DEPEND=virtual/yacc static? ( sys-libs/ncurses[static-libs] ) || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) net-misc/curl >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) !yassl? ( client-libs? ( !libressl? ( >=dev-libs/openssl-1.0.0:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) ) !client-libs? ( !libressl? ( >=dev-libs/openssl-1.0.0:0= ) libressl? ( dev-libs/libressl:0= ) ) ) client-libs? ( >=sys-libs/zlib-1.2.3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) !client-libs? ( >=sys-libs/zlib-1.2.3:0= ) sys-libs/ncurses:0= server? ( >=app-arch/lz4-0_p131:= >=dev-libs/boost-1.65.0:= numa? ( sys-process/numactl ) ) !client-libs? ( dev-db/mysql-connector-c[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=A fast, multi-threaded, multi-user SQL database server
-EAPI=6
-HOMEPAGE=https://www.mysql.com/
-IUSE=client-libs cracklib debug jemalloc latin1 libressl numa +perl profiling selinux +server static static-libs systemtap tcmalloc test yassl abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris
-LICENSE=GPL-2
-PDEPEND=perl? ( >=dev-perl/DBD-mysql-2.9004 )
-RDEPEND=selinux? ( sec-policy/selinux-mysql ) client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c ) !dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster server? ( !prefix? ( dev-db/mysql-init-scripts ) ) kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) net-misc/curl >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) !yassl? ( client-libs? ( !libressl? ( >=dev-libs/openssl-1.0.0:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) ) !client-libs? ( !libressl? ( >=dev-libs/openssl-1.0.0:0= ) libressl? ( dev-libs/libressl:0= ) ) ) client-libs? ( >=sys-libs/zlib-1.2.3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) !client-libs? ( >=sys-libs/zlib-1.2.3:0= ) sys-libs/ncurses:0= server? ( >=app-arch/lz4-0_p131:= >=dev-libs/boost-1.65.0:= numa? ( sys-process/numactl ) ) !client-libs? ( dev-db/mysql-connector-c[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] )
-REQUIRED_USE=?? ( tcmalloc jemalloc ) static? ( yassl )
-RESTRICT=libressl? ( test )
-SLOT=0/18
-SRC_URI=http://cdn.mysql.com/Downloads/MySQL-5.7/mysql-boost-5.7.22.tar.gz https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-5.7.22.tar.gz http://downloads.mysql.com/archives/MySQL-5.7/mysql-boost-5.7.22.tar.gz mirror://gentoo/mysql-extras-20180312-2011Z.tar.bz2 https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-20180312-2011Z.tar.bz2 https://dev.gentoo.org/~grknight/distfiles/mysql-extras-20180312-2011Z.tar.bz2 https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-20180312-2011Z.tar.bz2 https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-20180312-2011Z.tar.bz2
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=d2b10df965bc07ec2b6355b0e9b1d51e
diff --git a/dev-db/mysql-cluster-7.2.31 b/dev-db/mysql-cluster-7.2.31
deleted file mode 100644
index f478d5a3235a..000000000000
--- a/dev-db/mysql-cluster-7.2.31
+++ /dev/null
@@ -1,16 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst postrm preinst prepare setup test unpack
-DEPEND=|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) java? ( >=dev-java/java-config-2.2.0-r3 ) sys-devel/make >=dev-util/cmake-3.9.6 ssl? ( >=dev-libs/openssl-0.9.6d:0 ) kernel_linux? ( sys-process/procps ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 >=sys-libs/zlib-1.2.3 !bindist? ( >=sys-libs/readline-4.1:0 ) !dev-db/mysql !dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server jemalloc? ( dev-libs/jemalloc[static-libs?] ) tcmalloc? ( dev-util/google-perftools ) >=sys-libs/zlib-1.2.3[static-libs?] ssl? ( >=dev-libs/openssl-0.9.6d[static-libs?] ) systemtap? ( >=dev-util/systemtap-1.3 ) kernel_linux? ( dev-libs/libaio ) dev-libs/libevent java? ( >=virtual/jdk-1.6 ) virtual/yacc static? ( sys-libs/ncurses[static-libs] ) >=dev-util/cmake-2.4.3 >=dev-util/cmake-2.6.3
-DESCRIPTION=A fast, multi-threaded, multi-user SQL database server
-EAPI=5
-HOMEPAGE=https://www.mysql.com/
-IUSE=elibc_FreeBSD java bindist debug embedded minimal +perl selinux ssl static static-libs test latin1 extraengine cluster max-idx-128 +community profiling jemalloc tcmalloc systemtap
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-PDEPEND=perl? ( >=dev-perl/DBD-mysql-2.9004 ) ~virtual/mysql-5.5
-RDEPEND=!media-sound/amarok[embedded] java? ( >=dev-java/java-config-2.2.0-r3 ) ssl? ( >=dev-libs/openssl-0.9.6d:0 ) kernel_linux? ( sys-process/procps ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 >=sys-libs/zlib-1.2.3 !bindist? ( >=sys-libs/readline-4.1:0 ) !dev-db/mysql !dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server jemalloc? ( dev-libs/jemalloc[static-libs?] ) tcmalloc? ( dev-util/google-perftools ) >=sys-libs/zlib-1.2.3[static-libs?] ssl? ( >=dev-libs/openssl-0.9.6d[static-libs?] ) systemtap? ( >=dev-util/systemtap-1.3 ) kernel_linux? ( dev-libs/libaio ) dev-libs/libevent !minimal? ( !prefix? ( dev-db/mysql-init-scripts ) ) selinux? ( sec-policy/selinux-mysql ) java? ( >=virtual/jre-1.6 )
-REQUIRED_USE=tcmalloc? ( !jemalloc ) jemalloc? ( !tcmalloc ) minimal? ( !cluster !extraengine !embedded ) static? ( !ssl )
-RESTRICT=!bindist? ( bindist )
-SLOT=0
-SRC_URI=http://downloads.mysql.com/archives/mysql-cluster-gpl-7.2/mysql-cluster-gpl-7.2.31.tar.gz https://downloads.skysql.com/files/mysql-cluster-gpl-7.2/mysql-cluster-gpl-7.2.31.tar.gz mirror://mysql/Downloads/MySQL-Cluster-7.2/mysql-cluster-gpl-7.2.31.tar.gz mirror://gentoo/mysql-extras-20171108-2050Z.tar.bz2 https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-20171108-2050Z.tar.bz2 https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-20171108-2050Z.tar.bz2 https://dev.gentoo.org/~grknight/distfiles/mysql-extras-20171108-2050Z.tar.bz2
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 mysql-cmake 39849cc54381eee7c8d7333058ea7132 mysql-v2 af0178e9946ce2a0df18ca31f697e949 mysql_fx fd803e05287868299aac78823b68920e ninja-utils d2e7e7d290428bb25c56dcf2502badc1 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=034d6b5cf66d009f3bb014418886b259
diff --git a/dev-db/mysql-cluster-7.3.19 b/dev-db/mysql-cluster-7.3.19
deleted file mode 100644
index 0cc2a3d3c633..000000000000
--- a/dev-db/mysql-cluster-7.3.19
+++ /dev/null
@@ -1,16 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst preinst prepare pretend setup test unpack
-DEPEND=numa? ( sys-process/numactl ) dev-libs/libevent:0= >=dev-java/java-config-2.2.0-r3 || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) >=virtual/jdk-1.6 test? ( dev-perl/JSON ) virtual/pkgconfig sys-devel/make >=dev-util/cmake-3.9.6 kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 !dev-db/mariadb-native-client[mysqlcompat] jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) openssl? ( >=dev-libs/openssl-1.0.0:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) >=sys-libs/zlib-1.2.3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] sys-libs/ncurses:0= virtual/yacc static? ( sys-libs/ncurses[static-libs] )
-DESCRIPTION=A fast, multi-threaded, multi-user SQL database server
-EAPI=6
-HOMEPAGE=https://www.mysql.com/
-IUSE=numa elibc_FreeBSD abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64 debug embedded extraengine jemalloc latin1 libressl +openssl +perl profiling selinux +server systemtap static static-libs tcmalloc test yassl
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-PDEPEND=perl? ( >=dev-perl/DBD-mysql-2.9004 ) server? ( ~virtual/mysql-5.6[embedded=,static=] ) virtual/libmysqlclient:0/18[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs=]
-RDEPEND=numa? ( sys-process/numactl ) dev-libs/libevent:0= >=dev-java/java-config-2.2.0-r3 !media-sound/amarok[embedded] >=virtual/jre-1.6 kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 !dev-db/mariadb-native-client[mysqlcompat] jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) openssl? ( >=dev-libs/openssl-1.0.0:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) >=sys-libs/zlib-1.2.3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] sys-libs/ncurses:0= selinux? ( sec-policy/selinux-mysql ) !dev-db/mysql !dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server server? ( !prefix? ( dev-db/mysql-init-scripts ) ) !<virtual/mysql-5.6-r4
-REQUIRED_USE=^^ ( yassl openssl libressl ) !server? ( !extraengine !embedded ) ?? ( tcmalloc jemalloc ) static? ( !libressl !openssl yassl )
-RESTRICT=libressl? ( test )
-SLOT=0/18
-SRC_URI=http://cdn.mysql.com/Downloads/MySQL-Cluster-7.3/mysql-cluster-gpl-7.3.19.tar.gz http://downloads.mysql.com/archives/MySQL-Cluster-7.3/mysql-cluster-gpl-7.3.19.tar.gz mirror://gentoo/mysql-extras-20171121-1518Z.tar.bz2 https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-20171121-1518Z.tar.bz2 https://dev.gentoo.org/~grknight/distfiles/mysql-extras-20171121-1518Z.tar.bz2 https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-20171121-1518Z.tar.bz2 https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-20171121-1518Z.tar.bz2
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 multiprocessing cac3169468f893670dac3e7cb940e045 mysql-multilib-r1 9823899e303dd74138fef85f4a116e13 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=b4f6aaa3b031a4e298ccc2fc8d8c3905
diff --git a/dev-db/mysql-cluster-7.4.17 b/dev-db/mysql-cluster-7.4.17
deleted file mode 100644
index 460a6cbc8f4b..000000000000
--- a/dev-db/mysql-cluster-7.4.17
+++ /dev/null
@@ -1,16 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst preinst prepare pretend setup test unpack
-DEPEND=numa? ( sys-process/numactl ) dev-libs/libevent:0= >=dev-java/java-config-2.2.0-r3 || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) >=virtual/jdk-1.6 test? ( dev-perl/JSON ) virtual/pkgconfig sys-devel/make >=dev-util/cmake-3.9.6 kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 !dev-db/mariadb-native-client[mysqlcompat] jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) openssl? ( >=dev-libs/openssl-1.0.0:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) >=sys-libs/zlib-1.2.3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] sys-libs/ncurses:0= virtual/yacc static? ( sys-libs/ncurses[static-libs] )
-DESCRIPTION=A fast, multi-threaded, multi-user SQL database server
-EAPI=6
-HOMEPAGE=https://www.mysql.com/
-IUSE=numa elibc_FreeBSD abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64 debug embedded extraengine jemalloc latin1 libressl +openssl +perl profiling selinux +server systemtap static static-libs tcmalloc test yassl
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-PDEPEND=perl? ( >=dev-perl/DBD-mysql-2.9004 ) server? ( ~virtual/mysql-5.6[embedded=,static=] ) virtual/libmysqlclient:0/18[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs=]
-RDEPEND=numa? ( sys-process/numactl ) dev-libs/libevent:0= >=dev-java/java-config-2.2.0-r3 !media-sound/amarok[embedded] >=virtual/jre-1.6 kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 !dev-db/mariadb-native-client[mysqlcompat] jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) openssl? ( >=dev-libs/openssl-1.0.0:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) >=sys-libs/zlib-1.2.3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] sys-libs/ncurses:0= selinux? ( sec-policy/selinux-mysql ) !dev-db/mysql !dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server server? ( !prefix? ( dev-db/mysql-init-scripts ) ) !<virtual/mysql-5.6-r4
-REQUIRED_USE=^^ ( yassl openssl libressl ) !server? ( !extraengine !embedded ) ?? ( tcmalloc jemalloc ) static? ( !libressl !openssl yassl )
-RESTRICT=libressl? ( test )
-SLOT=0/18
-SRC_URI=http://cdn.mysql.com/Downloads/MySQL-Cluster-7.4/mysql-cluster-gpl-7.4.17.tar.gz http://downloads.mysql.com/archives/MySQL-Cluster-7.4/mysql-cluster-gpl-7.4.17.tar.gz mirror://gentoo/mysql-extras-20171121-1518Z.tar.bz2 https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-20171121-1518Z.tar.bz2 https://dev.gentoo.org/~grknight/distfiles/mysql-extras-20171121-1518Z.tar.bz2 https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-20171121-1518Z.tar.bz2 https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-20171121-1518Z.tar.bz2
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 multiprocessing cac3169468f893670dac3e7cb940e045 mysql-multilib-r1 9823899e303dd74138fef85f4a116e13 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=b4f6aaa3b031a4e298ccc2fc8d8c3905
diff --git a/dev-db/mysql-cluster/Manifest b/dev-db/mysql-cluster/Manifest
new file mode 100644
index 000000000000..4a750a6af64a
--- /dev/null
+++ b/dev-db/mysql-cluster/Manifest
@@ -0,0 +1,11 @@
+AUX my.cnf-5.5 4732 BLAKE2B c5a7582dfe4a5d107c41da12cb9868dd902986c1b109f1ef318c9b6a9da843ed4c4da14c3f44396b39f6aa3bd836ea3defaa9a918ee7f137bbbfc5e50cdeb8bc SHA512 617d5be2b84eb6207c8e26db15597f3477d69aed756b05897f5ac3b7df4bef599ed932e4b27f39ac20272ea5907b31ca42e01f2b317899bdbe19db7b7c4dfc2d
+AUX my.cnf-5.6 4504 BLAKE2B 5d904925d12ad4c3826426e7e7790800028c9adf9b42692adf3260cd8dae910338683fbcd3e5148f113c1ab27481e5ffe61871716a069c50f295cf756b3e685c SHA512 866aa700460c2962bad6294b271efad09ef285dd428ab01551078be9972d2f961fbdf56aef7927439784711022e92a96f2eba30cd297f056f6562e8817c89aae
+DIST mysql-cluster-gpl-7.2.31.tar.gz 25109340 BLAKE2B c0af2b85c9760636f35ab461997ac5e8e5d20085dbfef6e7a265931e743b288a4cdb8e282f7e9436daa8b9e060fe110f5522c640e2e2a7f0b54fe2686ebb751b SHA512 ab6a7ad2bb981e8351d1d337eb0a75ad952da6f100a6c17a02c629936c4a3bad5701ead6ccf9b912ba0412d3442b6ad87c8e0c5409b84f10af8ec86a7c44b881
+DIST mysql-cluster-gpl-7.3.19.tar.gz 41340089 BLAKE2B 25ca93a9bcc41fb03ba0e4d34a1c672ddee3db7ff76fcf483187483dec16d8bffaaf1ab0704b4bed6ebb57681768429f7088757769d6b23dfa757517eef767ea SHA512 2d12124ec6b7ffa904538f21b676b15e093b3720d067b6eaffe609310ffd6261308ddcfbba4ce259f73d8e905f96bdcd21c5b7ec8fb940d2e9a8ec64c0f397a3
+DIST mysql-cluster-gpl-7.4.17.tar.gz 41691695 BLAKE2B 9a9641a4962e625364fe9739d0954eeac8d773cb106e05c3cebd9ce94843246db679a1e81db383a861f9cec052193fa1ca80b34fb05d80ffbe248c29094476d2 SHA512 eaeab8b4c62e4b503210c269cf3147cb1fd3690e9bdb291a6bb46c874adf958166ccdf5b8766a09ec14d7fd63e3aff3e4b1f1527201e50e86e588507aa01767f
+DIST mysql-extras-20171108-2050Z.tar.bz2 313241 BLAKE2B 83900f96392edb97c47007ba0faa4c259b7a3c6f17a7ed7161c7c632ac2466f9ab59777e6c17fdeeb8553650ea654633e3b10cf6f8e7692fbee4ebc5db495aea SHA512 830e6bac6fcead4b2d9649f6aaf6ec6573f86ce3c1a8bc1be6c89a408d69bfb81136baa7273d4449688d683b832880c2470970cd737c2b07cc7a1c2ce9c5a0b6
+DIST mysql-extras-20171121-1518Z.tar.bz2 313539 BLAKE2B c397fdf7ffb3fcbcecda20933e18234062a9500dcf4031e9b17131e2a1f23dca7535ed33ff541fc075eb9995c67a9a8fd7261d7524dd42d8d333543c368b4c15 SHA512 dd0d4a00c0ed710e786d157a73f02c6f555ab7a68e57014d958627096a4245a0b45d22ec860dc5389002d106554e80166661c0b6ddcadff1f737e3fa195badda
+EBUILD mysql-cluster-7.2.31.ebuild 4305 BLAKE2B 8fd24da2fb5a3ea90022791843f76a06ab1c12a0a8fa0bb64e0357e2d2367709093544646d0993f904ec5fc041c21380d4ed3e9358cc1809d36c70b777c092ea SHA512 930bd60377563298a1b596685c2b5bf43d995415f06fc8f6b9e1e10c97cbbe43a97de255450bb177873033b99bf303bc3c4fa41bef124d2b29a7767923b39a24
+EBUILD mysql-cluster-7.3.19.ebuild 6311 BLAKE2B 599d98a3ae24dc3d3162a436f00824db3fbf53dddc0ab913010460c60a229f2419523059f1bfd7f024a904c7b62295e9b40e0f7157580497e21dbe166f1fc8aa SHA512 f7f277ba28ef4159bf83cdfa5e2c81a0d10649d5fa9919517dffed567857b71a1c3259d404dd9b2dfbee6a7a0566c02c48c8fe04eab8b28a9001d372c9fec776
+EBUILD mysql-cluster-7.4.17.ebuild 6311 BLAKE2B 599d98a3ae24dc3d3162a436f00824db3fbf53dddc0ab913010460c60a229f2419523059f1bfd7f024a904c7b62295e9b40e0f7157580497e21dbe166f1fc8aa SHA512 f7f277ba28ef4159bf83cdfa5e2c81a0d10649d5fa9919517dffed567857b71a1c3259d404dd9b2dfbee6a7a0566c02c48c8fe04eab8b28a9001d372c9fec776
+MISC metadata.xml 1657 BLAKE2B b8d1d71537ecc478d51177e5f78f02d4d07fd056fa5f15742d33066fd71b78b60aa62cf02028964748238f6ec1879e19dff42bbf7da56018ad652b6a63751dc8 SHA512 594c4282f0ca9fd8b207778f5fcb00397a8779564b95f50ac99b22f48a4df80372675243a62a68f6e026733a31a383c43820450eb3f00cb13bce974b7e7368ae
diff --git a/dev-db/mysql-cluster/files/my.cnf-5.5 b/dev-db/mysql-cluster/files/my.cnf-5.5
new file mode 100644
index 000000000000..edb71e86e85e
--- /dev/null
+++ b/dev-db/mysql-cluster/files/my.cnf-5.5
@@ -0,0 +1,147 @@
+# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file.
+
+# The following options will be passed to all MySQL clients
+[client]
+#password = your_password
+port = 3306
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
+
+[mysql]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqladmin]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlcheck]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqldump]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlimport]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlshow]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[myisamchk]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+
+[myisampack]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+
+# use [safe_mysqld] with mysql-3
+[mysqld_safe]
+err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err
+
+# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations
+[mysqld]
+character-set-server = utf8
+user = mysql
+port = 3306
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
+pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid
+log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err
+basedir = @GENTOO_PORTAGE_EPREFIX@/usr
+datadir = @DATADIR@
+skip-external-locking
+key_buffer_size = 16M
+max_allowed_packet = 1M
+table_open_cache = 64
+sort_buffer_size = 512K
+net_buffer_length = 8K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql
+#Set this to your desired error message language
+lc_messages = en_US
+
+# security:
+# using "localhost" in connects uses sockets by default
+# skip-networking
+bind-address = 127.0.0.1
+
+log-bin
+server-id = 1
+
+# point the following paths to different dedicated disks
+tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/
+#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname
+
+# you need the debug USE flag enabled to use the following directives,
+# if needed, uncomment them, start the server and issue
+# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace
+# this will show you *exactly* what's happening in your server ;)
+
+#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql
+#gdb
+#debug = d:t:i:o,/tmp/mysqld.trace
+#one-thread
+
+# the following is the InnoDB configuration
+# if you wish to disable innodb instead
+# uncomment just the next line
+#skip-innodb
+#
+# the rest of the innodb config follows:
+# don't eat too much memory, we're trying to be safe on 64Mb boxes
+# you might want to bump this up a bit on boxes with more RAM
+innodb_buffer_pool_size = 16M
+# this is the default, increase it if you have lots of tables
+innodb_additional_mem_pool_size = 2M
+#
+# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-(
+# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route
+# we have to take for the moment
+#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+# you may wish to change this size to be more suitable for your system
+# the max is there to avoid run-away growth on your machine
+innodb_data_file_path = ibdata1:10M:autoextend:max:128M
+# we keep this at around 25% of of innodb_buffer_pool_size
+# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size)
+innodb_log_file_size = 5M
+# this is the default, increase it if you have very large transactions going on
+innodb_log_buffer_size = 8M
+# this is the default and won't hurt you
+# you shouldn't need to tweak it
+innodb_log_files_in_group=2
+# see the innodb config docs, the other options are not always safe
+innodb_flush_log_at_trx_commit = 1
+innodb_lock_wait_timeout = 50
+innodb_file_per_table
+
+# Uncomment this to get FEDERATED engine support
+#plugin-load=federated=ha_federated.so
+loose-federated
+
+[mysqldump]
+quick
+max_allowed_packet = 16M
+
+[mysql]
+# uncomment the next directive if you are not familiar with SQL
+#safe-updates
+
+[isamchk]
+key_buffer_size = 20M
+sort_buffer_size = 20M
+read_buffer = 2M
+write_buffer = 2M
+
+[myisamchk]
+key_buffer_size = 20M
+sort_buffer_size = 20M
+read_buffer_size = 2M
+write_buffer_size = 2M
+
+[mysqlhotcopy]
+interactive-timeout
+
diff --git a/dev-db/mysql-cluster/files/my.cnf-5.6 b/dev-db/mysql-cluster/files/my.cnf-5.6
new file mode 100644
index 000000000000..df462ab69a14
--- /dev/null
+++ b/dev-db/mysql-cluster/files/my.cnf-5.6
@@ -0,0 +1,139 @@
+# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file.
+
+# The following options will be passed to all MySQL clients
+[client]
+#password = your_password
+port = 3306
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
+
+[mysql]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqladmin]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlcheck]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqldump]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlimport]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlshow]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[myisamchk]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+
+[myisampack]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+
+# use [safe_mysqld] with mysql-3
+[mysqld_safe]
+err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err
+
+# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations
+[mysqld]
+character-set-server = utf8
+user = mysql
+port = 3306
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
+pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid
+log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err
+basedir = @GENTOO_PORTAGE_EPREFIX@/usr
+datadir = @DATADIR@
+skip-external-locking
+key_buffer_size = 16M
+max_allowed_packet = 4M
+table_open_cache = 400
+sort_buffer_size = 512K
+net_buffer_length = 16K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql
+#Set this to your desired error message language
+lc_messages = en_US
+
+# security:
+# using "localhost" in connects uses sockets by default
+# skip-networking
+bind-address = 127.0.0.1
+
+log-bin
+server-id = 1
+
+# point the following paths to different dedicated disks
+tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/
+#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname
+
+# you need the debug USE flag enabled to use the following directives,
+# if needed, uncomment them, start the server and issue
+# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace
+# this will show you *exactly* what's happening in your server ;)
+
+#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql
+#gdb
+#debug = d:t:i:o,/tmp/mysqld.trace
+#one-thread
+
+# the rest of the innodb config follows:
+# don't eat too much memory, we're trying to be safe on 64Mb boxes
+# you might want to bump this up a bit on boxes with more RAM
+innodb_buffer_pool_size = 128M
+#
+# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-(
+# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route
+# we have to take for the moment
+#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+# you may wish to change this size to be more suitable for your system
+# the max is there to avoid run-away growth on your machine
+innodb_data_file_path = ibdata1:10M:autoextend:max:128M
+# we keep this at around 25% of of innodb_buffer_pool_size
+# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size)
+innodb_log_file_size = 48M
+# this is the default, increase it if you have very large transactions going on
+innodb_log_buffer_size = 8M
+# this is the default and won't hurt you
+# you shouldn't need to tweak it
+innodb_log_files_in_group=2
+# see the innodb config docs, the other options are not always safe
+innodb_flush_log_at_trx_commit = 1
+innodb_lock_wait_timeout = 50
+innodb_file_per_table
+
+# Uncomment this to get FEDERATED engine support
+#plugin-load=federated=ha_federated.so
+loose-federated
+
+[mysqldump]
+quick
+max_allowed_packet = 16M
+
+[mysql]
+# uncomment the next directive if you are not familiar with SQL
+#safe-updates
+
+[isamchk]
+key_buffer_size = 20M
+sort_buffer_size = 20M
+read_buffer = 2M
+write_buffer = 2M
+
+[myisamchk]
+key_buffer_size = 20M
+sort_buffer_size = 20M
+read_buffer_size = 2M
+write_buffer_size = 2M
+
+[mysqlhotcopy]
+interactive-timeout
diff --git a/dev-db/mysql-cluster/metadata.xml b/dev-db/mysql-cluster/metadata.xml
new file mode 100644
index 000000000000..0efe3d7675fa
--- /dev/null
+++ b/dev-db/mysql-cluster/metadata.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>mysql-bugs@gentoo.org</email>
+ <name>MySQL</name>
+ </maintainer>
+<use>
+ <flag name="cluster">Add support for NDB clustering</flag>
+ <flag name="community">Enables the community features from upstream.</flag>
+ <flag name="embedded">Build embedded server (libmysqld)</flag>
+ <flag name="extraengine">Add support for alternative storage engines (Archive, CSV, Blackhole, Federated(X), Partition)</flag>
+ <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for allocations.</flag>
+ <flag name="latin1">Use LATIN1 encoding instead of UTF8</flag>
+ <flag name="libressl">Enable SSL connections and crypto functions using <pkg>dev-libs/libressl</pkg></flag>
+ <flag name="openssl">Enable SSL connections and crypto functions using <pkg>dev-libs/openssl</pkg></flag>
+ <flag name="max-idx-128">Raise the max index per table limit from 64 to 128</flag>
+ <flag name="minimal">Install client programs only, no server</flag>
+ <flag name="numa">Enable NUMA support using <pkg>sys-process/numactl</pkg> (NUMA kernel support is also required)</flag>
+ <flag name="profiling">Add support for statement profiling (requires USE=community).</flag>
+ <flag name="server">Build the server program</flag>
+ <flag name="systemtap">Build support for profiling and tracing using <pkg>dev-util/systemtap</pkg></flag>
+ <flag name="test">Install upstream testsuites for end use.</flag>
+ <flag name="yassl">Enable SSL connections and crypto functions using the bundled yaSSL</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-db/mysql-cluster/mysql-cluster-7.2.31.ebuild b/dev-db/mysql-cluster/mysql-cluster-7.2.31.ebuild
new file mode 100644
index 000000000000..d5e946e39e0e
--- /dev/null
+++ b/dev-db/mysql-cluster/mysql-cluster-7.2.31.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+MY_EXTRAS_VER="20171108-2050Z"
+BUILD="cmake"
+#fails to build with ninja
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit toolchain-funcs java-pkg-opt-2 mysql-v2
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~amd64 ~x86"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+# This is often broken still
+EPATCH_EXCLUDE='20006_all_cmake_elib-mysql-cluster-5.5.37.patch 20008_all_mysql-tzinfo-symlink.patch 20019_all_mysql-5.5-mtr-perl-deprecation.patch 20020_all_mysql-5.6-events_1-bug-78899.patch'
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="!media-sound/amarok[embedded]"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# Official test instructions:
+# USE='cluster extraengine perl ssl community' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-cluster-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+ local TESTDIR="${CMAKE_BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ # 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 ! use "minimal" ; then
+
+ if [[ $UID -eq 0 ]]; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+ has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ addpredict /this-dir-does-not-exist/t9.MYI
+
+ # Run CTest (test-units)
+ cmake-utils_src_test
+ retstatus_unit=$?
+ [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+ # create directories because mysqladmin might right out of order
+ mkdir -p "${T}"/var-tests{,/log}
+
+ # These are failing in MySQL 5.5 for now and are believed to be
+ # false positives:
+ #
+ # main.information_schema, binlog.binlog_statement_insert_delayed,
+ # main.mysqld--help-notwin, ndb.ndbinfo, ndb_binlog.ndb_binlog_index
+ # fails due to USE=-latin1 / utf8 default
+ #
+ # main.mysql_client_test:
+ # segfaults at random under Portage only, suspect resource limits.
+ #
+ # sys_vars.plugin_dir_basic
+ # fails because PLUGIN_DIR is set to MYSQL_LIBDIR64/plugin
+ # instead of MYSQL_LIBDIR/plugin
+ #
+ # main.flush_read_lock_kill
+ # fails because of unknown system variable 'DEBUG_SYNC'
+ #
+ # main.openssl_1
+ # error message changing
+ # -mysqltest: Could not open connection 'default': 2026 SSL connection
+ # error: ASN: bad other signature confirmation
+ # +mysqltest: Could not open connection 'default': 2026 SSL connection
+ # error: error:00000001:lib(0):func(0):reason(1)
+ #
+
+ for t in main.mysql_client_test \
+ binlog.binlog_statement_insert_delayed main.information_schema \
+ main.mysqld--help-notwin main.flush_read_lock_kill \
+ sys_vars.plugin_dir_basic main.openssl_1 \
+ main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
+ ndb.ndbinfo ndb_binlog.ndb_binlog_index ; do
+ mysql-v2_disable_test "$t" "False positives in Gentoo"
+ done
+
+ # Run mysql tests
+ pushd "${TESTDIR}"
+
+ # run mysql-test tests
+ perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+ --parallel=auto
+ retstatus_tests=$?
+ [[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+ has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+ popd
+
+ # Cleanup is important for these testcases.
+ pkill -9 -f "${S}/ndb" 2>/dev/null
+ pkill -9 -f "${S}/sql" 2>/dev/null
+
+ failures=""
+ [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+ [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+ has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+ [[ -z "$failures" ]] || die "Test failures: $failures"
+ einfo "Tests successfully completed"
+
+ else
+
+ einfo "Skipping server tests due to minimal build."
+ fi
+}
diff --git a/dev-db/mysql-cluster/mysql-cluster-7.3.19.ebuild b/dev-db/mysql-cluster/mysql-cluster-7.3.19.ebuild
new file mode 100644
index 000000000000..465e47e22e51
--- /dev/null
+++ b/dev-db/mysql-cluster/mysql-cluster-7.3.19.ebuild
@@ -0,0 +1,190 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+MY_EXTRAS_VER="20171121-1518Z"
+SUBSLOT="18"
+MYSQL_PV_MAJOR="5.6"
+#fails to build with ninja
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit java-utils-2 mysql-multilib-r1
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE numa"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~amd64 ~x86"
+COMMON_DEPEND="numa? ( sys-process/numactl ) dev-libs/libevent:0= ${JAVA_PKG_E_DEPEND}"
+DEPEND="${COMMON_DEPEND} || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) >=virtual/jdk-1.6 test? ( dev-perl/JSON )"
+RDEPEND="${COMMON_DEPEND} !media-sound/amarok[embedded] >=virtual/jre-1.6"
+
+MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+
+PATCHES=(
+ "${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
+ "${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
+ "${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
+ "${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
+# "${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
+ "${MY_PATCH_DIR}"/20027_all_mysql-5.5-perl5.26-includes.patch
+ "${MY_PATCH_DIR}"/20028_all_mysql-5.6-gcc7.patch
+ "${MY_PATCH_DIR}"/30000_all_mysql-cluster-multilib-property.patch
+)
+
+MULTILIB_WRAPPED_HEADERS+=( /usr/include/mysql/storage/ndb/ndb_types.h )
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+pkg_setup() {
+ mysql-multilib-r1_pkg_setup
+ java-pkg_init
+}
+
+src_prepare() {
+ mysql-multilib-r1_src_prepare
+ java-utils-2_src_prepare
+ if use libressl ; then
+ sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+ "${S}/cmake/ssl.cmake" || die
+ fi
+}
+
+src_configure() {
+ # validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
+ # disable until we see what happens with it
+ local MYSQL_CMAKE_NATIVE_DEFINES=(
+ -DWITHOUT_VALIDATE_PASSWORD=1
+ -DWITH_NUMA=$(usex numa ON OFF)
+ -DWITH_NDBCLUSTER=1 -DWITH_PARTITION_STORAGE_ENGINE=1
+ -DWITHOUT_PARTITION_STORAGE_ENGINE=0 )
+ mysql-multilib-r1_src_configure
+}
+
+pkg_preinst() {
+ java-utils-2_pkg_preinst
+ mysql-multilib-r1_pkg_preinst
+}
+
+# Official test instructions:
+# USE='extraengine perl openssl' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-cluster-X.X.XX.ebuild \
+# digest clean package
+multilib_src_test() {
+
+ if ! multilib_is_native_abi ; then
+ einfo "Server tests not available on non-native abi".
+ return 0;
+ fi
+
+ _disable_test() {
+ local rawtestname reason
+ rawtestname="${1}" ; shift
+ reason="${@}"
+ ewarn "test '${rawtestname}' disabled: '${reason}'"
+ echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+ }
+
+ local TESTDIR="${CMAKE_BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ # 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 use server ; then
+
+ if [[ $UID -eq 0 ]]; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+ has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+ # Enable parallel testing, auto will try to detect number of cores
+ # You may set this by hand.
+ # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+ export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+ # create directories because mysqladmin might right out of order
+ mkdir -p "${T}"/var-tests{,/log}
+
+ # create symlink for the tests to find mysql_tzinfo_to_sql
+ ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+ touch "${T}/disabled.def"
+ # These are failing in MySQL 5.5/5.6 for now and are believed to be
+ # false positives:
+ #
+ # main.information_schema, binlog.binlog_statement_insert_delayed,
+ # main.mysqld--help-notwin, funcs_1.is_triggers funcs_1.is_tables_mysql,
+ # funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
+ # perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
+ # mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
+ # perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
+ # fails due to USE=-latin1 / utf8 default
+ #
+ # main.mysql_client_test:
+ # segfaults at random under Portage only, suspect resource limits.
+ #
+ for t in \
+ binlog.binlog_mysqlbinlog_filter \
+ binlog.binlog_statement_insert_delayed \
+ funcs_1.is_columns_mysql \
+ funcs_1.is_tables_mysql \
+ funcs_1.is_triggers \
+ main.information_schema \
+ main.mysqld--help-notwinfuncs_1.is_triggers \
+ main.mysql_client_test \
+ mysqld--help-notwin \
+ main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
+ perfschema.binlog_edge_mix \
+ perfschema.binlog_edge_stmt \
+ rpl.rpl_plugin_load main.mysql \
+ main.mysql_upgrade \
+ ; do
+ _disable_test "$t" "False positives in Gentoo"
+ done
+ # ndb.ndbinfo, ndb_binlog.ndb_binlog_index: latin1/utf8
+ for t in \
+ ndb.ndbinfo ndb.ndb_tools_connect \
+ ndb_binlog.ndb_binlog_index ; do
+ _disable_test "$t" "False positives in Gentoo (NDB) (Latin1/UTF8)"
+ done
+
+ # Set file limits higher so tests run
+ ulimit -n 3000
+
+ # Run mysql tests
+ pushd "${TESTDIR}" > /dev/null || die
+
+ # run mysql-test tests
+ perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+ --suite-timeout=5000 --reorder --skip-test-list="${T}/disabled.def" \
+ --nounit-tests
+ 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
+
+ failures=""
+ [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+ [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+ has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+ [[ -z "$failures" ]] || die "Test failures: $failures"
+ einfo "Tests successfully completed"
+
+ else
+
+ einfo "Skipping server tests due to minimal build."
+ fi
+}
diff --git a/dev-db/mysql-cluster/mysql-cluster-7.4.17.ebuild b/dev-db/mysql-cluster/mysql-cluster-7.4.17.ebuild
new file mode 100644
index 000000000000..465e47e22e51
--- /dev/null
+++ b/dev-db/mysql-cluster/mysql-cluster-7.4.17.ebuild
@@ -0,0 +1,190 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+MY_EXTRAS_VER="20171121-1518Z"
+SUBSLOT="18"
+MYSQL_PV_MAJOR="5.6"
+#fails to build with ninja
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit java-utils-2 mysql-multilib-r1
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE numa"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~amd64 ~x86"
+COMMON_DEPEND="numa? ( sys-process/numactl ) dev-libs/libevent:0= ${JAVA_PKG_E_DEPEND}"
+DEPEND="${COMMON_DEPEND} || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) >=virtual/jdk-1.6 test? ( dev-perl/JSON )"
+RDEPEND="${COMMON_DEPEND} !media-sound/amarok[embedded] >=virtual/jre-1.6"
+
+MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+
+PATCHES=(
+ "${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
+ "${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
+ "${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
+ "${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
+# "${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
+ "${MY_PATCH_DIR}"/20027_all_mysql-5.5-perl5.26-includes.patch
+ "${MY_PATCH_DIR}"/20028_all_mysql-5.6-gcc7.patch
+ "${MY_PATCH_DIR}"/30000_all_mysql-cluster-multilib-property.patch
+)
+
+MULTILIB_WRAPPED_HEADERS+=( /usr/include/mysql/storage/ndb/ndb_types.h )
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+pkg_setup() {
+ mysql-multilib-r1_pkg_setup
+ java-pkg_init
+}
+
+src_prepare() {
+ mysql-multilib-r1_src_prepare
+ java-utils-2_src_prepare
+ if use libressl ; then
+ sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+ "${S}/cmake/ssl.cmake" || die
+ fi
+}
+
+src_configure() {
+ # validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
+ # disable until we see what happens with it
+ local MYSQL_CMAKE_NATIVE_DEFINES=(
+ -DWITHOUT_VALIDATE_PASSWORD=1
+ -DWITH_NUMA=$(usex numa ON OFF)
+ -DWITH_NDBCLUSTER=1 -DWITH_PARTITION_STORAGE_ENGINE=1
+ -DWITHOUT_PARTITION_STORAGE_ENGINE=0 )
+ mysql-multilib-r1_src_configure
+}
+
+pkg_preinst() {
+ java-utils-2_pkg_preinst
+ mysql-multilib-r1_pkg_preinst
+}
+
+# Official test instructions:
+# USE='extraengine perl openssl' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-cluster-X.X.XX.ebuild \
+# digest clean package
+multilib_src_test() {
+
+ if ! multilib_is_native_abi ; then
+ einfo "Server tests not available on non-native abi".
+ return 0;
+ fi
+
+ _disable_test() {
+ local rawtestname reason
+ rawtestname="${1}" ; shift
+ reason="${@}"
+ ewarn "test '${rawtestname}' disabled: '${reason}'"
+ echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+ }
+
+ local TESTDIR="${CMAKE_BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ # 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 use server ; then
+
+ if [[ $UID -eq 0 ]]; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+ has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+ # Enable parallel testing, auto will try to detect number of cores
+ # You may set this by hand.
+ # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+ export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+ # create directories because mysqladmin might right out of order
+ mkdir -p "${T}"/var-tests{,/log}
+
+ # create symlink for the tests to find mysql_tzinfo_to_sql
+ ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+ touch "${T}/disabled.def"
+ # These are failing in MySQL 5.5/5.6 for now and are believed to be
+ # false positives:
+ #
+ # main.information_schema, binlog.binlog_statement_insert_delayed,
+ # main.mysqld--help-notwin, funcs_1.is_triggers funcs_1.is_tables_mysql,
+ # funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
+ # perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
+ # mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
+ # perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
+ # fails due to USE=-latin1 / utf8 default
+ #
+ # main.mysql_client_test:
+ # segfaults at random under Portage only, suspect resource limits.
+ #
+ for t in \
+ binlog.binlog_mysqlbinlog_filter \
+ binlog.binlog_statement_insert_delayed \
+ funcs_1.is_columns_mysql \
+ funcs_1.is_tables_mysql \
+ funcs_1.is_triggers \
+ main.information_schema \
+ main.mysqld--help-notwinfuncs_1.is_triggers \
+ main.mysql_client_test \
+ mysqld--help-notwin \
+ main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
+ perfschema.binlog_edge_mix \
+ perfschema.binlog_edge_stmt \
+ rpl.rpl_plugin_load main.mysql \
+ main.mysql_upgrade \
+ ; do
+ _disable_test "$t" "False positives in Gentoo"
+ done
+ # ndb.ndbinfo, ndb_binlog.ndb_binlog_index: latin1/utf8
+ for t in \
+ ndb.ndbinfo ndb.ndb_tools_connect \
+ ndb_binlog.ndb_binlog_index ; do
+ _disable_test "$t" "False positives in Gentoo (NDB) (Latin1/UTF8)"
+ done
+
+ # Set file limits higher so tests run
+ ulimit -n 3000
+
+ # Run mysql tests
+ pushd "${TESTDIR}" > /dev/null || die
+
+ # run mysql-test tests
+ perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+ --suite-timeout=5000 --reorder --skip-test-list="${T}/disabled.def" \
+ --nounit-tests
+ 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
+
+ failures=""
+ [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+ [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+ has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+ [[ -z "$failures" ]] || die "Test failures: $failures"
+ einfo "Tests successfully completed"
+
+ else
+
+ einfo "Skipping server tests due to minimal build."
+ fi
+}
diff --git a/dev-db/mysql-connector-c++-1.1.3 b/dev-db/mysql-connector-c++-1.1.3
deleted file mode 100644
index 411635d85a74..000000000000
--- a/dev-db/mysql-connector-c++-1.1.3
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=>=virtual/mysql-5.1:= dev-libs/boost:0= dev-libs/openssl:0= sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=MySQL database connector for C++ (mimics JDBC 4.0 API)
-EAPI=5
-HOMEPAGE=https://dev.mysql.com/downloads/connector/cpp/
-IUSE=debug examples gcov static-libs
-KEYWORDS=amd64 arm ppc ppc64 sparc x86
-LICENSE=GPL-2
-RDEPEND=>=virtual/mysql-5.1:= dev-libs/boost:0= dev-libs/openssl:0=
-SLOT=0
-SRC_URI=https://dev.mysql.com/get/Downloads/Connector-C++/mysql-connector-c++-1.1.3.tar.gz
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=97f2a22273bc901d358239fa8cf091b9
diff --git a/dev-db/mysql-connector-c++-1.1.6 b/dev-db/mysql-connector-c++-1.1.6
deleted file mode 100644
index 4c607c2bc4d9..000000000000
--- a/dev-db/mysql-connector-c++-1.1.6
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=virtual/libmysqlclient:= dev-libs/boost:= dev-libs/openssl:0= sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=MySQL database connector for C++ (mimics JDBC 4.0 API)
-EAPI=5
-HOMEPAGE=https://dev.mysql.com/downloads/connector/cpp/
-IUSE=debug examples gcov static-libs
-KEYWORDS=amd64 arm ppc ppc64 sparc x86
-LICENSE=GPL-2
-RDEPEND=virtual/libmysqlclient:= dev-libs/boost:= dev-libs/openssl:0=
-SLOT=0
-SRC_URI=https://dev.mysql.com/get/Downloads/Connector-C++/mysql-connector-c++-1.1.6.tar.gz
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=a1c56a4c1ee8ea5e424fca51f205c88f
diff --git a/dev-db/mysql-connector-c++-1.1.8 b/dev-db/mysql-connector-c++-1.1.8
deleted file mode 100644
index ed98e59b2ddf..000000000000
--- a/dev-db/mysql-connector-c++-1.1.8
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=virtual/libmysqlclient:= dev-libs/boost:= dev-libs/openssl:0= !<dev-db/mysql-connector-c-6.1.8 sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=MySQL database connector for C++ (mimics JDBC 4.0 API)
-EAPI=6
-HOMEPAGE=https://dev.mysql.com/downloads/connector/cpp/
-IUSE=debug examples gcov static-libs
-KEYWORDS=~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86
-LICENSE=GPL-2
-RDEPEND=virtual/libmysqlclient:= dev-libs/boost:= dev-libs/openssl:0= !<dev-db/mysql-connector-c-6.1.8
-SLOT=0
-SRC_URI=https://dev.mysql.com/get/Downloads/Connector-C++/mysql-connector-c++-1.1.8.tar.gz
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=f5a6b7f7282a57257051079bdf5d8706
diff --git a/dev-db/mysql-connector-c++-1.1.9 b/dev-db/mysql-connector-c++-1.1.9
deleted file mode 100644
index 96d3c934c35c..000000000000
--- a/dev-db/mysql-connector-c++-1.1.9
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=virtual/libmysqlclient:= dev-libs/boost:= dev-libs/openssl:0= !<dev-db/mysql-connector-c-6.1.8 sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=MySQL database connector for C++ (mimics JDBC 4.0 API)
-EAPI=6
-HOMEPAGE=https://dev.mysql.com/downloads/connector/cpp/
-IUSE=debug examples gcov static-libs
-KEYWORDS=amd64 ~arm ~arm64 ~ppc ppc64 ~sparc x86
-LICENSE=GPL-2
-RDEPEND=virtual/libmysqlclient:= dev-libs/boost:= dev-libs/openssl:0= !<dev-db/mysql-connector-c-6.1.8
-SLOT=0
-SRC_URI=https://dev.mysql.com/get/Downloads/Connector-C++/mysql-connector-c++-1.1.9.tar.gz
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=51d0ca416c3910a4c5f9a2cf4dcb7a7e
diff --git a/dev-db/mysql-connector-c++-8.0.11 b/dev-db/mysql-connector-c++-8.0.11
deleted file mode 100644
index ed4db41e958c..000000000000
--- a/dev-db/mysql-connector-c++-8.0.11
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-libs/openssl:0= dev-libs/protobuf:= legacy? ( dev-libs/boost:= >=dev-db/mysql-connector-c-6.1.8:= ) sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=MySQL database connector for C++ (mimics JDBC 4.0 API)
-EAPI=6
-HOMEPAGE=https://dev.mysql.com/downloads/connector/cpp/
-IUSE=+legacy
-KEYWORDS=~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86
-LICENSE=GPL-2
-RDEPEND=dev-libs/openssl:0= dev-libs/protobuf:= legacy? ( dev-libs/boost:= >=dev-db/mysql-connector-c-6.1.8:= )
-SLOT=0
-SRC_URI=https://dev.mysql.com/get/Downloads/Connector-C++/mysql-connector-c++-8.0.11-src.tar.gz
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=76fae047aa2f74bc74977c96ebab9d5f
diff --git a/dev-db/mysql-connector-c++/Manifest b/dev-db/mysql-connector-c++/Manifest
new file mode 100644
index 000000000000..d0aa690dfb17
--- /dev/null
+++ b/dev-db/mysql-connector-c++/Manifest
@@ -0,0 +1,16 @@
+AUX 8.0.11-fix-build.patch 9453 BLAKE2B 72c42d2f0aac7de63151b4b12a5de6f1597f70be3a8a42d1a137c1a57329acf1adf196377e90c838e1d4995223fb58615814d8c14d3c8d86472ad795e1b456e7 SHA512 321444184d459f7e650b3f72589db4b2537f67c2d413f9d3d5a995c937497b6310bc2b58200fc61b5c0d8e8fe2030d65035ddbab672338d9df1b6cf3ce605ea9
+AUX mysql-connector-c++-1.1.3-fix-cmake.patch 4949 BLAKE2B a3eaa6f656d7f587aca06b02847c335028a1595e61232d3c4579e10678234aec2c6e2d5e12997e9e9d268bd5dc6eef952852a91d64800cbc949d61663b25b03b SHA512 985e5dd9f9f4aaae3b34ff05e32cb0d9ddb108aa20be32e14786b5b2664263149907b46828cb01d491ef07934b73b18ee715185c59bce940370955a544325f3f
+AUX mysql-connector-c++-1.1.5-fix-mariadb.patch 1793 BLAKE2B f65ad472bbdced9920ae8f3fef868282608ec8bd361037e503f3879db223337e84f447157ec7b30f33cf6461abb327422d31fdd677914e672845c358e19ba883 SHA512 a2b23164d9632b84df233dfb0ae52c809256a9ec163deaa663eb3512ffb622a6885c21c67998e51e848772170966bb74322d4ab8d6816dda686c5d6ab9fa300a
+AUX mysql-connector-c++-1.1.6-fix-cmake.patch 762 BLAKE2B 4cecebd2cb075c6e1af7ab74a84132f41beeeb202d4d286038b05cbbb202cef709e7114563bdbee12aab4e6a738a9e23bbb9455fc1ce0f906d952af4e0042f05 SHA512 c4c89b398aa88a9e7b4ed4cf42b055b79670dc70685775afd1ef2d683e5b3754575c831a6083ef0d097431e796513597e1daf7737e3ade710abad917f63ed32f
+AUX mysql-connector-c++-1.1.8-fix-mariadb.patch 1939 BLAKE2B f2d2528cacfa4457c20587557e5125f9d642ce162319ba6b077173b5407319d8d07e6b525a5fb95e797d43a3ad4e9ceb111ebd07a52cf38df1db71b9b4f2ab4c SHA512 66e4783b2ad2db463b243d2fcd7c4f89f1ddbb02f6c5711adb09b402bb448e4ee69b50f635c60201cf63048aebaea25b5db6a18f46b35b25e8d7920dbcfde9bd
+DIST mysql-connector-c++-1.1.3.tar.gz 496226 BLAKE2B 51537d8728d4afdd98474107a02d3f70f6d44a6ee66f26edc101110d6674fce60e5e80bb736fd28cddf446c67590d7759cf28771f5a5f3c7d37e10c5d00a876c SHA512 c03a4ae25e9d189a5114ab630bef6edaefd1aee809dbb1ec26b765f5e84b93fbe17e5f7357a4fe2a95c179cd2028b676151df4baf4e3da7515543ecc0834afd7
+DIST mysql-connector-c++-1.1.6.tar.gz 522236 BLAKE2B 5f728b418fa7d395a83679fbda5c8757e1d06078e27865c7e02a6666ccb1a32c5c8cd77d481b0bc4d4354cea518bd2db2e06076db88ee285365583e27a5f0c23 SHA512 e940b6ee090f792bad8acbbfa3dacd46310ac40c7993c4097eeebb6be4b792d3f1856574e603a71e2795773db97169f47c9ed76a127654472370c726bcb291c7
+DIST mysql-connector-c++-1.1.8.tar.gz 528954 BLAKE2B fc2a606364426834335142375b99546e2ff1251e97add8ee4ecc370feccd7b9dd09f0abc3e1e9084b824141bde2a44d55ff9baddc093f8ec17b2b91060057148 SHA512 c3ab5c1e805598d557a449c44f77ce44cc110e5b529075e38b4f775d3726ebd16a2155f61e47a378a375a9d9362d1520334ea25376636151ddd087291aafd85d
+DIST mysql-connector-c++-1.1.9.tar.gz 508255 BLAKE2B e2cd300946a873a94beab13d9d1cb64ecb5bd9a9a56ef2217b1f7aff1643adc9afc0aa22c2ff1e0f6b8318cd34d12a7fe95f0584c96c212307fa9bd0cb54a2a1 SHA512 ec4d6cb7f21d52e786de3bff951e65ea5ad7391ba097b599d0094d3e8356cf17f700dee618e38e79d7a9e562684a6c51cca95fb8e2e225942766d33f8d0a5646
+DIST mysql-connector-c++-8.0.11-src.tar.gz 2322951 BLAKE2B a1ea47c0440beae1892144186ad6b99a4519369845e1f37f5ce42088df6c29a458bd41840a1f9401dbd29827bc3a7c96ba34563a3a4cf3176e29e377cc254b9f SHA512 5113efb473b7cc63f680c04dacf5bee78d0a58ee20b41c8203edb92f8720c31c52c24de838996f25476eaa3d734c845531440317e82cb5e5f635bc03b057a148
+EBUILD mysql-connector-c++-1.1.3.ebuild 1412 BLAKE2B f03aaff8472d3383204b1007ec65bb2d149c3e7d66c2d85c24d211dcd353ec0ebc03b9fcdb974f93fb5415d28a67676c82e6b458925619666bcf7096b43189a3 SHA512 e0e929f2d987da18c9a70a22e6bba0c7913c26b4f875cd0327ab9d85fa6f760c16b8dbbc3933bff080c2e0e863dd8e455a0f4d78ca68fad5298ec0a71594649d
+EBUILD mysql-connector-c++-1.1.6.ebuild 1542 BLAKE2B 56240c2cee4a328814d804034873bc46032194b636c7b2d49f40d6fca0db683a8a95632f4084e1d3028e281dc0a4b50fb7880946375b734a3b8d8c4658f535a9 SHA512 ab41d0675ef75135be6d5948e01af4d443cab5b9784dd738037c13da65c3c5d331dc70bb4e581f67c9f72e017ab7e977e5ed729ed3c8bccbfbf54c7f57c744e0
+EBUILD mysql-connector-c++-1.1.8.ebuild 1570 BLAKE2B 2fdce62496284a0e17b4bd5dd6aa92c424debb3d5ef6e42a7962e439c1cb4878c4f7cffa2dcfb6c7ab664f2c59f31b1e09e7ae71965f851f4ab3bfdc075284ed SHA512 44b999b586e476efdaa014fa3419413c0e323b1fd33ea78ff16fa2fce16ac02afc5c898358a854a341fb0518a1b3cb012c7720416292f15a86e1eef74402ccd8
+EBUILD mysql-connector-c++-1.1.9.ebuild 1574 BLAKE2B 4d41dfab577d6346d7371d44b666b417ec66d03118dda5f7258e83038b747593bbd2c6a74e7e92d10d75b058de16189ac41459e508304478438b967acfebb9a8 SHA512 85911cb29abc3106170ef6a78c12db19827cb25f1d97708e15fbf657bd1f8f2e57f2fa1cd91f7217667f406c70adb1d24bb1bdc2042d89533d6b0ea5ca183753
+EBUILD mysql-connector-c++-8.0.11.ebuild 831 BLAKE2B cd00b3ef8d70e64c8fa7d4852a45d58f060fa443dfb90ebffdb3fa11310d4afabf0396eb05ec4af04b2d3fb3115f38b10eb76a1a302d9d7a1cbb5b4f7e61fda0 SHA512 8de6feaa69664b8faea224769777b7050470fd0b60c0d317e00049bc0e29471bac94274ae0da4239ff211651bf3775df0526d29a02d39d88b1d107bddbb44ee0
+MISC metadata.xml 378 BLAKE2B 43fdbbc8d3b6ef99e51da96ddfefbdeaa70ef5fcb2fc6067305f75f75b7ee2fd21b79ca76704d8752bf59ae057b28efb187b063770964246f93fea629b58b467 SHA512 c6e545fb60d306792421ea26a937aaa6aea53d2a4100c9cafe78cf695c9dd0620cf3e770d43ff42749ae42bbe3a35212407ea84edee9af2dcb0255c2b763ddfc
diff --git a/dev-db/mysql-connector-c++/files/8.0.11-fix-build.patch b/dev-db/mysql-connector-c++/files/8.0.11-fix-build.patch
new file mode 100644
index 000000000000..7449b910a9b0
--- /dev/null
+++ b/dev-db/mysql-connector-c++/files/8.0.11-fix-build.patch
@@ -0,0 +1,276 @@
+diff -aurN a/buildinfo.cmake b/buildinfo.cmake
+--- a/buildinfo.cmake 2018-04-08 15:10:57.000000000 -0400
++++ b/buildinfo.cmake 2018-04-20 13:37:20.993266176 -0400
+@@ -112,4 +112,4 @@
+ endif()
+
+
+-install(FILES "${PROJECT_BINARY_DIR}/BUILDINFO.txt" DESTINATION .)
++#install(FILES "${PROJECT_BINARY_DIR}/BUILDINFO.txt" DESTINATION .)
+diff -aurN a/cdk/cmake/install_macros.cmake b/cdk/cmake/install_macros.cmake
+--- a/cdk/cmake/install_macros.cmake 2018-04-08 15:10:57.000000000 -0400
++++ b/cdk/cmake/install_macros.cmake 2018-04-20 14:12:17.255877167 -0400
+@@ -327,7 +327,7 @@
+ DESTINATION ${ARG_DESTINATION}
+ ${RENAME_PARAM}
+ ${PERMISSIONS_${target_type}}
+- CONFIGURATIONS Release RelWithDebInfo
++ CONFIGURATIONS Release RelWithDebInfo Gentoo
+ COMPONENT ${ARG_COMPONENT}
+ OPTIONAL)
+
+@@ -346,7 +346,7 @@
+ INSTALL(FILES ${debug_pdb_target_location}
+ DESTINATION ${ARG_PDB_DESTINATION}
+ ${PDB_RENAME_PARAM}
+- CONFIGURATIONS Release RelWithDebInfo
++ CONFIGURATIONS Release RelWithDebInfo Gentoo
+ COMPONENT ${ARG_COMPONENT}
+ OPTIONAL)
+ ENDIF()
+diff -aurN a/cdk/cmake/libutils.cmake b/cdk/cmake/libutils.cmake
+--- a/cdk/cmake/libutils.cmake 2018-04-08 15:10:57.000000000 -0400
++++ b/cdk/cmake/libutils.cmake 2018-04-20 14:27:49.021432318 -0400
+@@ -275,14 +275,7 @@
+ endforeach()
+
+ if(libs)
+-
+- if(${type} STREQUAL "STATIC")
+- merge_static_libraries(${TARGET} ${libs})
+- add_dependencies(${TARGET} ${libs})
+- else()
+ target_link_libraries(${TARGET} PRIVATE ${libs})
+- endif()
+-
+ endif()
+
+ #
+diff -aurN a/cdk/cmake/protobuf.cmake b/cdk/cmake/protobuf.cmake
+--- a/cdk/cmake/protobuf.cmake 2018-04-08 15:10:57.000000000 -0400
++++ b/cdk/cmake/protobuf.cmake 2018-04-20 13:43:04.950466261 -0400
+@@ -36,142 +36,8 @@
+ # ADD_LIBRARY(target ... ${SRCS})
+ #
+
+-#
+-# Configure Protobuf project in protobuf subfolder of build location.
+-#
+-
+-message("Configuring Protobuf build using cmake generator: ${CMAKE_GENERATOR}")
+-file(REMOVE ${PROJECT_BINARY_DIR}/protobuf/CMakeCache.txt)
+-file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/protobuf)
+-
+-# If specified, use the same build type for Protobuf
+-
+-if(CMAKE_BUILD_TYPE)
+- set(set_build_type -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
+-endif()
+-
+-execute_process(
+- COMMAND ${CMAKE_COMMAND}
+- -G "${CMAKE_GENERATOR}"
+- ${set_build_type}
+- -DSTATIC_MSVCRT=${STATIC_MSVCRT}
+- -DCMAKE_POSITION_INDEPENDENT_CODE=${CMAKE_POSITION_INDEPENDENT_CODE}
+- -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
+- -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
+- ${PROJECT_SOURCE_DIR}/protobuf
+- WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/protobuf
+- RESULT_VARIABLE protobuf_config
+-)
+-
+-if(protobuf_config)
+- message(FATAL_ERROR "Could not configure Protobuf build: ${protobuf_config}")
+-endif()
+-
+-include(${PROJECT_BINARY_DIR}/protobuf/exports.cmake)
+-
+-#
+-# Protobuf library targets imported above (pb_protobuf
+-# and pb_protobuf-lite) are local to the directory from which
+-# they were imported. This is not good if cdk is used as
+-# a sub-project of a parent project, because the parent project
+-# must have access to these targets.
+-#
+-# For that reason blow we create global protobuf/protobuf-lite targets
+-# and copy their loactions from the imported targets.
+-#
+-
+-add_library(protobuf STATIC IMPORTED GLOBAL)
+-add_library(protobuf-lite STATIC IMPORTED GLOBAL)
+-
+-foreach(lib protobuf protobuf-lite)
+- #message("processing: ${lib}")
+-
+- foreach(CONF NOCONFIG DEBUG RELEASE MINSIZEREL RELWITHDEBINFO)
+- #message("- CONF: ${CONF}")
+-
+- get_target_property(LOC pb_${lib} IMPORTED_LOCATION_${CONF})
+- if(LOC)
+- #message("- settig imported location to: ${LOC}")
+- set(location "${LOC}")
+- set_target_properties(${lib} PROPERTIES
+- IMPORTED_LOCATION_${CONF} "${LOC}"
+- )
+- set_property(TARGET ${lib} APPEND PROPERTY
+- IMPORTED_CONFIGURATIONS ${CONF})
+- endif()
+-
+- endforeach(CONF)
+-
+- # For multi-configuration builders like MSVC, set a generic
+- # location of the form <prefix>/$(Configuration)/<name> which will
+- # work with any configuration choosen at build time.
+- # It is constructed from one of per-configurartion locations
+- # determined above and saved in ${location}. The logic assumes
+- # that the per-configration location is of the form
+- # <prefix>/<config>/<name>
+-
+- if(CMAKE_CONFIGURATION_TYPES)
+-
+- get_filename_component(name "${location}" NAME)
+- get_filename_component(LOC "${location}" PATH)
+- get_filename_component(LOC "${LOC}" PATH)
+- set(LOC "${LOC}/$(Configuration)/${name}")
+-
+- message("- setting generic location to: ${LOC}")
+- set_target_properties(${lib} PROPERTIES
+- IMPORTED_LOCATION "${LOC}"
+- )
+-
+- endif()
+-
+-endforeach(lib)
+-
+-
+-# protobuf depends on protobuf-lite
+-
+-set_target_properties(protobuf PROPERTIES
+- INTERFACE_LINK_LIBRARIES "protobuf-lite"
+-)
+-
+-
+-message("Protobuf include path: ${PROTOBUF_INCLUDE_DIR}")
+-
+-set(PROTOBUF_INCLUDE_DIRS ${PROTOBUF_INCLUDE_DIR}
+- CACHE INTERNAL "Protobuf include path" FORCE)
+-set(PROTOBUF_PROTOC_EXECUTABLE pb_protoc
+- CACHE INTERNAL "Protobuf compiler" FORCE)
+-
+-#
+-# Custom target build_protobuf ensures that Protobuf project is built.
+-#
+-# Note: this depends on Protobuf project generating the stamp file
+-#
+-
+-if(NOT DEFINED PROTOBUF_BUILD_STAMP)
+- message(FATAL_ERROR "Protobuf build stamp file not defined")
+-endif()
+-
+-if(CMAKE_VERSION VERSION_LESS 3.0)
+- add_custom_command(OUTPUT ${PROTOBUF_BUILD_STAMP}
+- COMMAND ${CMAKE_COMMAND} --build . --config $<CONFIGURATION>
+- WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/protobuf
+- COMMENT "Building protobuf using configuration: $<CONFIGURATION>"
+- )
+-else()
+- add_custom_command(OUTPUT ${PROTOBUF_BUILD_STAMP}
+- COMMAND ${CMAKE_COMMAND} --build . --config $<CONFIG>
+- WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/protobuf
+- COMMENT "Building protobuf using configuration: $<CONFIG>"
+- )
+-endif()
+-
+-add_custom_target(build_protobuf
+- DEPENDS ${PROTOBUF_BUILD_STAMP}
+-)
+-
+-add_dependencies(protobuf build_protobuf)
+-add_dependencies(protobuf-lite build_protobuf)
+-add_dependencies(pb_protoc build_protobuf)
++#SET(Protobuf_USE_STATIC_LIBS ON)
++find_package(Protobuf REQUIRED)
+
+ #
+ # Choice between full and lite version of the library.
+diff -aurN a/cdk/protocol/mysqlx/crud.cc b/cdk/protocol/mysqlx/crud.cc
+--- a/cdk/protocol/mysqlx/crud.cc 2018-04-08 15:10:57.000000000 -0400
++++ b/cdk/protocol/mysqlx/crud.cc 2018-04-20 11:22:22.398040489 -0400
+@@ -295,7 +295,7 @@
+ class Placeholder_conv_imp
+ : public Args_conv
+ {
+- map<string, unsigned> m_map;
++ std::map<string, unsigned> m_map;
+
+ public:
+
+@@ -303,7 +303,7 @@
+
+ unsigned conv_placeholder(const string &name)
+ {
+- map<string, unsigned>::const_iterator it = m_map.find(name);
++ std::map<string, unsigned>::const_iterator it = m_map.find(name);
+ if (it == m_map.end())
+ throw_error("Placeholder converter: Placeholder was not defined on args");
+ //throw Generic_error((boost::format("Placeholder %s was not defined on args.")
+@@ -314,7 +314,7 @@
+
+ void add_placeholder(const string &name)
+ {
+- map<string, unsigned>::const_iterator it = m_map.find(name);
++ std::map<string, unsigned>::const_iterator it = m_map.find(name);
+ if (it != m_map.end())
+ throw_error("Placeholder converter: Redefined placeholder");
+ //throw Generic_error((boost::format("Redifined placeholder %s.")
+diff -aurN a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt 2018-04-20 14:15:00.546645410 -0400
++++ b/CMakeLists.txt 2018-04-20 13:26:16.888470928 -0400
+@@ -529,7 +529,7 @@
+
+
+ install(TARGETS connector
+- CONFIGURATIONS Release RelWithDebInfo
++ CONFIGURATIONS Release RelWithDebInfo Gentoo
+ ARCHIVE DESTINATION "${INSTALL_LIB_DIR_STATIC}"
+ RUNTIME DESTINATION "${INSTALL_LIB_DIR}"
+ LIBRARY DESTINATION "${INSTALL_LIB_DIR}"
+@@ -576,6 +576,12 @@
+ SET_INTERFACE_OPTIONS(try devapi)
+ # ADD_GCOV(try)
+
++IF(WITH_SSL STREQUAL "system")
++ find_package(OpenSSL REQUIRED)
++ TARGET_LINK_LIBRARIES(try ${OPENSSL_LIBRARIES})
++ENDIF()
++
++
+ if(WITH_JDBC)
+
+ add_executable(try_jdbc try_jdbc.cc)
+--- a/jdbc.cmake 2018-04-08 15:10:57.000000000 -0400
++++ b/jdbc.cmake 2018-04-20 15:03:38.683674143 -0400
+@@ -20,7 +20,7 @@
+ # Configure legacy connector build environment in ${JDBC_DIR}
+ #
+
+-list(APPEND jdbc_cmake_opts -DMYSQLCLIENT_STATIC_LINKING=ON)
++list(APPEND jdbc_cmake_opts -DMYSQLCLIENT_STATIC_LINKING=OFF)
+
+ if(CMAKE_BUILD_TYPE)
+ list(APPEND jdbc_cmake_opts -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
+--- /var/tmp/portage/dev-db/mysql-connector-c++-8.0.11/work/mysql-connector-c++-8.0.11-src/jdbc/FindMySQL.cmake 2018-02-23 05:47:56.000000000 -0500
++++ mysql-connector-c++-8.0.11-src/jdbc/FindMySQL.cmake 2018-04-20 15:13:42.204665429 -0400
+@@ -832,9 +832,11 @@
+ IF(NOT WIN32)
+ _mysql_conf(MYSQL_COMPILER_VERSION "")
+ STRING(REGEX MATCH "Compiler:[a-zA-Z0-9\\. ]+" MYSQL_COMPILER_VERSION ${MYSQL_COMPILER_VERSION})
++IF(MYSQL_COMPILER_VERSION)
+ STRING(REGEX REPLACE "Compiler: " "" MYSQL_COMPILER_VERSION ${MYSQL_COMPILER_VERSION})
+ STRING(REGEX MATCH "[a-zA-Z0-9]+" MYSQL_COMPILER_ID ${MYSQL_COMPILER_VERSION})
+ STRING(REGEX REPLACE "[a-zA-Z0-9]+ " "" MYSQL_COMPILER_VERSION ${MYSQL_COMPILER_VERSION})
++ENDIF(MYSQL_COMPILER_VERSION)
+ ENDIF(NOT WIN32)
+
+ ##########################################################################
diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.3-fix-cmake.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.3-fix-cmake.patch
new file mode 100644
index 000000000000..5f0669ca3381
--- /dev/null
+++ b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.3-fix-cmake.patch
@@ -0,0 +1,123 @@
+--- a/CMakeLists.txt 2014-05-04 21:27:59.000000000 -0400
++++ b/CMakeLists.txt 2014-05-04 21:47:31.460572470 -0400
+@@ -38,7 +38,7 @@
+
+ if(COMMAND cmake_policy AND POLICY CMP0015)
+ cmake_policy(SET CMP0015 NEW)
+-endif(COMMAND cmake_policy)
++endif(COMMAND cmake_policy AND POLICY CMP0015)
+
+ #-----------------
+ # CPPFLAGS, CXXFLAGS and LDFLAGS from the environment
+@@ -258,14 +258,14 @@
+ ${CPACK_RESOURCE_FILE_LICENSE}
+ "${CMAKE_SOURCE_DIR}/Licenses_for_Third-Party_Components.txt"
+ "${CMAKE_SOURCE_DIR}/ANNOUNCEMENT"
+- DESTINATION "." OPTIONAL)
++ DESTINATION "${INSTALL_DOCS}" OPTIONAL)
+
+ SET(COMMON_IGNORE_FILES "/CMakeFiles/" "/Testing/" "/.bzr/" "_CPack_Packages/"
+ ".cmake$" "~" ".swp" ".log" ".gz" ".directory$" "CMakeCache.txt" "Makefile"
+ "install_manifest.txt")
+ SET(PRJ_COMMON_IGNORE_FILES ${COMMON_IGNORE_FILES} "ANNOUNCEMENT_102_ALPHA" "ANNOUNCEMENT_103_ALPHA" "ANNOUNCEMENT_104_BETA" "ANNOUNCEMENT_105_GA" "ANNOUNCEMENT_110_GA" "ANNOUNCEMENT_111_GA" "ANNOUNCEMENT_DRAFT" )
+
+-SET(CPACK_SOURCE_IGNORE_FILES ${PRJ_COMMON_IGNORE_FILES} "./cppconn/config.h$" "./driver/nativeapi/binding_config.h$")
++SET(CPACK_SOURCE_IGNORE_FILES ${PRJ_COMMON_IGNORE_FILES} "${CMAKE_CURRENT_SOURCE_DIR}/cppconn/config.h$" "${CMAKE_CURRENT_SOURCE_DIR}/driver/nativeapi/binding_config.h$")
+ SET(CPACK_PACKAGE_IGNORE_FILES ${PRJ_COMMON_IGNORE_FILES} "something_there" )
+ SET(CPACK_SOURCE_GENERATOR "TGZ")
+
+@@ -292,10 +292,6 @@
+ ADD_SUBDIRECTORY(cppconn)
+ ADD_SUBDIRECTORY(driver)
+ ADD_SUBDIRECTORY(examples)
+-ADD_SUBDIRECTORY(test)
+-ADD_SUBDIRECTORY(test/framework)
+-ADD_SUBDIRECTORY(test/CJUnitTestsPort)
+-ADD_SUBDIRECTORY(test/unit)
+
+ IF(DEFINED CMAKE_SYSTEM_NAME AND ${CMAKE_SYSTEM_NAME} STREQUAL "SunOS")
+ # see also README
+--- a/FindMySQL.cm 2014-05-04 22:20:50.000000000 -0400
++++ b/FindMySQL.cm 2014-05-04 22:21:40.325384447 -0400
+@@ -58,7 +58,7 @@
+ EXECUTE_PROCESS(COMMAND ${MYSQL_CONFIG_EXECUTABLE} "--cflags"
+ OUTPUT_VARIABLE _mysql_config_output
+ )
+- STRING(REGEX MATCHALL "-m([^\r\n]+)" MYSQL_LINK_FLAGS "${_mysql_config_output}")
++ STRING(REGEX MATCHALL " -m([^\r\n]+)" MYSQL_LINK_FLAGS "${_mysql_config_output}")
+ STRING(REGEX REPLACE "[\r\n]$" "" MYSQL_CXXFLAGS "${_mysql_config_output}")
+ # ADD_DEFINITIONS("${MYSQL_CXXFLAGS}")
+ ELSE (MYSQL_CONFIG_EXECUTABLE AND NOT WIN32)
+diff -urN a/cppconn/CMakeLists.txt b/cppconn/CMakeLists.txt
+--- a/cppconn/CMakeLists.txt 2011-07-30 13:15:44.000000000 +0200
++++ b/cppconn/CMakeLists.txt 2011-07-30 14:10:34.000000000 +0200
+@@ -55,7 +55,7 @@
+
+ SET(MYSQLCPPCONN_INSTALL_HEADERS
+ build_config.h
+- config.h
++ ${CMAKE_CURRENT_BINARY_DIR}/config.h
+ connection.h
+ datatype.h
+ driver.h
+diff -urN mysql-connector-c++-1.1.0.old/driver/CMakeLists.txt mysql-connector-c++-1.1.0/driver/CMakeLists.txt
+--- a/driver/CMakeLists.txt 2011-07-30 13:15:44.000000000 +0200
++++ b/driver/CMakeLists.txt 2011-07-30 13:20:36.000000000 +0200
+@@ -26,6 +26,9 @@
+
+ INCLUDE_DIRECTORIES(${MYSQLCPPCONN_SOURCE_DIR})
+ INCLUDE_DIRECTORIES(${MYSQLCPPCONN_SOURCE_DIR}/cppconn)
++INCLUDE_DIRECTORIES(${MYSQLCPPCONN_BINARY_DIR})
++INCLUDE_DIRECTORIES(${MYSQLCPPCONN_BINARY_DIR}/cppconn)
++INCLUDE_DIRECTORIES(${MYSQLCPPCONN_BINARY_DIR}/driver/nativeapi)
+ INCLUDE_DIRECTORIES(${MYSQLCPPCONN_BOOST_INCLUDE_DIRS})
+ MESSAGE(STATUS "BOOST_INCLUDE_DIRS=${MYSQLCPPCONN_BOOST_INCLUDE_DIRS}")
+
+@@ -149,20 +152,22 @@
+ nativeapi/native_statement_wrapper.h
+ nativeapi/mysql_native_resultset_wrapper.h
+ nativeapi/native_resultset_wrapper.h
+- ../cppconn/warning.h
+- ../cppconn/statement.h
+- ../cppconn/sqlstring.h
+- ../cppconn/resultset_metadata.h
+- ../cppconn/resultset.h
+- ../cppconn/prepared_statement.h
+- ../cppconn/parameter_metadata.h
+- ../cppconn/metadata.h
+- ../cppconn/exception.h
+- ../cppconn/driver.h
+- ../cppconn/datatype.h
+- ../cppconn/connection.h
+- ../cppconn/config.h
+- ../cppconn/build_config.h
++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/warning.h
++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/statement.h
++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/sqlstring.h
++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/resultset_metadata.h
++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/resultset.h
++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/prepared_statement.h
++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/parameter_metadata.h
++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/metadata.h
++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/exception.h
++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/driver.h
++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/datatype.h
++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/connection.h
++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/config.h
++ ${CMAKE_CURRENT_BINARY_DIR}/cppconn/config.h
++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/build_config.h
++ ${CMAKE_CURRENT_BINARY_DIR}/cppconn/build_config.h
+
+ )
+
+@@ -271,8 +276,8 @@
+ )
+ ELSE(WIN32)
+ INSTALL(TARGETS mysqlcppconn mysqlcppconn-static
+- LIBRARY DESTINATION lib
+- ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib${LIB_SUFFIX}
++ ARCHIVE DESTINATION lib${LIB_SUFFIX}
+ )
+ ENDIF(WIN32)
+
diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.5-fix-mariadb.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.5-fix-mariadb.patch
new file mode 100644
index 000000000000..fa36e3bad936
--- /dev/null
+++ b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.5-fix-mariadb.patch
@@ -0,0 +1,45 @@
+diff -aruN a/driver/nativeapi/libmysql_static_proxy.cpp b/driver/nativeapi/libmysql_static_proxy.cpp
+--- a/driver/nativeapi/libmysql_static_proxy.cpp 2014-11-19 08:37:11.000000000 -0500
++++ b/driver/nativeapi/libmysql_static_proxy.cpp 2015-02-21 22:19:50.119234140 -0500
+@@ -319,7 +319,7 @@
+ int
+ LibmysqlStaticProxy::get_option(MYSQL * mysql, enum mysql_option option, const void *arg)
+ {
+-#if MYSQL_VERSION_ID >= 50703
++#if MYSQL_VERSION_ID >= 50703 && !defined( MARIADB_BASE_VERSION )
+ if (::mysql_get_option(mysql, option, arg)) {
+ throw sql::InvalidArgumentException("Unsupported option provided to mysql_get_option()");
+ } else {
+diff -aruN a/driver/mysql_connection.cpp b/driver/mysql_connection.cpp
+--- a/driver/mysql_connection.cpp 2014-11-19 08:37:11.000000000 -0500
++++ b/driver/mysql_connection.cpp 2015-02-21 22:28:48.920210376 -0500
+@@ -1015,6 +1015,7 @@
+ MY_CHARSET_INFO cs;
+ proxy->get_character_set_info(&cs);
+ *(static_cast<int *>(optionValue)) = cs.mbmaxlen;
++#ifndef MARIADB_BASE_VERSION
+ /* mysql_get_option() was added in mysql 5.7.3 version */
+ } else if ( proxy->get_server_version() >= 50703 ) {
+ try {
+@@ -1029,6 +1030,7 @@
+ CPP_ERR_FMT("Unsupported option : %d:(%s) %s", proxy->errNo(), proxy->sqlstate().c_str(), proxy->error().c_str());
+ throw e;
+ }
++#endif /* MARIADB_BASE_VERSION */
+ }
+ }
+ /* }}} */
+@@ -1046,11 +1048,13 @@
+ MY_CHARSET_INFO cs;
+ proxy->get_character_set_info(&cs);
+ return cs.dir ? sql::SQLString(cs.dir) : "";
++#ifndef MARIADB_BASE_VERSION
+ } else if ( proxy->get_server_version() >= 50703 ) {
+ const char* optionValue= NULL;
+ if (GET_CONN_OPTION(optionName, &optionValue, stringOptions)) {
+ return optionValue ? sql::SQLString(optionValue) : "";
+ }
++#endif /* MARIADB_BASE_VERSION */
+ }
+ return "";
+ }
diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.6-fix-cmake.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.6-fix-cmake.patch
new file mode 100644
index 000000000000..18d4e9a80410
--- /dev/null
+++ b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.6-fix-cmake.patch
@@ -0,0 +1,23 @@
+diff -aurN a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt 2015-06-04 08:58:30.000000000 -0400
++++ b/CMakeLists.txt 2015-07-21 10:41:59.081091000 -0400
+@@ -300,7 +300,7 @@
+ SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}")
+ ENDIF(WIN32)
+
+-SET(DOC_DESTINATION ".")
++SET(DOC_DESTINATION ${INSTALL_DOCS})
+ IF(RPM_LAYOUT)
+ SET(DOC_DESTINATION "share/doc/${CPACK_PACKAGE_NAME}-${MYSQLCPPCONN_VERSION}")
+ ENDIF()
+@@ -373,10 +373,6 @@
+ ADD_SUBDIRECTORY(cppconn)
+ ADD_SUBDIRECTORY(driver)
+ ADD_SUBDIRECTORY(examples)
+-ADD_SUBDIRECTORY(test)
+-ADD_SUBDIRECTORY(test/framework)
+-ADD_SUBDIRECTORY(test/CJUnitTestsPort)
+-ADD_SUBDIRECTORY(test/unit)
+
+ IF(DEFINED CMAKE_SYSTEM_NAME AND ${CMAKE_SYSTEM_NAME} STREQUAL "SunOS")
+ # see also README
diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.8-fix-mariadb.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.8-fix-mariadb.patch
new file mode 100644
index 000000000000..35ed218e18dc
--- /dev/null
+++ b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.8-fix-mariadb.patch
@@ -0,0 +1,45 @@
+diff -aurN a/driver/mysql_connection.cpp b/driver/mysql_connection.cpp
+--- a/driver/mysql_connection.cpp 2016-12-14 04:58:54.000000000 -0500
++++ b/driver/mysql_connection.cpp 2017-01-26 16:33:58.086005627 -0500
+@@ -1023,6 +1023,7 @@
+ proxy->get_character_set_info(&cs);
+ *(static_cast<int *>(optionValue)) = cs.mbmaxlen;
+ /* mysql_get_option() was added in mysql 5.7.3 version */
++#if !defined( MARIADB_BASE_VERSION ) && !defined ( MARIADB_VERSION_ID )
+ } else if ( proxy->get_server_version() >= 50703 ) {
+ try {
+ if (GET_CONN_OPTION(optionName, optionValue, intOptions)) {
+@@ -1036,6 +1037,7 @@
+ CPP_ERR_FMT("Unsupported option : %d:(%s) %s", proxy->errNo(), proxy->sqlstate().c_str(), proxy->error().c_str());
+ throw e;
+ }
++#endif
+ }
+ }
+ /* }}} */
+@@ -1053,11 +1055,13 @@
+ MY_CHARSET_INFO cs;
+ proxy->get_character_set_info(&cs);
+ return cs.dir ? sql::SQLString(cs.dir) : "";
++#if !defined( MARIADB_BASE_VERSION ) && !defined ( MARIADB_VERSION_ID )
+ } else if ( proxy->get_server_version() >= 50703 ) {
+ const char* optionValue= NULL;
+ if (GET_CONN_OPTION(optionName, &optionValue, stringOptions)) {
+ return optionValue ? sql::SQLString(optionValue) : "";
+ }
++#endif
+ }
+ return "";
+ }
+diff -aurN a/driver/nativeapi/libmysql_static_proxy.cpp b/driver/nativeapi/libmysql_static_proxy.cpp
+--- a/driver/nativeapi/libmysql_static_proxy.cpp 2017-01-26 16:35:46.256038741 -0500
++++ b/driver/nativeapi/libmysql_static_proxy.cpp 2017-01-26 16:28:34.114915809 -0500
+@@ -319,7 +319,7 @@
+ int
+ LibmysqlStaticProxy::get_option(MYSQL * mysql, enum mysql_option option, const void *arg)
+ {
+-#if MYSQL_VERSION_ID >= 50703
++#if MYSQL_VERSION_ID >= 50703 && !defined( MARIADB_BASE_VERSION ) && !defined ( MARIADB_VERSION_ID )
+ if (::mysql_get_option(mysql, option, arg)) {
+ throw sql::InvalidArgumentException("Unsupported option provided to mysql_get_option()");
+ } else {
diff --git a/dev-db/mysql-connector-c++/metadata.xml b/dev-db/mysql-connector-c++/metadata.xml
new file mode 100644
index 000000000000..7b402c140aa3
--- /dev/null
+++ b/dev-db/mysql-connector-c++/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<use>
+ <flag name="gcov">Build coverage support</flag>
+ <flag name="legacy">Build the legacy 1.x API as well as the DevX API</flag>
+</use>
+<maintainer type="project">
+ <email>mysql-bugs@gentoo.org</email>
+ <name>MySQL</name>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.3.ebuild b/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.3.ebuild
new file mode 100644
index 000000000000..ecc91680b59b
--- /dev/null
+++ b/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.3.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils cmake-utils flag-o-matic multilib
+
+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}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm ppc ppc64 sparc x86"
+IUSE="debug examples gcov static-libs"
+
+DEPEND=">=virtual/mysql-5.1:=
+ dev-libs/boost:0=
+ dev-libs/openssl:0="
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.1.3-fix-cmake.patch"
+)
+
+src_configure() {
+ # native lib/wrapper needs this!
+ append-flags "-fno-strict-aliasing"
+
+ local mycmakeargs=(
+ "-DMYSQLCPPCONN_BUILD_EXAMPLES=OFF"
+ "-DMYSQLCPPCONN_ICU_ENABLE=OFF"
+ $(cmake-utils_use debug MYSQLCPPCONN_TRACE_ENABLE)
+ $(cmake-utils_use gcov MYSQLCPPCONN_GCOV_ENABLE)
+ -DINSTALL_DOCS="/usr/share/doc/${PF}"
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ # static lib has wrong name so we need to rename it
+ if use static-libs; then
+ mv "${ED}"/usr/$(get_libdir)/libmysqlcppconn-static.a \
+ "${ED}"/usr/$(get_libdir)/libmysqlcppconn.a || die
+ else
+ rm -f "${ED}"/usr/$(get_libdir)/libmysqlcppconn-static.a
+ fi
+
+ # examples
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins "${S}"/examples/*
+ fi
+}
diff --git a/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.6.ebuild b/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.6.ebuild
new file mode 100644
index 000000000000..da199d2a86e5
--- /dev/null
+++ b/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.6.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils cmake-utils flag-o-matic multilib
+
+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}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm ppc ppc64 sparc x86"
+IUSE="debug examples gcov static-libs"
+
+DEPEND="virtual/libmysqlclient:=
+ dev-libs/boost:=
+ dev-libs/openssl:0="
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.1.6-fix-cmake.patch"
+ "${FILESDIR}/${PN}-1.1.5-fix-mariadb.patch"
+)
+
+src_configure() {
+ # native lib/wrapper needs this!
+ append-flags "-fno-strict-aliasing"
+
+ local mycmakeargs=(
+ -DMYSQLCPPCONN_BUILD_EXAMPLES=OFF
+ -DMYSQLCPPCONN_ICU_ENABLE=OFF
+ $(cmake-utils_use debug MYSQLCPPCONN_TRACE_ENABLE)
+ $(cmake-utils_use gcov MYSQLCPPCONN_GCOV_ENABLE)
+ -DINSTALL_DOCS="/usr/share/doc/${PF}"
+ -DMYSQL_CXX_LINKAGE=0
+ -DMYSQL_INCLUDE_DIR=$(mysql_config --variable=pkgincludedir)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ # static lib has wrong name so we need to rename it
+ if use static-libs; then
+ mv "${ED}"/usr/$(get_libdir)/libmysqlcppconn-static.a \
+ "${ED}"/usr/$(get_libdir)/libmysqlcppconn.a || die
+ else
+ rm -f "${ED}"/usr/$(get_libdir)/libmysqlcppconn-static.a
+ fi
+
+ # examples
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins "${S}"/examples/*
+ fi
+}
diff --git a/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.8.ebuild b/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.8.ebuild
new file mode 100644
index 000000000000..9601a542da48
--- /dev/null
+++ b/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.8.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils flag-o-matic
+
+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}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86"
+IUSE="debug examples gcov static-libs"
+
+DEPEND="virtual/libmysqlclient:=
+ dev-libs/boost:=
+ dev-libs/openssl:0=
+ !<dev-db/mysql-connector-c-6.1.8"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.1.6-fix-cmake.patch"
+ "${FILESDIR}/${PN}-1.1.8-fix-mariadb.patch"
+)
+
+src_configure() {
+ # native lib/wrapper needs this!
+ append-flags "-fno-strict-aliasing"
+
+ local mycmakeargs=(
+ -DMYSQLCPPCONN_BUILD_EXAMPLES=OFF
+ -DMYSQLCPPCONN_ICU_ENABLE=OFF
+ -DUSE_MYSQLCPPCONN_TRACE_ENABLE=$(usex debug ON OFF)
+ -DUSE_MYSQLCPPCONN_GCOV_ENABLE=$(usex gcov ON OFF)
+ -DINSTALL_DOCS="/usr/share/doc/${PF}"
+ -DMYSQL_CXX_LINKAGE=0
+ -DMYSQL_INCLUDE_DIR=$(mysql_config --variable=pkgincludedir)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ # static lib has wrong name so we need to rename it
+ if use static-libs; then
+ mv "${ED}"/usr/$(get_libdir)/libmysqlcppconn-static.a \
+ "${ED}"/usr/$(get_libdir)/libmysqlcppconn.a || die
+ else
+ rm -f "${ED}"/usr/$(get_libdir)/libmysqlcppconn-static.a
+ fi
+
+ # examples
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins "${S}"/examples/*
+ fi
+}
diff --git a/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.9.ebuild b/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.9.ebuild
new file mode 100644
index 000000000000..46c7c09d0496
--- /dev/null
+++ b/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.9.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils flag-o-matic
+
+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}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~arm64 ~ppc ppc64 ~sparc x86"
+IUSE="debug examples gcov static-libs"
+
+DEPEND="virtual/libmysqlclient:=
+ dev-libs/boost:=
+ dev-libs/openssl:0=
+ !<dev-db/mysql-connector-c-6.1.8"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.1.6-fix-cmake.patch"
+ "${FILESDIR}/${PN}-1.1.8-fix-mariadb.patch"
+)
+
+src_configure() {
+ # native lib/wrapper needs this!
+ append-flags "-fno-strict-aliasing"
+
+ local mycmakeargs=(
+ -DMYSQLCPPCONN_BUILD_EXAMPLES=OFF
+ -DMYSQLCPPCONN_ICU_ENABLE=OFF
+ -DUSE_MYSQLCPPCONN_TRACE_ENABLE=$(usex debug ON OFF)
+ -DUSE_MYSQLCPPCONN_GCOV_ENABLE=$(usex gcov ON OFF)
+ -DINSTALL_DOCS="/usr/share/doc/${PF}"
+ -DMYSQL_CXX_LINKAGE=0
+ -DMYSQL_INCLUDE_DIR=$(mysql_config --variable=pkgincludedir)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ # static lib has wrong name so we need to rename it
+ if use static-libs; then
+ mv "${ED}"/usr/$(get_libdir)/libmysqlcppconn-static.a \
+ "${ED}"/usr/$(get_libdir)/libmysqlcppconn.a || die
+ else
+ rm -f "${ED}"/usr/$(get_libdir)/libmysqlcppconn-static.a
+ fi
+
+ # examples
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins "${S}"/examples/*
+ fi
+}
diff --git a/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.11.ebuild b/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.11.ebuild
new file mode 100644
index 000000000000..ddae008cc97a
--- /dev/null
+++ b/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.11.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+CMAKE_MAKEFILE_GENERATOR=emake
+inherit cmake-utils
+
+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="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="+legacy"
+
+RDEPEND="
+ dev-libs/openssl:0=
+ dev-libs/protobuf:=
+ legacy? ( dev-libs/boost:=
+ >=dev-db/mysql-connector-c-6.1.8:= )"
+DEPEND="${RDEPEND}"
+S="${WORKDIR}/${P}-src"
+
+PATCHES=(
+ "${FILESDIR}/8.0.11-fix-build.patch"
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DWITH_SSL=system
+ -DWITH_JDBC=$(usex legacy ON OFF)
+ )
+
+ cmake-utils_src_configure
+}
diff --git a/dev-db/mysql-connector-c-6.1.11 b/dev-db/mysql-connector-c-6.1.11
deleted file mode 100644
index 47b1564517dc..000000000000
--- a/dev-db/mysql-connector-c-6.1.11
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare test
-DEPEND=sys-libs/zlib:=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ssl? ( dev-libs/openssl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=C client library for MariaDB/MySQL
-EAPI=6
-HOMEPAGE=https://dev.mysql.com/downloads/connector/c/
-IUSE=+ssl static-libs abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~sparc ~x86
-LICENSE=GPL-2
-RDEPEND=sys-libs/zlib:=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ssl? ( dev-libs/openssl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) !dev-db/mysql[client-libs(+)] !dev-db/mysql-cluster[client-libs(+)] !dev-db/mariadb[client-libs(+)] !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mariadb-galera[client-libs(+)] !dev-db/percona-server[client-libs(+)]
-SLOT=0/18
-SRC_URI=https://dev.mysql.com/get/Downloads/Connector-C/mysql-connector-c-6.1.11-src.tar.gz
-_eclasses_=cmake-multilib 7bc2cc09a4a5082b915541d447be8e5e cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=06246503d50f35295e829a06e1196fea
diff --git a/dev-db/mysql-connector-c-6.1.11-r1 b/dev-db/mysql-connector-c-6.1.11-r1
deleted file mode 100644
index 516f4c119dbe..000000000000
--- a/dev-db/mysql-connector-c-6.1.11-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare test
-DEPEND=sys-libs/zlib:=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ssl? ( libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) !libressl? ( dev-libs/openssl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) ) sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=C client library for MariaDB/MySQL
-EAPI=6
-HOMEPAGE=https://dev.mysql.com/downloads/connector/c/
-IUSE=libressl +ssl static-libs abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=alpha amd64 arm ~arm64 ~hppa ia64 ~mips ppc ppc64 ~s390 ~sparc x86
-LICENSE=GPL-2
-RDEPEND=sys-libs/zlib:=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ssl? ( libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) !libressl? ( dev-libs/openssl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) ) !dev-db/mysql[client-libs(+)] !dev-db/mysql-cluster[client-libs(+)] !dev-db/mariadb[client-libs(+)] !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mariadb-galera[client-libs(+)] !dev-db/percona-server[client-libs(+)]
-SLOT=0/18
-SRC_URI=https://dev.mysql.com/get/Downloads/Connector-C/mysql-connector-c-6.1.11-src.tar.gz
-_eclasses_=cmake-multilib 7bc2cc09a4a5082b915541d447be8e5e cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=d25cc4d6efc93576090b810a6d74e0e7
diff --git a/dev-db/mysql-connector-c/Manifest b/dev-db/mysql-connector-c/Manifest
new file mode 100644
index 000000000000..6f7189fb0b1b
--- /dev/null
+++ b/dev-db/mysql-connector-c/Manifest
@@ -0,0 +1,7 @@
+AUX 20028_all_mysql-5.6-gcc7.patch 603 BLAKE2B f03dc2e39dca4496cc084b427daa60014464876df456bf290a5de3431b481691a35ac9ac00d71cc86931efe3bca70dae012bedefc6d29ad7fec2feeb07cce014 SHA512 f9dab813418f38f3a877b8672cdec153d6f0f289144c35277e8275cc7a58195f974b7bf76b74f8dd2403643b1199f5e6d6bcde661ce5f79f614ff10347b52278
+AUX 6.1.11-openssl-1.1.patch 8528 BLAKE2B ed5c1d7455cbf5deeaa6a5badb1df665244c93222dccdf66f1121fb454fb13e2237b508f418ded84bf2dc99bce90281c95f351444f2f1593966a87aad154cfa9 SHA512 db9d1134ab2181bb78a00c0a3d22753d6bffe1b41e6b794d60af768021921573fc5061774d4ad654471f647e055e27ff36b40b4a5cc7c986d0d7837b6bd037e9
+AUX mysql_com.patch 1787 BLAKE2B 4fbd40325f400586926072927b3f07231d577f18c1e30951c34c36ded9b9e42b7c3dc47ca51df974265c28b40116e30274d8a73d6a843e5d9d0074430bc17b08 SHA512 340365b05d72045af0ef12fd5c260a796be547d9abb97a6ef3d6aaf30aecf29368c1dfa28f1284da544a81656f0436f11ada2f8c5cb481540d1f1c90dd354b49
+DIST mysql-connector-c-6.1.11-src.tar.gz 3489345 BLAKE2B 813512520ef660521221565a4466e81d902629d0ee731f746b68eed2b9129ea8361fcabe184537ec8ba91aed5a4b02dfb3450b36524c2e98f81fba148eee0cf1 SHA512 271395c888a93b833e0bbe1840b9987ecdb37d0f1cf89904207cc9aa99ed32e538aee8c9529ff39b6533947159776a8f5aa079da86ed51b1d26b086f4ffdd7c6
+EBUILD mysql-connector-c-6.1.11-r1.ebuild 2512 BLAKE2B 32d140f23e94ffbea15904aa2521e0254e51ac9f4eb0210023e343e0781282a822ab03fe923f37164bd21c94616bb7dca3725df436bd26bfc2d187ac9a680ecf SHA512 a47f7b83193220d858d0b3495233f04071c2ec62eb588c1ee2d5b884ccff217a74713f7e5fef953d472a9d8ce6f4cf9661aab092a3ecb776fcde1da46cd65f16
+EBUILD mysql-connector-c-6.1.11.ebuild 2226 BLAKE2B 67e1bf0d967f086f0946c8afc77827563ff9b2853a280af7bdaba51ffa7af803aad7241e44ba87e9aa72742e569212dc73be317660bbc11725e7fdb39609bbd0 SHA512 4967df77d63a9cc3a3628628d8ad840b6759bb6952a8cf55e6237bed1b35b7f68b10b22ab0994d28169fc433b85b99bed2e1f82b0a24420ff97f5d9e565afdd2
+MISC metadata.xml 239 BLAKE2B c4d6706d083b72927d239f41a644a4009c054c1c1a388af7733d3a2daf47d354009eb472573304a6be272601f05535297bcd9ceaea811a741cd905577ffe53d1 SHA512 e6e2fafe2f503db1d12e3d2368a99631ee8d014b7ea802d9879e7e3e2c0f9378675fffccd78ed09b914ae781ac3902567b1a53a721906e3ea63ceb51d0a1654b
diff --git a/dev-db/mysql-connector-c/files/20028_all_mysql-5.6-gcc7.patch b/dev-db/mysql-connector-c/files/20028_all_mysql-5.6-gcc7.patch
new file mode 100644
index 000000000000..cf8caedb7f1b
--- /dev/null
+++ b/dev-db/mysql-connector-c/files/20028_all_mysql-5.6-gcc7.patch
@@ -0,0 +1,13 @@
+diff --git a/sql-common/client_authentication.cc b/sql-common/client_authentication.cc
+index eaeb2d4..035ecd2 100644
+--- a/sql-common/client_authentication.cc
++++ b/sql-common/client_authentication.cc
+@@ -84,7 +84,7 @@ RSA *rsa_init(MYSQL *mysql)
+
+ if (mysql->options.extension != NULL &&
+ mysql->options.extension->server_public_key_path != NULL &&
+- mysql->options.extension->server_public_key_path != '\0')
++ mysql->options.extension->server_public_key_path[0] != '\0')
+ {
+ pub_key_file= fopen(mysql->options.extension->server_public_key_path,
+ "r");
diff --git a/dev-db/mysql-connector-c/files/6.1.11-openssl-1.1.patch b/dev-db/mysql-connector-c/files/6.1.11-openssl-1.1.patch
new file mode 100644
index 000000000000..cbca14de60b6
--- /dev/null
+++ b/dev-db/mysql-connector-c/files/6.1.11-openssl-1.1.patch
@@ -0,0 +1,287 @@
+From 7961393dd45e4ad1cdc7544b4bba2e98a5d2760c Mon Sep 17 00:00:00 2001
+From: eroen <eroen@occam.eroen.eu>
+Date: Fri, 20 Jan 2017 14:43:53 +0100
+Subject: [PATCH] Don't use deprecated API with openssl 1.1
+
+If openssl 1.1.0 is built with `--api=1.1 disable-deprecated`, using
+deprecated APIs causes build errors.
+
+X-Gentoo-Bug: 606600
+X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=606600
+---
+ mysys_ssl/my_aes_openssl.cc | 54 ++++++++++++++++++++++++++++++++-------------
+ sql-common/client.c | 16 ++++++++++++--
+ vio/viossl.c | 8 +++++++
+ vio/viosslfactories.c | 23 +++++++++++++++++++
+ 4 files changed, 84 insertions(+), 17 deletions(-)
+
+diff --git a/mysys_ssl/my_aes_openssl.cc b/mysys_ssl/my_aes_openssl.cc
+index 261ba8a..59a95e3 100644
+--- a/mysys_ssl/my_aes_openssl.cc
++++ b/mysys_ssl/my_aes_openssl.cc
+@@ -22,6 +22,12 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+ #include <openssl/evp.h>
+ #include <openssl/err.h>
+ #include <openssl/bio.h>
++#include <openssl/opensslv.h>
++
++#if (defined LIBRESSL_VERSION_NUMBER && OPENSSL_VERSION_NUMBER == 0x20000000L)
++#undef OPENSSL_VERSION_NUMBER
++#define OPENSSL_VERSION_NUMBER 0x1000107fL
++#endif
+
+ /*
+ xplugin needs BIO_new_bio_pair, but the server does not.
+@@ -122,7 +128,7 @@ int my_aes_encrypt(const unsigned char *source, uint32 source_length,
+ enum my_aes_opmode mode, const unsigned char *iv,
+ bool padding)
+ {
+- EVP_CIPHER_CTX ctx;
++ EVP_CIPHER_CTX *ctx;
+ const EVP_CIPHER *cipher= aes_evp_type(mode);
+ int u_len, f_len;
+ /* The real key to be used for encryption */
+@@ -132,23 +138,31 @@ int my_aes_encrypt(const unsigned char *source, uint32 source_length,
+ if (!cipher || (EVP_CIPHER_iv_length(cipher) > 0 && !iv))
+ return MY_AES_BAD_DATA;
+
+- if (!EVP_EncryptInit(&ctx, cipher, rkey, iv))
++ if (!EVP_EncryptInit(ctx, cipher, rkey, iv))
+ goto aes_error; /* Error */
+- if (!EVP_CIPHER_CTX_set_padding(&ctx, padding))
++ if (!EVP_CIPHER_CTX_set_padding(ctx, padding))
+ goto aes_error; /* Error */
+- if (!EVP_EncryptUpdate(&ctx, dest, &u_len, source, source_length))
++ if (!EVP_EncryptUpdate(ctx, dest, &u_len, source, source_length))
+ goto aes_error; /* Error */
+
+- if (!EVP_EncryptFinal(&ctx, dest + u_len, &f_len))
++ if (!EVP_EncryptFinal(ctx, dest + u_len, &f_len))
+ goto aes_error; /* Error */
+
+- EVP_CIPHER_CTX_cleanup(&ctx);
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++ EVP_CIPHER_CTX_cleanup(ctx);
++#else
++ EVP_CIPHER_CTX_free(ctx);
++#endif
+ return u_len + f_len;
+
+ aes_error:
+ /* need to explicitly clean up the error if we want to ignore it */
+ ERR_clear_error();
+- EVP_CIPHER_CTX_cleanup(&ctx);
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++ EVP_CIPHER_CTX_cleanup(ctx);
++#else
++ EVP_CIPHER_CTX_free(ctx);
++#endif
+ return MY_AES_BAD_DATA;
+ }
+
+@@ -159,7 +173,7 @@ int my_aes_decrypt(const unsigned char *source, uint32 source_length,
+ bool padding)
+ {
+
+- EVP_CIPHER_CTX ctx;
++ EVP_CIPHER_CTX *ctx;
+ const EVP_CIPHER *cipher= aes_evp_type(mode);
+ int u_len, f_len;
+
+@@ -170,24 +184,34 @@ int my_aes_decrypt(const unsigned char *source, uint32 source_length,
+ if (!cipher || (EVP_CIPHER_iv_length(cipher) > 0 && !iv))
+ return MY_AES_BAD_DATA;
+
+- EVP_CIPHER_CTX_init(&ctx);
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++ EVP_CIPHER_CTX_init(ctx);
++#endif
+
+- if (!EVP_DecryptInit(&ctx, aes_evp_type(mode), rkey, iv))
++ if (!EVP_DecryptInit(ctx, aes_evp_type(mode), rkey, iv))
+ goto aes_error; /* Error */
+- if (!EVP_CIPHER_CTX_set_padding(&ctx, padding))
++ if (!EVP_CIPHER_CTX_set_padding(ctx, padding))
+ goto aes_error; /* Error */
+- if (!EVP_DecryptUpdate(&ctx, dest, &u_len, source, source_length))
++ if (!EVP_DecryptUpdate(ctx, dest, &u_len, source, source_length))
+ goto aes_error; /* Error */
+- if (!EVP_DecryptFinal_ex(&ctx, dest + u_len, &f_len))
++ if (!EVP_DecryptFinal_ex(ctx, dest + u_len, &f_len))
+ goto aes_error; /* Error */
+
+- EVP_CIPHER_CTX_cleanup(&ctx);
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++ EVP_CIPHER_CTX_cleanup(ctx);
++#else
++ EVP_CIPHER_CTX_free(ctx);
++#endif
+ return u_len + f_len;
+
+ aes_error:
+ /* need to explicitly clean up the error if we want to ignore it */
+ ERR_clear_error();
+- EVP_CIPHER_CTX_cleanup(&ctx);
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++ EVP_CIPHER_CTX_cleanup(ctx);
++#else
++ EVP_CIPHER_CTX_free(ctx);
++#endif
+ return MY_AES_BAD_DATA;
+ }
+
+diff --git a/sql-common/client.c b/sql-common/client.c
+index 9e88e9f..fe7daf7 100644
+--- a/sql-common/client.c
++++ b/sql-common/client.c
+@@ -86,6 +86,14 @@ my_bool net_flush(NET *net);
+ # include <sys/un.h>
+ #endif
+
++#ifdef HAVE_OPENSSL
++#include <openssl/opensslv.h>
++#if (defined LIBRESSL_VERSION_NUMBER && OPENSSL_VERSION_NUMBER == 0x20000000L)
++#undef OPENSSL_VERSION_NUMBER
++#define OPENSSL_VERSION_NUMBER 0x1000107fL
++#endif
++#endif
++
+ #ifndef _WIN32
+ #include <errno.h>
+ #define SOCKET_ERROR -1
+@@ -2685,7 +2693,7 @@ static int ssl_verify_server_cert(Vio *vio, const char* server_hostname, const c
+ {
+ SSL *ssl;
+ X509 *server_cert= NULL;
+- char *cn= NULL;
++ const char *cn= NULL;
+ int cn_loc= -1;
+ ASN1_STRING *cn_asn1= NULL;
+ X509_NAME_ENTRY *cn_entry= NULL;
+@@ -2757,7 +2765,11 @@ static int ssl_verify_server_cert(Vio *vio, const char* server_hostname, const c
+ goto error;
+ }
+
+- cn= (char *) ASN1_STRING_data(cn_asn1);
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++ cn= (const char *) ASN1_STRING_data(cn_asn1);
++#else
++ cn= (const char *) ASN1_STRING_get0_data(cn_asn1);
++#endif
+
+ // There should not be any NULL embedded in the CN
+ if ((size_t)ASN1_STRING_length(cn_asn1) != strlen(cn))
+diff --git a/vio/viossl.c b/vio/viossl.c
+index 5622cb7..94b0f09 100644
+--- a/vio/viossl.c
++++ b/vio/viossl.c
+@@ -24,6 +24,12 @@
+
+ #ifdef HAVE_OPENSSL
+
++#include <openssl/opensslv.h>
++#if (defined LIBRESSL_VERSION_NUMBER && OPENSSL_VERSION_NUMBER == 0x20000000L)
++#undef OPENSSL_VERSION_NUMBER
++#define OPENSSL_VERSION_NUMBER 0x1000107fL
++#endif
++
+ #ifndef DBUG_OFF
+
+ static void
+@@ -310,8 +316,10 @@ void vio_ssl_delete(Vio *vio)
+ }
+
+ #ifndef HAVE_YASSL
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ ERR_remove_thread_state(0);
+ #endif
++#endif
+
+ vio_delete(vio);
+ }
+diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c
+index da5449a..87b30c3 100644
+--- a/vio/viosslfactories.c
++++ b/vio/viosslfactories.c
+@@ -16,6 +16,14 @@
+ #include "vio_priv.h"
+
+ #ifdef HAVE_OPENSSL
++#include <openssl/bn.h>
++#include <openssl/dh.h>
++#include <openssl/opensslv.h>
++
++#if (defined LIBRESSL_VERSION_NUMBER && OPENSSL_VERSION_NUMBER == 0x20000000L)
++#undef OPENSSL_VERSION_NUMBER
++#define OPENSSL_VERSION_NUMBER 0x1000107fL
++#endif
+
+ #define TLS_VERSION_OPTION_SIZE 256
+ #define SSL_CIPHER_LIST_SIZE 4096
+@@ -121,10 +129,18 @@ static DH *get_dh2048(void)
+ DH *dh;
+ if ((dh=DH_new()))
+ {
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ dh->p=BN_bin2bn(dh2048_p,sizeof(dh2048_p),NULL);
+ dh->g=BN_bin2bn(dh2048_g,sizeof(dh2048_g),NULL);
+ if (! dh->p || ! dh->g)
+ {
++#else
++ if (! DH_set0_pqg(dh,
++ BN_bin2bn(dh2048_p,sizeof(dh2048_p),NULL),
++ BN_bin2bn(dh2048_g,sizeof(dh2048_g),NULL),
++ NULL))
++ {
++#endif
+ DH_free(dh);
+ dh=0;
+ }
+@@ -247,6 +263,8 @@ typedef struct CRYPTO_dynlock_value
+ } openssl_lock_t;
+
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++
+ /* Array of locks used by openssl internally for thread synchronization.
+ The number of locks is equal to CRYPTO_num_locks.
+ */
+@@ -389,9 +407,11 @@ static void deinit_lock_callback_functions()
+ {
+ set_lock_callback_functions(FALSE);
+ }
++#endif
+
+ void vio_ssl_end()
+ {
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ int i= 0;
+
+ if (ssl_initialized) {
+@@ -409,6 +429,7 @@ void vio_ssl_end()
+
+ ssl_initialized= FALSE;
+ }
++#endif
+ }
+
+ #endif //OpenSSL specific
+@@ -419,6 +440,7 @@ void ssl_start()
+ {
+ ssl_initialized= TRUE;
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ SSL_library_init();
+ OpenSSL_add_all_algorithms();
+ SSL_load_error_strings();
+@@ -427,6 +449,7 @@ void ssl_start()
+ init_ssl_locks();
+ init_lock_callback_functions();
+ #endif
++#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
+ }
+ }
+
+--
+2.11.0
+
diff --git a/dev-db/mysql-connector-c/files/mysql_com.patch b/dev-db/mysql-connector-c/files/mysql_com.patch
new file mode 100644
index 000000000000..36a7d5a23791
--- /dev/null
+++ b/dev-db/mysql-connector-c/files/mysql_com.patch
@@ -0,0 +1,31 @@
+--- a/include/mysql_com.h 2014-06-10 23:10:43.000000000 -0400
++++ b/include/mysql_com.h 2015-08-11 15:20:54.487091000 -0400
+@@ -179,7 +171,7 @@
+ #define CLIENT_IGNORE_SIGPIPE 4096 /* IGNORE sigpipes */
+ #define CLIENT_TRANSACTIONS 8192 /* Client knows about transactions */
+ #define CLIENT_RESERVED 16384 /* Old flag for 4.1 protocol */
+-#define CLIENT_RESERVED2 32768 /* Old flag for 4.1 authentication */
++#define CLIENT_SECURE_CONNECTION 32768 /* New 4.1 authentication */
+ #define CLIENT_MULTI_STATEMENTS (1UL << 16) /* Enable/disable multi-stmt support */
+ #define CLIENT_MULTI_RESULTS (1UL << 17) /* Enable/disable multi-results */
+ #define CLIENT_PS_MULTI_RESULTS (1UL << 18) /* Multi-results in PS-protocol */
+@@ -226,7 +216,7 @@
+ | CLIENT_IGNORE_SIGPIPE \
+ | CLIENT_TRANSACTIONS \
+ | CLIENT_RESERVED \
+- | CLIENT_RESERVED2 \
++ | CLIENT_SECURE_CONNECTION \
+ | CLIENT_MULTI_STATEMENTS \
+ | CLIENT_MULTI_RESULTS \
+ | CLIENT_PS_MULTI_RESULTS \
+--- a/libmysql/client_settings.h 2015-02-25 16:09:49.000000000 -0500
++++ b/libmysql/client_settings.h 2015-08-11 15:44:10.804091000 -0400
+@@ -31,7 +31,7 @@
+ CLIENT_LONG_FLAG | \
+ CLIENT_TRANSACTIONS | \
+ CLIENT_PROTOCOL_41 | \
+- CLIENT_RESERVED2 | \
++ CLIENT_SECURE_CONNECTION | \
+ CLIENT_MULTI_RESULTS | \
+ CLIENT_PS_MULTI_RESULTS | \
+ CLIENT_PLUGIN_AUTH | \
diff --git a/dev-db/mysql-connector-c/metadata.xml b/dev-db/mysql-connector-c/metadata.xml
new file mode 100644
index 000000000000..709689b06053
--- /dev/null
+++ b/dev-db/mysql-connector-c/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>mysql-bugs@gentoo.org</email>
+ <name>MySQL</name>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-db/mysql-connector-c/mysql-connector-c-6.1.11-r1.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-6.1.11-r1.ebuild
new file mode 100644
index 000000000000..7ec9bf8b064f
--- /dev/null
+++ b/dev-db/mysql-connector-c/mysql-connector-c-6.1.11-r1.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-multilib
+
+MULTILIB_WRAPPED_HEADERS+=(
+ /usr/include/mysql/my_config.h
+)
+
+# wrap the config script
+MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
+
+DESCRIPTION="C client library for MariaDB/MySQL"
+HOMEPAGE="https://dev.mysql.com/downloads/connector/c/"
+LICENSE="GPL-2"
+
+SRC_URI="https://dev.mysql.com/get/Downloads/Connector-C/${P}-src.tar.gz"
+S="${WORKDIR}/${P}-src"
+KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~mips ppc ppc64 ~s390 ~sparc x86"
+
+SUBSLOT="18"
+SLOT="0/${SUBSLOT}"
+IUSE="libressl +ssl static-libs"
+
+CDEPEND="
+ sys-libs/zlib:=[${MULTILIB_USEDEP}]
+ ssl? (
+ libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
+ !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
+ )
+ "
+RDEPEND="${CDEPEND}
+ !dev-db/mysql[client-libs(+)]
+ !dev-db/mysql-cluster[client-libs(+)]
+ !dev-db/mariadb[client-libs(+)]
+ !dev-db/mariadb-connector-c[mysqlcompat]
+ !dev-db/mariadb-galera[client-libs(+)]
+ !dev-db/percona-server[client-libs(+)]
+ "
+DEPEND="${CDEPEND}"
+
+DOCS=( README )
+PATCHES=(
+ "${FILESDIR}/mysql_com.patch"
+ "${FILESDIR}/20028_all_mysql-5.6-gcc7.patch"
+ "${FILESDIR}/6.1.11-openssl-1.1.patch"
+)
+
+src_prepare() {
+ sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "${S}/scripts/CMakeLists.txt" || die
+ if use libressl ; then
+ sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+ "${S}/cmake/ssl.cmake" || die
+ fi
+ cmake-utils_src_prepare
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DINSTALL_LAYOUT=RPM
+ -DINSTALL_LIBDIR=$(get_libdir)
+ -DWITH_DEFAULT_COMPILER_OPTIONS=OFF
+ -DWITH_DEFAULT_FEATURE_SET=OFF
+ -DENABLED_LOCAL_INFILE=ON
+ -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+ -DWITH_ZLIB=system
+ -DENABLE_DTRACE=OFF
+ -DWITH_SSL=$(usex ssl system bundled)
+ -DLIBMYSQL_OS_OUTPUT_NAME=mysqlclient
+ -DSHARED_LIB_PATCH_VERSION="0"
+ )
+ cmake-utils_src_configure
+}
+
+multilib_src_install_all() {
+ if ! use static-libs ; then
+ find "${ED}" -name "*.a" -delete || die
+ fi
+}
+
+pkg_preinst() {
+ if [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+ elog "Due to ABI changes when switching between different client libraries,"
+ elog "revdep-rebuild must find and rebuild all packages linking to libmysqlclient."
+ elog "Please run: revdep-rebuild --library libmysqlclient.so.${SUBSLOT}"
+ ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+ fi
+}
diff --git a/dev-db/mysql-connector-c/mysql-connector-c-6.1.11.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-6.1.11.ebuild
new file mode 100644
index 000000000000..b0fd77fa0d6c
--- /dev/null
+++ b/dev-db/mysql-connector-c/mysql-connector-c-6.1.11.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-multilib
+
+MULTILIB_WRAPPED_HEADERS+=(
+ /usr/include/mysql/my_config.h
+)
+
+# wrap the config script
+MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
+
+DESCRIPTION="C client library for MariaDB/MySQL"
+HOMEPAGE="https://dev.mysql.com/downloads/connector/c/"
+LICENSE="GPL-2"
+
+SRC_URI="https://dev.mysql.com/get/Downloads/Connector-C/${P}-src.tar.gz"
+S="${WORKDIR}/${P}-src"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~sparc ~x86"
+
+SUBSLOT="18"
+SLOT="0/${SUBSLOT}"
+IUSE="+ssl static-libs"
+
+CDEPEND="
+ sys-libs/zlib:=[${MULTILIB_USEDEP}]
+ ssl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
+ "
+RDEPEND="${CDEPEND}
+ !dev-db/mysql[client-libs(+)]
+ !dev-db/mysql-cluster[client-libs(+)]
+ !dev-db/mariadb[client-libs(+)]
+ !dev-db/mariadb-connector-c[mysqlcompat]
+ !dev-db/mariadb-galera[client-libs(+)]
+ !dev-db/percona-server[client-libs(+)]
+ "
+DEPEND="${CDEPEND}"
+
+DOCS=( README )
+PATCHES=(
+ "${FILESDIR}/mysql_com.patch"
+ "${FILESDIR}/20028_all_mysql-5.6-gcc7.patch"
+)
+
+src_prepare() {
+ sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "${S}/scripts/CMakeLists.txt" || die
+ cmake-utils_src_prepare
+}
+
+multilib_src_configure() {
+ mycmakeargs+=(
+ -DINSTALL_LAYOUT=RPM
+ -DINSTALL_LIBDIR=$(get_libdir)
+ -DWITH_DEFAULT_COMPILER_OPTIONS=OFF
+ -DWITH_DEFAULT_FEATURE_SET=OFF
+ -DENABLED_LOCAL_INFILE=ON
+ -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+ -DWITH_ZLIB=system
+ -DENABLE_DTRACE=OFF
+ -DWITH_SSL=$(usex ssl system bundled)
+ -DLIBMYSQL_OS_OUTPUT_NAME=mysqlclient
+ -DSHARED_LIB_PATCH_VERSION="0"
+ )
+ cmake-utils_src_configure
+}
+
+multilib_src_install_all() {
+ if ! use static-libs ; then
+ find "${ED}" -name "*.a" -delete || die
+ fi
+}
+
+pkg_preinst() {
+ if [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+ elog "Due to ABI changes when switching between different client libraries,"
+ elog "revdep-rebuild must find and rebuild all packages linking to libmysqlclient."
+ elog "Please run: revdep-rebuild --library libmysqlclient.so.${SUBSLOT}"
+ ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+ fi
+}
diff --git a/dev-db/mysql-init-scripts-2.2-r3 b/dev-db/mysql-init-scripts-2.2-r3
deleted file mode 100644
index 70931d8a5aef..000000000000
--- a/dev-db/mysql-init-scripts-2.2-r3
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=install postinst
-DEPEND=virtual/pkgconfig
-DESCRIPTION=Gentoo MySQL init scripts.
-EAPI=6
-HOMEPAGE=https://www.gentoo.org/
-KEYWORDS=alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd
-LICENSE=GPL-2
-RDEPEND=!<dev-db/mysql-5.1 !<sys-apps/openrc-0.16.2
-SLOT=0
-_eclasses_=multilib 97f470f374f2e94ccab04a2fb21d811e s6 9fd5ce6a54658cb380091f4c3acc544e systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=0f42058be87d462636100469d2024fb1
diff --git a/dev-db/mysql-init-scripts/Manifest b/dev-db/mysql-init-scripts/Manifest
new file mode 100644
index 000000000000..6a277479a5c2
--- /dev/null
+++ b/dev-db/mysql-init-scripts/Manifest
@@ -0,0 +1,13 @@
+AUX conf.d-2.0 2944 BLAKE2B 94b94868e840267c5bf604226af11a4c806f48111472e417d725b51f48e38b8a4bd0dbbe8f9dba95c2250590c23bc0f9bc301203fdf399cd141055e54fa9a067 SHA512 2781e2caefed0c8be9c612f92cecf5a572dc17b97519034637a2b3f98a88af02dd8973f6c6b2af524d235067df6866409d1fe9d56740bfd0efb09948073c8d3b
+AUX init.d-2.2 5720 BLAKE2B 6d81ee1275439e59926ac0f2dbaa2f4b1ceed130f9047d7f6c19d27927fb0432701121554a77205f6f803c9f4e6e0ffdbf96ac8d6ff2f7ca149637585b859df4 SHA512 df1c85d527ec1805bf5ca22f5db37714ace6c55e4095ecf2e4cc1c4dad8a4aa6539282b11cb9c6a85b72e2412e1fbae90d85a8dfcda077bedb667bf784e4c613
+AUX init.d-s6-2.2 4978 BLAKE2B bdda1ecc926a5236be865487cca01974865c7d0c8e115b0bf4e5f791293ffd3be3976730fc21d3a4f2f81389d88c40d6b427d67dfeaa694ba8487e19f03b0aa1 SHA512 77d3691837a08d117dbaa8252368ab54f1bbd5969189261e498e57cacd158b87e5600b3c2ce62b25f72b8bf5b9a08f26d56fe93b6e2e96bc58c208d92ef1befc
+AUX init.d-supervise 5303 BLAKE2B ae0b30000d74028866512156e6d565e1bc4456680521e7af9195ffed2a7b75b0504c313b78d3629d0d2894c0ea980e8d8049624862200e64e82087e37bbb8d53 SHA512 149710600ca4780434e07101aa164e84d7decd86fdc4c2a8c5c37d2a965aff4626408885f98456773c6f8fb27eeeb5ab7028ccf73088739368c45f8ad9d587c4
+AUX log-s6 373 BLAKE2B e4579d7288c7e05c1abba55c29759eb3b0b49153c7b134e28b7308ba83e33c409d82ddc2e9794d0a398330b5b72ac33d165c6140259857ce3204928b20c2f6ac SHA512 e686bc0a4d9d5daf263c5a5f6bb883da1495feb9910f93c791af2d858b2adbf7cfc785c336ce470609f3f7bd12dabb97b470453bd67316feef5ed4df9ee9307d
+AUX logrotate.mysql 368 BLAKE2B 0eb2411785e53e4ec521139943633bf7f765df532e89d626bf2387c9bc8012c4caba019615feb13eeef48e8ace55207b5d93469b323488a93f24f62a3ba32ac0 SHA512 71e6aeec21e220157fb07a609475c626e0698f556db20f5e2876117d1d46a2f297520b2124458e8b8077f9a128e27540ffa1b77cadc5eb372a502edfb804fed1
+AUX mysql.conf 37 BLAKE2B 66f792ee51ca18e692e069a2627dd3a122dadbd0cf9097857da049ade3cc21fdc45bd7725c68def448a2763e5688ade468c17f53776b780be6f6d2a0245b1b7c SHA512 7b4940666d21f09fda47e2b24bd252c83af4372f34f1b3410c59d8f439fb7c0166d5a1b8d857bf67f2263f15d95a0fa0b67f225152a18c180b67d28f4ceb5f00
+AUX mysqld-v2.service 1208 BLAKE2B 9dad4cfa0a102fe7705f4d1db042d0c65d66e669b51b8536f0dbdc1ca3d149076ee71a373efc0cfa3ca900e87c8ccb91aa0beeb10bf8634553ddc3309ba3b2c9 SHA512 2016ea7d9c8fe9447675ec9612655f1b955a3f04ce417ebb1c7a8a86a29ef176a5737a9bd3bc5e45508e2e23a764a763897881b511f65635193291e212fd58aa
+AUX mysqld-wait-ready 1758 BLAKE2B 2a6ccc105cedc78e4e8acf77fd13f8083af80b3488572079bd063fac263382cd37a85cf40c02ffa8a9a047f146402dc2f7bfef91d47487003b64c84cdc8196c9 SHA512 ad4a850d045149df156c8236ae114e94887626e3ca803dea9bcc3909349043b51357a71ac17d694e0217f7856e076a0736267fc1ea3dedbef8a319fc9014c01b
+AUX mysqld_at-v2.service 1170 BLAKE2B d02f7ee3549d273d309e8e6e5cd8c2f987c6feab42bb330367c14df6932a887f7740ca6c28ecd15aba8bf2f89c33854345d773134630a5e8cd5ce8b99a8b6667 SHA512 a91eb574925afc0096e668799f9806b1cfa4c808ffab26dab5df1934db0dd8059a5e7913b0fdc3374f41e14cc72a6450890c9d746d3ff2de873af91199a71ee0
+AUX run-s6 268 BLAKE2B ebc9c74527257e1a35a4671afe2d34d9ed9868db0e0f33eebe655b31317a4ceeb02affe471ad49007534a9ce0a9399d9f14af664488ae753e207cf97d467107b SHA512 82be247195f6d9d230b063e9bda393bab8855382c2f3e5eb4d427fc1eb7e23dbd8c90939224ff2b5e4116a5c9d3f26ebdc9b9f548cde91e7c1217f4f8500c0d3
+EBUILD mysql-init-scripts-2.2-r3.ebuild 1870 BLAKE2B db7efaaa2e6487c5fa38f4e4a77251611a449c72ec2ba964f6f720f57f08721995646997ba1ccf0c6a299e6c5ca39c6f17211303f1e5434c5d9b1497565ce4c1 SHA512 900ed926adc1860da8665c3afeac3081f4bfd189a2207b91942bd268b34e9f3dc8f8a26640d2a2a78b9f3134b898c0101b0001012a04bf0227c600308637ca45
+MISC metadata.xml 243 BLAKE2B f247f748a23e4cda2f518ad7e4e53b9027ff08ec62289010e6dfc8cd2ad49412430c4095e80f2156c8e6f1226bcda0163b4faae83759550f79e9998928398713 SHA512 7c227a1fadd8d61aae9baabeb5d964c93fe0c4d82fb838c83fe0360cf38b24bebf51037726f13188ecd8f52c335368a693b81e74d79ba949576a6dbcb54887a9
diff --git a/dev-db/mysql-init-scripts/files/conf.d-2.0 b/dev-db/mysql-init-scripts/files/conf.d-2.0
new file mode 100644
index 000000000000..cecb9a940f14
--- /dev/null
+++ b/dev-db/mysql-init-scripts/files/conf.d-2.0
@@ -0,0 +1,78 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# If you want a non-stock location for the config file, uncomment or update
+# either of these as needed. If you do use it, you must make sure that none of
+# your socket, pidfile, datadir, logfiles, binary logs, relay logs or InnoDB
+# files collide with each other.
+MY_CNF="/etc/mysql/my.cnf"
+#MY_CNF="${MY_CNF:-/etc/${SVCNAME}/my.cnf}"
+#MY_CNF="${MY_CNF:-/etc/mysql/my-${SVCNAME/mysql.}.cnf}"
+
+# Place any additional arguments here that you might need
+# Common/useful options:
+# --skip-slave-start=1 - For bringing up replication initially
+# --server-id=NNN - Server ID for replication
+# --skip-networking - lock it down to UNIX sockets only
+MY_ARGS=""
+
+# This setting (in seconds) should be high enough to allow InnoDB to do a full
+# checkpoint recovery. 900 is the default used in the upstream RPM startup
+# scripts. 30 seconds should be sufficent if you just have a tiny <1GiB
+# database. After the core startup is done, we wait this long for the UNIX
+# socket to appear.
+STARTUP_TIMEOUT="900"
+
+# This is how long, in milliseconds, we wait for pidfile to be created, early
+# in the startup.
+STARTUP_EARLY_TIMEOUT="1000"
+
+# How long (in seconds) should we wait for shutdown?
+STOP_TIMEOUT=120
+
+# integer [-20 .. 19 ] default 0
+# change the priority of the server -20 (high) to 19 (low)
+# see nice(1) for description
+#NICE=0
+
+# See start-stop-daemon(8) for possible settings
+#IONICE=2
+
+# If defined, --verbose gets passed to S-S-D
+#DEBUG=1
+
+# Depending on your usage of MySQL, you may also wish to start it after some
+# other services are up. Uncomment the lines below as needed. If these aren't
+# enough for you, we encourage you to file a bug, and help us understand how
+# you are using MySQL.
+
+# Do your MySQL ACLs refer to hostnames not in your /etc/hosts?
+# If so, you need DNS before you can accept connections.
+# Avoid dependency circular loops if you use MySQL to power a local DNS server.
+#rc_use="dns"
+#rc_after="dns"
+
+# Does your MySQL bind to an IP on an interface other than net.lo?
+# Alternatively you might wish to specify the exact interface here.
+#rc_use="net"
+#rc_after="net"
+
+# Do you store your MySQL files on a SAN or other network filesystem, that is
+# provided by the netmount init script?
+#rc_need="netmount"
+
+# Or from NFS? P.S. This is not a good idea in most cases, but does have some
+# valid usage cases, so we provide the option.
+#rc_need="nfsmount"
+
+# Should any one of the instances satisfy the requirement for MySQL coming up?
+# By default, we say no.
+[ "${SVCNAME}" != mysql ] && rc_provide="!mysql"
+# But uncomment this next instead if you think it should.
+#rc_provide="mysql"
+
+# The conditional above has a false-positive "failure" return value as a
+# side-effect, and since it's the last statement, without the next line, this
+# script returns failure.
+return 0
+# vim: ft=gentoo-conf-d et ts=4 sw=4:
diff --git a/dev-db/mysql-init-scripts/files/init.d-2.2 b/dev-db/mysql-init-scripts/files/init.d-2.2
new file mode 100644
index 000000000000..5603f9e60310
--- /dev/null
+++ b/dev-db/mysql-init-scripts/files/init.d-2.2
@@ -0,0 +1,194 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_commands="checkconfig"
+extra_stopped_commands="bootstrap_galera"
+
+description_checkconfig="Verify the server's configuration"
+description_boostrap_galera="Start a new Galera cluster with this server as the initial node"
+
+depend() {
+ use net.lo
+ # localmount needed for $basedir
+ need localmount
+ # This service has its own timeout and may need to wait for repairs
+ # or remote synchronization
+ keyword -timeout
+}
+
+get_config() {
+ my_print_defaults --defaults-file="$1" mysqld server mariadb |
+ sed -n -e "s/^--$2=//p"
+}
+
+mysql_svcname() {
+ local ebextra=
+ case "${SVCNAME}" in
+ mysql*) ;;
+ *) ebextra=" (mysql)" ;;
+ esac
+ echo "${SVCNAME}${ebextra}"
+}
+
+stringContain() { [ -z "${2##*$1*}" ] && [ -z "$1" -o -n "$2" ]; }
+
+bootstrap_galera() {
+ MY_ARGS="--wsrep-new-cluster ${MY_ARGS}"
+ mark_service_starting
+ if start ; then
+ mark_service_started
+ return 0
+ else
+ mark_service_stopped
+ return 1
+ fi
+}
+
+start() {
+ # Check for old conf.d variables that mean migration was not yet done.
+ set | egrep -sq '^(mysql_slot_|MYSQL_BLOG_PID_FILE|STOPTIMEOUT)'
+ rc=$?
+ # Yes, MYSQL_INIT_I_KNOW_WHAT_I_AM_DOING is a hidden variable.
+ # It does have a use in testing, as it is possible to build a config file
+ # that works with both the old and new init scripts simulateously.
+ if [ "${rc}" = 0 -a -z "${MYSQL_INIT_I_KNOW_WHAT_I_AM_DOING}" ]; then
+ eerror "You have not updated your conf.d for the new mysql-init-scripts-2 revamp."
+ eerror "Not proceeding because it may be dangerous."
+ return 1
+ fi
+
+ # Check the config or die
+ if [ ${RC_CMD} != "restart" ] ; then
+ checkconfig || return 1
+ fi
+
+ # Now we can startup
+ ebegin "Starting $(mysql_svcname)"
+
+ MY_CNF="${MY_CNF:-/etc/${SVCNAME}/my.cnf}"
+
+ if [ ! -r "${MY_CNF}" ] ; then
+ eerror "Cannot read the configuration file \`${MY_CNF}'"
+ return 1
+ fi
+
+ # tail -n1 is critical as these we only want the last instance of the option
+ local basedir=$(get_config "${MY_CNF}" basedir | tail -n1)
+ local pidfile=$(get_config "${MY_CNF}" pid-file | tail -n1)
+ local socket=$(get_config "${MY_CNF}" socket | tail -n1)
+ local chroot=$(get_config "${MY_CNF}" chroot | tail -n1)
+ local wsrep="$(get_config "${MY_CNF}" 'wsrep[_-]on' | tail -n1 | awk '{print tolower($0)}')"
+ local wsrep_new=$(get_config "${MY_CNF}" 'wsrep-new-cluster' | tail -n1)
+
+ if [ -n "${chroot}" ] ; then
+ socket="${chroot}/${socket}"
+ pidfile="${chroot}/${pidfile}"
+ fi
+
+ # Galera: Only check datadir if not starting a new cluster and galera is enabled
+ # wsrep_on is not on or wsrep-new-cluster exists in the config or MY_ARGS
+ [ "${wsrep}" = "1" ] && wsrep="on"
+ if [ "${wsrep}" != "on" ] || [ -n "${wsrep_new}" ] || stringContain 'wsrep-new-cluster' "${MY_ARGS}" ; then
+
+ local datadir=$(get_config "${MY_CNF}" datadir | tail -n1)
+ if [ ! -d "${datadir}" ] ; then
+ eerror "MySQL datadir \`${datadir}' is empty or invalid"
+ eerror "Please check your config file \`${MY_CNF}'"
+ return 1
+ fi
+
+ if [ ! -d "${datadir}"/mysql ] ; then
+ # find which package is installed to report an error
+ local EROOT=$(portageq envvar EROOT)
+ local DBPKG_P=$(portageq match ${EROOT} $(portageq expand_virtual ${EROOT} virtual/mysql | head -n1))
+ if [ -z ${DBPKG_P} ] ; then
+ eerror "You don't appear to have a server package installed yet."
+ else
+ eerror "You don't appear to have the mysql database installed yet."
+ eerror "Please run \`emerge --config =${DBPKG_P}\` to have this done..."
+ fi
+ return 1
+ fi
+ fi
+
+ local piddir="${pidfile%/*}"
+ checkpath -d --owner mysql:mysql --mode 0755 "$piddir"
+ rc=$?
+ if [ $rc -ne 0 ]; then
+ eerror "Directory $piddir for pidfile does not exist and cannot be created"
+ return 1
+ fi
+
+ local startup_timeout=${STARTUP_TIMEOUT:-900}
+ local startup_early_timeout=${STARTUP_EARLY_TIMEOUT:-1000}
+ local tmpnice="${NICE:+"--nicelevel "}${NICE}"
+ local tmpionice="${IONICE:+"--ionice "}${IONICE}"
+ start-stop-daemon \
+ ${DEBUG:+"--verbose"} \
+ --start \
+ --exec "${basedir}"/sbin/mysqld \
+ --pidfile "${pidfile}" \
+ --background \
+ --wait ${startup_early_timeout} \
+ ${tmpnice} \
+ ${tmpionice} \
+ -- --defaults-file="${MY_CNF}" ${MY_ARGS}
+ local ret=$?
+ if [ ${ret} -ne 0 ] ; then
+ eend ${ret}
+ return ${ret}
+ fi
+
+ ewaitfile ${startup_timeout} "${socket}"
+ eend $? || return 1
+
+ save_options pidfile "${pidfile}"
+ save_options basedir "${basedir}"
+}
+
+stop() {
+ if [ ${RC_CMD} = "restart" ] ; then
+ checkconfig || return 1
+ fi
+
+ ebegin "Stopping $(mysql_svcname)"
+
+ local pidfile="$(get_options pidfile)"
+ local basedir="$(get_options basedir)"
+ local stop_timeout=${STOP_TIMEOUT:-120}
+
+ start-stop-daemon \
+ ${DEBUG:+"--verbose"} \
+ --stop \
+ --exec "${basedir}"/sbin/mysqld \
+ --pidfile "${pidfile}" \
+ --retry ${stop_timeout}
+ eend $?
+}
+
+checkconfig() {
+ local my_cnf="${MY_CNF:-/etc/${SVCNAME}/my.cnf}"
+ local basedir=$(get_config "${my_cnf}" basedir | tail -n1)
+ local svc_name=$(mysql_svcname)
+ ebegin "Checking mysqld configuration for ${svc_name}"
+
+ if [ ${RC_CMD} = "checkconfig" ] ; then
+ # We are calling checkconfig specifically. Print warnings regardless.
+ "${basedir}"/sbin/mysqld --defaults-file="${my_cnf}" --help --verbose > /dev/null
+ else
+ # Suppress output to check the return value
+ "${basedir}"/sbin/mysqld --defaults-file="${my_cnf}" --help --verbose > /dev/null 2>&1
+
+ # If the above command does not return 0,
+ # then there is an error to echo to the user
+ if [ $? -ne 0 ] ; then
+ "${basedir}"/sbin/mysqld --defaults-file="${my_cnf}" --help --verbose > /dev/null
+ fi
+ fi
+
+ eend $? "${svc_name} config check failed"
+}
+
+# vim: filetype=gentoo-init-d sw=2 ts=2 sts=2 noet:
+
diff --git a/dev-db/mysql-init-scripts/files/init.d-s6-2.2 b/dev-db/mysql-init-scripts/files/init.d-s6-2.2
new file mode 100644
index 000000000000..3fa54e949c91
--- /dev/null
+++ b/dev-db/mysql-init-scripts/files/init.d-s6-2.2
@@ -0,0 +1,163 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use net.lo
+ # localmount needed for $basedir
+ need localmount s6-svscan
+}
+
+get_config() {
+ my_print_defaults --defaults-file="$1" mysqld server mariadb |
+ sed -n -e "s/^--$2=//p"
+}
+
+mysql_svcname() {
+ local ebextra=
+ case "${svc_name}" in
+ mysql*) ;;
+ *) ebextra=" (mysql)" ;;
+ esac
+ echo "${svc_name}${ebextra}"
+}
+
+stringContain() { [ -z "${2##*$1*}" ] && [ -z "$1" -o -n "$2" ]; }
+
+bootstrap_galera() {
+ MY_ARGS="--wsrep-new-cluster ${MY_ARGS}"
+ mark_service_starting
+ if start_pre && start ; then
+ mark_service_started
+ return 0
+ else
+ mark_service_stopped
+ return 1
+ fi
+}
+
+
+extra_commands="checkconfig"
+extra_stopped_commands="bootstrap_galera"
+
+description_checkconfig="Verify the server's configuration"
+description_boostrap_galera="Start a new Galera cluster with this server as the initial node"
+supervisor=s6
+name=$(mysql_svcname)
+s6_service_timeout_stop="$((1000*${STOP_TIMEOUT:-120}))"
+#s6_svwait_options_start="-U -t $((1000*${STARTUP_EARLY_TIMEOUT:-1000}))"
+svc_name=${RC_SVCNAME%-s6}
+s6_service_path=/var/svc.d/${svc_name}
+
+start_pre() {
+ # Check the config or die
+ if [ ${RC_CMD} != "restart" ] ; then
+ checkconfig || return 1
+ fi
+
+ MY_CNF="${MY_CNF:-/etc/${svc_name}/my.cnf}"
+
+ if [ ! -r "${MY_CNF}" ] ; then
+ eerror "Cannot read the configuration file \`${MY_CNF}'"
+ return 1
+ fi
+
+ # tail -n1 is critical as these we only want the last instance of the option
+ local basedir=$(get_config "${MY_CNF}" basedir | tail -n1)
+ local pidfile=$(get_config "${MY_CNF}" pid-file | tail -n1)
+ local socket=$(get_config "${MY_CNF}" socket | tail -n1)
+ local chroot=$(get_config "${MY_CNF}" chroot | tail -n1)
+ local wsrep="$(get_config "${MY_CNF}" 'wsrep[_-]on' | tail -n1 | awk '{print tolower($0)}')"
+ local wsrep_new=$(get_config "${MY_CNF}" 'wsrep-new-cluster' | tail -n1)
+
+ if [ -n "${chroot}" ] ; then
+ socket="${chroot}/${socket}"
+ pidfile="${chroot}/${pidfile}"
+ fi
+
+ # Galera: Only check datadir if not starting a new cluster and galera is enabled
+ # wsrep_on is not on or wsrep-new-cluster exists in the config or MY_ARGS
+ [ "${wsrep}" = "1" ] && wsrep="on"
+ if [ "${wsrep}" != "on" ] || [ -n "${wsrep_new}" ] || stringContain 'wsrep-new-cluster' "${MY_ARGS}" ; then
+
+ local datadir=$(get_config "${MY_CNF}" datadir | tail -n1)
+ if [ ! -d "${datadir}" ] ; then
+ eerror "MySQL datadir \`${datadir}' is empty or invalid"
+ eerror "Please check your config file \`${MY_CNF}'"
+ return 1
+ fi
+
+ if [ ! -d "${datadir}"/mysql ] ; then
+ # find which package is installed to report an error
+ local EROOT=$(portageq envvar EROOT)
+ local DBPKG_P=$(portageq match ${EROOT} $(portageq expand_virtual ${EROOT} virtual/mysql | head -n1))
+ if [ -z ${DBPKG_P} ] ; then
+ eerror "You don't appear to have a server package installed yet."
+ else
+ eerror "You don't appear to have the mysql database installed yet."
+ eerror "Please run \`emerge --config =${DBPKG_P}\` to have this done..."
+ fi
+ return 1
+ fi
+ fi
+
+ local piddir="${pidfile%/*}"
+ checkpath -d --owner mysql:mysql --mode 0755 "$piddir"
+ rc=$?
+ if [ $rc -ne 0 ]; then
+ eerror "Directory $piddir for pidfile does not exist and cannot be created"
+ return 1
+ fi
+
+ # Prepare env files to source
+ mkdir -p "/var/svc.d/${svc_name}"
+ echo "MY_CNF=\"${MY_CNF}\"" > "/var/svc.d/${svc_name}/env"
+ echo "MY_ARGS=\"${MY_ARGS}\"" >> "/var/svc.d/${svc_name}/env"
+ echo "basedir=\"${basedir}\"" >> "/var/svc.d/${svc_name}/env"
+ mkdir -p "/var/svc.d/${svc_name}/log"
+ echo "SVCNAME=\"${svc_name}\"" > "/var/svc.d/${svc_name}/log/env"
+ echo "S6_LOG_OPTIONS=\"${S6_LOG_OPTIONS}\"" > "/var/svc.d/${svc_name}/log/env"
+}
+
+start_post() {
+ local socket=$(get_config "${MY_CNF}" socket | tail -n1)
+ local chroot=$(get_config "${MY_CNF}" chroot | tail -n1)
+ local startup_timeout=${STARTUP_TIMEOUT:-900}
+
+ if [ -n "${chroot}" ] ; then
+ socket="${chroot}/${socket}"
+ fi
+ ewaitfile ${startup_timeout} "${socket}"
+}
+
+checkconfig() {
+ local my_cnf="${MY_CNF:-/etc/${svc_name}/my.cnf}"
+ local basedir=$(get_config "${my_cnf}" basedir | tail -n1)
+ local svc_name=$(mysql_svcname)
+ ebegin "Checking mysqld configuration for ${svc_name}"
+
+ if [ ${RC_CMD} = "checkconfig" ] ; then
+ # We are calling checkconfig specifically. Print warnings regardless.
+ "${basedir}"/sbin/mysqld --defaults-file="${my_cnf}" --help --verbose > /dev/null
+ else
+ # Suppress output to check the return value
+ "${basedir}"/sbin/mysqld --defaults-file="${my_cnf}" --help --verbose > /dev/null 2>&1
+
+ # If the above command does not return 0,
+ # then there is an error to echo to the user
+ if [ $? -ne 0 ] ; then
+ "${basedir}"/sbin/mysqld --defaults-file="${my_cnf}" --help --verbose > /dev/null
+ fi
+ fi
+
+ eend $? "${svc_name} config check failed"
+}
+
+stop_pre() {
+ if [ ${RC_CMD} = "restart" ] ; then
+ checkconfig || return 1
+ fi
+}
+
+# vim: filetype=gentoo-init-d sw=2 ts=2 sts=2 noet:
+
diff --git a/dev-db/mysql-init-scripts/files/init.d-supervise b/dev-db/mysql-init-scripts/files/init.d-supervise
new file mode 100644
index 000000000000..5341a6a18d64
--- /dev/null
+++ b/dev-db/mysql-init-scripts/files/init.d-supervise
@@ -0,0 +1,180 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_commands="checkconfig"
+extra_stopped_commands="boostrap_galera"
+
+description_checkconfig="Verify the server's configuration"
+description_boostrap_galera="Start a new Galera cluster with this server as the initial node"
+
+depend() {
+ use net.lo
+ # localmount needed for $basedir
+ need localmount
+}
+
+get_config() {
+ my_print_defaults --defaults-file="$1" mysqld server mariadb |
+ sed -n -e "s/^--$2=//p"
+}
+
+mysql_svcname() {
+ local ebextra=
+ case "${SVCNAME}" in
+ mysql*) ;;
+ *) ebextra=" (mysql)" ;;
+ esac
+ echo "${SVCNAME}${ebextra}"
+}
+
+stringContain() { [ -z "${2##*$1*}" ] && [ -z "$1" -o -n "$2" ]; }
+
+bootstrap_galera() {
+ MY_ARGS="--wsrep-new-cluster ${MY_ARGS}"
+ mark_service_starting
+ if start ; then
+ mark_service_started
+ return 0
+ else
+ mark_service_stopped
+ return 1
+ fi
+}
+
+start() {
+ # Check for old conf.d variables that mean migration was not yet done.
+ set | egrep -sq '^(mysql_slot_|MYSQL_BLOG_PID_FILE|STOPTIMEOUT)'
+ rc=$?
+ # Yes, MYSQL_INIT_I_KNOW_WHAT_I_AM_DOING is a hidden variable.
+ # It does have a use in testing, as it is possible to build a config file
+ # that works with both the old and new init scripts simulateously.
+ if [ "${rc}" = 0 -a -z "${MYSQL_INIT_I_KNOW_WHAT_I_AM_DOING}" ]; then
+ eerror "You have not updated your conf.d for the new mysql-init-scripts-2 revamp."
+ eerror "Not proceeding because it may be dangerous."
+ return 1
+ fi
+
+ # Check the config or die
+ if [ ${RC_CMD} != "restart" ] ; then
+ checkconfig || return 1
+ fi
+
+ # Now we can startup
+ ebegin "Starting $(mysql_svcname)"
+
+ MY_CNF="${MY_CNF:-/etc/${SVCNAME}/my.cnf}"
+
+ if [ ! -r "${MY_CNF}" ] ; then
+ eerror "Cannot read the configuration file \`${MY_CNF}'"
+ return 1
+ fi
+
+ # tail -n1 is critical as these we only want the last instance of the option
+ local basedir=$(get_config "${MY_CNF}" basedir | tail -n1)
+ local pidfile=$(get_config "${MY_CNF}" pid-file | tail -n1)
+ local socket=$(get_config "${MY_CNF}" socket | tail -n1)
+ local chroot=$(get_config "${MY_CNF}" chroot | tail -n1)
+ local wsrep="$(get_config "${MY_CNF}" 'wsrep[_-]on' | tail -n1 | awk '{print tolower($0)}')"
+ local wsrep_new=$(get_config "${MY_CNF}" 'wsrep-new-cluster' | tail -n1)
+
+ if [ -n "${chroot}" ] ; then
+ socket="${chroot}/${socket}"
+ pidfile="${chroot}/${pidfile}"
+ fi
+
+ # Galera: Only check datadir if not starting a new cluster and galera is enabled
+ # wsrep_on is not on or wsrep-new-cluster exists in the config or MY_ARGS
+ [ "${wsrep}" = "1" ] && wsrep="on"
+ if [ "${wsrep}" != "on" ] || [ -n "${wsrep_new}" ] || stringContain 'wsrep-new-cluster' "${MY_ARGS}" ; then
+
+ local datadir=$(get_config "${MY_CNF}" datadir | tail -n1)
+ if [ ! -d "${datadir}" ] ; then
+ eerror "MySQL datadir \`${datadir}' is empty or invalid"
+ eerror "Please check your config file \`${MY_CNF}'"
+ return 1
+ fi
+
+ if [ ! -d "${datadir}"/mysql ] ; then
+ # find which package is installed to report an error
+ local EROOT=$(portageq envvar EROOT)
+ local DBPKG_P=$(portageq match ${EROOT} $(portageq expand_virtual ${EROOT} virtual/mysql | head -n1))
+ if [ -z ${DBPKG_P} ] ; then
+ eerror "You don't appear to have a server package installed yet."
+ else
+ eerror "You don't appear to have the mysql database installed yet."
+ eerror "Please run \`emerge --config =${DBPKG_P}\` to have this done..."
+ fi
+ return 1
+ fi
+ fi
+
+ local piddir="${pidfile%/*}"
+ checkpath -d --owner mysql:mysql --mode 0755 "$piddir"
+ rc=$?
+ if [ $rc -ne 0 ]; then
+ eerror "Directory $piddir for pidfile does not exist and cannot be created"
+ return 1
+ fi
+
+ local startup_timeout=${STARTUP_TIMEOUT:-900}
+# local startup_early_timeout=${STARTUP_EARLY_TIMEOUT:-1000}
+ local tmpnice="${NICE:+"--nicelevel "}${NICE}"
+ local tmpionice="${IONICE:+"--ionice "}${IONICE}"
+ supervise-daemon \
+ ${DEBUG:+"--verbose"} \
+ --pidfile "/run/${SVCNAME}.pid" \
+ ${tmpnice} \
+ ${tmpionice} \
+ --start \
+ "${basedir}"/sbin/mysqld \
+ -- --defaults-file="${MY_CNF}" ${MY_ARGS}
+ local ret=$?
+ if [ ${ret} -ne 0 ] ; then
+ eend ${ret}
+ return ${ret}
+ fi
+
+ ewaitfile ${startup_timeout} "${socket}"
+ eend $? || return 1
+}
+
+stop() {
+ if [ ${RC_CMD} = "restart" ] ; then
+ checkconfig || return 1
+ fi
+
+ ebegin "Stopping $(mysql_svcname)"
+
+ supervise-daemon \
+ ${DEBUG:+"--verbose"} \
+ --stop \
+ --pidfile "/run/${SVCNAME}.pid"
+ eend $?
+}
+
+checkconfig() {
+ local my_cnf="${MY_CNF:-/etc/${SVCNAME}/my.cnf}"
+ local basedir=$(get_config "${my_cnf}" basedir | tail -n1)
+ local svc_name=$(mysql_svcname)
+ ebegin "Checking mysqld configuration for ${svc_name}"
+
+ if [ ${RC_CMD} = "checkconfig" ] ; then
+ # We are calling checkconfig specifically. Print warnings regardless.
+ "${basedir}"/sbin/mysqld --defaults-file="${my_cnf}" --help --verbose > /dev/null
+ else
+ # Suppress output to check the return value
+ "${basedir}"/sbin/mysqld --defaults-file="${my_cnf}" --help --verbose > /dev/null 2>&1
+
+ # If the above command does not return 0,
+ # then there is an error to echo to the user
+ if [ $? -ne 0 ] ; then
+ "${basedir}"/sbin/mysqld --defaults-file="${my_cnf}" --help --verbose > /dev/null
+ fi
+ fi
+
+ eend $? "${svc_name} config check failed"
+}
+
+# vim: filetype=gentoo-init-d sw=2 ts=2 sts=2 noet:
+
diff --git a/dev-db/mysql-init-scripts/files/log-s6 b/dev-db/mysql-init-scripts/files/log-s6
new file mode 100644
index 000000000000..d135c530cd4e
--- /dev/null
+++ b/dev-db/mysql-init-scripts/files/log-s6
@@ -0,0 +1,11 @@
+#!/bin/sh
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+if [ -e ./env ] ; then source ./env ; else echo "failed to source env" ; fi
+mkdir -p "/var/log/mysql/${SVCNAME}"
+if [ ${S6_LOG_OPTIONS} ] ; then
+ exec s6-log ${S6_LOG_OPTIONS}
+else
+ exec s6-log -b n20 S15000000 !"gzip -nq9" "/var/log/mysql/${SVCNAME}"
+fi
diff --git a/dev-db/mysql-init-scripts/files/logrotate.mysql b/dev-db/mysql-init-scripts/files/logrotate.mysql
new file mode 100644
index 000000000000..afb20c66d479
--- /dev/null
+++ b/dev-db/mysql-init-scripts/files/logrotate.mysql
@@ -0,0 +1,14 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+/var/log/mysql/mysql.err /var/log/mysql/mysql.log /var/log/mysql/mysqld.err {
+monthly
+create 660 mysql mysql
+notifempty
+size 5M
+sharedscripts
+missingok
+postrotate
+[ -f /var/run/mysqld/mysqld.pid ] && /bin/kill -HUP `cat /var/run/mysqld/mysqld.pid`
+endscript
+}
diff --git a/dev-db/mysql-init-scripts/files/mysql.conf b/dev-db/mysql-init-scripts/files/mysql.conf
new file mode 100644
index 000000000000..74cd5f836e76
--- /dev/null
+++ b/dev-db/mysql-init-scripts/files/mysql.conf
@@ -0,0 +1 @@
+d /var/run/mysqld 0755 mysql mysql -
diff --git a/dev-db/mysql-init-scripts/files/mysqld-v2.service b/dev-db/mysql-init-scripts/files/mysqld-v2.service
new file mode 100644
index 000000000000..641abf733098
--- /dev/null
+++ b/dev-db/mysql-init-scripts/files/mysqld-v2.service
@@ -0,0 +1,47 @@
+[Unit]
+Description=MySQL database server
+After=syslog.target
+After=network.target
+Conflicts=mariadb.service
+
+[Service]
+Type=simple
+User=mysql
+Group=mysql
+
+# Note: we set --basedir to prevent probes that might trigger SELinux alarms,
+# https://bugzilla.redhat.com/show_bug.cgi?id=547485
+ExecStart=/usr/sbin/mysqld --basedir=/usr
+ExecStartPost=/usr/libexec/mysqld-wait-ready $MAINPID
+
+# Give a reasonable amount of time for the server to start up/shut down
+TimeoutSec=300
+
+# We rely on systemd, not mysqld_safe, to restart mysqld if it dies
+# Restart crashed server only, on-failure would also restart, for example, when
+# my.cnf contains unknown option
+Restart=on-abort
+RestartSec=5s
+
+# Place temp files in a secure directory, not /tmp
+PrivateTmp=true
+
+# To allow memlock to be used as non-root user if set in configuration
+CapabilityBoundingSet=CAP_IPC_LOCK
+
+# Prevent writes to /usr, /boot, and /etc
+ProtectSystem=full
+
+# Currently has issues with SELinux https://jira.mariadb.org/browse/MDEV-10404
+# This is safe to uncomment when not using SELinux
+#NoNewPrivileges=true
+
+PrivateDevices=true
+
+# Prevent accessing /home, /root and /run/user
+ProtectHome=true
+
+UMask=007
+
+[Install]
+WantedBy=multi-user.target
diff --git a/dev-db/mysql-init-scripts/files/mysqld-wait-ready b/dev-db/mysql-init-scripts/files/mysqld-wait-ready
new file mode 100644
index 000000000000..9e5d3e4d85e0
--- /dev/null
+++ b/dev-db/mysql-init-scripts/files/mysqld-wait-ready
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+# This script waits for mysqld to be ready to accept connections
+# (which can be many seconds or even minutes after launch, if there's
+# a lot of crash-recovery work to do).
+# Running this as ExecStartPost is useful so that services declared as
+# "After mysqld" won't be started until the database is really ready.
+
+# Service file passes us the daemon's PID (actually, mysqld_safe's PID)
+daemon_pid="$1"
+
+# extract value of a MySQL option from config files
+# Usage: get_mysql_option SECTION VARNAME DEFAULT
+# result is returned in $result
+# We use my_print_defaults which prints all options from multiple files,
+# with the more specific ones later; hence take the last match.
+get_mysql_option(){
+ result=`/usr/bin/my_print_defaults "$1" | sed -n "s/^--$2=//p" | tail -n 1`
+ if [ -z "$result" ]; then
+ # not found, use default
+ result="$3"
+ fi
+}
+
+# Defaults here had better match what mysqld_safe will default to
+get_mysql_option mysqld datadir "/var/lib/mysql"
+datadir="$result"
+get_mysql_option mysqld socket "/var/lib/mysql/mysql.sock"
+socketfile="$result"
+
+# Wait for the server to come up or for the mysqld process to disappear
+ret=0
+while /bin/true; do
+ RESPONSE=`/usr/bin/mysqladmin --no-defaults --socket="$socketfile" --user=UNKNOWN_MYSQL_USER ping 2>&1`
+ mret=$?
+ if [ $mret -eq 0 ]; then
+ break
+ fi
+ # exit codes 1, 11 (EXIT_CANNOT_CONNECT_TO_SERVICE) are expected,
+ # anything else suggests a configuration error
+ if [ $mret -ne 1 -a $mret -ne 11 ]; then
+ ret=1
+ break
+ fi
+ # "Access denied" also means the server is alive
+ echo "$RESPONSE" | grep -q "Access denied for user" && break
+
+ # Check process still exists
+ if ! /bin/kill -0 $daemon_pid 2>/dev/null; then
+ ret=1
+ break
+ fi
+ sleep 1
+done
+
+exit $ret
diff --git a/dev-db/mysql-init-scripts/files/mysqld_at-v2.service b/dev-db/mysql-init-scripts/files/mysqld_at-v2.service
new file mode 100644
index 000000000000..26964ea8a768
--- /dev/null
+++ b/dev-db/mysql-init-scripts/files/mysqld_at-v2.service
@@ -0,0 +1,45 @@
+[Unit]
+Description=MySQL database server
+ConditionPathExists=/etc/mysql/my%I.cnf
+After=network.target
+
+[Service]
+Type=simple
+User=mysql
+Group=mysql
+
+# Note: we set --basedir to prevent probes that might trigger SELinux alarms,
+# https://bugzilla.redhat.com/show_bug.cgi?id=547485
+ExecStart=/usr/sbin/mysqld --defaults-file=/etc/mysql/my%I.cnf --basedir=/usr
+ExecStartPost=/usr/libexec/mysqld-wait-ready $MAINPID
+
+# Give a reasonable amount of time for the server to start up/shut down
+TimeoutSec=300
+
+# Restart crashed server only, on-failure would also restart, for example, when
+# my.cnf contains unknown option
+Restart=on-abort
+RestartSec=5s
+
+# Place temp files in a secure directory, not /tmp
+PrivateTmp=true
+
+# To allow memlock to be used as non-root user if set in configuration
+CapabilityBoundingSet=CAP_IPC_LOCK
+
+# Prevent writes to /usr, /boot, and /etc
+ProtectSystem=full
+
+# Currently has issues with SELinux https://jira.mariadb.org/browse/MDEV-10404
+# This is safe to uncomment when not using SELinux
+#NoNewPrivileges=true
+
+PrivateDevices=true
+
+# Prevent accessing /home, /root and /run/user
+ProtectHome=true
+
+UMask=007
+
+[Install]
+WantedBy=multi-user.target
diff --git a/dev-db/mysql-init-scripts/files/run-s6 b/dev-db/mysql-init-scripts/files/run-s6
new file mode 100644
index 000000000000..1ab2253cd823
--- /dev/null
+++ b/dev-db/mysql-init-scripts/files/run-s6
@@ -0,0 +1,6 @@
+#!/bin/sh
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+if [ -e ./env ] ; then source ./env ; else echo "failed to source env" ; fi
+exec "${basedir}/sbin/mysqld" --defaults-file="${MY_CNF}" ${MY_ARGS} 2>&1
diff --git a/dev-db/mysql-init-scripts/metadata.xml b/dev-db/mysql-init-scripts/metadata.xml
new file mode 100644
index 000000000000..357d7d00f109
--- /dev/null
+++ b/dev-db/mysql-init-scripts/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>mysql-bugs@gentoo.org</email>
+ <name>MySQL</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-db/mysql-init-scripts/mysql-init-scripts-2.2-r3.ebuild b/dev-db/mysql-init-scripts/mysql-init-scripts-2.2-r3.ebuild
new file mode 100644
index 000000000000..8fa8c8341de8
--- /dev/null
+++ b/dev-db/mysql-init-scripts/mysql-init-scripts-2.2-r3.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit systemd s6
+
+DESCRIPTION="Gentoo MySQL init scripts."
+HOMEPAGE="https://www.gentoo.org/"
+SRC_URI=""
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd"
+IUSE=""
+
+DEPEND=""
+# This _will_ break with MySQL 5.0, 4.x, 3.x
+# It also NEEDS openrc for the save_options/get_options builtins.
+# The s6 support was added after openrc 0.16.2
+RDEPEND="
+ !<dev-db/mysql-5.1
+ !<sys-apps/openrc-0.16.2
+ "
+# Need to set S due to PMS saying we need it existing, but no SRC_URI
+S=${WORKDIR}
+
+src_install() {
+ newconfd "${FILESDIR}/conf.d-2.0" "mysql"
+
+ # s6 init scripts
+ if use amd64 || use x86 ; then
+ newconfd "${FILESDIR}/conf.d-2.0" "mysql-s6"
+ newinitd "${FILESDIR}/init.d-s6-2.2" "mysql-s6"
+ s6_install_service mysql "${FILESDIR}/run-s6"
+ s6_install_service mysql/log "${FILESDIR}/log-s6"
+ fi
+
+ newinitd "${FILESDIR}/init.d-2.2" "mysql"
+ newinitd "${FILESDIR}/init.d-supervise" "mysql-supervise"
+
+ # systemd unit installation
+ exeinto /usr/libexec
+ doexe "${FILESDIR}"/mysqld-wait-ready
+ systemd_newunit "${FILESDIR}/mysqld-v2.service" "mysqld.service"
+ systemd_newunit "${FILESDIR}/mysqld_at-v2.service" "mysqld@.service"
+ systemd_dotmpfilesd "${FILESDIR}/mysql.conf"
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/logrotate.mysql" "mysql"
+}
+
+pkg_postinst() {
+ if use amd64 || use x86 ; then
+ elog ""
+ elog "To use the mysql-s6 script, you need to install the optional sys-apps/s6 package."
+ elog "If you wish to use s6 logging support, comment out the log-error setting in your my.cnf"
+ fi
+
+ elog ""
+ elog "Starting with version 10.1.8, MariaDB includes an improved systemd unit named mariadb.service"
+ elog "You should prefer that unit over this package's mysqld.service."
+ einfo ""
+}
diff --git a/dev-db/mysql-proxy-0.8.2-r1 b/dev-db/mysql-proxy-0.8.2-r1
deleted file mode 100644
index 36c0e915cfdb..000000000000
--- a/dev-db/mysql-proxy-0.8.2-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=configure install prepare
-DEPEND=>=dev-libs/libevent-2.1 >=dev-libs/glib-2.16 >=dev-lang/lua-5.1:0 >=virtual/mysql-5.0 virtual/pkgconfig
-DESCRIPTION=A Proxy for the MySQL Client/Server protocol
-EAPI=5
-HOMEPAGE=http://dev.mysql.com/doc/mysql-proxy/en/
-IUSE=examples
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=>=dev-libs/libevent-2.1 >=dev-libs/glib-2.16 >=dev-lang/lua-5.1:0
-SLOT=0
-SRC_URI=https://launchpad.net/mysql-proxy/0.8/0.8.2/+download/mysql-proxy-0.8.2.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=e05875ef3a609ad1cf0915a66edfabe6
diff --git a/dev-db/mysql-proxy/Manifest b/dev-db/mysql-proxy/Manifest
new file mode 100644
index 000000000000..2f94ea4a276e
--- /dev/null
+++ b/dev-db/mysql-proxy/Manifest
@@ -0,0 +1,7 @@
+AUX mysql-proxy.cnf 1120 BLAKE2B 5e1bd66b984948dfde35be6709e0e6c175ff2685f708f34a98b1ee27bacb624b57a4be5775318663c0996dd780e8b05797b0320cedd5165135533042a04721ad SHA512 5f889422d7232608dcde5f332577c563b0c29b0db5a327659ce7b30cef7e4d498eca641159d49671b7368080ff2113511b6b362b44fb75ddd781a00e2879246b
+AUX mysql-proxy.confd 365 BLAKE2B 064bd99f0b233109fffb65dace18df9a6803cec6c6dbe7e47e3043eb1e4c627a875c07300bef2446968e3f493caa0426ee4f58f4b1dc59652eb89e2ac5330d7c SHA512 9a4a6499e03d939fcc5fbd5f71d1e377a1d003e542be7fab47d810899649f58e518aa34617c67b207477c7b1a85b75ce3045eb5959156c673b4c28c2c101185b
+AUX mysql-proxy.confd-0.8.0-r1 391 BLAKE2B 7896a8f6e4aa8edf8dfcee3e8a29f0aa30bfd1b4fcbb76dad92eafe1c42b1a9eff4a050ea71d1b98196459da39eaf843ec849e9dfc0d2b81f0bca77c34e94be0 SHA512 e07afd8502d87006cfd4640e83c1ecab98b862d0916ee351c9c60aaaa01f0766d51d0749d3f63f33df9f8bbbbc45ef21517fa0dbc87bf3ade8e3e6c4048c8a5b
+AUX mysql-proxy.initd 431 BLAKE2B fd9b3512056162470cb331cade13ee9d83ad91398bc7d907540606fbdf9c8139bec25aad9c2d8ad58d91bb39a406218ddb42d948b21d5a2aa03f714d43ac66b6 SHA512 184850991fbc7c2c625e28f217b12a6e44a38392d1f054dfd25ab6b4c298fb5c53177d6590f536ec3b23bf03b127ae7ee144cc5402bcd2cc8be44a478bc82af3
+DIST mysql-proxy-0.8.2.tar.gz 861995 BLAKE2B 2f6071d5c2a63462dc619ade0ce92db6845d0e010d4d5022314157b3cdac553b5ccff8149763844d42892eaa444f132587f02b8495ddd446ed02953909e59b5a SHA512 e083ea6344bf2d3b85a38127e42cbab659a959684f7f0f63272fa0df926d6d32dbbaaab2b6479ee8fc227fbc9af6f24e855d19700ec1ab4b904c5e638b4d64c8
+EBUILD mysql-proxy-0.8.2-r1.ebuild 1268 BLAKE2B fdaebbcb3663055180073a77f7868ea49b9d888bf72075696151d49a692c5692d50163473068f0184b734cf5d9aede13acd055b07f485c76a2b8f47e1a537f86 SHA512 491326aa07da2e83e440420950c687162d33c3393dd33ae845259a4e663726258f2bc2ba4783ad03289e99cd4164d008d0c8805e36358fa519fe528697d95c76
+MISC metadata.xml 553 BLAKE2B cbbc397ac51dc4760dcd482204ea2d1eca1ea479b9b46cb6681eb642143204d1d4e11da9483c1775d25f89419bbb263975606c3874d01f924df8bbdfd1b80195 SHA512 ea9b0711830e204234c0395e2637005cbf83187c7554435351447871ca99595756893ab4113adcac3deaa6df5495fdf9bf4d3091140c6d2ef498e832cc520388
diff --git a/dev-db/mysql-proxy/files/mysql-proxy.cnf b/dev-db/mysql-proxy/files/mysql-proxy.cnf
new file mode 100644
index 000000000000..7d15674f6b9d
--- /dev/null
+++ b/dev-db/mysql-proxy/files/mysql-proxy.cnf
@@ -0,0 +1,47 @@
+# MySQL Proxy's configuration file (mysql-proxy.cnf)
+# This file must be 0660 or more restrictive
+# otherwise mysql-proxy will refuse to load
+[mysql-proxy]
+#basedir = ...
+#daemon = true
+#defaults-file = ...
+#event-threads = ...
+keepalive = true
+log-backtrace-on-crash = true
+log-file = /var/log/mysql/mysql-proxy.log
+log-level = warning
+#log-use-syslog = true
+#lua-cpath = ...
+#lua-path = ...
+#max-open-files = ...
+pid-file = /var/run/mysql-proxy.pid
+#plugin-dir = ...
+#plugins = admin,proxy,debug,replicant
+#plugins = admin,proxy
+plugins = proxy
+#user = ...
+
+# module: admin
+admin-address = 127.0.0.1:4041
+#admin-lua-script = ...
+#admin-password = ...
+#admin-username = ...
+
+# module: proxy
+#no-proxy = false
+proxy-address = 127.0.0.1:4040
+proxy-backend-addresses = 127.0.0.1:3306
+proxy-fix-bug-25371 = false
+#proxy-lua-script = ...
+#proxy-pool-no-change-user = ...
+#proxy-read-only-backend-addresses = ...
+proxy-skip-profiling = false
+
+# module: replicant
+#replicant-master-address = ...
+#replicant-username = ...
+#replicant-password = ...
+#replicant-read-binlogs = ...
+
+# module: debug
+debug-address = 127.0.0.1:4043
diff --git a/dev-db/mysql-proxy/files/mysql-proxy.confd b/dev-db/mysql-proxy/files/mysql-proxy.confd
new file mode 100644
index 000000000000..079530159f82
--- /dev/null
+++ b/dev-db/mysql-proxy/files/mysql-proxy.confd
@@ -0,0 +1,12 @@
+# /etc/conf.d/mysql-proxy: config file for /etc/init.d/mysql-proxy
+
+# location of pidfile
+PIDFILE="/var/run/mysql-proxy.pid"
+
+# general options for mysql-proxy
+# do NOT specify --daemon or --pid-file=... here!
+OPTS="--log-use-syslog"
+
+# if you want mysql-proxy to depend on mysql, enable this:
+#RC_NEED="mysql" # baselayout-1
+#rc_need="mysql" # baselayout-2/OpenRC
diff --git a/dev-db/mysql-proxy/files/mysql-proxy.confd-0.8.0-r1 b/dev-db/mysql-proxy/files/mysql-proxy.confd-0.8.0-r1
new file mode 100644
index 000000000000..8b86431a3d8f
--- /dev/null
+++ b/dev-db/mysql-proxy/files/mysql-proxy.confd-0.8.0-r1
@@ -0,0 +1,12 @@
+# /etc/conf.d/mysql-proxy: config file for /etc/init.d/mysql-proxy
+
+# location of pidfile
+PIDFILE="/var/run/mysql-proxy.pid"
+
+# general options for mysql-proxy
+# do NOT specify --daemon or --pid-file=... here!
+OPTS="--defaults-file=/etc/mysql/mysql-proxy.cnf"
+
+# if you want mysql-proxy to depend on mysql, enable this:
+#RC_NEED="mysql" # baselayout-1
+#rc_need="mysql" # baselayout-2/OpenRC
diff --git a/dev-db/mysql-proxy/files/mysql-proxy.initd b/dev-db/mysql-proxy/files/mysql-proxy.initd
new file mode 100644
index 000000000000..7107facfd6f8
--- /dev/null
+++ b/dev-db/mysql-proxy/files/mysql-proxy.initd
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting MySQL Proxy"
+ start-stop-daemon --start --quiet \
+ --exec /usr/bin/mysql-proxy \
+ -- --daemon --pid-file="${PIDFILE}" ${OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping MySQL Proxy"
+ start-stop-daemon --stop --quiet \
+ --pidfile "${PIDFILE}"
+ eend $?
+}
diff --git a/dev-db/mysql-proxy/metadata.xml b/dev-db/mysql-proxy/metadata.xml
new file mode 100644
index 000000000000..dc0c708273db
--- /dev/null
+++ b/dev-db/mysql-proxy/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <longdescription>
+MySQL Proxy is a simple program that sits between your client and MySQL
+server(s) that can monitor, analyze or transform their communication. Its
+flexibility allows for unlimited uses; common ones include: load balancing;
+failover; query analysis; query filtering and modification; and many more.
+</longdescription>
+ <upstream>
+ <remote-id type="launchpad">mysql-proxy</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/mysql-proxy/mysql-proxy-0.8.2-r1.ebuild b/dev-db/mysql-proxy/mysql-proxy-0.8.2-r1.ebuild
new file mode 100644
index 000000000000..6a7abae6bab8
--- /dev/null
+++ b/dev-db/mysql-proxy/mysql-proxy-0.8.2-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils versionator
+
+MY_PV=$(get_version_component_range 1-2)
+DESCRIPTION="A Proxy for the MySQL Client/Server protocol"
+HOMEPAGE="http://dev.mysql.com/doc/mysql-proxy/en/"
+SRC_URI="https://launchpad.net/${PN}/${MY_PV}/${PV}/+download/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples"
+RDEPEND=">=dev-libs/libevent-2.1
+ >=dev-libs/glib-2.16
+ >=dev-lang/lua-5.1:0"
+DEPEND="${RDEPEND}
+ >=virtual/mysql-5.0
+ virtual/pkgconfig"
+
+src_prepare() {
+ sed -i \
+ -e 's|_EVENT_VERSION|LIBEVENT_VERSION|g' \
+ src/chassis-mainloop.c || die
+}
+
+src_configure() {
+ econf \
+ --includedir=/usr/include/${PN} \
+ --with-mysql \
+ --with-lua \
+ || die "econf failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ newinitd "${FILESDIR}"/${PN}.initd ${PN} || die
+ newconfd "${FILESDIR}"/${PN}.confd-0.8.0-r1 ${PN} || die
+ dodoc ChangeLog NEWS README
+ if use examples; then
+ docinto examples
+ dodoc examples/*.lua || die
+ dodoc lib/*.lua || die
+ fi
+ # mysql-proxy will refuse to start unless the config file is at most 0660.
+ insinto /etc/mysql
+ insopts -m0660
+ doins "${FILESDIR}"/${PN}.cnf || die
+}
diff --git a/dev-db/mysql-super-smack-1.3-r3 b/dev-db/mysql-super-smack-1.3-r3
deleted file mode 100644
index c07f5457fa46..000000000000
--- a/dev-db/mysql-super-smack-1.3-r3
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst prepare test
-DEPEND=mysql? ( virtual/mysql ) postgres? ( dev-db/postgresql[server] ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 =sys-devel/automake-1.13* >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=Benchmarking, stress testing, and load generation tool for MySQL & PostGreSQL
-EAPI=5
-HOMEPAGE=http://vegan.net/tony/supersmack/
-IUSE=+mysql postgres
-KEYWORDS=amd64 ~ppc x86
-LICENSE=GPL-2
-RDEPEND=mysql? ( virtual/mysql ) postgres? ( dev-db/postgresql[server] )
-REQUIRED_USE=|| ( mysql postgres )
-SLOT=0
-SRC_URI=http://vegan.net/tony/supersmack/super-smack-1.3.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 autotools-utils 5a4611dfba155b1659528663fad4cd5e desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=9760a13f3019b4ab60c020aea68c93b3
diff --git a/dev-db/mysql-super-smack/Manifest b/dev-db/mysql-super-smack/Manifest
new file mode 100644
index 000000000000..293bb10b532e
--- /dev/null
+++ b/dev-db/mysql-super-smack/Manifest
@@ -0,0 +1,8 @@
+AUX mysql-super-smack-1.2.destdir.patch 420 BLAKE2B be3b49d142a32f6ed00edbd6085d20f202f1d3061ad2e1463f2ea7be434ae1114bd9b776a03840ae9e4baff209b43a25b089a0e3863181273146e462dfcb3e7c SHA512 9319fb29af0e91bedc969a0c5f02bcac386274aa179af7ef3130b18ac9bfa36a0a422a76e50abb777323cac242283c1b680051689a6269ab7e567b5ae53a216b
+AUX mysql-super-smack-1.3-automake-1.13.patch 7680 BLAKE2B 99a28b7c857575b8e824d0e3f5ae87668a47e1e234315ad3657c5e388051164bcc03cadc9f80d9eac82f2b4f79864a595944a2ec896885b52044264ca3529755 SHA512 b74994f03b136c7642423ee5eb1346134ed127a9ca0996df83ed777f49f9dff3efe93889bc3a375868afec38be20303ffbede98dcfd3b6ec5921f0e417b5a000
+AUX mysql-super-smack-1.3-gen-data.patch 2265 BLAKE2B 42f85a5779968d13262ddf3b726d4522912bc29c4d81fce41fe61caeab85c7fa93be5c3497dc21a0acabc67e59446cc941deb6fb98ac2154cf7f84214b500ff6 SHA512 6a08a3ccc158e7c8e0500a8d3231d0b1fc0d0f4a41e2a5bf40426e480c6fc373b0fa7ff5c08b5d40afe559a34b97fd00412c43fe9212047f2c4d063b98ac2154
+AUX mysql-super-smack-1.3.amd64.patch 702 BLAKE2B e986f6c487d05c9de0ee3f3a397a2c63d21c05209efc48e8fa173975b88839baa6100150d0cdd6df42b7435cc8a411b5235cf92a586850ae3d57cb564a8b95a8 SHA512 5ac9c130534d5cea6caa70f6373850181ae81c68c1eb3cb9e7a774bdeeafdf822582fe9cb548b9eb1268a2b4edc516461b95238454abefcdd25677066d720da9
+AUX mysql-super-smack-1.3.gcc4.3.patch 237 BLAKE2B 97e8bdc1a208749a087e109293898c228be7b5fbd4e573e85d434ff002150b0494040159e4e70b81ad056efd610321fd2119c243c1f9df6560b3ee7124bd8315 SHA512 2682770012d8e429b8fe93bb77e274e1d9570cf4ff2301511f4a3b8e0ab56dc5fb5c2b3f46ee94a6aad79a84c740c0f352399f304d58eba1efe3ed6c870269a1
+DIST super-smack-1.3.tar.gz 155375 BLAKE2B aabcd6ab6c7da0e847c734bd57b7228a0c37f41aac789e63a8285b5a0fb43360101728ff6a2dc84b63cf9c0b5361770aa909382f9e2f50abdc2ea1e8407f835b SHA512 5343fa78bdf483c1019c9e25d1fdb15581342d49b863a536eb1cf8c38bde5641fdf135fe5a8ec87f74051fd9766b2f5e4f09f963afe2eb1cd7ea41edfa260920
+EBUILD mysql-super-smack-1.3-r3.ebuild 1506 BLAKE2B 546c700c3a9c1b07e3e9da2baeeae7b055d5c30191bc1b76f4ddc600411b8d741adb535a807d6936fad4a82e187200ea239dd7c83c066ab94a2fc8271c475505 SHA512 7cf407a3535cbe44071fc52443ed01443970c264b83dc84de646408a924a9ea7f6951a720a83bb45f65a6721096f3d4290b85aecc52c4f3eb08a1138533fadfa
+MISC metadata.xml 318 BLAKE2B 93f00d35a0b2e5d19bc3d697fb4e3c9d68a91d8a215b97570f9ce106d2a811c7d0d7a415851660157d6767d0cdc179c8451598b58c48868076db79d71ee537cd SHA512 4c4e7510b5c21355fc41f1a4b2b11400a1367b6e6420b3ae4607a2797cbad29ab5385b5c6b1845f126598a94b070efdd6c16cccf255a15a0154c36ed383ff122
diff --git a/dev-db/mysql-super-smack/files/mysql-super-smack-1.2.destdir.patch b/dev-db/mysql-super-smack/files/mysql-super-smack-1.2.destdir.patch
new file mode 100644
index 000000000000..02399905a11e
--- /dev/null
+++ b/dev-db/mysql-super-smack/files/mysql-super-smack-1.2.destdir.patch
@@ -0,0 +1,13 @@
+--- super-smack-1.2/Makefile.am.orig 2004-02-23 19:57:22.000000000 -0800
++++ super-smack-1.2/Makefile.am 2004-02-23 19:57:40.000000000 -0800
+@@ -23,8 +23,8 @@
+ DATADIR= @DATADIR@
+
+ install-data-local:
+- $(mkinstalldirs) $(SMACKS_DIR) $(DATADIR)
+- cp -rp $(srcdir)/smacks/* $(SMACKS_DIR)
++ $(mkinstalldirs) $(DESTDIR)$(SMACKS_DIR) $(DESTDIR)$(DATADIR)
++ cp -rp $(srcdir)/smacks/* $(DESTDIR)$(SMACKS_DIR)
+
+
+ dist-hook:
diff --git a/dev-db/mysql-super-smack/files/mysql-super-smack-1.3-automake-1.13.patch b/dev-db/mysql-super-smack/files/mysql-super-smack-1.3-automake-1.13.patch
new file mode 100644
index 000000000000..6cf69580b887
--- /dev/null
+++ b/dev-db/mysql-super-smack/files/mysql-super-smack-1.3-automake-1.13.patch
@@ -0,0 +1,256 @@
+diff -aurwN a/configure.ac b/configure.ac
+--- a/configure.ac 2014-06-20 14:43:52.744753334 -0400
++++ b/configure.ac 2014-06-20 14:59:51.263609319 -0400
+@@ -16,9 +16,9 @@
+
+ # Process this file with autoconf to produce a configure script.
+
+-AC_INIT()
++AC_INIT([super-smack], [1.1])
+ AM_CONFIG_HEADER(config.h)
+-AM_INIT_AUTOMAKE(super-smack, 1.1)
++AM_INIT_AUTOMAKE
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
+
+ # Checks for programs.
+@@ -31,6 +31,14 @@
+ AM_PROG_LEX
+ AC_PROG_YACC
+
++AH_TEMPLATE([HAVE_CRYPT], [Define if we have a crypt()])
++AH_TEMPLATE([HAVE_MYSQL], [MySQL Support])
++AH_TEMPLATE([HAVE_ORACLE], [PostgreSQL Support])
++AH_TEMPLATE([HAVE_PGSQL], [Oracle Support])
++AH_TEMPLATE([SMACK_DATADIR], [Sample .smack data files])
++
++AC_CONFIG_MACRO_DIRS([m4])
++
+ # get super-smack datadir
+ AC_ARG_WITH(datadir,
+ [ --with-datadir=DIR Specify default smack datadir],
+diff -aurwN a/m4/crypt.m4 b/m4/crypt.m4
+--- a/m4/crypt.m4 1969-12-31 19:00:00.000000000 -0500
++++ b/m4/crypt.m4 2014-06-20 15:06:42.289976907 -0400
+@@ -0,0 +1,5 @@
++AC_DEFUN([AC_FUNC_CRYPT], [
++ AC_CHECK_LIB(crypt, crypt)
++ AC_CHECK_FUNC(crypt, AC_DEFINE(HAVE_CRYPT))
++])
++
+diff -aruwN a/m4/lex.m4 b/m4/lex.m4
+--- a/m4/lex.m4 1969-12-31 19:00:00.000000000 -0500
++++ b/m4/lex.m4 2014-06-20 16:51:23.548854098 -0400
+@@ -0,0 +1,6 @@
++AC_DEFUN([AM_PROG_LEX],
++[missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1)
++AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex")
++AC_PROG_LEX
++AC_DECL_YYTEXT])
++
+diff -aurwN a/m4/libz.m4 b/m4/libz.m4
+--- a/m4/libz.m4 1969-12-31 19:00:00.000000000 -0500
++++ b/m4/libz.m4 2014-06-20 15:06:24.260569878 -0400
+@@ -0,0 +1,4 @@
++AC_DEFUN([AC_LIB_Z], [
++ AC_CHECK_LIB(z, compress)
++])
++
+diff -aurwN a/m4/mysql.m4 b/m4/mysql.m4
+--- a/m4/mysql.m4 1969-12-31 19:00:00.000000000 -0500
++++ b/m4/mysql.m4 2014-06-20 15:10:48.291892456 -0400
+@@ -0,0 +1,76 @@
++#serial 1
++AC_DEFUN([AC_LIB_MYSQL], [
++ AC_ARG_WITH(mysql-lib,
++ [ --with-mysql-lib=DIR Look for MySQL client library in DIR],
++ mysql_lib=$withval, mysql_lib="")
++
++ if test "x$want_mysql" = "xyes"
++ then
++ AC_MSG_CHECKING([for libmysqlclient])
++ AC_MSG_RESULT()
++
++ mysql_ok=no
++
++ SAVE_LIBS=$LIBS
++
++ mysql_lib="$mysql_lib /usr/lib /usr/lib/mysql \
++ /usr/local/lib /usr/local/lib/mysql \
++ /usr/local/mysql/lib"
++
++ for dir in $mysql_lib; do
++ if test "x$mysql_found" != "xyes"
++ then
++ if test -f "$dir/libmysqlclient.so" ;
++ then
++ LIBS="-L$dir $SAVE_LIBS $LIBZ_LIB"
++ MYSQL_LIB="-L$dir -lmysqlclient $LIBZ_LIB"
++ AC_SUBST(MYSQL_LIB)
++ AC_CHECK_LIB(mysqlclient, mysql_real_connect,
++ mysql_ok=yes, mysql_ok=no)
++ fi
++ fi
++ done
++
++ if test "x$mysql_ok" != "xyes"
++ then
++ AC_MSG_ERROR([Could not find libmysqlclient in '$mysql_lib'])
++ fi
++ fi
++])
++
++AC_DEFUN([AC_HEADER_MYSQL], [
++ AC_ARG_WITH(mysql-include,
++ [ --with-mysql-include=DIR
++ Look for MySQL include files in DIR],
++ mysql_include=$withval, mysql_include="")
++
++ if test "x$want_mysql" = "xyes"
++ then
++ AC_MSG_CHECKING([for mysql.h])
++ AC_MSG_RESULT()
++
++ mysql_found=no
++
++ mysql_include="$mysql_include /usr/include /usr/include/mysql \
++ /usr/local/include /usr/local/include/mysql \
++ /usr/local/mysql/include"
++
++ for dir in $mysql_include; do
++ if test "x$mysql_found" != "xyes"
++ then
++ if test -f "$dir/mysql.h"
++ then
++ MYSQL_INCLUDE="-I$dir"
++ AC_SUBST(MYSQL_INCLUDE)
++ mysql_found=yes
++ fi
++ fi
++ done
++
++ if test "x$mysql_found" != "xyes"
++ then
++ AC_MSG_ERROR([Could not find mysql.h in '$mysql_include'])
++ fi
++ fi
++])
++
+diff -aurwN a/m4/oracle.m4 b/m4/oracle.m4
+--- a/m4/oracle.m4 1969-12-31 19:00:00.000000000 -0500
++++ b/m4/oracle.m4 2014-06-20 15:05:05.543169365 -0400
+@@ -0,0 +1,10 @@
++AC_DEFUN([AC_LIB_ORACLE], [
++ ORACLE_LIB=""
++ AC_SUBST(ORACLE_LIB)
++])
++
++AC_DEFUN([AC_HEADER_ORACLE], [
++ ORACLE_INCLUDE=""
++ AC_SUBST(ORACLE_INCLUDE)
++])
++
+diff -aurwN a/m4/postgresql.m4 b/m4/postgresql.m4
+--- a/m4/postgresql.m4 1969-12-31 19:00:00.000000000 -0500
++++ b/m4/postgresql.m4 2014-06-20 15:06:09.311064874 -0400
+@@ -0,0 +1,75 @@
++AC_DEFUN([AC_LIB_PGSQL], [
++ AC_ARG_WITH(pgsql-lib,
++ [ --with-pgsql-lib=DIR Look for PostgreSQL client library in DIR],
++ pgsql_lib=$withval, pgsql_lib="")
++
++ if test "x$want_pgsql" = "xyes"
++ then
++ AC_MSG_CHECKING([for libpq])
++ AC_MSG_RESULT()
++
++ pgsql_ok=no
++
++ SAVE_LIBS=$LIBS
++
++ pgsql_lib="$pgsql_lib /usr/lib /usr/lib/pgsql \
++ /usr/local/lib /usr/local/lib/pgsql \
++ /usr/local/pgsql/lib"
++
++ for dir in $pgsql_lib; do
++ if test "x$pgsql_found" != "xyes"
++ then
++ if test -f "$dir/libpq.so"
++ then
++ LIBS="-L$dir $SAVE_LIBS"
++ PGSQL_LIB="-L$dir -lpq"
++ AC_SUBST(PGSQL_LIB)
++ AC_CHECK_LIB(pq, PQconnectdb,
++ pgsql_ok=yes, pgsql_ok=no)
++ fi
++ fi
++ done
++
++ if test "x$pgsql_ok" != "xyes"
++ then
++ AC_MSG_ERROR([Could not find libpq in '$pgsql_lib'])
++ fi
++ fi
++])
++
++AC_DEFUN([AC_HEADER_PGSQL], [
++ AC_ARG_WITH(pgsql-include,
++ [ --with-pgsql-include=DIR
++ Look for PostgreSQL include files in DIR],
++ pgsql_include=$withval, pgsql_include="")
++
++ if test "x$want_pgsql" = "xyes"
++ then
++ AC_MSG_CHECKING([for libpq-fe.h])
++ AC_MSG_RESULT()
++
++ pgsql_found=no
++
++ pgsql_include="$pgsql_include /usr/include /usr/include/pgsql \
++ /usr/local/include /usr/local/include/pgsql \
++ /usr/local/pgsql/include"
++
++ for dir in $pgsql_include; do
++ if test "x$pgsql_found" != "xyes"
++ then
++ if test -f "$dir/libpq-fe.h"
++ then
++ PGSQL_INCLUDE="-I$dir"
++ AC_SUBST(PGSQL_INCLUDE)
++ pgsql_found=yes
++ fi
++ fi
++ done
++
++ if test "x$pgsql_found" != "xyes"
++ then
++ AC_MSG_ERROR([Could not find libpq-fe.h in '$pgsql_include'])
++ fi
++ fi
++])
++
+diff -aurwN a/src/Makefile.am b/src/Makefile.am
+--- a/src/Makefile.am 2014-06-20 14:37:35.266956252 -0400
++++ b/src/Makefile.am 2014-06-20 15:12:40.278227315 -0400
+@@ -16,7 +16,8 @@
+
+ # Process this file with automake to create Makefile.in
+
+-INCLUDES = @MYSQL_INCLUDE@ @PGSQL_INCLUDE@ @ORACLE_INCLUDE@
++AM_CPPFLAGS = @MYSQL_INCLUDE@ @PGSQL_INCLUDE@ @ORACLE_INCLUDE@
++BUILT_SOURCES = super-smack-yacc.hh
+
+ noinst_PROGRAMS=test-dictionary test-client test_tcp_client
+ bin_PROGRAMS=super-smack super-smack-gen-data
+diff -aurN a/src/super-smack-lex.ll b/src/super-smack-lex.ll
+--- a/src/super-smack-lex.ll 2003-05-14 21:08:34.000000000 -0400
++++ b/src/super-smack-lex.ll 2014-06-24 08:56:05.970614176 -0400
+@@ -6,7 +6,7 @@
+ #include <ctype.h>
+ #include "query.h"
+ #include "parse.h"
+- #include "super-smack-yacc.h"
++ #include "super-smack-yacc.hh"
+
+ static string q_str = "";
+ %}
+
diff --git a/dev-db/mysql-super-smack/files/mysql-super-smack-1.3-gen-data.patch b/dev-db/mysql-super-smack/files/mysql-super-smack-1.3-gen-data.patch
new file mode 100644
index 000000000000..37abfe35ec97
--- /dev/null
+++ b/dev-db/mysql-super-smack/files/mysql-super-smack-1.3-gen-data.patch
@@ -0,0 +1,45 @@
+diff -Nuar super-smack-1.3.orig/smacks/select-key.smack super-smack-1.3/smacks/select-key.smack
+--- super-smack-1.3.orig/smacks/select-key.smack 2005-05-30 03:04:38.000000000 -0700
++++ super-smack-1.3/smacks/select-key.smack 2008-11-13 22:27:48.125627179 -0800
+@@ -24,7 +24,7 @@
+ min_rows "90000"; // the table must have at least that many rows
+ data_file "words.dat"; // if the table is empty, load the data from
+ //this file
+- gen_data_file "gen-data -n 90000 -f %12-12s%n,%25-25s,%n,%d";
++ gen_data_file "super-smack-gen-data -n 90000 -f %12-12s%n,%25-25s,%n,%d";
+ // if the file above does not exist, generate it with the above shell command
+ // you can replace this command with anything that prints comma-delimited
+ // data to stdout, just make sure you have the right number of columns
+diff -Nuar super-smack-1.3.orig/smacks/update-select.smack super-smack-1.3/smacks/update-select.smack
+--- super-smack-1.3.orig/smacks/update-select.smack 2005-05-30 03:04:51.000000000 -0700
++++ super-smack-1.3/smacks/update-select.smack 2008-11-13 22:27:45.070167829 -0800
+@@ -24,7 +24,7 @@
+ min_rows "90000"; // the table must have at least that many rows
+ data_file "words.dat"; // if the table is empty, load the data from
+ //this file
+- gen_data_file "gen-data -n 90000 -f %12-12s%n,%25-25s,%n,%d";
++ gen_data_file "super-smack-gen-data -n 90000 -f %12-12s%n,%25-25s,%n,%d";
+ // if the file above does not exist, generate it with the above command
+ }
+
+diff -Nuar super-smack-1.3.orig/src/Makefile.am super-smack-1.3/src/Makefile.am
+--- super-smack-1.3.orig/src/Makefile.am 2001-02-24 03:44:30.000000000 -0800
++++ super-smack-1.3/src/Makefile.am 2008-11-13 22:27:37.693573246 -0800
+@@ -19,7 +19,7 @@
+ INCLUDES = @MYSQL_INCLUDE@ @PGSQL_INCLUDE@ @ORACLE_INCLUDE@
+
+ noinst_PROGRAMS=test-dictionary test-client test_tcp_client
+-bin_PROGRAMS=super-smack gen-data
++bin_PROGRAMS=super-smack super-smack-gen-data
+ test_dictionary_SOURCES=test-dictionary.cc \
+ dictionary.cc dictionary.h \
+ die.cc die.h \
+@@ -57,7 +57,7 @@
+ tcp_client.h tcp_client.cc
+ super_smack_LDADD = @MYSQL_LIB@ @PGSQL_LIB@ @ORACLE_LIB@
+
+-gen_data_SOURCES=gen-data.cc die.cc die.h
++super_smack_gen_data_SOURCES=gen-data.cc die.cc die.h
+
+ # yacc needs to generate a y.tab.h
+ YFLAGS = -d
diff --git a/dev-db/mysql-super-smack/files/mysql-super-smack-1.3.amd64.patch b/dev-db/mysql-super-smack/files/mysql-super-smack-1.3.amd64.patch
new file mode 100644
index 000000000000..c2c5db0c56f0
--- /dev/null
+++ b/dev-db/mysql-super-smack/files/mysql-super-smack-1.3.amd64.patch
@@ -0,0 +1,20 @@
+--- supesmack-1.3/src/query.cc.orig 2005-04-30 14:51:29.000000000 +0100
++++ supesmack-1.3/src/query.cc 2006-08-15 22:06:06.000000000 +0100
+@@ -197,7 +197,7 @@
+ {
+ string s((*i).first);
+ int str_len = (*i).first.length();
+- if((unsigned)p + str_len + 3 *sizeof(int) < (unsigned)p_end )
++ if((unsigned long)p + str_len + 3 *sizeof(int) < (unsigned long)p_end )
+ {
+ *p++ = (char) str_len;
+ const char* q_type_name = s.c_str();
+@@ -216,7 +216,7 @@
+ die(0, "report buffer overflow -- too many query types");
+ }
+
+- len = (unsigned)p - (unsigned)buf;
++ len = (unsigned long)p - (unsigned long)buf;
+ *(buf) = num_recs;
+
+ if(write(fd, buf, len) != len)
diff --git a/dev-db/mysql-super-smack/files/mysql-super-smack-1.3.gcc4.3.patch b/dev-db/mysql-super-smack/files/mysql-super-smack-1.3.gcc4.3.patch
new file mode 100644
index 000000000000..23bcd56e019c
--- /dev/null
+++ b/dev-db/mysql-super-smack/files/mysql-super-smack-1.3.gcc4.3.patch
@@ -0,0 +1,9 @@
+--- src/dictionary.h.orig 2008-10-31 19:12:51.000000000 +0100
++++ src/dictionary.h 2008-10-31 19:13:12.000000000 +0100
+@@ -23,6 +23,7 @@
+
+ #include <string>
+ #include <vector>
++#include <cstring>
+ #include <time.h>
+ #include <stdlib.h>
diff --git a/dev-db/mysql-super-smack/metadata.xml b/dev-db/mysql-super-smack/metadata.xml
new file mode 100644
index 000000000000..c78c5193bd0d
--- /dev/null
+++ b/dev-db/mysql-super-smack/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person"><email>robbat2@gentoo.org</email></maintainer>
+<maintainer type="project">
+<email>mysql-bugs@gentoo.org</email>
+<name>MySQL</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-db/mysql-super-smack/mysql-super-smack-1.3-r3.ebuild b/dev-db/mysql-super-smack/mysql-super-smack-1.3-r3.ebuild
new file mode 100644
index 000000000000..d7cbc48eae64
--- /dev/null
+++ b/dev-db/mysql-super-smack/mysql-super-smack-1.3-r3.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+WANT_AUTOMAKE="1.13"
+AUTOTOOLS_AUTORECONF="YES"
+#AUTOTOOLS_IN_SOURCE_BUILD="YES"
+
+inherit eutils autotools-utils
+
+MY_PN="super-smack"
+MY_P="${MY_PN}-${PV}"
+DESCRIPTION="Benchmarking, stress testing, and load generation tool for MySQL & PostGreSQL"
+HOMEPAGE="http://vegan.net/tony/supersmack/"
+SRC_URI="http://vegan.net/tony/supersmack/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="+mysql postgres"
+REQUIRED_USE="|| ( mysql postgres )"
+
+DEPEND="mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql[server] )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.2.destdir.patch
+ "${FILESDIR}"/${PN}-1.3.amd64.patch
+ "${FILESDIR}"/${PN}-1.3.gcc4.3.patch
+ "${FILESDIR}"/${PN}-1.3-gen-data.patch
+ "${FILESDIR}"/${PN}-1.3-automake-1.13.patch
+)
+DOCS=( CHANGES INSTALL MANUAL README TUTORIAL )
+
+src_prepare() {
+ # Clean up files so eautoreconf does not pick up any
+ # deprecated autotools macros.
+ rm acinclude.m4 aclocal.m4 acconfig.h config.status config.h || die
+ mv configure.in configure.ac || die
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(usex mysql --with-mysql "")
+ $(usex postgres --with-pgsql "")
+ --with-datadir=/var/tmp/${MY_PN}
+ --with-smacks-dir=/usr/share/${MY_PN}
+ )
+ autotools-utils_src_configure
+}
+
+pkg_postinst() {
+ elog "The gen-data binary is now installed as super-smack-gen-data"
+}
diff --git a/dev-db/mysql-udf-base64-20010618 b/dev-db/mysql-udf-base64-20010618
deleted file mode 100644
index ef30b072a144..000000000000
--- a/dev-db/mysql-udf-base64-20010618
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile install postinst prepare setup unpack
-DEPEND=>=virtual/mysql-5.1
-DESCRIPTION=MySQL UDFs that provide base64 encode/decode
-EAPI=4
-HOMEPAGE=http://mirrors.sohu.com/mysql/Contrib/Old-Versions/
-KEYWORDS=~amd64 ~x86
-LICENSE=PHP-2.02
-RDEPEND=>=virtual/mysql-5.1
-SLOT=0
-SRC_URI=http://mirrors.sohu.com/mysql/Contrib/Old-Versions/mysql-udf-base64.c -> mysql-udf-base64-20010618.c http://mirrors.sohu.com/mysql/Contrib/Old-Versions/mysql-udf-base64.readme -> mysql-udf-base64-20010618.readme
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=992d7ef9623f40092e5ad189b1b34bbb
diff --git a/dev-db/mysql-udf-base64/Manifest b/dev-db/mysql-udf-base64/Manifest
new file mode 100644
index 000000000000..7151fd1aa582
--- /dev/null
+++ b/dev-db/mysql-udf-base64/Manifest
@@ -0,0 +1,6 @@
+AUX mysql-udf-base64-signedness.patch 879 BLAKE2B ed3876d8b314ef0030006afde8f3f3345b2fdff9f6b39cdb6e2173f585da326e64a2106b76696e94cdfb30ac0ad1cd46663809373ba431dcf6ecc19970671b77 SHA512 7bbd3c477feacecf2bcb8297e1ab482c5b67efbec8cc475627886d4bc48105ca31d32b49fa9ee0d7d0948d94d9d202a2d48c82ebf0e19dd2f3f3da1da362a7ba
+AUX mysql-udf-base64.sql 205 BLAKE2B 3f69177e24534c39886d3027715a50b4bfd4d15d672e8d42f678c2a183798b4d18db69befde4365d08ccab477fba8dcd8ffc617615965f096dd326dfc18c58e0 SHA512 d223b2dc206930a46c6c2c5311f4cbeb5757c7a66b5c5f345533e2d319dc6185eada25b98ef1d5b05c2b804c0f92f22e99b3a340a8b9bb332d8adc00585997d2
+DIST mysql-udf-base64-20010618.c 7106 BLAKE2B 3f295cb172a3a9c3ea89b8cc24b03d8cdc1113ec8df00777069c8fe892fa91df3b2dc8da4193acd74c69c61c3144c4f429fc8d54fbe7cc4f7caba3b10cabe76d SHA512 23d2d1da7481626ebdb8ca3e31d01ae17903ff431415c7bca6ab20e414dc8751ab105a73e55b66a380e0e11ac0fc949b79d5f3c34f3d353abc1a52627be45f86
+DIST mysql-udf-base64-20010618.readme 222 BLAKE2B d030fa20512cdc6a8efe32aa7e11af307016f49b433f76cc5b66d62a6b602d3198a5924cea4e3012395e8e243ee82a298d437415f5989b94bb6c14fc4da96066 SHA512 2e2a17d7d1f1435bda59c89529e38a4843be814de5cb0db57643f8feb99a59cadf1e518e2903c470cd5931a964541dc5cc5d1b7f9041e7ed49442c37f139b2aa
+EBUILD mysql-udf-base64-20010618.ebuild 1429 BLAKE2B 8b5a50219307fd4f49e7b7e43d0cbee7425e7d4971ed8aeda0b8434057f77666d16796e92e33e7016df46e3ce145d8129e41be087e9a5e2a13cc4152ef2fb576 SHA512 6ac0dd2e8128945f8d8ace8ae5c9227a2224fcd51513b4a52f24f238f75511b9ca1d5b1076807356ea36ac3c83157b7dea42fd6f856e4b25085028c7d49eabf3
+MISC metadata.xml 166 BLAKE2B c254f1fb642881aba57637be14fb0a89b10384f91a128feaec3a8c870d76efc2cbacb92caccc0dee2dd19a5ac5eaf8643080dafa05c4e2ac96a68568927e5afd SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84
diff --git a/dev-db/mysql-udf-base64/files/mysql-udf-base64-signedness.patch b/dev-db/mysql-udf-base64/files/mysql-udf-base64-signedness.patch
new file mode 100644
index 000000000000..5084a9dd0128
--- /dev/null
+++ b/dev-db/mysql-udf-base64/files/mysql-udf-base64-signedness.patch
@@ -0,0 +1,29 @@
+--- mysql-udf-base64.c.orig 2011-10-16 14:17:13.000000000 +0200
++++ mysql-udf-base64.c 2011-10-16 14:18:41.000000000 +0200
+@@ -49,7 +49,7 @@
+ #include <string.h>
+ #include <mysql/mysql.h>
+
+-static char base64_table[] =
++static const char base64_table[] =
+ { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
+ 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
+ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
+@@ -101,7 +101,7 @@
+ unsigned long len;
+
+ /* *is_null=0; */
+- current = args->args[0];
++ current = (unsigned char*) args->args[0];
+ len = args->lengths[0];
+
+ if (len <= 0 || args->arg_type[0] != STRING_RESULT )
+@@ -211,7 +211,7 @@
+ }
+ }
+
+- current = args->args[0];
++ current = (unsigned char*) args->args[0];
+ len = args->lengths[0];
+
+ if (len <= 0 || args->arg_type[0] != STRING_RESULT )
diff --git a/dev-db/mysql-udf-base64/files/mysql-udf-base64.sql b/dev-db/mysql-udf-base64/files/mysql-udf-base64.sql
new file mode 100644
index 000000000000..619d4b0013d2
--- /dev/null
+++ b/dev-db/mysql-udf-base64/files/mysql-udf-base64.sql
@@ -0,0 +1,5 @@
+drop function base64encode;
+drop function base64decode;
+
+create function base64encode returns string soname 'mysql_udf_base64.so';
+create function base64decode returns string soname 'mysql_udf_base64.so';
diff --git a/dev-db/mysql-udf-base64/metadata.xml b/dev-db/mysql-udf-base64/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/dev-db/mysql-udf-base64/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/dev-db/mysql-udf-base64/mysql-udf-base64-20010618.ebuild b/dev-db/mysql-udf-base64/mysql-udf-base64-20010618.ebuild
new file mode 100644
index 000000000000..a7b4b06a6907
--- /dev/null
+++ b/dev-db/mysql-udf-base64/mysql-udf-base64-20010618.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+MY_PN="${PN//-/_}"
+
+DESCRIPTION="MySQL UDFs that provide base64 encode/decode"
+HOMEPAGE="http://mirrors.sohu.com/mysql/Contrib/Old-Versions/"
+SRC_URI="http://mirrors.sohu.com/mysql/Contrib/Old-Versions/${PN}.c -> ${P}.c
+ http://mirrors.sohu.com/mysql/Contrib/Old-Versions/${PN}.readme -> ${P}.readme"
+
+LICENSE="PHP-2.02"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=">=virtual/mysql-5.1"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"
+
+# compile helper
+_compile() {
+ local CC="$(tc-getCC)"
+ echo "${CC} ${@}" && "${CC}" "${@}"
+}
+
+pkg_setup() {
+ MYSQL_PLUGINDIR="$(mysql_config --plugindir)"
+ MYSQL_INCLUDE="$(mysql_config --include)"
+}
+
+src_unpack() {
+ cp -f "${DISTDIR}/${P}.c" "${S}/${PN}.c"
+ cp -f "${DISTDIR}/${P}.readme" "${S}/${PN}.readme"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-signedness.patch"
+}
+
+src_compile() {
+ _compile ${CFLAGS} -Wall -fPIC ${MYSQL_INCLUDE} \
+ -shared ${LDFLAGS} -o ${MY_PN}.so ${PN}.c
+}
+
+src_install() {
+ exeinto "${MYSQL_PLUGINDIR}"
+ doexe ${MY_PN}.so
+ newdoc ${PN}.readme README
+ newdoc "${FILESDIR}/${PN}.sql" ${MY_PN}.sql
+}
+
+pkg_postinst() {
+ elog
+ elog "Please have a look at the documentation, how to"
+ elog "enable/disable the UDF functions of ${PN}."
+ elog
+ elog "The documentation is located here:"
+ elog "/usr/share/doc/${PF}"
+ elog
+}
diff --git a/dev-db/mysql-udf-http-1.0 b/dev-db/mysql-udf-http-1.0
deleted file mode 100644
index b8392eb08678..000000000000
--- a/dev-db/mysql-udf-http-1.0
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=configure install postinst prepare setup
-DEPEND=>=virtual/mysql-5.1 net-misc/curl >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=MySQL User-defined function (UDF) for HTTP REST
-EAPI=4
-HOMEPAGE=https://code.google.com/p/mysql-udf-http/
-KEYWORDS=~amd64 ~x86
-LICENSE=BSD-2
-RDEPEND=>=virtual/mysql-5.1 net-misc/curl
-SLOT=0
-SRC_URI=https://mysql-udf-http.googlecode.com/files/mysql-udf-http-1.0.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=e8f50c89b73af6d0212aeeab7be4a268
diff --git a/dev-db/mysql-udf-http/Manifest b/dev-db/mysql-udf-http/Manifest
new file mode 100644
index 000000000000..59116e9ac75a
--- /dev/null
+++ b/dev-db/mysql-udf-http/Manifest
@@ -0,0 +1,4 @@
+AUX mysql-udf-http-stdlib.patch 262 BLAKE2B 7d80e33afafc57072ffc2bff22a3ff297dfc5311e1d13ebb668b32e371e3dde4a71859ff268b567a237f640bc2f01679065f5c5ab13223501cdd5a89e85ca66a SHA512 9e914bafffa08ace217ffab6de9497cf0cbe4bcc2f5c10fb9c381e540cc700bdf356fdde8edcce539e3e0d2728083451e5ec147c24bf63c9861d35b3030a6b77
+DIST mysql-udf-http-1.0.tar.gz 322160 BLAKE2B 50097f0e58b6adb23b51f6aa760fdb58c226196d274f1a115da7824be459538feade2365cdbc15e8c5a4fbeddd5513d73fa7773f69a41e305d8687917600d4d1 SHA512 84feb7cfec052e368131bdf44937868339d9d8694128cd5257aa248ce3d1e2e660f3df1e7da99f64b3954fa66c29ed7af5a809fa5ebbd93a96c6cd2ec2ec81de
+EBUILD mysql-udf-http-1.0.ebuild 1303 BLAKE2B 7e496664c99bef30023e2bf3d1679b7d21cad9006cbb6babd9d010c932a77ac9c487b1d05cbfbef70f57b6db9ad1dc8f1f19def2ea3309c1f0ae6147606dec61 SHA512 bdbbc1ddb92411972cfd1365cf3745669006f86710a17a5d3adc6232c33e2e5868b3ca1f272a9dcd57a444cac1ced5cad38dc2a28a97a403c09302af73a64306
+MISC metadata.xml 251 BLAKE2B a8ed853b16c23d8a55dfce0a0cf8b7072a29c573b7bbac0b538173766e320222aef7ea91789c9a9a90e0a191505f2c5986c508352fb2277aae4773089b4ec773 SHA512 e1e841d7dcee0bb517f95e3e36a03deb356ff186b63674f3f4b87cf29daed5b3070ac9442eec72c84820a4c01ef0f715b8589f496495a4a8eac2c4d4be48815d
diff --git a/dev-db/mysql-udf-http/files/mysql-udf-http-stdlib.patch b/dev-db/mysql-udf-http/files/mysql-udf-http-stdlib.patch
new file mode 100644
index 000000000000..6e371fc4a835
--- /dev/null
+++ b/dev-db/mysql-udf-http/files/mysql-udf-http-stdlib.patch
@@ -0,0 +1,10 @@
+--- src/mysql-udf-http.c.orig 2010-09-06 06:00:32.000000000 +0200
++++ src/mysql-udf-http.c 2011-10-18 16:36:37.000000000 +0200
+@@ -2,6 +2,7 @@
+ #include <string.h>
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <curl/curl.h>
+ #include "mysql-udf-http.h"
+
diff --git a/dev-db/mysql-udf-http/metadata.xml b/dev-db/mysql-udf-http/metadata.xml
new file mode 100644
index 000000000000..c28680ca19b4
--- /dev/null
+++ b/dev-db/mysql-udf-http/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="google-code">mysql-udf-http</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/mysql-udf-http/mysql-udf-http-1.0.ebuild b/dev-db/mysql-udf-http/mysql-udf-http-1.0.ebuild
new file mode 100644
index 000000000000..76152f4b2812
--- /dev/null
+++ b/dev-db/mysql-udf-http/mysql-udf-http-1.0.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils toolchain-funcs autotools
+
+DESCRIPTION="MySQL User-defined function (UDF) for HTTP REST"
+HOMEPAGE="https://code.google.com/p/mysql-udf-http/"
+SRC_URI="https://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=">=virtual/mysql-5.1
+ net-misc/curl"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ MYSQL_PLUGINDIR="$(mysql_config --plugindir)"
+ MYSQL_INCLUDE="$(mysql_config --include)"
+}
+
+src_prepare() {
+ # fix README
+ sed -i -e "s|${PN}\(\.so\)|${PN//-/_}\1|g" README
+
+ # fix Makefile.am
+ sed -i -e "s|${PN}\([_\.]la\)|${PN//-/_}\1|g" \
+ -e "s|\(-module\)|\1 -avoid-version|g" src/Makefile.am
+
+ epatch "${FILESDIR}/${PN}-stdlib.patch"
+ eautoreconf
+}
+
+src_configure() {
+ econf --with-pic --disable-static --libdir="${MYSQL_PLUGINDIR}" \
+ --with-mysql="$(type -p mysql_config)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc README
+
+ # remove obsolete *.la file
+ rm -f -- "${D}${MYSQL_PLUGINDIR}"/*.la
+}
+
+pkg_postinst() {
+ elog
+ elog "Please have a look at the documentation, how to"
+ elog "enable/disable the UDF functions of ${PN}."
+ elog
+ elog "The documentation is located here:"
+ elog "/usr/share/doc/${PF}"
+ elog
+}
diff --git a/dev-db/mysql-udf-ipv6-0.4 b/dev-db/mysql-udf-ipv6-0.4
deleted file mode 100644
index a2ea417f246e..000000000000
--- a/dev-db/mysql-udf-ipv6-0.4
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install postinst prepare setup
-DEPEND=>=virtual/mysql-5.1 idn? ( net-dns/libidn )
-DESCRIPTION=IPv6 and internationalized domain (IDNA) functions for MySQL
-EAPI=4
-HOMEPAGE=http://labs.watchmouse.com/2009/10/extending-mysql-5-with-ipv6-functions/
-IUSE=idn
-KEYWORDS=~amd64 ~x86
-LICENSE=EUPL-1.1
-RDEPEND=>=virtual/mysql-5.1 idn? ( net-dns/libidn )
-SLOT=0
-SRC_URI=https://bitbucket.org/watchmouse/mysql-udf-ipv6/get/01c591b05b79.tar.bz2 -> watchmouse-mysql-udf-ipv6-01c591b05b79.tar.bz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=928fd28bd5fcc153ba74681b14864e6a
diff --git a/dev-db/mysql-udf-ipv6/Manifest b/dev-db/mysql-udf-ipv6/Manifest
new file mode 100644
index 000000000000..9f455084f5aa
--- /dev/null
+++ b/dev-db/mysql-udf-ipv6/Manifest
@@ -0,0 +1,4 @@
+AUX mysql-udf-ipv6-warnings.patch 767 BLAKE2B 789e9ec57aa89d57385a38c73c363b51e05bde55fa844c6576bf1bfd9d6ed64137dc8a162d83fc8af6c4884e6da93653e0314f3dd11a18b0c2c0fcd0da4bf42d SHA512 6a8c3e771b49c9bb6b59b9eb460128cba37de16aaec8d52dab2d707e23163200be68b39e95290d0f773e1349a088877405fd8d86446e74e60bccb84a82435f9c
+DIST watchmouse-mysql-udf-ipv6-01c591b05b79.tar.bz2 10105 BLAKE2B c3f7b71c240af4e89b369b519d03d43cc3fd120d3c66a115ac6869c95ee4cb6ef0d8fc9c9fbc9d86c41eacf50af133db2ff96537c4c8418d32bea11db2247eb5 SHA512 21bcd207076dfbab251b343eb4bf9dd8f783f0ce666ba266b2b9101acfcb764dbb1b4cc2f4b0608a128d0e684b31e9d97d58978b2cdb3a5452c1656780671287
+EBUILD mysql-udf-ipv6-0.4.ebuild 1535 BLAKE2B 81c8f882367cf83986d67e220ec731d45b54cbd9914cf953ef5de10947a907313cef49283563c417709ff62288a8d9c25eaf141d7f1caa840f41aa3715783bb8 SHA512 ad6ad66d4aa9b40b631a51909182a6306a9847d60f05e8c00532a33d7198a98f222426c519d75b1b14db22b8ff6ba036b0031003b3450cdd10d89bc45ac84449
+MISC metadata.xml 260 BLAKE2B c5666bbb5541ad456c9e76699751867b923714eb5624f3f1bc7823fd94aad2be3c02aeacecacd9b8fe3d598ef759a8b0ff00e6e718c06b3e35906f2d293e249d SHA512 0c8d4eac647683711cc2f9a1c2c273bee8fd5a1a9694a0f182bd2b63f0be8beb0468e7fdc704babf10f531099e50cac0700ea39402583847eb28cd909832e370
diff --git a/dev-db/mysql-udf-ipv6/files/mysql-udf-ipv6-warnings.patch b/dev-db/mysql-udf-ipv6/files/mysql-udf-ipv6-warnings.patch
new file mode 100644
index 000000000000..392ecd3c4f53
--- /dev/null
+++ b/dev-db/mysql-udf-ipv6/files/mysql-udf-ipv6-warnings.patch
@@ -0,0 +1,28 @@
+--- mysql_udf_ipv6.c.orig 2011-08-10 10:45:49.000000000 +0200
++++ mysql_udf_ipv6.c 2011-10-18 16:27:58.000000000 +0200
+@@ -282,7 +282,7 @@
+ {
+ unsigned long length = args->lengths[0];
+ long long mask = *((long long *) args->args[1]);
+- unsigned char mask8, i;
++ unsigned char i;
+
+ if (!args->args[0] || !length)
+ {
+@@ -299,7 +299,7 @@
+
+ // my ugly get-the-job-done 128-bit masking
+ memset(result, 0, INET6_ADDRLEN);
+- for (i = 0; i < INET6_ADDRLEN, mask >= 8; i++, mask -= 8)
++ for (i = 0; i < INET6_ADDRLEN && mask >= 8; i++, mask -= 8)
+ {
+ result[i] = args->args[0][i];
+ }
+@@ -347,7 +347,6 @@
+ {
+ struct addrinfo *info;
+ char *addr;
+- ushort i;
+
+ if (!args->args[0] || !args->lengths[0])
+ {
diff --git a/dev-db/mysql-udf-ipv6/metadata.xml b/dev-db/mysql-udf-ipv6/metadata.xml
new file mode 100644
index 000000000000..e3473b0dd86d
--- /dev/null
+++ b/dev-db/mysql-udf-ipv6/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="bitbucket">watchmouse/mysql-udf-ipv6</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/mysql-udf-ipv6/mysql-udf-ipv6-0.4.ebuild b/dev-db/mysql-udf-ipv6/mysql-udf-ipv6-0.4.ebuild
new file mode 100644
index 000000000000..e7bcc4490033
--- /dev/null
+++ b/dev-db/mysql-udf-ipv6/mysql-udf-ipv6-0.4.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+MY_REV="01c591b05b79" # checkout revision
+MY_USR="watchmouse" # user name
+
+MY_P="${MY_USR}-${PN}-${MY_REV}"
+
+DESCRIPTION="IPv6 and internationalized domain (IDNA) functions for MySQL"
+HOMEPAGE="http://labs.watchmouse.com/2009/10/extending-mysql-5-with-ipv6-functions/"
+SRC_URI="https://bitbucket.org/${MY_USR}/${PN}/get/${MY_REV}.tar.bz2 -> ${MY_P}.tar.bz2"
+
+LICENSE="EUPL-1.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="idn"
+
+DEPEND=">=virtual/mysql-5.1
+ idn? ( net-dns/libidn )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+# compile helper
+_compile() {
+ local CC="$(tc-getCC)"
+ echo "${CC} ${@}" && "${CC}" "${@}"
+}
+
+pkg_setup() {
+ MYSQL_PLUGINDIR="$(mysql_config --plugindir)"
+ MYSQL_INCLUDE="$(mysql_config --include)"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-warnings.patch"
+}
+
+src_compile() {
+ _compile ${CFLAGS} -Wall -fPIC ${MYSQL_INCLUDE} \
+ -shared ${LDFLAGS} -o mysql_udf_ipv6.so mysql_udf_ipv6.c
+
+ if use idn; then
+ _compile ${CFLAGS} -Wall -fPIC ${MYSQL_INCLUDE} -lidn \
+ -shared ${LDFLAGS} -o mysql_udf_idna.so mysql_udf_idna.c
+ fi
+}
+
+src_install() {
+ exeinto "${MYSQL_PLUGINDIR}"
+ doexe mysql_udf_*.so
+ newdoc Changelog ChangeLog
+ dodoc README
+}
+
+pkg_postinst() {
+ elog
+ elog "Please have a look at the documentation, how to"
+ elog "enable/disable the UDF functions of ${PN}."
+ elog
+ elog "The documentation is located here:"
+ elog "/usr/share/doc/${PF}"
+ elog
+}
diff --git a/dev-db/mysql-workbench-6.3.10 b/dev-db/mysql-workbench-6.3.10
deleted file mode 100644
index c48a2860fae9..000000000000
--- a/dev-db/mysql-workbench-6.3.10
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare setup test unpack
-DEPEND=python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7[sqlite] ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] dev-libs/glib:2 dev-cpp/atkmm dev-cpp/pangomm >=dev-cpp/glibmm-2.14:2 dev-cpp/gtkmm:3.0 dev-libs/atk x11-libs/pango x11-libs/gtk+:3 gnome-base/libglade:2.0 >=x11-libs/cairo-1.5.12[glib,svg] 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 >=virtual/mysql-5.6 dev-libs/libpcre[cxx] >=sci-libs/gdal-1.11.1-r1[-mdb] virtual/opengl || ( sys-libs/e2fsprogs-libs dev-libs/ossp-uuid ) dev-libs/tinyxml[stl] >=dev-db/mysql-connector-c++-1.1.8 dev-db/vsqlite++ || ( dev-db/libiodbc dev-db/unixODBC ) gnome-keyring? ( gnome-base/libgnome-keyring ) dev-python/pexpect >=dev-python/paramiko-1.7.4 dev-lang/swig virtual/jre virtual/pkgconfig >=app-portage/elt-patches-20170422 app-arch/xz-utils >=sys-apps/sed-4 dev-util/desktop-file-utils x11-misc/shared-mime-info sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=MySQL Workbench
-EAPI=6
-HOMEPAGE=https://www.mysql.com/products/workbench/
-IUSE=debug doc gnome-keyring python_targets_python2_7
-KEYWORDS=~amd64 ~x86 ~amd64-linux ~x86-linux
-LICENSE=GPL-2
-RDEPEND=python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7[sqlite] ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] dev-libs/glib:2 dev-cpp/atkmm dev-cpp/pangomm >=dev-cpp/glibmm-2.14:2 dev-cpp/gtkmm:3.0 dev-libs/atk x11-libs/pango x11-libs/gtk+:3 gnome-base/libglade:2.0 >=x11-libs/cairo-1.5.12[glib,svg] 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 >=virtual/mysql-5.6 dev-libs/libpcre[cxx] >=sci-libs/gdal-1.11.1-r1[-mdb] virtual/opengl || ( sys-libs/e2fsprogs-libs dev-libs/ossp-uuid ) dev-libs/tinyxml[stl] >=dev-db/mysql-connector-c++-1.1.8 dev-db/vsqlite++ || ( dev-db/libiodbc dev-db/unixODBC ) gnome-keyring? ( gnome-base/libgnome-keyring ) dev-python/pexpect >=dev-python/paramiko-1.7.4 app-admin/sudo >=sys-apps/net-tools-1.60_p20120127084908
-REQUIRED_USE=python_targets_python2_7
-SLOT=0
-SRC_URI=mirror://mysql/Downloads/MySQLGUITools/mysql-workbench-community-6.3.10-src.tar.gz https://github.com/antlr/website-antlr3/blob/gh-pages/download/antlr-3.4-complete.jar?raw=true -> antlr-3.4-complete.jar
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 gnome.org 5e4cc5af3f1b17bdee155bf02e8c2df4 gnome2 6e4acb9c9da2cfa25f2dfedb93bb4a43 gnome2-utils 29bb8f7881c95139e532a2d5e47ff834 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 python-single-r1 26fdbe5e685d53f67303a3a43d9e4848 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg 6cd76cc914c1a759dee032778487b57f xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=89521c47e5d77d026c85c90f5e378907
diff --git a/dev-db/mysql-workbench-6.3.4-r1 b/dev-db/mysql-workbench-6.3.4-r1
deleted file mode 100644
index 2bd2b91d40a9..000000000000
--- a/dev-db/mysql-workbench-6.3.4-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare setup test unpack
-DEPEND=python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7[sqlite] ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] dev-libs/glib:2 dev-cpp/atkmm dev-cpp/pangomm >=dev-cpp/glibmm-2.14:2 >=dev-cpp/gtkmm-2.14:2.4 dev-libs/atk x11-libs/pango >=x11-libs/gtk+-2.20:2 gnome-base/libglade:2.0 >=x11-libs/cairo-1.5.12[glib,svg] 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 >=virtual/mysql-5.1 dev-libs/libpcre[cxx] >=sci-libs/gdal-1.11.1-r1[-mdb] virtual/opengl >=dev-lang/lua-5.1:0[deprecated] || ( sys-libs/e2fsprogs-libs dev-libs/ossp-uuid ) dev-libs/tinyxml[stl] dev-db/mysql-connector-c++ dev-db/vsqlite++ || ( dev-db/libiodbc dev-db/unixODBC ) gnome-keyring? ( gnome-base/libgnome-keyring ) dev-python/pexpect >=dev-python/paramiko-1.7.4 dev-lang/swig virtual/jre virtual/pkgconfig >=app-portage/elt-patches-20170422 app-arch/xz-utils >=sys-apps/sed-4 dev-util/desktop-file-utils x11-misc/shared-mime-info sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=MySQL Workbench
-EAPI=5
-HOMEPAGE=http://dev.mysql.com/workbench/
-IUSE=debug doc gnome-keyring python_targets_python2_7
-KEYWORDS=amd64 x86 ~amd64-linux ~x86-linux
-LICENSE=GPL-2
-RDEPEND=python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7[sqlite] ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] dev-libs/glib:2 dev-cpp/atkmm dev-cpp/pangomm >=dev-cpp/glibmm-2.14:2 >=dev-cpp/gtkmm-2.14:2.4 dev-libs/atk x11-libs/pango >=x11-libs/gtk+-2.20:2 gnome-base/libglade:2.0 >=x11-libs/cairo-1.5.12[glib,svg] 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 >=virtual/mysql-5.1 dev-libs/libpcre[cxx] >=sci-libs/gdal-1.11.1-r1[-mdb] virtual/opengl >=dev-lang/lua-5.1:0[deprecated] || ( sys-libs/e2fsprogs-libs dev-libs/ossp-uuid ) dev-libs/tinyxml[stl] dev-db/mysql-connector-c++ dev-db/vsqlite++ || ( dev-db/libiodbc dev-db/unixODBC ) gnome-keyring? ( gnome-base/libgnome-keyring ) dev-python/pexpect >=dev-python/paramiko-1.7.4 app-admin/sudo >=sys-apps/net-tools-1.60_p20120127084908
-REQUIRED_USE=python_targets_python2_7
-SLOT=0
-SRC_URI=mirror://mysql/Downloads/MySQLGUITools/mysql-workbench-community-6.3.4-src.tar.gz https://github.com/antlr/website-antlr3/blob/gh-pages/download/antlr-3.4-complete.jar?raw=true -> antlr-3.4-complete.jar
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 gnome.org 5e4cc5af3f1b17bdee155bf02e8c2df4 gnome2 6e4acb9c9da2cfa25f2dfedb93bb4a43 gnome2-utils 29bb8f7881c95139e532a2d5e47ff834 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 python-single-r1 26fdbe5e685d53f67303a3a43d9e4848 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg 6cd76cc914c1a759dee032778487b57f xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=ca05143a23b904a79c4babd4113bfc5a
diff --git a/dev-db/mysql-workbench-6.3.4-r2 b/dev-db/mysql-workbench-6.3.4-r2
deleted file mode 100644
index 742a05581022..000000000000
--- a/dev-db/mysql-workbench-6.3.4-r2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare setup test unpack
-DEPEND=python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7[sqlite] ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] dev-libs/glib:2 dev-cpp/atkmm dev-cpp/pangomm >=dev-cpp/glibmm-2.14:2 >=dev-cpp/gtkmm-2.14:2.4 dev-libs/atk x11-libs/pango >=x11-libs/gtk+-2.20:2 gnome-base/libglade:2.0 >=x11-libs/cairo-1.5.12[glib,svg] 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 >=virtual/mysql-5.1 dev-libs/libpcre[cxx] >=sci-libs/gdal-1.11.1-r1[-mdb] virtual/opengl >=dev-lang/lua-5.1:0[deprecated] || ( sys-libs/e2fsprogs-libs dev-libs/ossp-uuid ) dev-libs/tinyxml[stl] dev-db/mysql-connector-c++ dev-db/vsqlite++ || ( dev-db/libiodbc dev-db/unixODBC ) gnome-keyring? ( gnome-base/libgnome-keyring ) dev-python/pexpect >=dev-python/paramiko-1.7.4 dev-lang/swig virtual/pkgconfig >=app-portage/elt-patches-20170422 app-arch/xz-utils >=sys-apps/sed-4 dev-util/desktop-file-utils x11-misc/shared-mime-info sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=MySQL Workbench
-EAPI=5
-HOMEPAGE=http://dev.mysql.com/workbench/
-IUSE=debug doc gnome-keyring python_targets_python2_7
-KEYWORDS=~amd64 ~x86 ~amd64-linux ~x86-linux
-LICENSE=GPL-2
-RDEPEND=python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7[sqlite] ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] dev-libs/glib:2 dev-cpp/atkmm dev-cpp/pangomm >=dev-cpp/glibmm-2.14:2 >=dev-cpp/gtkmm-2.14:2.4 dev-libs/atk x11-libs/pango >=x11-libs/gtk+-2.20:2 gnome-base/libglade:2.0 >=x11-libs/cairo-1.5.12[glib,svg] 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 >=virtual/mysql-5.1 dev-libs/libpcre[cxx] >=sci-libs/gdal-1.11.1-r1[-mdb] virtual/opengl >=dev-lang/lua-5.1:0[deprecated] || ( sys-libs/e2fsprogs-libs dev-libs/ossp-uuid ) dev-libs/tinyxml[stl] dev-db/mysql-connector-c++ dev-db/vsqlite++ || ( dev-db/libiodbc dev-db/unixODBC ) gnome-keyring? ( gnome-base/libgnome-keyring ) dev-python/pexpect >=dev-python/paramiko-1.7.4 app-admin/sudo >=sys-apps/net-tools-1.60_p20120127084908
-REQUIRED_USE=python_targets_python2_7
-SLOT=0
-SRC_URI=mirror://mysql/Downloads/MySQLGUITools/mysql-workbench-community-6.3.4-src.tar.gz
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 gnome.org 5e4cc5af3f1b17bdee155bf02e8c2df4 gnome2 6e4acb9c9da2cfa25f2dfedb93bb4a43 gnome2-utils 29bb8f7881c95139e532a2d5e47ff834 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 python-single-r1 26fdbe5e685d53f67303a3a43d9e4848 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg 6cd76cc914c1a759dee032778487b57f xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=01170d073c1cfd0c93875cdb496e8ed1
diff --git a/dev-db/mysql-workbench-6.3.9 b/dev-db/mysql-workbench-6.3.9
deleted file mode 100644
index 7ca48339fc9b..000000000000
--- a/dev-db/mysql-workbench-6.3.9
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare setup test unpack
-DEPEND=python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7[sqlite] ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] dev-libs/glib:2 dev-cpp/atkmm dev-cpp/pangomm >=dev-cpp/glibmm-2.14:2 dev-cpp/gtkmm:3.0 dev-libs/atk x11-libs/pango x11-libs/gtk+:3 gnome-base/libglade:2.0 >=x11-libs/cairo-1.5.12[glib,svg] 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 >=virtual/mysql-5.6 dev-libs/libpcre[cxx] >=sci-libs/gdal-1.11.1-r1[-mdb] virtual/opengl || ( sys-libs/e2fsprogs-libs dev-libs/ossp-uuid ) dev-libs/tinyxml[stl] >=dev-db/mysql-connector-c++-1.1.8 dev-db/vsqlite++ || ( dev-db/libiodbc dev-db/unixODBC ) gnome-keyring? ( gnome-base/libgnome-keyring ) dev-python/pexpect >=dev-python/paramiko-1.7.4 dev-lang/swig virtual/jre virtual/pkgconfig >=app-portage/elt-patches-20170422 app-arch/xz-utils >=sys-apps/sed-4 dev-util/desktop-file-utils x11-misc/shared-mime-info sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=MySQL Workbench
-EAPI=6
-HOMEPAGE=https://www.mysql.com/products/workbench/
-IUSE=debug doc gnome-keyring python_targets_python2_7
-KEYWORDS=~amd64 ~x86 ~amd64-linux ~x86-linux
-LICENSE=GPL-2
-RDEPEND=python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7[sqlite] ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] dev-libs/glib:2 dev-cpp/atkmm dev-cpp/pangomm >=dev-cpp/glibmm-2.14:2 dev-cpp/gtkmm:3.0 dev-libs/atk x11-libs/pango x11-libs/gtk+:3 gnome-base/libglade:2.0 >=x11-libs/cairo-1.5.12[glib,svg] 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 >=virtual/mysql-5.6 dev-libs/libpcre[cxx] >=sci-libs/gdal-1.11.1-r1[-mdb] virtual/opengl || ( sys-libs/e2fsprogs-libs dev-libs/ossp-uuid ) dev-libs/tinyxml[stl] >=dev-db/mysql-connector-c++-1.1.8 dev-db/vsqlite++ || ( dev-db/libiodbc dev-db/unixODBC ) gnome-keyring? ( gnome-base/libgnome-keyring ) dev-python/pexpect >=dev-python/paramiko-1.7.4 app-admin/sudo >=sys-apps/net-tools-1.60_p20120127084908
-REQUIRED_USE=python_targets_python2_7
-SLOT=0
-SRC_URI=mirror://mysql/Downloads/MySQLGUITools/mysql-workbench-community-6.3.9-src.tar.gz https://github.com/antlr/website-antlr3/blob/gh-pages/download/antlr-3.4-complete.jar?raw=true -> antlr-3.4-complete.jar
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 gnome.org 5e4cc5af3f1b17bdee155bf02e8c2df4 gnome2 6e4acb9c9da2cfa25f2dfedb93bb4a43 gnome2-utils 29bb8f7881c95139e532a2d5e47ff834 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 python-single-r1 26fdbe5e685d53f67303a3a43d9e4848 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg 6cd76cc914c1a759dee032778487b57f xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=f809419857ab5f2c5141b3ec1412b23b
diff --git a/dev-db/mysql-workbench/Manifest b/dev-db/mysql-workbench/Manifest
new file mode 100644
index 000000000000..39ed3d5686f0
--- /dev/null
+++ b/dev-db/mysql-workbench/Manifest
@@ -0,0 +1,15 @@
+AUX mysql-workbench-6.2.3-CMakeLists.patch 1455 BLAKE2B f08c387531091609192a9a0ebc495ba8aa506f3b7a50f8785299df1772fbc8dd1275fa64fb48592932b90845035cef5546cf495aa291931d1514d32be85368d8 SHA512 8a38b0fa7be0ac982b1d501964727fcb6bd0c7ab5179e2a69a1926c1abe56e2f30c6d9a046b48cdcaaec948d5c9deadb62e14331d52cf39e91f26ee90104c812
+AUX mysql-workbench-6.2.5-wbcopytables.patch 496 BLAKE2B 4666f32098ec43ad36f1c726903472e829873002521262d6781a2febfc1394dac6f9708fbb99a3fa52a032a5b8f695c9b98579b28a63e74727eac21a8ef3fbe6 SHA512 c0766315cd345893af57880eccdc2c1dd9ffa456a27d0c736af1382ca24c507de865188588753f212f35d8781305dcbd8d555f128edd6454dc2299bd0357fd5b
+AUX mysql-workbench-6.3.3-mysql_options4.patch 1713 BLAKE2B d879fbcb6e098402d8f59046c67cf55f8a76e0cd857b1141c99d8ce7ed1866b79aacd784fd50d0020de3ab8993ad33f625e29ba325c8ed362d9e1a0705c9c7af SHA512 6371903765be6eb2f489523d10f6662e20903da2dd5755445c2cc8dcdcf07f0b5aa7b694b89fa7b625452d5a3f8b9157bad2278dc875de2b7b6c23daf4438539
+AUX mysql-workbench-6.3.4-cxx11.patch 1550 BLAKE2B 89df45aed8ad8b006f43f0b6fc1158021c8152929694adaeed18c736ad8920e5bf0c3f852f298654e76ba2d478ff21afcdc0343cfb31c67cdf5382d48bc3ea99 SHA512 e312edede63f2308c466300e34c2d9ff19451fff9daca265219b9b074b2e28f5f8fb0799efbe825f5aaedd5515f2e99a4d1ab2dff6018e5140a5f4c9ab3c9d41
+AUX mysql-workbench-6.3.4-gtk.patch 1190 BLAKE2B d3d09cc3536929a7ddf6af77efaddb3bc28067bcc2772a3c42a0e31c5787d9aca829cf810894fe08abb8152d93068681e1a3024f40cb5cc6f19a48f6b7e0280c SHA512 81af1d9dbe40b0ad04e9d8e317a1b47832b864071e26ab954237f850685bdb53ad84fedf4aa546e83f4dd122e368d1bc90e46e9b6261104b86998607b7830d33
+AUX mysql-workbench-6.3.9-mariadb-json.patch 2320 BLAKE2B 9dcf7ca5091109ab71a201a68aa16259402dae85d4ea1135fbce476dbc0d4f49ad154005a6fe6195ce86ffba49ebf3d03de8ac94b6adcda2a297600b1ac6d0d3 SHA512 23e4135ee5c8b7cc7b70cc6b5170209c9a6350cfc7e8450d29a1098c31472b68494147ec4f1286365f7802af72570f4822b0078ae269affbbaf98e3ad9e99eb4
+DIST antlr-3.4-complete.jar 2388361 BLAKE2B 561c1dffe464bbc387075df6d95bbdcab27315ba5679cfa10f85d6449baad3d05f4daa45af93d9b127d9fedb8c7e44c45537f1a84b4c4d877c40b9812620f669 SHA512 04be4dfba3a21f3ab9d9e439a64958bd8e844a9f151b798383bd9e0dd6ebc416783ae7cb1d1dbb27fb7288ab9756b13b8338cdb8ceb41a10949c852ad45ab1f2
+DIST mysql-workbench-community-6.3.10-src.tar.gz 14969443 BLAKE2B 57f7b0d661bc8211e123a027ce12e71be5637c189cc6e3b949df4f8e5a7edfc8c78f3c6e85b7292347dce2b720ee79070ac8fb91224396a3afae4104583d4325 SHA512 f892853a5f8b000c424b945c38680e17b041699fe2b03743b71c803de6cedeb12e3f69ad94d1c737e23f26d8608026e18fb29d31be6b3a2ffea1d78229212a4d
+DIST mysql-workbench-community-6.3.4-src.tar.gz 14954524 BLAKE2B 54941a760cc44b745039a59d0ad88e109605c47285b34098d7ebc9e7a32758027c07219f7b8dc96fad198fbc68086582ccfa5ba7e7a35fa1fff8ff57b467f91f SHA512 8d7eacd46fd3cac912dac2fdbc0669759f9411796507cca76b0ad47228381b15b7f88e60a7a5a8763e704b456884828783cb0c7ed218025edb35aa5033d7d02f
+DIST mysql-workbench-community-6.3.9-src.tar.gz 14634678 BLAKE2B 0991036cedc3198e789369a40641cc318fdc4230c2b6242b923e836c50248e3e1f5b891c1ce7465d132c30e482ef5458a19ed8b9e4a9865719be8eda61eeb1dc SHA512 a3df060114adb0c4f95423dc2732a39917be4eb2281cc2d811cc68c2d43cfa28eea52c4ab743018e91c8c58b0ad7d4b34a9936df8c17381accee8159afe19901
+EBUILD mysql-workbench-6.3.10.ebuild 2690 BLAKE2B cbea5b68d89b90e9806e55ee8166f6a3a9528a4b883267e70617e2e54bbb9a3ff2479e6b6a97551d5315f4b87cf41bae7576f142a32c108260b5536f9f4a56c8 SHA512 7199940aabe6f2b90a3f9999fdaff72bfd52115cbb3a25f4a2b611e6962490c93fd384fd0d7de4fc54ceb95730ad5d9fa124f8221210822b05c3fdcb0f3dac81
+EBUILD mysql-workbench-6.3.4-r1.ebuild 2823 BLAKE2B e0982f34995ce56ba191c6b19492757438171b628aecf12641192bfc84a94d226ac745916b12d3b27fc8537e040e3a72bd4ae572b0c18c71f032ae4f0f2222c4 SHA512 b3865e92b552dbaedb60989602401608fd792908f6abf9cdc44786242b765120e36029a86e6169aef8c87c3ed0392ca1655596603fb06591931717da942d3ccc
+EBUILD mysql-workbench-6.3.4-r2.ebuild 2639 BLAKE2B 3ec26fc7bc62e5b4ca9840a7d2f0116566fd4af7d848f89175e67d07ebff340466221a6226d632fc960e6a8f41cae60cb8a8d50317ceb00d049b395c6ab0c493 SHA512 da097fc7e58b6d3383aa66d37cfa0b734c203db43904c0aa8266e51f160a61f649f6bd08136569076eb0ad5b56bdbb855139a58a9adbb8736ff419574e05702a
+EBUILD mysql-workbench-6.3.9.ebuild 2621 BLAKE2B 1a2583c3a0cf268ab0c0d52203773612fa115a1c6096d4a4571ca40bedbeff4cf3fe95bccf75512705d4c3eed7cf72a0358b1dd6acccbb95fa1e1eb2d6c154ef SHA512 26f05929ce84c1e64e5d3aadf95d19431ba129528bff947646a9b952a155887f773370caca1d44d68f7d09d7b0b9184d77d44ef3eb6ceb016976a549369bc1cb
+MISC metadata.xml 310 BLAKE2B b0d985e39bb17865a05907e5449723c2bf862d9f3ae7f8570173c9cff443171feef6694db26a51880f8c1a4b1e3834ca7ab9bc7c2057fd6f8930b9d1c1c02cdd SHA512 f284063d72f2218f8ed60a74b43f252d608865682b8c0447f52016a02a7cbf6d45a226787d893328dd31946ade1cca78ff7556896183b4422c4142a8935a2193
diff --git a/dev-db/mysql-workbench/files/mysql-workbench-6.2.3-CMakeLists.patch b/dev-db/mysql-workbench/files/mysql-workbench-6.2.3-CMakeLists.patch
new file mode 100644
index 000000000000..6e9a4d5e1410
--- /dev/null
+++ b/dev-db/mysql-workbench/files/mysql-workbench-6.2.3-CMakeLists.patch
@@ -0,0 +1,43 @@
+--- mysql-workbench-community-6.0.7-src/CMakeLists.txt 2013-08-30 18:05:12.000000000 +0200
++++ mysql-workbench-community-6.0.7-src/CMakeLists.txt 2013-09-08 11:41:18.723838826 +0200
+@@ -18,6 +18,9 @@
+ find_package(PkgConfig REQUIRED)
+
+ find_package(GTK2 2.20 REQUIRED gtk gtkmm)
++if (NOT GTK2_FOUND)
++ message( FATAL_ERROR "Not all GTK2 components were found!" )
++endif()
+ pkg_check_modules(GTHREAD REQUIRED gthread-2.0)
+ pkg_check_modules(GMODULE REQUIRED gmodule-2.0)
+ set(GTK2_INCLUDE_DIRS ${GTK2_INCLUDE_DIRS} ${GTHREAD_INCLUDE_DIRS} ${GMODULE_INCLUDE_DIRS})
+@@ -32,7 +35,8 @@
+ endif ()
+
+ # All known publicly available versions of Antlr3C are buggy
+-
++# see: https://bugzilla.redhat.com/show_bug.cgi?id=966973
++# patch seems to be only applied partially to antlr-3.4, bug is present in antlr-3.5, too
+ if (SKIP_BUNDLED_ANTLR)
+ find_package(Antlr3C)
+ endif ()
+@@ -89,7 +93,8 @@
+ pkg_check_modules(CAIRO REQUIRED cairo>=1.5.12)
+ pkg_check_modules(UUID REQUIRED uuid)
+ pkg_check_modules(LIBZIP REQUIRED libzip)
+-if (UNIX)
++
++if (UNIX AND USE_GNOME_KEYRING)
+ pkg_check_modules(GNOME_KEYRING gnome-keyring-1)
+ if (GNOME_KEYRING_FOUND)
+ set(KEYRING_DEFINITION "HAVE_GNOME_KEYRING")
+@@ -99,7 +104,10 @@
+ set(KEYRING_DEFINITION "HAVE_OLD_GNOME_KEYRING")
+ endif()
+ endif()
++ if (NOT GNOME_KEYRING_FOUND)
++ message( FATAL_ERROR "Gnome keyring libraries could not be found" )
++ endif()
+ endif()
+
+ include (CheckFunctionExists)
+
diff --git a/dev-db/mysql-workbench/files/mysql-workbench-6.2.5-wbcopytables.patch b/dev-db/mysql-workbench/files/mysql-workbench-6.2.5-wbcopytables.patch
new file mode 100644
index 000000000000..2d3d8db243f8
--- /dev/null
+++ b/dev-db/mysql-workbench/files/mysql-workbench-6.2.5-wbcopytables.patch
@@ -0,0 +1,12 @@
+--- a/plugins/migration/CMakeLists.txt.~1~ 2015-02-25 09:08:47.000000000 +0100
++++ b/plugins/migration/CMakeLists.txt 2015-03-07 07:28:56.745378152 +0100
+@@ -10,7 +10,8 @@
+ if (UNIX)
+ configure_file(wbcopytables.in wbcopytables)
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/wbcopytables DESTINATION ${WB_INSTALL_BIN_DIR})
+-
++
++ SET(CMAKE_INSTALL_RPATH "${WB_INSTALL_LIB_DIR}")
+ add_executable(wbcopytables-bin
+ copytable/copytable.cpp
+ copytable/python_copy_data_source.cpp
diff --git a/dev-db/mysql-workbench/files/mysql-workbench-6.3.3-mysql_options4.patch b/dev-db/mysql-workbench/files/mysql-workbench-6.3.3-mysql_options4.patch
new file mode 100644
index 000000000000..7fb9c8d57fc5
--- /dev/null
+++ b/dev-db/mysql-workbench/files/mysql-workbench-6.3.3-mysql_options4.patch
@@ -0,0 +1,40 @@
+--- plugins/migration/copytable/copytable.cpp.~1~ 2015-04-15 15:54:19.000000000 +0200
++++ plugins/migration/copytable/copytable.cpp 2015-04-26 08:53:08.871167725 +0200
+@@ -1920,12 +1920,17 @@
+ _incoming_data_charset = "latin1";
+
+ mysql_init(&_mysql);
++/* This is optional has compiled in for MySQL >= 5.6.6
++ * Looks like MariaDB does not support this as supposed,
++ * so disable completly. */
++#ifndef MARIADB_BASE_VERSION
+ #if defined(MYSQL_VERSION_MAJOR) && defined(MYSQL_VERSION_MINOR) && defined(MYSQL_VERSION_PATCH)
+ #if MYSQL_CHECK_VERSION(5,6,6)
+ if (is_mysql_version_at_least(5,6,6))
+ mysql_options4(&_mysql, MYSQL_OPT_CONNECT_ATTR_ADD, "program_name", app_name.c_str());
+ #endif
+ #endif
++#endif
+
+ // _bulk_insert_record is used to prepare a single record string, the connection
+ // is needed to escape binary data properly
+--- plugins/migration/copytable/copytable.cpp.~1~ 2015-04-26 08:57:30.444285953 +0200
++++ plugins/migration/copytable/copytable.cpp 2015-04-26 10:16:39.234711324 +0200
+@@ -2875,6 +2875,9 @@
+
+ // This function is used to create a legal SQL string that you can use in an SQL statement
+ // This is needed because the escaping depends on the character set in use by the server
++ #ifdef MARIADB_BASE_VERSION
++ length += mysql_real_escape_string(_mysql, buffer + length, data, (unsigned long)dlength);
++ #else
+ #if defined(MYSQL_VERSION_MAJOR) && defined(MYSQL_VERSION_MINOR) && defined(MYSQL_VERSION_PATCH)
+ #if MYSQL_CHECK_VERSION(5,7,6)
+ if (is_mysql_version_at_least(5,7,6))
+@@ -2885,6 +2888,7 @@
+ length += mysql_real_escape_string(_mysql, buffer + length, data, (unsigned long)dlength);
+ #endif
+ #endif
++ #endif
+
+ return true;
+ }
diff --git a/dev-db/mysql-workbench/files/mysql-workbench-6.3.4-cxx11.patch b/dev-db/mysql-workbench/files/mysql-workbench-6.3.4-cxx11.patch
new file mode 100644
index 000000000000..e8ed54a8c705
--- /dev/null
+++ b/dev-db/mysql-workbench/files/mysql-workbench-6.3.4-cxx11.patch
@@ -0,0 +1,39 @@
+Last-Update: 2015-10-24
+Forwarded: not-needed
+Bug-Upstream: https://bugs.mysql.com/bug.php?id=78668
+From: Marcin Szalowicz
+Author: Dmitry Smirnov <onlyjob@member.fsf.org>
+Description: fix FTBFS
+ ~~~~
+ library/forms/view.cpp:515:32: error: cannot convert 'boost::signals2::signal<bool()>::result_type {aka boost::optional<bool>}' to 'bool' in return
+ return _signal_mouse_leave();
+ ^
+ library/forms/CMakeFiles/mforms.dir/build.make:1865: recipe for target 'library/forms/CMakeFiles/mforms.dir/view.cpp.o' failed
+ ~~~~
+
+--- a/library/forms/swig/mforms.i
++++ b/library/forms/swig/mforms.i
+@@ -532,9 +532,9 @@
+ void add_##method(PyObject *callback) { signal->connect(pycall_void_toolbaritem_fun(callback)); }
+
+ #define SWIG_ADD_SIGNAL_BOOL_INT_CALLBACK(method, signal)\
+ void add_##method(PyObject *callback) { signal->connect(pycall_bool_int_fun(callback)); }\
+- bool call_##method(int i) { return (*signal)(i); }
++ bool call_##method(int i) { return *( (*signal)(i) ); }
+
+ #define SWIG_ADD_SIGNAL_VOID_ENTRYACTION_CALLBACK(method, signal)\
+ void add_##method(PyObject *callback) { signal->connect(pycall_void_entryaction_fun(callback)); }
+
+--- a/library/forms/view.cpp
++++ b/library/forms/view.cpp
+@@ -511,9 +511,9 @@
+
+ bool View::mouse_leave()
+ {
+ if (_signal_mouse_leave.num_slots() > 0)
+- return _signal_mouse_leave();
++ return *_signal_mouse_leave();
+ return false;
+ }
+
+ //--------------------------------------------------------------------------------------------------
diff --git a/dev-db/mysql-workbench/files/mysql-workbench-6.3.4-gtk.patch b/dev-db/mysql-workbench/files/mysql-workbench-6.3.4-gtk.patch
new file mode 100644
index 000000000000..e975906e19ab
--- /dev/null
+++ b/dev-db/mysql-workbench/files/mysql-workbench-6.3.4-gtk.patch
@@ -0,0 +1,38 @@
+Last-Update: 2016-11-13
+Forwarded: not-needed
+Author: Dmitry Smirnov <onlyjob@debian.org>
+Bug-Debian: https://bugs.debian.org/839356
+Description: fix FTBFS
+
+--- mysql-workbench-6.3.4+dfsg.orig/library/forms/gtk/src/lf_popover.cpp
++++ mysql-workbench-6.3.4+dfsg/library/forms/gtk/src/lf_popover.cpp
+@@ -380,7 +380,7 @@ void PopoverWidget::show_popover(const i
+ if (_style == mforms::PopoverStyleTooltip)
+ {
+ Glib::RefPtr<Gdk::Window> wnd = this->get_window();
+- if (wnd != 0)
++ if (wnd)
+ {
+ int xx;
+ int yy;
+@@ -396,7 +396,7 @@ void PopoverWidget::show_popover(const i
+ {
+ Gdk::ModifierType mask;
+ Glib::RefPtr<Gdk::Display> dsp = Gdk::Display::get_default();
+- if (dsp != 0)
++ if (dsp)
+ dsp->get_pointer(x, y, mask);
+ }
+
+--- mysql-workbench-6.3.4+dfsg.orig/library/forms/gtk/src/lf_popup.cpp
++++ mysql-workbench-6.3.4+dfsg/library/forms/gtk/src/lf_popup.cpp
+@@ -81,7 +81,8 @@ void PopupImpl::on_screen_changed(const
+ {
+ d("\n");
+ Glib::RefPtr<Gdk::Colormap> colormap = screen->get_rgba_colormap();
+- _have_rgba = colormap;
++ if (colormap)
++ _have_rgba = true;
+
+ if (!_have_rgba)
+ colormap = screen->get_rgb_colormap();
diff --git a/dev-db/mysql-workbench/files/mysql-workbench-6.3.9-mariadb-json.patch b/dev-db/mysql-workbench/files/mysql-workbench-6.3.9-mariadb-json.patch
new file mode 100644
index 000000000000..e785d6fb0976
--- /dev/null
+++ b/dev-db/mysql-workbench/files/mysql-workbench-6.3.9-mariadb-json.patch
@@ -0,0 +1,55 @@
+--- a/plugins/migration/copytable/copytable.cpp
++++ b/plugins/migration/copytable/copytable.cpp
+@@ -109,8 +109,10 @@
+ return "MYSQL_TYPE_STRING";
+ case MYSQL_TYPE_GEOMETRY:
+ return "MYSQL_TYPE_GEOMETRY";
++#if MYSQL_CHECK_VERSION(5, 7, 8) && ! defined MARIADB_BASE_VERSION
+ case MYSQL_TYPE_JSON:
+ return "MYSQL_TYPE_JSON";
++#endif
+ default:
+ return "UNKNOWN";
+ }
+@@ -295,7 +297,9 @@
+ case MYSQL_TYPE_STRING:
+ case MYSQL_TYPE_VAR_STRING:
+ case MYSQL_TYPE_BIT:
++#if MYSQL_CHECK_VERSION(5, 7, 8) && ! defined MARIADB_BASE_VERSION
+ case MYSQL_TYPE_JSON:
++#endif
+ if (!col->is_long_data)
+ bind.buffer_length = (unsigned)col->source_length + 1;
+
+@@ -1392,7 +1396,11 @@
+ rowbuffer[index].buffer_type == MYSQL_TYPE_MEDIUM_BLOB ||
+ rowbuffer[index].buffer_type == MYSQL_TYPE_LONG_BLOB || rowbuffer[index].buffer_type == MYSQL_TYPE_BLOB ||
+ rowbuffer[index].buffer_type == MYSQL_TYPE_STRING ||
+- rowbuffer[index].buffer_type == MYSQL_TYPE_GEOMETRY || rowbuffer[index].buffer_type == MYSQL_TYPE_JSON) {
++ rowbuffer[index].buffer_type == MYSQL_TYPE_GEOMETRY
++#if MYSQL_CHECK_VERSION(5, 7, 8) && ! defined MARIADB_BASE_VERSION
++ || rowbuffer[index].buffer_type == MYSQL_TYPE_JSON
++#endif
++ ) {
+ if (rowbuffer[index].buffer_length)
+ free(rowbuffer[index].buffer);
+
+@@ -2162,7 +2170,9 @@
+ case MYSQL_TYPE_STRING:
+ case MYSQL_TYPE_ENUM:
+ case MYSQL_TYPE_SET:
++#if MYSQL_CHECK_VERSION(5, 7, 8) && ! defined MARIADB_BASE_VERSION
+ case MYSQL_TYPE_JSON:
++#endif
+ _bulk_insert_record.append("'", 1);
+ ret_val = _bulk_insert_record.append_escaped((char *)(*_row_buffer)[col_index].buffer,
+ *(*_row_buffer)[col_index].length);
+@@ -2621,7 +2621,7 @@
+ // This is needed because the escaping depends on the character set in use by the server
+ unsigned long ret_length = 0;
+
+-#if MYSQL_CHECK_VERSION(5, 7, 6)
++#if MYSQL_CHECK_VERSION(5, 7, 6) && ! defined MARIADB_BASE_VERSION
+ if (_target->is_mysql_version_at_least(5, 7, 6))
+ ret_length += mysql_real_escape_string_quote(_mysql, buffer + length, data, (unsigned long)dlength, '"');
+ else
diff --git a/dev-db/mysql-workbench/metadata.xml b/dev-db/mysql-workbench/metadata.xml
new file mode 100644
index 000000000000..64e908505cd8
--- /dev/null
+++ b/dev-db/mysql-workbench/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>graaff@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">antlr/website-antlr3</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/mysql-workbench/mysql-workbench-6.3.10.ebuild b/dev-db/mysql-workbench/mysql-workbench-6.3.10.ebuild
new file mode 100644
index 000000000000..178a44ec3f9c
--- /dev/null
+++ b/dev-db/mysql-workbench/mysql-workbench-6.3.10.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+GCONF_DEBUG="no"
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="sqlite"
+
+inherit gnome2 eutils flag-o-matic python-single-r1 cmake-utils
+
+MY_P="${PN}-community-${PV}-src"
+
+DESCRIPTION="MySQL Workbench"
+HOMEPAGE="https://www.mysql.com/products/workbench/"
+SRC_URI="mirror://mysql/Downloads/MySQLGUITools/${MY_P}.tar.gz https://github.com/antlr/website-antlr3/blob/gh-pages/download/antlr-3.4-complete.jar?raw=true -> antlr-3.4-complete.jar"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="debug doc gnome-keyring"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+# glibc: deprecated mutex functions, removed in 2.36.0
+CDEPEND="${PYTHON_DEPS}
+ dev-libs/glib:2
+ dev-cpp/atkmm
+ dev-cpp/pangomm
+ >=dev-cpp/glibmm-2.14:2
+ dev-cpp/gtkmm:3.0
+ dev-libs/atk
+ x11-libs/pango
+ x11-libs/gtk+:3
+ gnome-base/libglade:2.0
+ >=x11-libs/cairo-1.5.12[glib,svg]
+ 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
+ >=virtual/mysql-5.6
+ dev-libs/libpcre[cxx]
+ >=sci-libs/gdal-1.11.1-r1[-mdb]
+ virtual/opengl
+ || ( sys-libs/e2fsprogs-libs dev-libs/ossp-uuid )
+ dev-libs/tinyxml[stl]
+ >=dev-db/mysql-connector-c++-1.1.8
+ dev-db/vsqlite++
+ || ( dev-db/libiodbc dev-db/unixODBC )
+ gnome-keyring? ( gnome-base/libgnome-keyring )
+ 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}-6.3.9-mariadb-json.patch"
+)
+
+src_unpack() {
+ unpack ${PN}-community-${PV}-src.tar.gz
+}
+
+src_prepare() {
+ sed -i -e '/target_link_libraries/ s/sqlparser.grt/sqlparser.grt sqlparser/' \
+ modules/db.mysql.sqlparser/CMakeLists.txt
+
+ ## 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
+
+ ## package is very fragile...
+ strip-flags
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ append-cxxflags -std=c++11
+ local mycmakeargs=(
+ -DUSE_GNOME_KEYRING="$(usex gnome-keyring)"
+ -DLIB_INSTALL_DIR="/usr/$(get_libdir)"
+ -DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
+ -DPYTHON_LIBRARY="$(python_get_library_path)"
+ -DMySQL_CONFIG_PATH="/usr/bin/mysql_config"
+ )
+ ANTLR_JAR_PATH="${DISTDIR}/antlr-3.4-complete.jar" cmake-utils_src_configure
+}
+
+src_compile() {
+ # Work around parallel build issues, bug 507838
+ cmake-utils_src_compile -j1
+}
diff --git a/dev-db/mysql-workbench/mysql-workbench-6.3.4-r1.ebuild b/dev-db/mysql-workbench/mysql-workbench-6.3.4-r1.ebuild
new file mode 100644
index 000000000000..1d3b557c13c5
--- /dev/null
+++ b/dev-db/mysql-workbench/mysql-workbench-6.3.4-r1.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+GCONF_DEBUG="no"
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="sqlite"
+
+inherit gnome2 eutils flag-o-matic python-single-r1 cmake-utils
+
+MY_P="${PN}-community-${PV}-src"
+
+DESCRIPTION="MySQL Workbench"
+HOMEPAGE="http://dev.mysql.com/workbench/"
+SRC_URI="mirror://mysql/Downloads/MySQLGUITools/${MY_P}.tar.gz https://github.com/antlr/website-antlr3/blob/gh-pages/download/antlr-3.4-complete.jar?raw=true -> antlr-3.4-complete.jar"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+IUSE="debug doc gnome-keyring"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+# glibc: deprecated mutex functions, removed in 2.36.0
+CDEPEND="${PYTHON_DEPS}
+ dev-libs/glib:2
+ dev-cpp/atkmm
+ dev-cpp/pangomm
+ >=dev-cpp/glibmm-2.14:2
+ >=dev-cpp/gtkmm-2.14:2.4
+ dev-libs/atk
+ x11-libs/pango
+ >=x11-libs/gtk+-2.20:2
+ gnome-base/libglade:2.0
+ >=x11-libs/cairo-1.5.12[glib,svg]
+ 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
+ >=virtual/mysql-5.1
+ dev-libs/libpcre[cxx]
+ >=sci-libs/gdal-1.11.1-r1[-mdb]
+ virtual/opengl
+ >=dev-lang/lua-5.1:0[deprecated]
+ || ( sys-libs/e2fsprogs-libs dev-libs/ossp-uuid )
+ dev-libs/tinyxml[stl]
+ dev-db/mysql-connector-c++
+ dev-db/vsqlite++
+ || ( dev-db/libiodbc dev-db/unixODBC )
+ gnome-keyring? ( gnome-base/libgnome-keyring )
+ dev-python/pexpect
+ >=dev-python/paramiko-1.7.4
+ "
+
+# lua perhaps no longer needed? Was used via libgrt only
+
+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}"
+
+src_unpack() {
+ unpack ${PN}-community-${PV}-src.tar.gz
+}
+
+src_prepare() {
+ ## Patch CMakeLists.txt
+ epatch "${FILESDIR}/${PN}-6.2.3-CMakeLists.patch" \
+ "${FILESDIR}/${PN}-6.2.5-wbcopytables.patch" \
+ "${FILESDIR}/${PN}-6.3.3-mysql_options4.patch" \
+ "${FILESDIR}/${PN}-6.3.4-cxx11.patch" \
+ "${FILESDIR}/${PN}-6.3.4-gtk.patch"
+
+ sed -i -e '/target_link_libraries/ s/sqlparser.grt/sqlparser.grt sqlparser/' \
+ modules/db.mysql.sqlparser/CMakeLists.txt
+
+ ## remove hardcoded CXXFLAGS
+ sed -i -e 's/-O0 -g3//' ext/scintilla/gtk/CMakeLists.txt || die
+
+ ## package is very fragile...
+ strip-flags
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ append-cxxflags -std=c++11
+ local mycmakeargs=(
+ $(cmake-utils_use_use gnome-keyring GNOME_KEYRING)
+ -DLIB_INSTALL_DIR="/usr/$(get_libdir)"
+ -DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
+ -DPYTHON_LIBRARY="$(python_get_library_path)"
+ )
+ ANTLR_JAR_PATH="${DISTDIR}/antlr-3.4-complete.jar" cmake-utils_src_configure
+}
+
+src_compile() {
+ # Work around parallel build issues, bug 507838
+ cmake-utils_src_compile -j1
+}
diff --git a/dev-db/mysql-workbench/mysql-workbench-6.3.4-r2.ebuild b/dev-db/mysql-workbench/mysql-workbench-6.3.4-r2.ebuild
new file mode 100644
index 000000000000..84f314bf0128
--- /dev/null
+++ b/dev-db/mysql-workbench/mysql-workbench-6.3.4-r2.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+GCONF_DEBUG="no"
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="sqlite"
+
+inherit gnome2 eutils flag-o-matic python-single-r1 cmake-utils
+
+MY_P="${PN}-community-${PV}-src"
+
+DESCRIPTION="MySQL Workbench"
+HOMEPAGE="http://dev.mysql.com/workbench/"
+SRC_URI="mirror://mysql/Downloads/MySQLGUITools/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="debug doc gnome-keyring"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+# glibc: deprecated mutex functions, removed in 2.36.0
+CDEPEND="${PYTHON_DEPS}
+ dev-libs/glib:2
+ dev-cpp/atkmm
+ dev-cpp/pangomm
+ >=dev-cpp/glibmm-2.14:2
+ >=dev-cpp/gtkmm-2.14:2.4
+ dev-libs/atk
+ x11-libs/pango
+ >=x11-libs/gtk+-2.20:2
+ gnome-base/libglade:2.0
+ >=x11-libs/cairo-1.5.12[glib,svg]
+ 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
+ >=virtual/mysql-5.1
+ dev-libs/libpcre[cxx]
+ >=sci-libs/gdal-1.11.1-r1[-mdb]
+ virtual/opengl
+ >=dev-lang/lua-5.1:0[deprecated]
+ || ( sys-libs/e2fsprogs-libs dev-libs/ossp-uuid )
+ dev-libs/tinyxml[stl]
+ dev-db/mysql-connector-c++
+ dev-db/vsqlite++
+ || ( dev-db/libiodbc dev-db/unixODBC )
+ gnome-keyring? ( gnome-base/libgnome-keyring )
+ dev-python/pexpect
+ >=dev-python/paramiko-1.7.4
+ "
+
+# lua perhaps no longer needed? Was used via libgrt only
+
+RDEPEND="${CDEPEND}
+ app-admin/sudo
+ >=sys-apps/net-tools-1.60_p20120127084908"
+
+DEPEND="${CDEPEND}
+ dev-lang/swig
+ virtual/pkgconfig"
+
+S="${WORKDIR}"/"${MY_P}"
+
+src_unpack() {
+ unpack ${PN}-community-${PV}-src.tar.gz
+}
+
+src_prepare() {
+ ## Patch CMakeLists.txt
+ epatch "${FILESDIR}/${PN}-6.2.3-CMakeLists.patch" \
+ "${FILESDIR}/${PN}-6.2.5-wbcopytables.patch" \
+ "${FILESDIR}/${PN}-6.3.3-mysql_options4.patch" \
+ "${FILESDIR}/${PN}-6.3.4-cxx11.patch" \
+ "${FILESDIR}/${PN}-6.3.4-gtk.patch"
+
+ sed -i -e '/target_link_libraries/ s/sqlparser.grt/sqlparser.grt sqlparser/' \
+ modules/db.mysql.sqlparser/CMakeLists.txt
+
+ ## remove hardcoded CXXFLAGS
+ sed -i -e 's/-O0 -g3//' ext/scintilla/gtk/CMakeLists.txt || die
+
+ ## package is very fragile...
+ strip-flags
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ append-cxxflags -std=c++11
+ local mycmakeargs=(
+ $(cmake-utils_use_use gnome-keyring GNOME_KEYRING)
+ -DLIB_INSTALL_DIR="/usr/$(get_libdir)"
+ -DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
+ -DPYTHON_LIBRARY="$(python_get_library_path)"
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ # Work around parallel build issues, bug 507838
+ cmake-utils_src_compile -j1
+}
diff --git a/dev-db/mysql-workbench/mysql-workbench-6.3.9.ebuild b/dev-db/mysql-workbench/mysql-workbench-6.3.9.ebuild
new file mode 100644
index 000000000000..efa53cd769f5
--- /dev/null
+++ b/dev-db/mysql-workbench/mysql-workbench-6.3.9.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+GCONF_DEBUG="no"
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="sqlite"
+
+inherit gnome2 eutils flag-o-matic python-single-r1 cmake-utils
+
+MY_P="${PN}-community-${PV}-src"
+
+DESCRIPTION="MySQL Workbench"
+HOMEPAGE="https://www.mysql.com/products/workbench/"
+SRC_URI="mirror://mysql/Downloads/MySQLGUITools/${MY_P}.tar.gz https://github.com/antlr/website-antlr3/blob/gh-pages/download/antlr-3.4-complete.jar?raw=true -> antlr-3.4-complete.jar"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="debug doc gnome-keyring"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+# glibc: deprecated mutex functions, removed in 2.36.0
+CDEPEND="${PYTHON_DEPS}
+ dev-libs/glib:2
+ dev-cpp/atkmm
+ dev-cpp/pangomm
+ >=dev-cpp/glibmm-2.14:2
+ dev-cpp/gtkmm:3.0
+ dev-libs/atk
+ x11-libs/pango
+ x11-libs/gtk+:3
+ gnome-base/libglade:2.0
+ >=x11-libs/cairo-1.5.12[glib,svg]
+ 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
+ >=virtual/mysql-5.6
+ dev-libs/libpcre[cxx]
+ >=sci-libs/gdal-1.11.1-r1[-mdb]
+ virtual/opengl
+ || ( sys-libs/e2fsprogs-libs dev-libs/ossp-uuid )
+ dev-libs/tinyxml[stl]
+ >=dev-db/mysql-connector-c++-1.1.8
+ dev-db/vsqlite++
+ || ( dev-db/libiodbc dev-db/unixODBC )
+ gnome-keyring? ( gnome-base/libgnome-keyring )
+ 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}-6.3.9-mariadb-json.patch"
+)
+
+src_unpack() {
+ unpack ${PN}-community-${PV}-src.tar.gz
+}
+
+src_prepare() {
+ sed -i -e '/target_link_libraries/ s/sqlparser.grt/sqlparser.grt sqlparser/' \
+ modules/db.mysql.sqlparser/CMakeLists.txt
+
+ ## remove hardcoded CXXFLAGS
+ sed -i -e 's/-O0 -g3//' ext/scintilla/gtk/CMakeLists.txt || die
+
+ ## package is very fragile...
+ strip-flags
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ append-cxxflags -std=c++11
+ local mycmakeargs=(
+ -DUSE_GNOME_KEYRING="$(usex gnome-keyring)"
+ -DLIB_INSTALL_DIR="/usr/$(get_libdir)"
+ -DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
+ -DPYTHON_LIBRARY="$(python_get_library_path)"
+ -DMySQL_CONFIG_PATH="/usr/bin/mysql_config"
+ )
+ ANTLR_JAR_PATH="${DISTDIR}/antlr-3.4-complete.jar" cmake-utils_src_configure
+}
+
+src_compile() {
+ # Work around parallel build issues, bug 507838
+ cmake-utils_src_compile -j1
+}
diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
new file mode 100644
index 000000000000..6b53339392d8
--- /dev/null
+++ b/dev-db/mysql/Manifest
@@ -0,0 +1,20 @@
+AUX my.cnf-5.1 4658 BLAKE2B ef401df54d762a48ed46c3d67d60ada17b4126ff9cbf57acfa981fba286446f24cabe5ad39ffe3d2c4e95bff078e51b3948ab53b326ba02f39d5fc67b5289318 SHA512 6499e2cc1382e64be1f59d1e7855737067bfcf360f0acaede5dd357d97678eb55964de66ac0bece2bd0bfd2283997c7f335359242cfe396e21f0391de68c62ee
+AUX my.cnf-5.5 4733 BLAKE2B 89af4a9dbd4828a40aa91b294cef15ec8afbcb614ece424614d0bd2d047273906ccb8e4518a48d530f55e898b6c75403d61aa7a733d5bf50f0f0640c55471505 SHA512 6a5d183f1aeb30d9096838ac010c8f2dc004448924b3606bd03c1a5e0336a20fe5fcef1d2cd772977a167268fcff51a4b663f1f73a37d3066983621a8ca6c004
+AUX my.cnf-5.6 4504 BLAKE2B 5d904925d12ad4c3826426e7e7790800028c9adf9b42692adf3260cd8dae910338683fbcd3e5148f113c1ab27481e5ffe61871716a069c50f295cf756b3e685c SHA512 866aa700460c2962bad6294b271efad09ef285dd428ab01551078be9972d2f961fbdf56aef7927439784711022e92a96f2eba30cd297f056f6562e8817c89aae
+AUX my.cnf-5.7 138 BLAKE2B 71862b4b77334ab74002237453d2c7f6b51cd1ae57dba3b00b19e216d3f10034796de9aa618efb11482cef78b7c7e50393b5f665810d03321b5ca770ac8a6144 SHA512 1d7250689005c948f4a849959baf33f5f0fda099f230611651919ed053fb563daa19d996b7ca6714e224174172fb504f4d7d08e9d449a7e1203e32cf3fdec782
+AUX my.cnf.distro-client 631 BLAKE2B 9ba4edf4398410ef40bf7312a485edd70a807a9da37c69bb6f6bee2c58a722fef1b9f37d28f09f41912722451cc0e9913218d15be472a853a942119f019bf486 SHA512 f40539a56afe79b7c0dff14de46690fd67e8350755b27fbb490d914001c01836cdf9f851aa461bd8b60943ef2ca084b70e48d995f5c18bcc241309f3473c610c
+AUX my.cnf.distro-server 994 BLAKE2B 41dceff58edf748f9f60ac3c0d1682d2fc2f026fc1fd14b4c2dea398814beda3c09aabea04dd3a9e145464524c629e7e69dc257d1245e0a46dd8584b7f685172 SHA512 cf172edc23d3dda49c21af6b8adef8aa13694d8ceecddf1d612d4ae34d00ba53c51ae4ae7ca4d11083eeacb5d862f59a855a9d80e9e448ab8bbf17f42aac2650
+DIST mysql-5.5.60.tar.gz 21025041 BLAKE2B c4010c64b30ca72aff011053189981cc0676806ed9f18a0ac584e07f71e1f7fe062a3ca78db6f109a2b96d324d778b239880f96852fdc058892b09d0d09e740b SHA512 734395f3ce2c12e7703fe48d5bb2ce85ff8d7f04ae51cbe2d04a46b72b9689f804e5b498ae0b4722b0c098e2eed43d4f93b622964059525e6d9d14a47d55f775
+DIST mysql-5.6.38.tar.gz 32197625 BLAKE2B 5edd6d05e562568d2418edd81c6822b397103013e92beacc00964401c6df67f8a934f05b57c6679aa25a49ef6db2e4a06056f3f1850e0f2afe4de895c7b8f686 SHA512 8144aec822f053fbdfa11ae542e96d3e7da93552b60ed131f041ec4832f48c95025b322340a2e90a82c18b6ee6bfd708f209735f82e37532198245aad697b93d
+DIST mysql-5.6.39.tar.gz 32110958 BLAKE2B 2f279c6745bc995c860bb4f2868409136e112cc8b9fb0c04fa7673bb6d5612f3ef6d3462666de736d6e7fe5439275ab49908a6609175d1cb8c096d5db5ecb59c SHA512 e1e60854c82d71f9600bf611df964f441815d9d0f896134110a749b29fe340fa216d7c89f4da63d492929565f19a2502463549b8c8c038c658e0be8409a3ffb5
+DIST mysql-5.6.40.tar.gz 32083035 BLAKE2B efcc078341bae239df28ac0504111aa34926885ae47edb5011352b56552a5a3abd1f824f8cbdc23d8d667592b8f5510946ef18c3efa61865dbbc7f4bb8a2d4a0 SHA512 c8e458b4cd34cae87f1b088ed2188bd00de8cdc42709d5964e82fa2e4aaecfc12a75ae006c54ffa0d3d286fbdef9704d0cbb83436437d5705fb8921d960e758c
+DIST mysql-boost-5.7.22.tar.gz 48985783 BLAKE2B 208d684e038366824de4bfbe87b6761f91d05fc5cd46cfa89eb627025fb726efe2d7a08a8ce252fed369e399d2d4921bb93c446a296b617320c53ce351fc17c2 SHA512 186c9e9735114e312c65531c70e6b0b9b48b0fe14384b7a6ebfac2c1f91c3f4ac223d06e27a424fc75f57e0aaf2f74d6a8411a8ab9c6fed45c499068d0f1dc2a
+DIST mysql-extras-20171121-1518Z.tar.bz2 313539 BLAKE2B c397fdf7ffb3fcbcecda20933e18234062a9500dcf4031e9b17131e2a1f23dca7535ed33ff541fc075eb9995c67a9a8fd7261d7524dd42d8d333543c368b4c15 SHA512 dd0d4a00c0ed710e786d157a73f02c6f555ab7a68e57014d958627096a4245a0b45d22ec860dc5389002d106554e80166661c0b6ddcadff1f737e3fa195badda
+DIST mysql-extras-20180214-0024Z.tar.bz2 316686 BLAKE2B a893e2975a8062ab236f642d158a7833656942adb31d467b784a9224e7dd87872c3784bb29e93b620a58cd9a835d65248f1a817cdbafa574b5949e2b4262108a SHA512 ad0e81695a70954ad107fe104f9140be24e53d499aed6c123e68e1a062ec5cc90c70f6272fdc014e567794e331301e656ba01b22c2c7a1afaf11e14a9190fb0b
+DIST mysql-extras-20180312-2011Z.tar.bz2 319047 BLAKE2B 1da22a0c763a85a6350122c0c56aef4999279c1ef7cf99bcec28348acc83964eb257bb4340c1a21bdcd3b1eb024b23fa62879bed8679c410d847324cb7e24b82 SHA512 b0aa9fc8fbc050451ef147cee99b00cf10d34a71641837821e78655241f7d79a94fe2efb4cef9a23fe9741e08ada2fc0b58ef3b3663752bc567babfbcaa547c8
+EBUILD mysql-5.5.60.ebuild 4381 BLAKE2B c48db634322354aeb487df4df4eff2a27b2e69d9aa5785f349c45f8e947a7e3572e86f013d71e0063b69731fda9155811928336f270d0fee3230caf6eeeae6ed SHA512 f3e4946ede777c0bc39ae415f3f30bb33be145f15f452829683fcbd2e191cd65d6d0f3c6d372651468bb25ea7bfab3f5c8dbadcf4021ca3f0cebf1590eed6ce9
+EBUILD mysql-5.6.38.ebuild 6466 BLAKE2B c85ee0bd78a7b75a328a72120444277c9425886e06dc9134662669c73af4d1da45c6d49943f44fbe518379d0babd0590a3ae127f7552862aeb6eacbc18e6cd1c SHA512 e4272584a5de91df2b5f4fee2060e3ca3b5151472bc5e9d472004fdc213f0fc9527874958995bb039847f7f5da97047fc3e9b12f61cecdf03b9d3f65d707be78
+EBUILD mysql-5.6.39.ebuild 6520 BLAKE2B d21e873fb57b7b311e7c06d680963794f1b7eb63c118a90aba8d4d036b0449c109e7c50c58a7616bf0b6545225f505fa5a6bcbcb3c0b095ba7c09dc3d296cc63 SHA512 e3c0b406a9c738d0474428c3007888d70832cd61c5a1d1bfad9ff9842f54c67f9494ca81e9647621b68a7e8ccb40af2ecc7fec4118538e569aeb58fe797c54e5
+EBUILD mysql-5.6.40.ebuild 6526 BLAKE2B 08c92c74325dfab7d6106c3397129a5da95f52598185cf379985097f99e373cd9c0fbc0afa5a12643eb7212a10b63f1263eecb92556315943b59139d938cb7cb SHA512 2298baeeda2edf1d75e9a697e86428b81ded08fb58513942698e24ec4c8d16a295ed5abbc899faeb30bd5f3359f85bcde218c01020802727cf4816b7b447cd42
+EBUILD mysql-5.7.22.ebuild 26968 BLAKE2B 12c16254b4173f661462e5b65a84966e60816d40294defaa3cf8d2dd21b1d2cc3d5210230527bbbe4f3e40ed38c99704e059d810001eaa008811b23ee6bd0e76 SHA512 4d10eb23cd398739dac2234ba33cf4009b8ca01acf3b0549bd8e48f427b702102c9a01b7c5e3f699ca7faa1e068d600bcd0a3d8e758f02bc98f617d3f51e9e4a
+MISC metadata.xml 1916 BLAKE2B da2c681ac07c234aa7ecc6f52a1ed63bf49241f7cb270733d0acf523ae5c420bb8f91628bf8510f9365b137ddd63224fd9da6a00df976832947ce043da49a602 SHA512 eac8cb1f76264b46137794c7c47907579af51ac9184aba324f3951135f60dc58c642efdd0a7a3e5c438322f8de4066425ec306d0924472853413be2fd19cbaf9
diff --git a/dev-db/mysql/files/my.cnf-5.1 b/dev-db/mysql/files/my.cnf-5.1
new file mode 100644
index 000000000000..0ec0677aabc5
--- /dev/null
+++ b/dev-db/mysql/files/my.cnf-5.1
@@ -0,0 +1,144 @@
+# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file.
+
+# The following options will be passed to all MySQL clients
+[client]
+#password = your_password
+port = 3306
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
+
+[mysql]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqladmin]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlcheck]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqldump]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlimport]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlshow]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[myisamchk]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+
+[myisampack]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+
+# use [safe_mysqld] with mysql-3
+[mysqld_safe]
+err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err
+
+# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations
+[mysqld]
+character-set-server = utf8
+user = mysql
+port = 3306
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
+pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid
+log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err
+basedir = @GENTOO_PORTAGE_EPREFIX@/usr
+datadir = @DATADIR@
+skip-external-locking
+key_buffer = 16M
+max_allowed_packet = 1M
+table_open_cache = 64
+sort_buffer_size = 512K
+net_buffer_length = 8K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+language = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/english
+
+# security:
+# using "localhost" in connects uses sockets by default
+# skip-networking
+bind-address = 127.0.0.1
+
+log-bin
+server-id = 1
+
+# point the following paths to different dedicated disks
+tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/
+#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname
+
+# you need the debug USE flag enabled to use the following directives,
+# if needed, uncomment them, start the server and issue
+# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace
+# this will show you *exactly* what's happening in your server ;)
+
+#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql
+#gdb
+#debug = d:t:i:o,/tmp/mysqld.trace
+#one-thread
+
+# uncomment the following directives if you are using BDB tables
+#bdb_cache_size = 4M
+#bdb_max_lock = 10000
+
+# the following is the InnoDB configuration
+# if you wish to disable innodb instead
+# uncomment just the next line
+#skip-innodb
+#
+# the rest of the innodb config follows:
+# don't eat too much memory, we're trying to be safe on 64Mb boxes
+# you might want to bump this up a bit on boxes with more RAM
+innodb_buffer_pool_size = 16M
+# this is the default, increase it if you have lots of tables
+innodb_additional_mem_pool_size = 2M
+#
+# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-(
+# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route
+# we have to take for the moment
+#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+# you may wish to change this size to be more suitable for your system
+# the max is there to avoid run-away growth on your machine
+innodb_data_file_path = ibdata1:10M:autoextend:max:128M
+# we keep this at around 25% of of innodb_buffer_pool_size
+# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size)
+innodb_log_file_size = 5M
+# this is the default, increase it if you have very large transactions going on
+innodb_log_buffer_size = 8M
+# this is the default and won't hurt you
+# you shouldn't need to tweak it
+innodb_log_files_in_group=2
+# see the innodb config docs, the other options are not always safe
+innodb_flush_log_at_trx_commit = 1
+innodb_lock_wait_timeout = 50
+innodb_file_per_table
+
+[mysqldump]
+quick
+max_allowed_packet = 16M
+
+[mysql]
+# uncomment the next directive if you are not familiar with SQL
+#safe-updates
+
+[isamchk]
+key_buffer = 20M
+sort_buffer_size = 20M
+read_buffer = 2M
+write_buffer = 2M
+
+[myisamchk]
+key_buffer = 20M
+sort_buffer_size = 20M
+read_buffer = 2M
+write_buffer = 2M
+
+[mysqlhotcopy]
+interactive-timeout
diff --git a/dev-db/mysql/files/my.cnf-5.5 b/dev-db/mysql/files/my.cnf-5.5
new file mode 100644
index 000000000000..83b9aaab2ecc
--- /dev/null
+++ b/dev-db/mysql/files/my.cnf-5.5
@@ -0,0 +1,147 @@
+# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file.
+
+# The following options will be passed to all MySQL clients
+[client]
+#password = your_password
+port = 3306
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
+
+[mysql]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqladmin]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlcheck]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqldump]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlimport]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlshow]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[myisamchk]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+
+[myisampack]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+
+# use [safe_mysqld] with mysql-3
+[mysqld_safe]
+err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err
+
+# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations
+[mysqld]
+character-set-server = utf8
+user = mysql
+port = 3306
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
+pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid
+log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err
+basedir = @GENTOO_PORTAGE_EPREFIX@/usr
+datadir = @DATADIR@
+skip-external-locking
+key_buffer_size = 16M
+max_allowed_packet = 1M
+table_open_cache = 64
+sort_buffer_size = 512K
+net_buffer_length = 8K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql
+#Set this to your desired error message language
+lc_messages = en_US
+
+# security:
+# using "localhost" in connects uses sockets by default
+# skip-networking
+bind-address = 127.0.0.1
+
+log-bin
+server-id = 1
+
+# point the following paths to different dedicated disks
+tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/
+#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname
+
+# you need the debug USE flag enabled to use the following directives,
+# if needed, uncomment them, start the server and issue
+# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace
+# this will show you *exactly* what's happening in your server ;)
+
+#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql
+#gdb
+#debug = d:t:i:o,/tmp/mysqld.trace
+#one-thread
+
+# the following is the InnoDB configuration
+# if you wish to disable innodb instead
+# uncomment just the next line
+#skip-innodb
+#
+# the rest of the innodb config follows:
+# don't eat too much memory, we're trying to be safe on 64Mb boxes
+# you might want to bump this up a bit on boxes with more RAM
+innodb_buffer_pool_size = 16M
+# this is the default, increase it if you have lots of tables
+innodb_additional_mem_pool_size = 2M
+#
+# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-(
+# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route
+# we have to take for the moment
+#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+# you may wish to change this size to be more suitable for your system
+# the max is there to avoid run-away growth on your machine
+innodb_data_file_path = ibdata1:10M:autoextend:max:128M
+# we keep this at around 25% of of innodb_buffer_pool_size
+# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size)
+innodb_log_file_size = 5M
+# this is the default, increase it if you have very large transactions going on
+innodb_log_buffer_size = 8M
+# this is the default and won't hurt you
+# you shouldn't need to tweak it
+innodb_log_files_in_group=2
+# see the innodb config docs, the other options are not always safe
+innodb_flush_log_at_trx_commit = 1
+innodb_lock_wait_timeout = 50
+innodb_file_per_table
+
+# Uncomment this to get FEDERATED engine support
+#plugin-load=federated=ha_federated.so
+#loose-federated
+
+[mysqldump]
+quick
+max_allowed_packet = 16M
+
+[mysql]
+# uncomment the next directive if you are not familiar with SQL
+#safe-updates
+
+[isamchk]
+key_buffer_size = 20M
+sort_buffer_size = 20M
+read_buffer = 2M
+write_buffer = 2M
+
+[myisamchk]
+key_buffer_size = 20M
+sort_buffer_size = 20M
+read_buffer_size = 2M
+write_buffer_size = 2M
+
+[mysqlhotcopy]
+interactive-timeout
+
diff --git a/dev-db/mysql/files/my.cnf-5.6 b/dev-db/mysql/files/my.cnf-5.6
new file mode 100644
index 000000000000..df462ab69a14
--- /dev/null
+++ b/dev-db/mysql/files/my.cnf-5.6
@@ -0,0 +1,139 @@
+# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file.
+
+# The following options will be passed to all MySQL clients
+[client]
+#password = your_password
+port = 3306
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
+
+[mysql]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqladmin]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlcheck]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqldump]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlimport]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlshow]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[myisamchk]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+
+[myisampack]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+
+# use [safe_mysqld] with mysql-3
+[mysqld_safe]
+err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err
+
+# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations
+[mysqld]
+character-set-server = utf8
+user = mysql
+port = 3306
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
+pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid
+log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err
+basedir = @GENTOO_PORTAGE_EPREFIX@/usr
+datadir = @DATADIR@
+skip-external-locking
+key_buffer_size = 16M
+max_allowed_packet = 4M
+table_open_cache = 400
+sort_buffer_size = 512K
+net_buffer_length = 16K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql
+#Set this to your desired error message language
+lc_messages = en_US
+
+# security:
+# using "localhost" in connects uses sockets by default
+# skip-networking
+bind-address = 127.0.0.1
+
+log-bin
+server-id = 1
+
+# point the following paths to different dedicated disks
+tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/
+#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname
+
+# you need the debug USE flag enabled to use the following directives,
+# if needed, uncomment them, start the server and issue
+# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace
+# this will show you *exactly* what's happening in your server ;)
+
+#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql
+#gdb
+#debug = d:t:i:o,/tmp/mysqld.trace
+#one-thread
+
+# the rest of the innodb config follows:
+# don't eat too much memory, we're trying to be safe on 64Mb boxes
+# you might want to bump this up a bit on boxes with more RAM
+innodb_buffer_pool_size = 128M
+#
+# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-(
+# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route
+# we have to take for the moment
+#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+# you may wish to change this size to be more suitable for your system
+# the max is there to avoid run-away growth on your machine
+innodb_data_file_path = ibdata1:10M:autoextend:max:128M
+# we keep this at around 25% of of innodb_buffer_pool_size
+# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size)
+innodb_log_file_size = 48M
+# this is the default, increase it if you have very large transactions going on
+innodb_log_buffer_size = 8M
+# this is the default and won't hurt you
+# you shouldn't need to tweak it
+innodb_log_files_in_group=2
+# see the innodb config docs, the other options are not always safe
+innodb_flush_log_at_trx_commit = 1
+innodb_lock_wait_timeout = 50
+innodb_file_per_table
+
+# Uncomment this to get FEDERATED engine support
+#plugin-load=federated=ha_federated.so
+loose-federated
+
+[mysqldump]
+quick
+max_allowed_packet = 16M
+
+[mysql]
+# uncomment the next directive if you are not familiar with SQL
+#safe-updates
+
+[isamchk]
+key_buffer_size = 20M
+sort_buffer_size = 20M
+read_buffer = 2M
+write_buffer = 2M
+
+[myisamchk]
+key_buffer_size = 20M
+sort_buffer_size = 20M
+read_buffer_size = 2M
+write_buffer_size = 2M
+
+[mysqlhotcopy]
+interactive-timeout
diff --git a/dev-db/mysql/files/my.cnf-5.7 b/dev-db/mysql/files/my.cnf-5.7
new file mode 100644
index 000000000000..571ebf07a76e
--- /dev/null
+++ b/dev-db/mysql/files/my.cnf-5.7
@@ -0,0 +1,3 @@
+# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file.
+
+!includedir @GENTOO_PORTAGE_EPREFIX@/etc/mysql/mysql.d
diff --git a/dev-db/mysql/files/my.cnf.distro-client b/dev-db/mysql/files/my.cnf.distro-client
new file mode 100644
index 000000000000..8bf183634304
--- /dev/null
+++ b/dev-db/mysql/files/my.cnf.distro-client
@@ -0,0 +1,21 @@
+# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/50-distro-client.cnf: The global mysql configuration file.
+
+# The following options will be passed to all MySQL clients
+[client]
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
+character-sets-dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysql]
+# uncomment the next directive if you are not familiar with SQL
+#safe-updates
+
+[mysqldump]
+quick
+max_allowed_packet = 16M
+
+[myisamchk]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+
+[myisampack]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
diff --git a/dev-db/mysql/files/my.cnf.distro-server b/dev-db/mysql/files/my.cnf.distro-server
new file mode 100644
index 000000000000..d4ed30c1f089
--- /dev/null
+++ b/dev-db/mysql/files/my.cnf.distro-server
@@ -0,0 +1,28 @@
+# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/50-distro-server.cnf: The global mysql configuration file.
+
+# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations
+[mysqld]
+character-set-server = utf8
+user = mysql
+port = 3306
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
+pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysql.pid
+log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err
+basedir = @GENTOO_PORTAGE_EPREFIX@/usr
+datadir = @DATADIR@
+skip-external-locking
+lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql
+#Set this to your desired error message language
+lc_messages = en_US
+
+# security:
+# using "localhost" in connects uses sockets by default
+# skip-networking
+bind-address = 127.0.0.1
+
+log-bin
+server-id = 1
+
+# point the following paths to different dedicated disks
+tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/
+#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname
diff --git a/dev-db/mysql/metadata.xml b/dev-db/mysql/metadata.xml
new file mode 100644
index 000000000000..82e3cca31974
--- /dev/null
+++ b/dev-db/mysql/metadata.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>mysql-bugs@gentoo.org</email>
+ <name>MySQL</name>
+ </maintainer>
+<!--
+Please note that this list is shared between the following packages:
+dev-db/mysql
+dev-db/mariadb
+-->
+<use>
+ <flag name="client-libs">Build the client libraries from the server package instead of the C Connector packages (not recommended)</flag>
+ <flag name="cluster">Add support for NDB clustering (deprecated)</flag>
+ <flag name="community">Enables the community features from upstream.</flag>
+ <flag name="embedded">Build embedded server (libmysqld)</flag>
+ <flag name="extraengine">Add support for alternative storage engines (Archive, CSV, Blackhole, Federated(X), Partition)</flag>
+ <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for allocations.</flag>
+ <flag name="latin1">Use LATIN1 encoding instead of UTF8</flag>
+ <flag name="libressl">Enable SSL connections and crypto functions using <pkg>dev-libs/libressl</pkg></flag>
+ <flag name="openssl">Enable SSL connections and crypto functions using <pkg>dev-libs/openssl</pkg></flag>
+ <flag name="max-idx-128">Raise the max index per table limit from 64 to 128</flag>
+ <flag name="minimal">Install client programs only, no server</flag>
+ <flag name="numa">Enable NUMA support using <pkg>sys-process/numactl</pkg> (NUMA kernel support is also required)</flag>
+ <flag name="profiling">Add support for statement profiling (requires USE=community).</flag>
+ <flag name="server">Build the server program</flag>
+ <flag name="systemtap">Build support for profiling and tracing using <pkg>dev-util/systemtap</pkg></flag>
+ <flag name="test">Install upstream testsuites for end use.</flag>
+ <flag name="yassl">Enable SSL connections and crypto functions using the bundled yaSSL</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-db/mysql/mysql-5.5.60.ebuild b/dev-db/mysql/mysql-5.5.60.ebuild
new file mode 100644
index 000000000000..881a4ffb831a
--- /dev/null
+++ b/dev-db/mysql/mysql-5.5.60.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+MY_EXTRAS_VER="20180214-0024Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+
+# Build type
+BUILD="cmake"
+#fails to build with ninja
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit toolchain-funcs mysql-v2
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# Define the mysql-extras source
+EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+SLOT="0/18"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# Official test instructions:
+# USE='extraengine perl ssl static-libs community' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+ local TESTDIR="${BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ # 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 ! use "minimal" ; then
+
+ if [[ $UID -eq 0 ]]; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+ has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ addpredict /this-dir-does-not-exist/t9.MYI
+
+ # Run CTest (test-units)
+ cmake-utils_src_test
+ retstatus_unit=$?
+ [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+ # Enable parallel testing, auto will try to detect number of cores
+ # You may set this by hand.
+ # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+ export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+ # create directories because mysqladmin might right out of order
+ mkdir -p "${T}"/var-tests{,/log}
+
+ # create symlink for the tests to find mysql_tzinfo_to_sql
+ ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+ # These are failing in MySQL 5.5 for now and are believed to be
+ # false positives:
+ #
+ # main.information_schema, binlog.binlog_statement_insert_delayed,
+ # main.mysqld--help-notwin
+ # fails due to USE=-latin1 / utf8 default
+ #
+ # main.mysql_client_test:
+ # segfaults at random under Portage only, suspect resource limits.
+ #
+ # main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+ # fails due to bad cleanup of previous tests when run in parallel
+ # The tool is deprecated anyway
+ # Bug 532288
+
+ for t in main.mysql_client_test main.openssl_1 \
+ binlog.binlog_statement_insert_delayed main.information_schema \
+ main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+ mysql-v2_disable_test "$t" "False positives in Gentoo"
+ done
+
+ for t in main.mysql main.mysql_upgrade ; do
+ mysql-v2_disable_test "$t" "Test $t broken upstream - error return value not updated"
+ done
+
+ # Run mysql tests
+ pushd "${TESTDIR}"
+
+ # run mysql-test tests
+ perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+ --testcase-timeout=30 --reorder
+ retstatus_tests=$?
+ [[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+ has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+ popd
+
+ # Cleanup is important for these testcases.
+ pkill -9 -f "${S}/ndb" 2>/dev/null
+ pkill -9 -f "${S}/sql" 2>/dev/null
+
+ failures=""
+ [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+ [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+ has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+ [[ -z "$failures" ]] || die "Test failures: $failures"
+ einfo "Tests successfully completed"
+
+ else
+
+ einfo "Skipping server tests due to minimal build."
+ fi
+}
diff --git a/dev-db/mysql/mysql-5.6.38.ebuild b/dev-db/mysql/mysql-5.6.38.ebuild
new file mode 100644
index 000000000000..dd37abf2cc6c
--- /dev/null
+++ b/dev-db/mysql/mysql-5.6.38.ebuild
@@ -0,0 +1,192 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+MY_EXTRAS_VER="20171121-1518Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+HAS_TOOLS_PATCH="1"
+SUBSLOT="18"
+#fails to build with ninja
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit mysql-multilib-r1
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE numa"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+COMMON_DEPEND="numa? ( sys-process/numactl:= )"
+
+DEPEND="${COMMON_DEPEND}
+ || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+ test? ( dev-perl/JSON )"
+RDEPEND="${COMMON_DEPEND}"
+
+MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+
+PATCHES=(
+ "${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
+ "${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
+ "${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
+ "${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
+ "${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.6.37.patch
+ "${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
+ "${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
+ "${MY_PATCH_DIR}"/20027_all_mysql-5.5-perl5.26-includes.patch
+ "${MY_PATCH_DIR}"/20028_all_mysql-5.6-gcc7.patch
+)
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+src_prepare() {
+ mysql-multilib-r1_src_prepare
+ if use libressl ; then
+ sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+ "${S}/cmake/ssl.cmake" || die
+ fi
+}
+
+src_configure() {
+ # validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
+ # disable until we see what happens with it
+ local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 -DWITH_NUMA=$(usex numa ON OFF) )
+ mysql-multilib-r1_src_configure
+}
+
+# Official test instructions:
+# USE='server embedded extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+multilib_src_test() {
+
+ if ! multilib_is_native_abi ; then
+ einfo "Server tests not available on non-native abi".
+ return 0;
+ fi
+
+ local TESTDIR="${BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ # 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 use server ; then
+
+ if [[ $UID -eq 0 ]]; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+ has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+ # Run CTest (test-units)
+ cmake-utils_src_test
+ retstatus_unit=$?
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+ # Enable parallel testing, auto will try to detect number of cores
+ # You may set this by hand.
+ # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+ export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+ # create directories because mysqladmin might right out of order
+ mkdir -p "${T}"/var-tests{,/log}
+
+ # create symlink for the tests to find mysql_tzinfo_to_sql
+ ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+ # These are failing in MySQL 5.5/5.6 for now and are believed to be
+ # false positives:
+ #
+ # main.information_schema, binlog.binlog_statement_insert_delayed,
+ # funcs_1.is_triggers funcs_1.is_tables_mysql,
+ # funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
+ # perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
+ # mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
+ # perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
+ # fails due to USE=-latin1 / utf8 default
+ #
+ # main.mysql_client_test:
+ # segfaults at random under Portage only, suspect resource limits.
+ #
+ # rpl.rpl_plugin_load
+ # fails due to included file not listed in expected result
+ # appears to be poor planning
+ #
+ # main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+ # fails due to bad cleanup of previous tests when run in parallel
+ # The tool is deprecated anyway
+ # Bug 532288
+ #
+ # main.events_2
+ # Fails on date in past without preserve causing the drop to fail
+
+ for t in \
+ binlog.binlog_mysqlbinlog_filter \
+ binlog.binlog_statement_insert_delayed \
+ funcs_1.is_columns_mysql \
+ funcs_1.is_tables_mysql \
+ funcs_1.is_triggers \
+ main.information_schema \
+ main.mysql_client_test \
+ main.mysqld--help-notwin \
+ perfschema.binlog_edge_mix \
+ perfschema.binlog_edge_stmt \
+ rpl.rpl_plugin_load \
+ main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
+ main.events_2 \
+ ; do
+ mysql-multilib-r1_disable_test "$t" "False positives in Gentoo"
+ done
+
+ if ! use extraengine ; then
+ # bug 401673, 530766
+ for t in federated.federated_plugin ; do
+ mysql-multilib-r1_disable_test "$t" "Test $t requires USE=extraengine (Need federated engine)"
+ done
+ fi
+
+ for t in main.mysql main.mysql_upgrade ; do
+ mysql-multilib-r1_disable_test "$t" "Test $t broken upstream - error return value not updated"
+ done
+
+ # Run mysql tests
+ pushd "${TESTDIR}"
+
+ # Set file limits higher so tests run
+ ulimit -n 3000
+
+ # run mysql-test tests
+ perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+ --suite-timeout=5000 --reorder
+ retstatus_tests=$?
+# [[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+# has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+ popd
+
+ # Cleanup is important for these testcases.
+ pkill -9 -f "${S}/ndb" 2>/dev/null
+ pkill -9 -f "${S}/sql" 2>/dev/null
+
+ failures=""
+ [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+ [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+# has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+ [[ -z "$failures" ]] || die "Test failures: $failures"
+ einfo "Tests successfully completed"
+
+ else
+ einfo "Skipping server tests due to minimal build."
+ fi
+}
diff --git a/dev-db/mysql/mysql-5.6.39.ebuild b/dev-db/mysql/mysql-5.6.39.ebuild
new file mode 100644
index 000000000000..a85b1579d4cd
--- /dev/null
+++ b/dev-db/mysql/mysql-5.6.39.ebuild
@@ -0,0 +1,193 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+MY_EXTRAS_VER="20180214-0024Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+HAS_TOOLS_PATCH="1"
+SUBSLOT="18"
+#fails to build with ninja
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit mysql-multilib-r1
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE numa"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+COMMON_DEPEND="numa? ( sys-process/numactl:= )"
+
+DEPEND="${COMMON_DEPEND}
+ || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+ test? ( dev-perl/JSON )"
+RDEPEND="${COMMON_DEPEND}"
+
+MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+
+PATCHES=(
+ "${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
+ "${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
+ "${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
+ "${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
+ "${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.6.37.patch
+ "${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
+ "${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
+ "${MY_PATCH_DIR}"/20027_all_mysql-5.5-perl5.26-includes.patch
+ "${MY_PATCH_DIR}"/20028_all_mysql-5.6-gcc7.patch
+ "${MY_PATCH_DIR}"/20031_all_mysql-5.6-fix-monitor.test.patch
+)
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+src_prepare() {
+ mysql-multilib-r1_src_prepare
+ if use libressl ; then
+ sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+ "${S}/cmake/ssl.cmake" || die
+ fi
+}
+
+src_configure() {
+ # validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
+ # disable until we see what happens with it
+ local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 -DWITH_NUMA=$(usex numa ON OFF) )
+ mysql-multilib-r1_src_configure
+}
+
+# Official test instructions:
+# USE='server extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+multilib_src_test() {
+
+ if ! multilib_is_native_abi ; then
+ einfo "Server tests not available on non-native abi".
+ return 0;
+ fi
+
+ local TESTDIR="${BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ # 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 use server ; then
+
+ if [[ $UID -eq 0 ]]; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+ has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+ # Run CTest (test-units)
+ cmake-utils_src_test
+ retstatus_unit=$?
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+ # Enable parallel testing, auto will try to detect number of cores
+ # You may set this by hand.
+ # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+ export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+ # create directories because mysqladmin might right out of order
+ mkdir -p "${T}"/var-tests{,/log}
+
+ # create symlink for the tests to find mysql_tzinfo_to_sql
+ ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+ # These are failing in MySQL 5.5/5.6 for now and are believed to be
+ # false positives:
+ #
+ # main.information_schema, binlog.binlog_statement_insert_delayed,
+ # funcs_1.is_triggers funcs_1.is_tables_mysql,
+ # funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
+ # perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
+ # mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
+ # perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
+ # fails due to USE=-latin1 / utf8 default
+ #
+ # main.mysql_client_test:
+ # segfaults at random under Portage only, suspect resource limits.
+ #
+ # rpl.rpl_plugin_load
+ # fails due to included file not listed in expected result
+ # appears to be poor planning
+ #
+ # main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+ # fails due to bad cleanup of previous tests when run in parallel
+ # The tool is deprecated anyway
+ # Bug 532288
+ #
+ # main.events_2
+ # Fails on date in past without preserve causing the drop to fail
+
+ for t in \
+ binlog.binlog_mysqlbinlog_filter \
+ binlog.binlog_statement_insert_delayed \
+ funcs_1.is_columns_mysql \
+ funcs_1.is_tables_mysql \
+ funcs_1.is_triggers \
+ main.information_schema \
+ main.mysql_client_test \
+ main.mysqld--help-notwin \
+ perfschema.binlog_edge_mix \
+ perfschema.binlog_edge_stmt \
+ rpl.rpl_plugin_load \
+ main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
+ main.events_2 \
+ ; do
+ mysql-multilib-r1_disable_test "$t" "False positives in Gentoo"
+ done
+
+ if ! use extraengine ; then
+ # bug 401673, 530766
+ for t in federated.federated_plugin ; do
+ mysql-multilib-r1_disable_test "$t" "Test $t requires USE=extraengine (Need federated engine)"
+ done
+ fi
+
+ for t in main.mysql main.mysql_upgrade ; do
+ mysql-multilib-r1_disable_test "$t" "Test $t broken upstream - error return value not updated"
+ done
+
+ # Run mysql tests
+ pushd "${TESTDIR}"
+
+ # Set file limits higher so tests run
+ ulimit -n 3000
+
+ # run mysql-test tests
+ perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+ --suite-timeout=5000 --reorder
+ retstatus_tests=$?
+# [[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+# has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+ popd
+
+ # Cleanup is important for these testcases.
+ pkill -9 -f "${S}/ndb" 2>/dev/null
+ pkill -9 -f "${S}/sql" 2>/dev/null
+
+ failures=""
+ [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+ [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+# has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+ [[ -z "$failures" ]] || die "Test failures: $failures"
+ einfo "Tests successfully completed"
+
+ else
+ einfo "Skipping server tests due to minimal build."
+ fi
+}
diff --git a/dev-db/mysql/mysql-5.6.40.ebuild b/dev-db/mysql/mysql-5.6.40.ebuild
new file mode 100644
index 000000000000..572d880ca1cf
--- /dev/null
+++ b/dev-db/mysql/mysql-5.6.40.ebuild
@@ -0,0 +1,193 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+MY_EXTRAS_VER="20180214-0024Z"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+HAS_TOOLS_PATCH="1"
+SUBSLOT="18"
+#fails to build with ninja
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit mysql-multilib-r1
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE numa"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+COMMON_DEPEND="numa? ( sys-process/numactl:= )"
+
+DEPEND="${COMMON_DEPEND}
+ || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+ test? ( dev-perl/JSON )"
+RDEPEND="${COMMON_DEPEND}"
+
+MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+
+PATCHES=(
+ "${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
+ "${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
+ "${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
+ "${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
+ "${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.6.37.patch
+ "${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
+ "${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
+ "${MY_PATCH_DIR}"/20027_all_mysql-5.5-perl5.26-includes.patch
+ "${MY_PATCH_DIR}"/20028_all_mysql-5.6-gcc7.patch
+ "${MY_PATCH_DIR}"/20031_all_mysql-5.6-fix-monitor.test.patch
+)
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+src_prepare() {
+ mysql-multilib-r1_src_prepare
+ if use libressl ; then
+ sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+ "${S}/cmake/ssl.cmake" || die
+ fi
+}
+
+src_configure() {
+ # validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
+ # disable until we see what happens with it
+ local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 -DWITH_NUMA=$(usex numa ON OFF) )
+ mysql-multilib-r1_src_configure
+}
+
+# Official test instructions:
+# USE='server extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+multilib_src_test() {
+
+ if ! multilib_is_native_abi ; then
+ einfo "Server tests not available on non-native abi".
+ return 0;
+ fi
+
+ local TESTDIR="${BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ # 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 use server ; then
+
+ if [[ $UID -eq 0 ]]; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+ has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+ # Run CTest (test-units)
+ cmake-utils_src_test
+ retstatus_unit=$?
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+ # Enable parallel testing, auto will try to detect number of cores
+ # You may set this by hand.
+ # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+ export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+ # create directories because mysqladmin might right out of order
+ mkdir -p "${T}"/var-tests{,/log}
+
+ # create symlink for the tests to find mysql_tzinfo_to_sql
+ ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
+
+ # These are failing in MySQL 5.5/5.6 for now and are believed to be
+ # false positives:
+ #
+ # main.information_schema, binlog.binlog_statement_insert_delayed,
+ # funcs_1.is_triggers funcs_1.is_tables_mysql,
+ # funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
+ # perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
+ # mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
+ # perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
+ # fails due to USE=-latin1 / utf8 default
+ #
+ # main.mysql_client_test:
+ # segfaults at random under Portage only, suspect resource limits.
+ #
+ # rpl.rpl_plugin_load
+ # fails due to included file not listed in expected result
+ # appears to be poor planning
+ #
+ # main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+ # fails due to bad cleanup of previous tests when run in parallel
+ # The tool is deprecated anyway
+ # Bug 532288
+ #
+ # main.events_2
+ # Fails on date in past without preserve causing the drop to fail
+
+ for t in \
+ binlog.binlog_mysqlbinlog_filter \
+ binlog.binlog_statement_insert_delayed \
+ funcs_1.is_columns_mysql \
+ funcs_1.is_tables_mysql \
+ funcs_1.is_triggers \
+ main.information_schema \
+ main.mysql_client_test \
+ main.mysqld--help-notwin \
+ perfschema.binlog_edge_mix \
+ perfschema.binlog_edge_stmt \
+ rpl.rpl_plugin_load \
+ main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
+ main.events_2 \
+ ; do
+ mysql-multilib-r1_disable_test "$t" "False positives in Gentoo"
+ done
+
+ if ! use extraengine ; then
+ # bug 401673, 530766
+ for t in federated.federated_plugin ; do
+ mysql-multilib-r1_disable_test "$t" "Test $t requires USE=extraengine (Need federated engine)"
+ done
+ fi
+
+ for t in main.mysql main.mysql_upgrade ; do
+ mysql-multilib-r1_disable_test "$t" "Test $t broken upstream - error return value not updated"
+ done
+
+ # Run mysql tests
+ pushd "${TESTDIR}"
+
+ # Set file limits higher so tests run
+ ulimit -n 3000
+
+ # run mysql-test tests
+ perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+ --suite-timeout=5000 --reorder
+ retstatus_tests=$?
+# [[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+# has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+ popd
+
+ # Cleanup is important for these testcases.
+ pkill -9 -f "${S}/ndb" 2>/dev/null
+ pkill -9 -f "${S}/sql" 2>/dev/null
+
+ failures=""
+ [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+ [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+# has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+ [[ -z "$failures" ]] || die "Test failures: $failures"
+ einfo "Tests successfully completed"
+
+ else
+ einfo "Skipping server tests due to minimal build."
+ fi
+}
diff --git a/dev-db/mysql/mysql-5.7.22.ebuild b/dev-db/mysql/mysql-5.7.22.ebuild
new file mode 100644
index 000000000000..3c0a0ac7c387
--- /dev/null
+++ b/dev-db/mysql/mysql-5.7.22.ebuild
@@ -0,0 +1,843 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20180312-2011Z"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+# Keeping eutils in EAPI=6 for emktemp in pkg_config
+
+inherit eutils flag-o-matic prefix toolchain-funcs \
+ user cmake-utils multilib-minimal
+
+SRC_URI="http://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
+ https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
+ http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz"
+
+# Gentoo patches to MySQL
+if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
+ SRC_URI="${SRC_URI}
+ mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
+ https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
+fi
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="0/18"
+IUSE="client-libs cracklib debug jemalloc latin1 libressl numa +perl profiling selinux
+ +server static static-libs systemtap tcmalloc test yassl"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="libressl? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-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"
+
+if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
+ EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
+ EGIT_CLONE_TYPE=shallow
+ MY_PATCH_DIR="${WORKDIR}/mysql-extras"
+else
+ MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+fi
+
+PATCHES=(
+ "${MY_PATCH_DIR}"/20001_all_fix-minimal-build-cmake-mysql-5.7.patch
+ "${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.7.patch
+# "${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.7.6.patch
+ "${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
+ "${MY_PATCH_DIR}"/20018_all_mysql-5.7.21-without-clientlibs-tools.patch
+)
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+# MULTILIB_USEDEP only set for libraries used by the client library
+COMMON_DEPEND="
+ kernel_linux? (
+ sys-process/procps:0=
+ dev-libs/libaio:0=
+ )
+ net-misc/curl
+ >=sys-apps/sed-4
+ >=sys-apps/texinfo-4.7-r1
+ jemalloc? ( dev-libs/jemalloc:0= )
+ tcmalloc? ( dev-util/google-perftools:0= )
+ systemtap? ( >=dev-util/systemtap-1.3:0= )
+ !yassl? (
+ client-libs? (
+ !libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
+ libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
+ )
+ !client-libs? (
+ !libressl? ( >=dev-libs/openssl-1.0.0:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ )
+ client-libs? ( >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?] )
+ !client-libs? ( >=sys-libs/zlib-1.2.3:0= )
+ sys-libs/ncurses:0=
+ server? (
+ >=app-arch/lz4-0_p131:=
+ >=dev-libs/boost-1.65.0:=
+ numa? ( sys-process/numactl )
+ )
+ !client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
+"
+DEPEND="virtual/yacc
+ static? ( sys-libs/ncurses[static-libs] )
+ || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+ ${COMMON_DEPEND}"
+RDEPEND="selinux? ( sec-policy/selinux-mysql )
+ client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
+ !dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+ server? ( !prefix? ( dev-db/mysql-init-scripts ) )
+ ${COMMON_DEPEND}
+"
+# 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 )"
+
+pkg_setup() {
+ if [[ ${MERGE_TYPE} != binary ]] ; then
+ local GCC_MAJOR_SET=$(gcc-major-version)
+ local GCC_MINOR_SET=$(gcc-minor-version)
+ # Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on
+ # non x86{,_64} arches
+ if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
+ ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+ eerror "${PN} needs to be built with gcc-4.7 or later."
+ eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+ die
+ fi
+ fi
+ if has test ${FEATURES} && \
+ use server && ! has userpriv ${FEATURES} ; then
+ eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+
+ # This should come after all of the die statements
+ enewgroup mysql 60 || die "problem adding 'mysql' group"
+ enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
+}
+
+pkg_preinst() {
+ # Here we need to see if the implementation switched client libraries
+ # We check if this is a new instance of the package and a client library already exists
+ local SHOW_ABI_MESSAGE libpath
+ if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+ libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
+ elog "Due to ABI changes when switching between different client libraries,"
+ elog "revdep-rebuild must find and rebuild all packages linking to libmysqlclient."
+ elog "Please run: revdep-rebuild --library ${libpath}"
+ ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+ fi
+}
+
+pkg_postinst() {
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ # Create log directory securely if it does not exist
+ [[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+ if use server ; then
+ if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+ einfo
+ elog "You might want to run:"
+ elog "\"emerge --config =${CATEGORY}/${PF}\""
+ elog "if this is a new install."
+ elog
+ elog "If you are switching server implentations, you should run the"
+ elog "mysql_upgrade tool."
+ einfo
+ else
+ einfo
+ elog "If you are upgrading major versions, you should run the"
+ elog "mysql_upgrade tool."
+ einfo
+ fi
+ fi
+
+ # Note about configuration change
+ einfo
+ elog "This version of mysql reorganizes the configuration from a single my.cnf"
+ elog "to several files in /etc/mysql/${PN}.d."
+ elog "Please backup any changes you made to /etc/mysql/my.cnf"
+ elog "and add them as a new file under /etc/mysql/${PN}.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 appropitate section headers, i.e. [mysqld]."
+ einfo
+}
+
+src_unpack() {
+ unpack ${A}
+ # Grab the patches
+ [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
+
+ mv -f "${WORKDIR}/${P}" "${S}" || die
+}
+
+src_prepare() {
+ 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
+
+ if use libressl ; then
+ sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+ "${S}/cmake/ssl.cmake" || die
+ fi
+
+ sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
+
+ cmake-utils_src_prepare
+}
+
+src_configure(){
+ # bug 508724 mariadb cannot use ld.gold
+ tc-ld-disable-gold
+ # Bug #114895, bug #110149
+ filter-flags "-O" "-O[01]"
+
+ append-cxxflags -felide-constructors
+
+ # bug #283926, with GCC4.4, this is required to get correct behavior.
+ append-flags -fno-strict-aliasing
+
+ if use client-libs ; then
+ multilib-minimal_src_configure
+ else
+ multilib_src_configure
+ fi
+}
+
+multilib_src_configure() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ if ! multilib_is_native_abi && ! use client-libs ; then
+ return
+ fi
+
+ CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+ # debug hack wrt #497532
+ mycmakeargs=(
+ -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
+ -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_SCRIPTDIR=share/mysql/scripts
+ -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)
+ ### TODO: make this system but issues with UTF-8 prevent it
+ -DWITH_EDITLINE=bundled
+ -DWITH_ZLIB=system
+ -DWITH_LIBWRAP=0
+ -DENABLED_LOCAL_INFILE=1
+ -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+ -DWITH_DEFAULT_COMPILER_OPTIONS=0
+ -DWITH_DEFAULT_FEATURE_SET=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)
+ -DWITH_RAPID=OFF
+ -DWITH_LIBEVENT=NO
+ -DWITH_CURL=system
+ -DWITH_BOOST="${S}/boost"
+ )
+ if use test ; then
+ mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+ else
+ mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+ fi
+
+ if ! use yassl ; then
+ mycmakeargs+=( -DWITH_SSL=system )
+ else
+ mycmakeargs+=( -DWITH_SSL=bundled )
+ fi
+
+ if ! use client-libs ; then
+ mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+ fi
+
+ # bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
+ # systemtap only works on native ABI bug 530132
+ if multilib_is_native_abi; then
+ mycmakeargs+=(
+ -DENABLE_DTRACE=$(usex systemtap)
+ )
+ else
+ mycmakeargs+=(
+ -DWITHOUT_TOOLS=1
+ -DWITH_READLINE=1
+ -DENABLE_DTRACE=0
+ )
+ fi
+
+ if multilib_is_native_abi && use server ; then
+
+ mycmakeargs+=(
+ -DWITH_LZ4=system
+ -DWITH_NUMA=$(usex numa ON OFF)
+ )
+
+ 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."
+
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+ -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+ )
+
+ elif ! use latin1 ; then
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=utf8
+ -DDEFAULT_COLLATION=utf8_general_ci
+ )
+ else
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=latin1
+ -DDEFAULT_COLLATION=latin1_swedish_ci
+ )
+ fi
+ mycmakeargs+=(
+ -DEXTRA_CHARSETS=all
+ -DDISABLE_SHARED=$(usex static YES NO)
+ -DWITH_DEBUG=$(usex debug)
+ -DWITH_EMBEDDED_SERVER=OFF
+ -DENABLED_PROFILING=$(usex profiling)
+ )
+
+ if use static; then
+ mycmakeargs+=( -DWITH_PIC=1 )
+ 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_HEAP_STORAGE_ENGINE=1
+ -DWITH_INNOBASE_STORAGE_ENGINE=1
+ -DWITH_MYISAMMRG_STORAGE_ENGINE=1
+ -DWITH_MYISAM_STORAGE_ENGINE=1
+ -DWITH_PARTITION_STORAGE_ENGINE=1
+ -DWITH_INNODB_MEMCACHED=0
+ )
+
+ else
+ mycmakeargs+=(
+ -DWITHOUT_SERVER=1
+ -DWITH_EMBEDDED_SERVER=OFF
+ -DEXTRA_CHARSETS=none
+ )
+ fi
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ if use client-libs ; then
+ multilib-minimal_src_compile
+ else
+ multilib_src_compile
+ fi
+}
+
+multilib_src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ local MULTILIB_WRAPPED_HEADERS
+ local MULTILIB_CHOST_TOOLS
+ if use client-libs ; then
+ # headers with ABI specific data
+ MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/mysql/server/my_config.h
+ /usr/include/mysql/server/mysql_version.h )
+
+ # wrap the config scripts
+ MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
+ multilib-minimal_src_install
+ else
+ multilib_src_install
+ multilib_src_install_all
+ fi
+}
+
+# Intentionally override eclass function
+multilib_src_install() {
+
+ cmake-utils_src_install
+
+ # Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+ find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+multilib_src_install_all() {
+ # 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 "${D}/${MY_SHAREDSTATEDIR}/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.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+ eprefixify "${TMPDIR}/50-distro-client.cnf"
+ doins "${TMPDIR}/50-distro-client.cnf"
+
+ if use server ; then
+ mycnf_src="my.cnf.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|utf8|latin1|g" \
+ "${TMPDIR}/my.cnf.ok" || die
+ fi
+ eprefixify "${TMPDIR}/my.cnf.ok"
+ newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+
+ einfo "Including support files and sample configurations"
+ docinto "support-files"
+ local script
+ for script in \
+ "${S}"/support-files/magic
+ do
+ [[ -f "$script" ]] && dodoc "${script}"
+ done
+
+ docinto "scripts"
+ for script in "${S}"/scripts/mysql* ; do
+ [[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
+ done
+ fi
+
+ #Remove mytop if perl is not selected
+ [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+}
+
+# Official test instructions:
+# USE='perl server static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+ _disable_test() {
+ local rawtestname reason
+ rawtestname="${1}" ; shift
+ reason="${@}"
+ ewarn "test '${rawtestname}' disabled: '${reason}'"
+ echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+ }
+
+ local TESTDIR="${BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ if ! use server ; then
+ einfo "Skipping server tests due to minimal build."
+ return 0
+ fi
+
+ # 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 [[ $UID -eq 0 ]]; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+ has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+ # Run CTest (test-units)
+ cmake-utils_src_test
+ retstatus_unit=$?
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+ # Enable parallel testing, auto will try to detect number of cores
+ # You may set this by hand.
+ # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+ export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+ # 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"
+ # These are failing in MySQL 5.7 for now and are believed to be
+ # false positives:
+ #
+ local t
+
+ for t in auth_sec.keyring_udf federated.federated_plugin ; do
+ _disable_test "$t" "False positives in Gentoo"
+ done
+
+ # 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"
+}
+
+mysql_init_vars() {
+ MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX%/}/usr/share/mysql"}
+ MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX%/}/etc/mysql"}
+ MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX%/}/var/lib/mysql"}
+ MY_LOGDIR=${MY_LOGDIR="${EPREFIX%/}/var/log/mysql"}
+
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ MY_DATADIR=""
+ if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
+ MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+ | sed -ne '/datadir/s|^--datadir=||p' \
+ | tail -n1`
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
+ | sed -e 's/.*=\s*//' \
+ | tail -n1`
+ fi
+ fi
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ MY_DATADIR="${MY_LOCALSTATEDIR}"
+ einfo "Using default MY_DATADIR"
+ fi
+ elog "MySQL MY_DATADIR is ${MY_DATADIR}"
+
+ if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
+ if [[ -e "${MY_DATADIR}" ]] ; then
+ # If you get this and you're wondering about it, see bug #207636
+ elog "MySQL datadir found in ${MY_DATADIR}"
+ elog "A new one will not be created."
+ PREVIOUS_DATADIR="yes"
+ else
+ PREVIOUS_DATADIR="no"
+ fi
+ export PREVIOUS_DATADIR
+ fi
+ else
+ if [[ ${EBUILD_PHASE} == "config" ]]; then
+ local new_MY_DATADIR
+ new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+ | sed -ne '/datadir/s|^--datadir=||p' \
+ | tail -n1`
+
+ if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
+ ewarn "MySQL MY_DATADIR has changed"
+ ewarn "from ${MY_DATADIR}"
+ ewarn "to ${new_MY_DATADIR}"
+ MY_DATADIR="${new_MY_DATADIR}"
+ fi
+ fi
+ fi
+
+ export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+ export MY_LOCALSTATEDIR MY_LOGDIR
+ export MY_DATADIR
+}
+
+pkg_config() {
+ _getoptval() {
+ local mypd="${EROOT%/}"/usr/bin/my_print_defaults
+ local section="$1"
+ local flag="--${2}="
+ local extra_options="${3}"
+ "${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
+ }
+ local old_MY_DATADIR="${MY_DATADIR}"
+ local old_HOME="${HOME}"
+ # my_print_defaults needs to read stuff in $HOME/.my.cnf
+ export HOME=${EPREFIX%/}/root
+
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ [[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
+ if [[ ! -x "${EROOT%/}/usr/sbin/mysqld" ]] ; then
+ die "Minimal builds do NOT include the MySQL server"
+ fi
+
+ if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
+ local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}"
+ MY_DATADIR_s="${MY_DATADIR_s%%/}"
+ local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}"
+ old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
+
+ if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
+ if [[ -d "${MY_DATADIR_s}" ]]; then
+ ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
+ ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
+ else
+ elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
+ mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
+ || die "Moving MY_DATADIR failed"
+ fi
+ else
+ ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
+ if [[ -d "${MY_DATADIR_s}" ]]; then
+ ewarn "Attempting to use ${MY_DATADIR_s}"
+ else
+ eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
+ die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
+ fi
+ fi
+ fi
+
+ local pwd1="a"
+ local pwd2="b"
+ local maxtry=15
+
+ 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
+ MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
+ # These are dir+prefix
+ MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
+ MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+ MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
+ MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+
+ if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]]; then
+ einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
+ install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
+ fi
+ if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]]; then
+ einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
+ install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN"
+ fi
+ if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]]; then
+ einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
+ install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG"
+ fi
+
+ if [[ -d "${ROOT%/}/${MY_DATADIR}/mysql" ]] ; then
+ ewarn "You have already a MySQL database in place."
+ ewarn "(${ROOT%/}/${MY_DATADIR}/*)"
+ ewarn "Please rename or delete it if you wish to replace it."
+ die "MySQL database already exists!"
+ fi
+
+ # 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 "${MYSQL_ROOT_PASSWORD}" ]; then
+
+ einfo "Please provide a password for the mysql 'root' user now"
+ einfo "or through the ${HOME}/.my.cnf file."
+ ewarn "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
+ fi
+
+ local options
+ local sqltmp="$(emktemp)"
+
+ # Fix bug 446200. Don't reference host my.cnf, needs to come first,
+ # see http://bugs.mysql.com/bug.php?id=31312
+ use prefix && options="${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
+ 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}" && options="${options} ${optfull}"
+ done
+
+ einfo "Creating the mysql database and setting proper permissions on it ..."
+
+ # Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
+ PID_DIR="${EROOT%/}/var/run/mysqld"
+ if [[ ! -d "${PID_DIR}" ]]; then
+ install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
+ fi
+
+ if [[ ! -d "${MY_DATADIR}" ]]; then
+ install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
+ fi
+
+ pushd "${TMPDIR}" &>/dev/null || die
+
+ # Filling timezones, see
+ # http://dev.mysql.com/doc/mysql/en/time-zone-support.html
+ echo "USE mysql;" >"${sqltmp}"
+ "${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
+ chown mysql "${sqltmp}" || die
+
+ # --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=( "${EROOT%/}/usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" )
+ cmd+=( "--basedir=${EPREFIX%/}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
+ einfo "Command: ${cmd[*]}"
+ su -s /bin/sh -c "${cmd[*]}" mysql \
+ >"${TMPDIR%/}"/mysql_install_db.log 2>&1
+ if [ $? -ne 0 ]; then
+ grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
+ die "Failed to initialize mysqld. Please review ${EPREFIX%/}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
+ fi
+ popd &>/dev/null || die
+ [[ -f "${ROOT%/}/${MY_DATADIR}/mysql/user.frm" ]] \
+ || die "MySQL databases not installed"
+
+ use prefix || options="${options} --user=mysql"
+
+ local socket="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.sock"
+ local pidfile="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.pid"
+ local mysqld="${EROOT%/}/usr/sbin/mysqld \
+ ${options} \
+ $(use prefix || echo --user=mysql) \
+ --log-warnings=0 \
+ --basedir=${EROOT%/}/usr \
+ --datadir=${ROOT%/}/${MY_DATADIR} \
+ --max_allowed_packet=8M \
+ --net_buffer_length=16K \
+ --socket=${socket} \
+ --pid-file=${pidfile}
+ --tmpdir=${ROOT}/${MYSQL_TMPDIR}"
+ #einfo "About to start mysqld: ${mysqld}"
+ ebegin "Starting mysqld"
+ einfo "Command ${mysqld}"
+ ${mysqld} &
+ rc=$?
+ while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
+ maxtry=$((${maxtry}-1))
+ echo -n "."
+ sleep 1
+ done
+ eend $rc
+
+ if ! [[ -S "${socket}" ]]; then
+ die "Completely failed to start up mysqld with: ${mysqld}"
+ fi
+
+ 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 WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}'"
+ "${EROOT%/}/usr/bin/mysql" \
+ --no-defaults \
+ "--socket=${socket}" \
+ -hlocalhost \
+ -e "${sql}"
+ eend $?
+
+ # Stop the server and cleanup
+ einfo "Stopping the server ..."
+ kill $(< "${pidfile}" )
+ rm -f "${sqltmp}"
+ wait %1
+ einfo "Done"
+}
diff --git a/dev-db/mysqltuner-1.6.18 b/dev-db/mysqltuner-1.6.18
deleted file mode 100644
index 247caaf7e993..000000000000
--- a/dev-db/mysqltuner-1.6.18
+++ /dev/null
@@ -1,10 +0,0 @@
-DEFINED_PHASES=install
-DESCRIPTION=MySQLTuner is a high-performance MySQL tuning script
-EAPI=6
-HOMEPAGE=http://www.mysqltuner.com/
-KEYWORDS=amd64 x86
-LICENSE=GPL-3
-RDEPEND=dev-lang/perl virtual/perl-Getopt-Long virtual/mysql
-SLOT=0
-SRC_URI=https://github.com/major/MySQLTuner-perl/archive/1.6.18.tar.gz -> mysqltuner-1.6.18.tar.gz
-_md5_=87cad36c7eb889154efc4188a97d2a84
diff --git a/dev-db/mysqltuner/Manifest b/dev-db/mysqltuner/Manifest
new file mode 100644
index 000000000000..5d7d7c37bc12
--- /dev/null
+++ b/dev-db/mysqltuner/Manifest
@@ -0,0 +1,3 @@
+DIST mysqltuner-1.6.18.tar.gz 169074 BLAKE2B e138e29db2f0b1abf88b2d8268732fd9f05043abf320d8d97493d6abb3880e5664eaea39392406297e3125789ffc172f6347922ba14a00af16beb3f6f8080802 SHA512 8067b7ac4a4fe7398ee2cdc463a30042f46972f97680b49912dca46fd1d835989aa4115568dbe5473ff28c4d956bf0ad70537318db788dd56bc93ad220e6bcb6
+EBUILD mysqltuner-1.6.18.ebuild 819 BLAKE2B 28fbddde037358d38eac70b778e77e255c3a2fcc812652ed42bd3482bca055c81beabd4bdb879d08b05cb15c6b9a5d036a2db0ecdc032fefbfcca8d5b7de1a48 SHA512 097e8b3cecb29cfc084d73befee963c656b017202f048fcd04d8b2a7880218500fd8f52a7b72edbf5f4fa8f8d3780924d8fe954a254c048d6b4f8264f9107dea
+MISC metadata.xml 329 BLAKE2B d077c83fc6fa3835f649af5c44a6f2390c2a0c7bcaf61fb5c6817e828b1a4589511a45217b991d3b9abb1e916ff36ce4cf5f906d45bc3ba99d3affc3327da1b5 SHA512 3bf9adc56a18f131c90d2524e83bb1e43a2cf49286e2c4c215cd95f1ff8792e0a4e325a36350a95e187396e0aa39640238ab57f57682c914e97c5663a815275f
diff --git a/dev-db/mysqltuner/metadata.xml b/dev-db/mysqltuner/metadata.xml
new file mode 100644
index 000000000000..b5fa8bce6890
--- /dev/null
+++ b/dev-db/mysqltuner/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="github">major/MySQLTuner-perl</remote-id>
+ <bugs-to>https://github.com/major/MySQLTuner-perl/issues</bugs-to>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/mysqltuner/mysqltuner-1.6.18.ebuild b/dev-db/mysqltuner/mysqltuner-1.6.18.ebuild
new file mode 100644
index 000000000000..6977a21572ee
--- /dev/null
+++ b/dev-db/mysqltuner/mysqltuner-1.6.18.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MY_PN=MySQLTuner-perl
+
+DESCRIPTION="MySQLTuner is a high-performance MySQL tuning script"
+HOMEPAGE="http://www.mysqltuner.com/"
+SRC_URI="https://github.com/major/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="dev-lang/perl
+ virtual/perl-Getopt-Long
+ virtual/mysql"
+
+DOCS=( USAGE.md CONTRIBUTING.md INTERNALS.md basic_passwords.txt vulnerabilities.csv )
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+src_install() {
+ newbin "${PN}.pl" "${PN}"
+
+ # The passwords and vulnerabilities are meant to be fed to the script uncompressed
+ docompress -x "/usr/share/doc/${PF}/basic_passwords.txt" "/usr/share/doc/${PF}/vulnerabilities.csv"
+ einstalldocs
+}
diff --git a/dev-db/mytop-1.6-r4 b/dev-db/mytop-1.6-r4
deleted file mode 100644
index 57f6e8cab293..000000000000
--- a/dev-db/mytop-1.6-r4
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test unpack
-DEPEND=dev-perl/DBD-mysql virtual/perl-Getopt-Long dev-perl/TermReadKey virtual/perl-Term-ANSIColor virtual/perl-Time-HiRes >=sys-apps/sed-4 dev-lang/perl:=[-build(-)]
-DESCRIPTION=mytop - a top clone for mysql
-EAPI=5
-HOMEPAGE=http://jeremy.zawodny.com/mysql/mytop/
-KEYWORDS=alpha amd64 ppc sparc x86
-LICENSE=|| ( Artistic GPL-2 )
-RDEPEND=dev-perl/DBD-mysql virtual/perl-Getopt-Long dev-perl/TermReadKey virtual/perl-Term-ANSIColor virtual/perl-Time-HiRes dev-lang/perl:=[-build(-)]
-SLOT=0
-SRC_URI=http://jeremy.zawodny.com/mysql/mytop/mytop-1.6.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 perl-functions 01e8c68d5a528bbcda4d3c60205983df perl-module 863b35d127db98823d439f8d73c2d011 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=b6a3d476a281de6b062fdbabbc145466
diff --git a/dev-db/mytop-1.9.1 b/dev-db/mytop-1.9.1
deleted file mode 100644
index b79aa5e3539e..000000000000
--- a/dev-db/mytop-1.9.1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-perl/DBD-mysql virtual/perl-Getopt-Long dev-perl/TermReadKey virtual/perl-Term-ANSIColor virtual/perl-Time-HiRes >=sys-apps/sed-4 dev-lang/perl:=
-DESCRIPTION=mytop - a top clone for mysql
-EAPI=6
-HOMEPAGE=http://www.mysqlfanboy.com/mytop-3/
-KEYWORDS=~alpha ~amd64 ~ppc ~sparc ~x86
-LICENSE=GPL-2
-RDEPEND=dev-perl/DBD-mysql virtual/perl-Getopt-Long dev-perl/TermReadKey virtual/perl-Term-ANSIColor virtual/perl-Time-HiRes dev-lang/perl:=
-SLOT=0
-SRC_URI=http://www.mysqlfanboy.com/mytop-3/mytop-1.9.1.tar.gz
-_eclasses_=multiprocessing cac3169468f893670dac3e7cb940e045 perl-functions 01e8c68d5a528bbcda4d3c60205983df perl-module 863b35d127db98823d439f8d73c2d011
-_md5_=a9f78f8d55486aeb3efd6d5eb8dc8769
diff --git a/dev-db/mytop/Manifest b/dev-db/mytop/Manifest
new file mode 100644
index 000000000000..924d6a0e6b33
--- /dev/null
+++ b/dev-db/mytop/Manifest
@@ -0,0 +1,10 @@
+AUX mytop-1.6-getopt-long-2.38-fixup.patch 578 BLAKE2B fc50dbdf44099cb812dc5610f22cada2010d684fd0914b544beaacf62478b3c3f1f179ebdc9ff9f7da07fe2764a2fdf32e43827e17b7bab1e8809a614e4cfb09 SHA512 a6f6bc9757112acc8cdeeb19e89487ad2ca79524c8d7a577b84c288addc283547837f390a7d7f43317d878e5be796be9d875fd57f548637a3d52aa1cabc5f3a8
+AUX mytop-1.6-global-status.patch 3694 BLAKE2B 68b2f93f74d4038d5e0527df65061a5b8b37efbfaffcbb31ead0e2cb0d36f939da3449e90c39d942d09316afea803a98ddb59bdb5e47450a71000737a4e33ce7 SHA512 bf33682ed457acac751390f757b4b284cf68cae1facdc5d9f3980abae3a3a6580b0558cd114569e79cab2b4ede430fba1c8b426d8b6d500fe0edf833b74d17ab
+AUX mytop-1.6-queries-vs-questions-mysql-5.0.76.patch 3365 BLAKE2B b28c2855e90201e1c7e5c94a76036b751f7428b3726fcc9d69b5848eb4fd8fe6c0cd538b80f901eef95586aa965485c64571439884f3fdda41a66f230355aba7 SHA512 a2735b157b81f702af09d6ee38003e4d15b6f901bc8f5e7013e8c73a1bd9ee798d0ed00ac0578b7e8ef36e5d4ddcc65489325937e9c2074004d2f69fb81fdcfb
+AUX mytop-1.9.1-global-status.patch 3459 BLAKE2B 338dffab012e3026d1c4e5edf241cf15a4bc2d67b1a29f4770aeb20b952d5d171e9fd805e21a963652eb601a4ed3bb5ddf3dd35fd310f66ce4fb89eee7257f9c SHA512 68052535131147a446133fbc155e04e13c5f0195c8fd111059b2bc266aa7a79f72cb25ec1f453e051651783760e212349dc7c50e1de2768d45281d25582a0cc9
+AUX mytop-1.9.1-queries-vs-questions-mysql-5.0.76.patch 3431 BLAKE2B 4d1d18cd3c9f9f74df49ab1958e68b50e286700619e28c8fc3e701a51eb4e95b5a1a8da2bae0e671f458f163d17ee163a30b697cc02219d118f0a05ecc00498f SHA512 50f5373dda953ea7ac18aff65b1319999fe0c53471ebef548309e49e2c6f762d5d98f105280a2c58a324731ff3c1c1af123114acf09f6bb3c99e4580e6041473
+DIST mytop-1.6.tar.gz 19720 BLAKE2B c7cd4e75283a52e505e09ee3f1618877832be16154e2d313f3a9a71c53a604f67180c892b13209b85c584db0c67c66461064b9c5c99352685518a65f2d3cefc5 SHA512 672209d828c70fd740a791f2e4dfac1e4c594adff197b8bc43322249f03f6c7b18a750da0892c1519fe29e24b661e41d40cdad3a29b546dec4b3a747155566e2
+DIST mytop-1.9.1.tar.gz 22095 BLAKE2B d0281fce93d9165593d5a94229a5de0d2b18d38b02e69329322e62611b5d9546d08626ea60ea7ede4d6ee88fc7df08c733cb5437fb47c468e0d591d7dde00595 SHA512 e6d38812dd69f5e330e5fe9206abe7e00c9e08dd61ba52a9dbd18a823bb09715832d27fb8db6fe1146d78eb56845cc0a7e2a72989ee56267d6482238fee84bc5
+EBUILD mytop-1.6-r4.ebuild 897 BLAKE2B e582412174bf886c390bc96efa133e287ae3afd53f64a5d222b869642b4175cef4040428addf6271177555ffaf1c79a7abc3fc64dc2346eb4fae7ff27324d155 SHA512 44c4b20f7dd17a0dd0686ce8250ad54d7d508fe94b41bcacbe5391ff003a37854e0d74e2ebee3cc243e8e94ecc8851a637b9615a3ddffa179173fa02685a7c75
+EBUILD mytop-1.9.1.ebuild 825 BLAKE2B 7b112fd1a6a91e248d6f007b8782949fcc180fe807c825a41fbede2b9390ba7c2f5a54a734e0f6fd5082ed6a59ffa42870f60860814a5ae78b82d19c6a9566f2 SHA512 26d7b172c52e3056184a48feb381462c1094872aa23168cb3f9cdf9c9b69e4756b1313893c53ad1383438e867ecaa889a0a2fc27c33c9ce868c2cd35baf777e6
+MISC metadata.xml 239 BLAKE2B c4d6706d083b72927d239f41a644a4009c054c1c1a388af7733d3a2daf47d354009eb472573304a6be272601f05535297bcd9ceaea811a741cd905577ffe53d1 SHA512 e6e2fafe2f503db1d12e3d2368a99631ee8d014b7ea802d9879e7e3e2c0f9378675fffccd78ed09b914ae781ac3902567b1a53a721906e3ea63ceb51d0a1654b
diff --git a/dev-db/mytop/files/mytop-1.6-getopt-long-2.38-fixup.patch b/dev-db/mytop/files/mytop-1.6-getopt-long-2.38-fixup.patch
new file mode 100644
index 000000000000..b911f9067baa
--- /dev/null
+++ b/dev-db/mytop/files/mytop-1.6-getopt-long-2.38-fixup.patch
@@ -0,0 +1,14 @@
+Getopt-Long-2.38 is stricter about what it allows.
+
+diff -Nuar mytop-1.6.orig/mytop mytop-1.6/mytop
+--- mytop-1.6.orig/mytop 2009-04-10 00:47:31.007111359 -0700
++++ mytop-1.6/mytop 2009-04-10 00:50:39.875391905 -0700
+@@ -153,7 +153,7 @@
+ "idle|i" => \$config{idle},
+ "resolve|r" => \$config{resolve},
+ "prompt!" => \$config{prompt},
+- "long|!" => \$config{long_nums},
++ "long!" => \$config{long_nums},
+ "mode|m=s" => \$config{mode},
+ "sort=s" => \$config{sort},
+ );
diff --git a/dev-db/mytop/files/mytop-1.6-global-status.patch b/dev-db/mytop/files/mytop-1.6-global-status.patch
new file mode 100644
index 000000000000..ae75ac7867af
--- /dev/null
+++ b/dev-db/mytop/files/mytop-1.6-global-status.patch
@@ -0,0 +1,103 @@
+Use GLOBAL STATUS instead of implicit session status.
+
+As of MySQL-5.0.72, many of the status variables split for session and global
+variants. Importantly, the Com_* and Questions ones did, and this broke the
+statistics at the top of mytop.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+MySQL-Bug: 41131
+MySQL-Bug-URL: http://bugs.mysql.com/bug.php?id=41131
+
+diff -Nuar --exclude '*~' mytop-1.6.orig/mytop mytop-1.6/mytop
+--- mytop-1.6.orig/mytop 2007-02-16 20:57:46.000000000 -0800
++++ mytop-1.6/mytop 2008-11-30 15:18:05.818845253 -0800
+@@ -98,7 +98,7 @@
+ my %qcache = (); ## The query cache--used for full query info support.
+ my %ucache = (); ## The user cache--used for full killing by user
+ my %dbcache = (); ## The db cache. This should be merged at some point.
+-my %statcache = (); ## The show status cache for GetShowStatus()
++my %statcache = (); ## The show global status cache for GetShowStatus()
+
+ my (%STATUS, %OLD_STATUS); # header stuff.
+
+@@ -710,7 +710,7 @@
+ ##
+ if ($config{header})
+ {
+- my @recs = Hashes("show status");
++ my @recs = Hashes("show global status");
+
+ ## if the server died or we lost connectivity
+ if (not @recs)
+@@ -755,7 +755,7 @@
+
+ ## Query Cache info
+ ##
+- ## mysql> show status like 'qcache%';
++ ## mysql> show global status like 'qcache%';
+ ## +-------------------------+----------+
+ ## | Variable_name | Value |
+ ## +-------------------------+----------+
+@@ -1064,7 +1064,7 @@
+
+ sub GetQPS()
+ {
+- my($data) = Hashes('SHOW STATUS LIKE "Questions"');
++ my($data) = Hashes('SHOW GLOBAL STATUS LIKE "Questions"');
+ my $num = $data->{Value};
+
+ if (not defined $questions) ## first time?
+@@ -1126,7 +1126,7 @@
+ }
+
+ # Variable_name and Value pairs come back...
+- my @data = Hashes("SHOW STATUS LIKE 'Com_%'");
++ my @data = Hashes("SHOW GLOBAL STATUS LIKE 'Com_%'");
+ my %cmd_data;
+ my %cmd_delta;
+ my %cmd_pct;
+@@ -1216,7 +1216,7 @@
+ sub GetShowStatus()
+ {
+ Clear() unless $config{batchmode};
+- my @rows = Hashes("SHOW STATUS");
++ my @rows = Hashes("SHOW GLOBAL STATUS");
+
+ printf "%32s %10s %10s\n", 'Counter', 'Total', 'Change';
+ printf "%32s %10s %10s\n", '-------', '-----', '------';
+@@ -1543,7 +1543,7 @@
+
+ And you obviously need access to a MySQL server (version 3.22.x or
+ 3.23.x) with the necessary security to run the I<SHOW PROCESSLIST> and
+-I<SHOW STATUS> commands.
++I<SHOW GLOBAL STATUS> commands.
+
+ If you are a Windows user, using ActiveState's Perl, you can use PPM
+ (the Perl Package Manager) to install the MySQL and Term::ReadKey
+@@ -1599,7 +1599,7 @@
+ notice features from each of them here.
+
+ B<mytop> will connect to a MySQL server and periodically run the
+-I<SHOW PROCESSLIST> and I<SHOW STATUS> commands and attempt to
++I<SHOW PROCESSLIST> and I<SHOW GLOBAL STATUS> commands and attempt to
+ summarize the information from them in a useful format.
+
+ =head2 The Display
+@@ -1817,7 +1817,7 @@
+
+ =item B<c>
+
+-Show "command counters" based on the Com_* values in SHOW STATUS.
++Show "command counters" based on the Com_* values in SHOW GLOBAL STATUS.
+ This is a new feature. Feedback welcome.
+
+ =item B<d>
+@@ -1904,7 +1904,7 @@
+
+ Some performance information is not available when talking to a
+ version 3.22.x MySQL server. Additional information (about threads
+-mostly) was added to the output of I<SHOW STATUS> in MySQL 3.23.x and
++mostly) was added to the output of I<SHOW GLOBAL STATUS> in MySQL 3.23.x and
+ B<mytop> makes use of it. If the information is not available, you
+ will simply see zeros where the real numbers should be.
+
diff --git a/dev-db/mytop/files/mytop-1.6-queries-vs-questions-mysql-5.0.76.patch b/dev-db/mytop/files/mytop-1.6-queries-vs-questions-mysql-5.0.76.patch
new file mode 100644
index 000000000000..f1e139fe7471
--- /dev/null
+++ b/dev-db/mytop/files/mytop-1.6-queries-vs-questions-mysql-5.0.76.patch
@@ -0,0 +1,72 @@
+In MySQL 5.0.72 the Questions variable was changed to only contain the number
+of client-initiated queries, NOT the number of overall queries. This caused
+problems with the select/insert/update/delete percentages because Com_* was
+still based on the overall queries.
+
+MySQL 5.0.76 introduced a new variable 'Queries' with the behavior of the old
+Questions variable.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+MySQL-Bug: 41131
+MySQL-Bug-URL: http://bugs.mysql.com/?id=41131
+
+====
+Revision 2:
+The first revision missed changing the instances of $OLD_STATUS{Questions}.
+
+diff -Nuar mytop-1.6.orig/mytop mytop-1.6/mytop
+--- mytop-1.6.orig/mytop 2009-02-14 17:28:38.696187159 -0800
++++ mytop-1.6/mytop 2009-02-14 17:36:31.192890507 -0800
+@@ -800,8 +800,15 @@
+
+ ## Queries per second...
+
+- my $avg_queries_per_sec = sprintf("%.2f", $STATUS{Questions} / $STATUS{Uptime});
+- my $num_queries = $STATUS{Questions};
++ my ($num_queries, $old_num_queries);
++ if(defined($STATUS{Queries})) {
++ $num_queries = $STATUS{Queries};
++ $old_num_queries = $OLD_STATUS{Queries};
++ } else {
++ $num_queries = $STATUS{Questions};
++ $old_num_queries = $OLD_STATUS{Questions};
++ }
++ my $avg_queries_per_sec = sprintf("%.2f", $num_queries / $STATUS{Uptime});
+
+ my @t = localtime(time);
+
+@@ -820,25 +827,25 @@
+
+
+ printf " Queries: %-5s qps: %4.0f Slow: %7s Se/In/Up/De(%%): %02.0f/%02.0f/%02.0f/%02.0f \n",
+- make_short( $STATUS{Questions} ), # q total
+- $STATUS{Questions} / $STATUS{Uptime}, # qps, average
++ make_short( $num_queries ), # q total
++ $num_queries / $STATUS{Uptime}, # qps, average
+ make_short( $STATUS{Slow_queries} ), # slow
+
+ # hmm. a Qcache hit is really a select and should be counted.
+- 100 * ($STATUS{Com_select} + ($STATUS{Qcache_hits}||0) ) / $STATUS{Questions},
+- 100 * ($STATUS{Com_insert} + $STATUS{Com_replace} ) / $STATUS{Questions},
+- 100 * ($STATUS{Com_update} ) / $STATUS{Questions},
+- 100 * $STATUS{Com_delete} / $STATUS{Questions};
++ 100 * ($STATUS{Com_select} + ($STATUS{Qcache_hits}||0) ) / $num_queries,
++ 100 * ($STATUS{Com_insert} + $STATUS{Com_replace} ) / $num_queries,
++ 100 * ($STATUS{Com_update} ) / $num_queries,
++ 100 * $STATUS{Com_delete} / $num_queries;
+
+ $lines_left--;
+
+ if ($t_delta)
+ {
+- my $q_diff = ( $STATUS{Questions} - $OLD_STATUS{Questions} );
+-# print("q_diff: $STATUS{Questions} - $OLD_STATUS{Questions} / $t_delta = $q_diff\n");
++ my $q_diff = ( $num_queries - $old_num_queries );
++# print("q_diff: $num_queries - $old_num_queries / $t_delta = $q_diff\n");
+
+ printf(" qps now: %4.0f Slow qps: %3.1f Threads: %4.0f (%4.0f/%4.0f) %02.0f/%02.0f/%02.0f/%02.0f \n",
+- ( $STATUS{Questions} - $OLD_STATUS{Questions} ) / $t_delta,
++ ( $num_queries - $old_num_queries ) / $t_delta,
+ ( # slow now (qps)
+ ($STATUS{Slow_queries} ) ?
+ ( $STATUS{Slow_queries} - $OLD_STATUS{Slow_queries} ) / $t_delta :
diff --git a/dev-db/mytop/files/mytop-1.9.1-global-status.patch b/dev-db/mytop/files/mytop-1.9.1-global-status.patch
new file mode 100644
index 000000000000..ae0163c31af4
--- /dev/null
+++ b/dev-db/mytop/files/mytop-1.9.1-global-status.patch
@@ -0,0 +1,94 @@
+Use GLOBAL STATUS instead of implicit session status.
+
+As of MySQL-5.0.72, many of the status variables split for session and global
+variants. Importantly, the Com_* and Questions ones did, and this broke the
+statistics at the top of mytop.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+MySQL-Bug: 41131
+MySQL-Bug-URL: http://bugs.mysql.com/bug.php?id=41131
+
+diff -Nuar --exclude '*~' mytop-1.6.orig/mytop mytop-1.6/mytop
+--- mytop-1.6.orig/mytop 2007-02-16 20:57:46.000000000 -0800
++++ mytop-1.6/mytop 2008-11-30 15:18:05.818845253 -0800
+@@ -98,7 +98,7 @@
+ my %qcache = (); ## The query cache--used for full query info support.
+ my %ucache = (); ## The user cache--used for full killing by user
+ my %dbcache = (); ## The db cache. This should be merged at some point.
+-my %statcache = (); ## The show status cache for GetShowStatus()
++my %statcache = (); ## The show global status cache for GetShowStatus()
+
+ my (%STATUS, %OLD_STATUS); # header stuff.
+
+@@ -755,7 +755,7 @@
+
+ ## Query Cache info
+ ##
+- ## mysql> show status like 'qcache%';
++ ## mysql> show global status like 'qcache%';
+ ## +-------------------------+----------+
+ ## | Variable_name | Value |
+ ## +-------------------------+----------+
+@@ -1064,7 +1064,7 @@
+
+ sub GetQPS()
+ {
+- my($data) = Hashes('SHOW STATUS LIKE "Questions"');
++ my($data) = Hashes('SHOW GLOBAL STATUS LIKE "Questions"');
+ my $num = $data->{Value};
+
+ if (not defined $questions) ## first time?
+@@ -1126,7 +1126,7 @@
+ }
+
+ # Variable_name and Value pairs come back...
+- my @data = Hashes("SHOW STATUS LIKE 'Com_%'");
++ my @data = Hashes("SHOW GLOBAL STATUS LIKE 'Com_%'");
+ my %cmd_data;
+ my %cmd_delta;
+ my %cmd_pct;
+@@ -1216,7 +1216,7 @@
+ sub GetShowStatus()
+ {
+ Clear() unless $config{batchmode};
+- my @rows = Hashes("SHOW STATUS");
++ my @rows = Hashes("SHOW GLOBAL STATUS");
+
+ printf "%32s %10s %10s\n", 'Counter', 'Total', 'Change';
+ printf "%32s %10s %10s\n", '-------', '-----', '------';
+@@ -1543,7 +1543,7 @@
+
+ And you obviously need access to a MySQL server (version 3.22.x or
+ 3.23.x) with the necessary security to run the I<SHOW PROCESSLIST> and
+-I<SHOW STATUS> commands.
++I<SHOW GLOBAL STATUS> commands.
+
+ If you are a Windows user, using ActiveState's Perl, you can use PPM
+ (the Perl Package Manager) to install the MySQL and Term::ReadKey
+@@ -1599,7 +1599,7 @@
+ notice features from each of them here.
+
+ B<mytop> will connect to a MySQL server and periodically run the
+-I<SHOW PROCESSLIST> and I<SHOW STATUS> commands and attempt to
++I<SHOW PROCESSLIST> and I<SHOW GLOBAL STATUS> commands and attempt to
+ summarize the information from them in a useful format.
+
+ =head2 The Display
+@@ -1817,7 +1817,7 @@
+
+ =item B<c>
+
+-Show "command counters" based on the Com_* values in SHOW STATUS.
++Show "command counters" based on the Com_* values in SHOW GLOBAL STATUS.
+ This is a new feature. Feedback welcome.
+
+ =item B<d>
+@@ -1904,7 +1904,7 @@
+
+ Some performance information is not available when talking to a
+ version 3.22.x MySQL server. Additional information (about threads
+-mostly) was added to the output of I<SHOW STATUS> in MySQL 3.23.x and
++mostly) was added to the output of I<SHOW GLOBAL STATUS> in MySQL 3.23.x and
+ B<mytop> makes use of it. If the information is not available, you
+ will simply see zeros where the real numbers should be.
+
diff --git a/dev-db/mytop/files/mytop-1.9.1-queries-vs-questions-mysql-5.0.76.patch b/dev-db/mytop/files/mytop-1.9.1-queries-vs-questions-mysql-5.0.76.patch
new file mode 100644
index 000000000000..0314c8ac82b2
--- /dev/null
+++ b/dev-db/mytop/files/mytop-1.9.1-queries-vs-questions-mysql-5.0.76.patch
@@ -0,0 +1,73 @@
+In MySQL 5.0.72 the Questions variable was changed to only contain the number
+of client-initiated queries, NOT the number of overall queries. This caused
+problems with the select/insert/update/delete percentages because Com_* was
+still based on the overall queries.
+
+MySQL 5.0.76 introduced a new variable 'Queries' with the behavior of the old
+Questions variable.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+MySQL-Bug: 41131
+MySQL-Bug-URL: http://bugs.mysql.com/?id=41131
+
+====
+Revision 2:
+The first revision missed changing the instances of $OLD_STATUS{Questions}.
+
+diff -Nuar mytop-1.6.orig/mytop mytop-1.6/mytop
+--- mytop-1.6.orig/mytop 2009-02-14 17:28:38.696187159 -0800
++++ mytop-1.6/mytop 2009-02-14 17:36:31.192890507 -0800
+@@ -800,8 +800,15 @@
+
+ ## Queries per second...
+
+- my $avg_queries_per_sec = sprintf("%.2f", $STATUS{Questions} / $STATUS{Uptime});
+- my $num_queries = $STATUS{Questions};
++ my ($num_queries, $old_num_queries);
++ if(defined($STATUS{Queries})) {
++ $num_queries = $STATUS{Queries};
++ $old_num_queries = $OLD_STATUS{Queries};
++ } else {
++ $num_queries = $STATUS{Questions};
++ $old_num_queries = $OLD_STATUS{Questions};
++ }
++ my $avg_queries_per_sec = sprintf("%.2f", $num_queries / $STATUS{Uptime});
+
+ my @t = localtime(time);
+
+@@ -924,26 +924,26 @@
+
+
+ printf " Queries: %-6s qps: %4.0f Slow: %7s Se/In/Up/De(%%): %02.0f/%02.0f/%02.0f/%02.0f \n",
+- make_short( $STATUS{Questions} ), # q total
+- $STATUS{Questions} / $STATUS{Uptime}, # qps, average
++ make_short( $num_queries ), # q total
++ $num_queries / $STATUS{Uptime}, # qps, average
+ make_short( $STATUS{Slow_queries} ), # slow
+
+ # hmm. a Qcache hit is really a select and should be counted.
+- 100 * ($STATUS{Com_select} + ($STATUS{Qcache_hits}||0) ) / $STATUS{Questions},
+- 100 * ($STATUS{Com_insert} + $STATUS{Com_replace} ) / $STATUS{Questions},
+- 100 * ($STATUS{Com_update} ) / $STATUS{Questions},
+- 100 * $STATUS{Com_delete} / $STATUS{Questions};
++ 100 * ($STATUS{Com_select} + ($STATUS{Qcache_hits}||0) ) / $num_queries,
++ 100 * ($STATUS{Com_insert} + $STATUS{Com_replace} ) / $num_queries,
++ 100 * ($STATUS{Com_update} ) / $num_queries,
++ 100 * $STATUS{Com_delete} / $num_queries;
+
+ $lines_left--;
+
+ if ($t_delta)
+ {
+- my $q_diff = ( $STATUS{Questions} - $OLD_STATUS{Questions} );
+-# print("q_diff: $STATUS{Questions} - $OLD_STATUS{Questions} / $t_delta = $q_diff\n");
++ my $q_diff = ( $num_queries - $old_num_queries );
++# print("q_diff: $num_queries - $old_num_queries / $t_delta = $q_diff\n");
+
+ printf(" Sorts: %5.0f qps now: %4.0f Slow qps: %3.1f Threads: %4.0f (%4.0f/%4.0f) %02.0f/%02.0f/%02.0f/%02.0f \n",
+ ( $STATUS{Sort_rows} - $OLD_STATUS{Sort_rows} ) / $t_delta,
+- ( $STATUS{Questions} - $OLD_STATUS{Questions} ) / $t_delta,
++ ( $num_queries - $old_num_queries ) / $t_delta,
+ ( # slow now (qps)
+ ($STATUS{Slow_queries} ) ?
+ ( $STATUS{Slow_queries} - $OLD_STATUS{Slow_queries} ) / $t_delta :
diff --git a/dev-db/mytop/metadata.xml b/dev-db/mytop/metadata.xml
new file mode 100644
index 000000000000..709689b06053
--- /dev/null
+++ b/dev-db/mytop/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>mysql-bugs@gentoo.org</email>
+ <name>MySQL</name>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-db/mytop/mytop-1.6-r4.ebuild b/dev-db/mytop/mytop-1.6-r4.ebuild
new file mode 100644
index 000000000000..306d8d7102e1
--- /dev/null
+++ b/dev-db/mytop/mytop-1.6-r4.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit perl-module
+
+DESCRIPTION="mytop - a top clone for mysql"
+HOMEPAGE="http://jeremy.zawodny.com/mysql/mytop/"
+SRC_URI="http://jeremy.zawodny.com/mysql/mytop/${P}.tar.gz"
+
+LICENSE="|| ( Artistic GPL-2 )"
+KEYWORDS="alpha amd64 ppc sparc x86"
+SLOT="0"
+IUSE=""
+
+RDEPEND="dev-perl/DBD-mysql
+ virtual/perl-Getopt-Long
+ dev-perl/TermReadKey
+ virtual/perl-Term-ANSIColor
+ virtual/perl-Time-HiRes"
+DEPEND="${RDEPEND}
+ >=sys-apps/sed-4"
+
+PATCHES=( "${FILESDIR}/${PN}-1.6-global-status.patch"
+ "${FILESDIR}/${PN}-1.6-queries-vs-questions-mysql-5.0.76.patch"
+ "${FILESDIR}/${PN}-1.6-getopt-long-2.38-fixup.patch"
+ )
+SRC_TEST="do"
+
+src_install() {
+ perl-module_src_install
+ sed -i -r\
+ -e "s|socket( +)=> '',|socket\1=> '/var/run/mysqld/mysqld.sock',|g" \
+ "${D}"/usr/bin/mytop
+}
diff --git a/dev-db/mytop/mytop-1.9.1.ebuild b/dev-db/mytop/mytop-1.9.1.ebuild
new file mode 100644
index 000000000000..050fb8117112
--- /dev/null
+++ b/dev-db/mytop/mytop-1.9.1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit perl-module
+
+DESCRIPTION="mytop - a top clone for mysql"
+HOMEPAGE="http://www.mysqlfanboy.com/mytop-3/"
+SRC_URI="http://www.mysqlfanboy.com/mytop-3/${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86"
+SLOT="0"
+IUSE=""
+
+RDEPEND="dev-perl/DBD-mysql
+ virtual/perl-Getopt-Long
+ dev-perl/TermReadKey
+ virtual/perl-Term-ANSIColor
+ virtual/perl-Time-HiRes"
+DEPEND="${RDEPEND}
+ >=sys-apps/sed-4"
+
+PATCHES=( "${FILESDIR}/${PN}-1.9.1-global-status.patch"
+ "${FILESDIR}/${PN}-1.9.1-queries-vs-questions-mysql-5.0.76.patch"
+ )
+SRC_TEST="do"
+
+src_install() {
+ perl-module_src_install
+ sed -i -r\
+ -e "s|socket( +)=> '',|socket\1=> '/var/run/mysqld/mysqld.sock',|g" \
+ "${D}"/usr/bin/mytop
+}
diff --git a/dev-db/ocp-0.2 b/dev-db/ocp-0.2
deleted file mode 100644
index 8c59fe72c5eb..000000000000
--- a/dev-db/ocp-0.2
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=configure prepare
-DEPEND=dev-db/oracle-instantclient-basic dev-libs/popt sys-libs/zlib
-DESCRIPTION=Oracle copy tool
-EAPI=6
-HOMEPAGE=https://github.com/maxsatula/ocp
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=dev-db/oracle-instantclient-basic dev-libs/popt sys-libs/zlib
-SLOT=0
-SRC_URI=https://github.com/maxsatula/ocp/releases/download/v0.2/ocp-0.2.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=5223c636aeef1030b38758b648e1789c
diff --git a/dev-db/ocp-9999 b/dev-db/ocp-9999
deleted file mode 100644
index 21fed1405c66..000000000000
--- a/dev-db/ocp-9999
+++ /dev/null
@@ -1,10 +0,0 @@
-DEFINED_PHASES=prepare unpack
-DEPEND=dev-db/oracle-instantclient-basic dev-libs/popt sys-libs/zlib >=dev-vcs/git-1.8.2.1[curl] >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=Oracle copy tool
-EAPI=6
-HOMEPAGE=https://github.com/maxsatula/ocp
-LICENSE=GPL-2
-RDEPEND=dev-db/oracle-instantclient-basic dev-libs/popt sys-libs/zlib
-SLOT=0
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 git-r3 8f6de46b0aa318aea0e8cac62ece098b libtool 0081a71a261724730ec4c248494f044d multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=c5ffb09d63e6401b9033e8059c16ef2d
diff --git a/dev-db/ocp/Manifest b/dev-db/ocp/Manifest
new file mode 100644
index 000000000000..8016219761ab
--- /dev/null
+++ b/dev-db/ocp/Manifest
@@ -0,0 +1,4 @@
+DIST ocp-0.2.tar.gz 144968 BLAKE2B 495b2af182768a0c18b08350fb77b09964be52afd72f3ff610ed6a0a54905b116744c93c6261986ca48a0a0c56fd23fd2d15d1919f4c8a4ff8b55ebe532efa07 SHA512 0ff132a368a615c2a8e8ecb391da138ce9fd52d638de82e5a4d1c9ec3340b117c9c4d8f971ee86724664f93b4073b189407c3c19a0c22c961922145d30221c85
+EBUILD ocp-0.2.ebuild 732 BLAKE2B 4d7301cfb319b4e40650ff6c9995d7f9807bfda90e581699cea845557f56aae666a1aedfea375e2d2e24009028cb11adf59147d419bba2c1e2765b4211cb74b0 SHA512 447f0a33d07797e6dd5fbe5fc7f62ddbe853e4d038f5ba1da148c92311d38ba19289c17166c5f4a9fafacb7e22eb4ecbfafe60dfff18cfbc6ccfae29c73c287a
+EBUILD ocp-9999.ebuild 648 BLAKE2B 8484d73d462b4a676e43902796072e831834dcbbd2eb833197fdde8425d037590ec513d3cce6739451c964b22da47911a36761fa908b47a7859fd11fe98f7773 SHA512 7163ce5d60b0961e517f5cb19c344c35fb052f2a6524522bec6657d1816a8f0ea48eaf085b833e4ced42a5e2f369c0377081bebef73caae5be10d1203d1e6101
+MISC metadata.xml 614 BLAKE2B 218c867c70ad619570c2c9ce97bc8fc5ea1ba9b121db0e05e0fb3046d7b4e7fcd3e467fbeb57d72715604d1c457b4aa44649a78587d29c61b9a63d19775f3b9e SHA512 33281a9bb09cfd13ecae433df9612587d56befe35f81e50d88164b0b4caf997f404c613ae456b497fc934fae9b4837846a18a2cf714c49bbc0b0b6eb920fa77d
diff --git a/dev-db/ocp/metadata.xml b/dev-db/ocp/metadata.xml
new file mode 100644
index 000000000000..1d5044264397
--- /dev/null
+++ b/dev-db/ocp/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>maksym.satula@gmail.com</email>
+ <name>Max Satula</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <bugs-to>https://github.com/maxsatula/ocp/issues</bugs-to>
+ </upstream>
+ <longdescription lang="en">A tool for downloading and uploading files from/to Oracle Database directories using Oracle SQL Net connection only</longdescription>
+</pkgmetadata>
diff --git a/dev-db/ocp/ocp-0.2.ebuild b/dev-db/ocp/ocp-0.2.ebuild
new file mode 100644
index 000000000000..3745af1f5a87
--- /dev/null
+++ b/dev-db/ocp/ocp-0.2.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic
+
+DESCRIPTION="Oracle copy tool"
+HOMEPAGE="https://github.com/maxsatula/ocp"
+
+if [[ ${PV} == *9999 ]]; then
+ EGIT_REPO_URI="https://github.com/maxsatula/ocp.git"
+ EGIT_BRANCH="develop"
+ inherit git-r3 autotools
+else
+ SRC_URI="https://github.com/maxsatula/ocp/releases/download/v${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+
+RDEPEND="
+ dev-db/oracle-instantclient-basic
+ dev-libs/popt
+ sys-libs/zlib"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ default
+
+ if [[ ${PV} == *9999 ]] ; then
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ append-ldflags $(no-as-needed)
+ default
+}
diff --git a/dev-db/ocp/ocp-9999.ebuild b/dev-db/ocp/ocp-9999.ebuild
new file mode 100644
index 000000000000..baab9a6071ec
--- /dev/null
+++ b/dev-db/ocp/ocp-9999.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Oracle copy tool"
+HOMEPAGE="https://github.com/maxsatula/ocp"
+
+if [[ ${PV} == *9999 ]]; then
+ EGIT_REPO_URI="https://github.com/maxsatula/ocp.git"
+ EGIT_BRANCH="develop"
+ inherit git-r3 autotools
+else
+ SRC_URI="https://github.com/maxsatula/ocp/releases/download/v${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+
+RDEPEND="
+ dev-db/oracle-instantclient-basic
+ dev-libs/popt
+ sys-libs/zlib"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ default
+
+ if [[ ${PV} == *9999 ]] ; then
+ eautoreconf
+ fi
+}
diff --git a/dev-db/odbtp-1.1.4 b/dev-db/odbtp-1.1.4
deleted file mode 100644
index 51d8df8a1f5e..000000000000
--- a/dev-db/odbtp-1.1.4
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile install unpack
-DESCRIPTION=Fast, efficient TCP/IP protocol for connecting to Win32-based databases
-EAPI=0
-HOMEPAGE=http://odbtp.sourceforge.net/
-IUSE=doc
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2 LGPL-2
-SLOT=0
-SRC_URI=mirror://sourceforge/odbtp/odbtp-1.1.4.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=d9fd4f07c2a8a02f67b31bc80205d4f5
diff --git a/dev-db/odbtp/Manifest b/dev-db/odbtp/Manifest
new file mode 100644
index 000000000000..637441cc6869
--- /dev/null
+++ b/dev-db/odbtp/Manifest
@@ -0,0 +1,4 @@
+AUX odbtp-1.1.4-amd64.patch 331 BLAKE2B 49c2f05527d933f209731a6d39f008d1a84c3db27eef5c5a20b4371b86d45c58932e117b0d3ea0c94b4ec7976342e1fb1b8afdf39f195237d6f4cedf46252bc8 SHA512 e2f9f6874ce9b40ba0c3e4d0619af8ade796fe5e03e25ff93d1bd94d2c43bcf8212d9dd4ebf9ff3fd462231cff6d7c59a755a9e5a58cc8de49e4e326950deaa7
+DIST odbtp-1.1.4.tar.gz 1049975 BLAKE2B be7a674ce871ee1b8f9b636bed78ff396648d335ffa1d01347ec6414ec9ca85091c8a5d0de2bcaff13e49e495ae1396bd22e903e40968582c7c689a46244ebc2 SHA512 4b87c8733fc1f017546024901874b0ea2f410646ef39f9581cc170773639077c3f885813550422966e8797489c66b32b75de85fa658e3bb84da285b96c0a7b70
+EBUILD odbtp-1.1.4.ebuild 840 BLAKE2B 52146688457c6b3422eb58130d947d80d66178b2d81bc161e23201d85ac68022ee2f6aaec08750c32a9e27ef650c23795a70ba8629624f8fbee7a33bcd572a99 SHA512 ede291791076e225994cf5b2ba2aeb266d006148f3e7c0cab3973be7fae6e5b9c6a1d777b42e16cd724d8ccfad103c325d20b9fc461b037f01a71183531bd39e
+MISC metadata.xml 242 BLAKE2B 76781b6c876647b5fbb1ff6e12addeb8c1c8ed4dc87f64b2139c991448a19ef29124d3ffefbf07d44fe07fab755a90b26793c26a45ee33d77b8d4a66495e7a02 SHA512 283656b4ec20f636e1ee18de3c598a3100abb2862c7117da8c5fe9ea47b63c1b47fc17ca11313164d5b1e341e4480b5841271ea35236652fbb3f971fef2c51ec
diff --git a/dev-db/odbtp/files/odbtp-1.1.4-amd64.patch b/dev-db/odbtp/files/odbtp-1.1.4-amd64.patch
new file mode 100644
index 000000000000..1ba2cb3b71e5
--- /dev/null
+++ b/dev-db/odbtp/files/odbtp-1.1.4-amd64.patch
@@ -0,0 +1,11 @@
+--- odbtp-1.1.4/odbtp.h.old 2006-11-05 21:29:33.000000000 +0100
++++ odbtp-1.1.4/odbtp.h 2006-11-05 21:29:44.000000000 +0100
+@@ -22,7 +22,7 @@
+ #define _ODBTP_H_
+
+ /* The below line must be uncommented for 64-bit systems, such as Tru64. */
+-/* #define _C_LONG_64_ 1 */
++#define _C_LONG_64_ 1
+
+ #define ODBTP_LIB_VERSION "1.1.4"
+
diff --git a/dev-db/odbtp/metadata.xml b/dev-db/odbtp/metadata.xml
new file mode 100644
index 000000000000..c5e963f21d42
--- /dev/null
+++ b/dev-db/odbtp/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="sourceforge">odbtp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/odbtp/odbtp-1.1.4.ebuild b/dev-db/odbtp/odbtp-1.1.4.ebuild
new file mode 100644
index 000000000000..fa6048a6e8f1
--- /dev/null
+++ b/dev-db/odbtp/odbtp-1.1.4.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=0
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Fast, efficient TCP/IP protocol for connecting to Win32-based databases"
+HOMEPAGE="http://odbtp.sourceforge.net/"
+SRC_URI="mirror://sourceforge/odbtp/${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # Patch according to the README.64bitOS
+ use amd64 && epatch "${FILESDIR}/${P}-amd64.patch"
+}
+
+src_compile() {
+ # respect $CC (bug #243768)
+ tc-export CC
+ econf || die "econf failed"
+ emake -j1 || die "emake failed"
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "make install failed"
+
+ # Install various documentation
+ dodoc AUTHORS INSTALL NEWS README*
+ if use doc ; then
+ dohtml -r docs/*
+ fi
+}
diff --git a/dev-db/opendbx-1.4.5-r1 b/dev-db/opendbx-1.4.5-r1
deleted file mode 100644
index 6c50a477814e..000000000000
--- a/dev-db/opendbx-1.4.5-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install setup
-DEPEND=mysql? ( virtual/mysql ) postgres? ( dev-db/postgresql:* ) sqlite? ( dev-db/sqlite:3 ) oracle? ( dev-db/oracle-instantclient-basic ) firebird? ( dev-db/firebird )
-DESCRIPTION=OpenDBX - A database abstraction layer
-EAPI=5
-HOMEPAGE=https://www.linuxnetworks.de/doc/index.php/OpenDBX
-IUSE=firebird +mysql oracle postgres sqlite
-KEYWORDS=amd64 x86
-LICENSE=LGPL-2.1
-RDEPEND=mysql? ( virtual/mysql ) postgres? ( dev-db/postgresql:* ) sqlite? ( dev-db/sqlite:3 ) oracle? ( dev-db/oracle-instantclient-basic ) firebird? ( dev-db/firebird )
-RESTRICT=firebird? ( bindist )
-SLOT=0
-SRC_URI=https://www.linuxnetworks.de/opendbx/download/opendbx-1.4.5.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=67a15015f22ab73c58c00000fe84c3e8
diff --git a/dev-db/opendbx-1.4.6-r1 b/dev-db/opendbx-1.4.6-r1
deleted file mode 100644
index 0df67180a615..000000000000
--- a/dev-db/opendbx-1.4.6-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install setup
-DEPEND=mysql? ( virtual/mysql ) postgres? ( dev-db/postgresql:* ) sqlite? ( dev-db/sqlite:3 ) oracle? ( dev-db/oracle-instantclient-basic ) firebird? ( dev-db/firebird )
-DESCRIPTION=OpenDBX - A database abstraction layer
-EAPI=5
-HOMEPAGE=https://www.linuxnetworks.de/doc/index.php/OpenDBX
-IUSE=firebird +mysql oracle postgres sqlite
-KEYWORDS=~amd64 ~x86
-LICENSE=LGPL-2.1
-RDEPEND=mysql? ( virtual/mysql ) postgres? ( dev-db/postgresql:* ) sqlite? ( dev-db/sqlite:3 ) oracle? ( dev-db/oracle-instantclient-basic ) firebird? ( dev-db/firebird )
-RESTRICT=firebird? ( bindist )
-SLOT=0
-SRC_URI=https://www.linuxnetworks.de/opendbx/download/opendbx-1.4.6.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=392d7d35114e70d84d46e86cb98a7f7e
diff --git a/dev-db/opendbx-1.5.0-r1 b/dev-db/opendbx-1.5.0-r1
deleted file mode 100644
index 56f3489ddb31..000000000000
--- a/dev-db/opendbx-1.5.0-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install setup
-DEPEND=mysql? ( virtual/mysql ) postgres? ( dev-db/postgresql:* ) sqlite? ( dev-db/sqlite:3 ) oracle? ( dev-db/oracle-instantclient-basic ) firebird? ( dev-db/firebird )
-DESCRIPTION=OpenDBX - A database abstraction layer
-EAPI=5
-HOMEPAGE=https://www.linuxnetworks.de/doc/index.php/OpenDBX
-IUSE=firebird +mysql oracle postgres sqlite
-KEYWORDS=~x64-solaris
-LICENSE=LGPL-2.1
-RDEPEND=mysql? ( virtual/mysql ) postgres? ( dev-db/postgresql:* ) sqlite? ( dev-db/sqlite:3 ) oracle? ( dev-db/oracle-instantclient-basic ) firebird? ( dev-db/firebird )
-RESTRICT=firebird? ( bindist )
-SLOT=0
-SRC_URI=https://www.linuxnetworks.de/opendbx/download/libopendbx-1.5.0.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=e4960bfcfd2386e2608c392f0ec982ce
diff --git a/dev-db/opendbx/Manifest b/dev-db/opendbx/Manifest
new file mode 100644
index 000000000000..871f4e3d67f2
--- /dev/null
+++ b/dev-db/opendbx/Manifest
@@ -0,0 +1,7 @@
+DIST libopendbx-1.5.0.tar.gz 583894 BLAKE2B c427bf8d79df6b83d0ce940d974625bd9b54e49e502f864d244a780185b6321f84a6b779e09b603a71ca26549844001268f0357169e9a74e742b9c2668e4b3ec SHA512 7e4e9b8c62fd981276f6747f8184d7e34d743b866bfd76c8126a16371b50dc682177fd563212333d2dbebe2128d0b1527fc69029833329ba8cc0311308fa9bb5
+DIST opendbx-1.4.5.tar.gz 582915 BLAKE2B 7a11947f73ba3a3d407fecf7600589b64a6a80b82f24720ae613d1dc7044e7efe3af8fe273c0cdb043923af2cee1913766054eff3267243345b89c6977124be6 SHA512 e46289f9a7eb8b6e4084863834f8c4ca080eb3343b5f9d5837c476bab0a39e798a6364c8648f9fb53e52ab60cae57749b9f7e9bd23cb95b8ff21160f1bf4247e
+DIST opendbx-1.4.6.tar.gz 587514 BLAKE2B 0a6c983ac1ebdc3ad9390185938f32e13ba9ff2ced6d41390421e1e3a1e9eb639a85d89da7ce2dd67f05fd2fcaebb2f53146f43678e548511403d8cdc4de88da SHA512 dd6d53d29157057dbf4e273fd82c7694e8bc626d3409d6ab9c25627a0fec96418326550fa8004b5341facdc4cd8aae12516224e8bb84e2562482885780ff0e55
+EBUILD opendbx-1.4.5-r1.ebuild 1673 BLAKE2B f16733bc1218209340872d61688ca95a9c9ee2d73af3c5332a1bcb09f4bafa4ab1f423a5495c49b1c9b5d3c6abb6320213622d54cfa0add5e2dd5514fcc26d8e SHA512 995797952cf91405528206c23afbf9cd50eceda44a17c6885752c0ac66fa42c7d42b4079e24ebd2eaa8d288e604651b4a5fb896e7bc365fdd54e5b1f9dabd8b4
+EBUILD opendbx-1.4.6-r1.ebuild 1748 BLAKE2B 9cbb80ce927f4230d893698f3a4a48ce8fff14ddfa072b74fabb33e5dd64981ca7e7d867e5b87092a4beb3540d30181264c00296aa23964a62ac0481befa344b SHA512 3aeab5356de54c8eae21e5628d542e6d04ff858c11cc94da38146bbf2f06c006b86f5c83379db3623688c015d585bb8b0f10db18dcd7a2dc3e88366459e681dc
+EBUILD opendbx-1.5.0-r1.ebuild 1816 BLAKE2B 4350d0bb7f28b8a7c6534504ee13d9b8ea5b12fd3a33465321ca4fe5aa1ea0ebe285180fb8d2cbaa954106076b1c1d1a972c6ddf6c209544c5c971f98b38e329 SHA512 423100bc613fd0258f883001c39dcac9e6720437bd42729ce7a9ae062b837788cab630f6917042a01a994884c21587c557a8c410ac0c48ec8650d1e4d33ca56e
+MISC metadata.xml 243 BLAKE2B 1d641d0445b6ef43e1ca3ca3f967b0580b0a5ba444509e092a8a51bba18564136091c2dacd69ed723e36cb851b3962176a8aca06d3b2e604cf089c4983dbb7f5 SHA512 2bbd30d145173aa1c10a47ec43bfc1f6b1aeda4b25ec40e534d08a35fc9a63ba9ba7826204cf4d561566ea0678f2d865cb7a947814f5e5e436a839d750f2db2e
diff --git a/dev-db/opendbx/metadata.xml b/dev-db/opendbx/metadata.xml
new file mode 100644
index 000000000000..92db6f744243
--- /dev/null
+++ b/dev-db/opendbx/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>alicef@gentoo.org</email>
+ <name>Alice Ferrazzi</name>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-db/opendbx/opendbx-1.4.5-r1.ebuild b/dev-db/opendbx/opendbx-1.4.5-r1.ebuild
new file mode 100644
index 000000000000..c069c4e62341
--- /dev/null
+++ b/dev-db/opendbx/opendbx-1.4.5-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit flag-o-matic multilib
+
+DESCRIPTION="OpenDBX - A database abstraction layer"
+HOMEPAGE="https://www.linuxnetworks.de/doc/index.php/OpenDBX"
+SRC_URI="https://www.linuxnetworks.de/opendbx/download/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="firebird +mysql oracle postgres sqlite"
+RESTRICT="firebird? ( bindist )"
+
+DEPEND="mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql:* )
+ sqlite? ( dev-db/sqlite:3 )
+ oracle? ( dev-db/oracle-instantclient-basic )
+ firebird? ( dev-db/firebird )"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ if ! ( use firebird || use mysql || use oracle || use postgres || use sqlite )
+ then
+ ewarn "You should enable at least one of the following USE flags:"
+ ewarn "firebird, mysql, oracle, postgres or sqlite"
+ fi
+
+ if use oracle && [[ ! -d ${ORACLE_HOME} ]]
+ then
+ die "Oracle support requested, but ORACLE_HOME not set to a valid directory!"
+ fi
+
+ use mysql && append-cppflags -I/usr/include/mysql
+ use firebird && append-cppflags -I/opt/firebird/include
+ use oracle && append-ldflags -L"${ORACLE_HOME}"/lib
+}
+
+src_configure() {
+ local backends=""
+
+ use firebird && backends="${backends} firebird"
+ use mysql && backends="${backends} mysql"
+ use oracle && backends="${backends} oracle"
+ use postgres && backends="${backends} pgsql"
+ use sqlite && backends="${backends} sqlite3"
+
+ econf --with-backends="${backends}"
+}
+
+src_compile() {
+ # bug #322221
+ emake -j1
+}
+
+src_install() {
+ emake -j1 install DESTDIR="${D}"
+ dodoc AUTHORS ChangeLog README
+
+ rm -f "${D}"/usr/$(get_libdir)/opendbx/*.{a,la}
+}
diff --git a/dev-db/opendbx/opendbx-1.4.6-r1.ebuild b/dev-db/opendbx/opendbx-1.4.6-r1.ebuild
new file mode 100644
index 000000000000..b438b36edf6d
--- /dev/null
+++ b/dev-db/opendbx/opendbx-1.4.6-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit flag-o-matic multilib
+
+DESCRIPTION="OpenDBX - A database abstraction layer"
+HOMEPAGE="https://www.linuxnetworks.de/doc/index.php/OpenDBX"
+SRC_URI="https://www.linuxnetworks.de/opendbx/download/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="firebird +mysql oracle postgres sqlite"
+RESTRICT="firebird? ( bindist )"
+
+DEPEND="mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql:* )
+ sqlite? ( dev-db/sqlite:3 )
+ oracle? ( dev-db/oracle-instantclient-basic )
+ firebird? ( dev-db/firebird )"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ if ! ( use firebird || use mysql || use oracle || use postgres || use sqlite )
+ then
+ ewarn "You should enable at least one of the following USE flags:"
+ ewarn "firebird, mysql, oracle, postgres or sqlite"
+ fi
+
+ if use oracle && [[ ! -d ${ORACLE_HOME} ]]
+ then
+ die "Oracle support requested, but ORACLE_HOME not set to a valid directory!"
+ fi
+
+ use mysql && append-cppflags -I/usr/include/mysql
+ use firebird && append-cppflags -I/opt/firebird/include
+ use oracle && append-ldflags -L"${ORACLE_HOME}"/lib
+}
+
+src_configure() {
+ local backends=""
+
+ use firebird && backends="${backends} firebird"
+ use mysql && backends="${backends} mysql"
+ use oracle && backends="${backends} oracle"
+ use postgres && backends="${backends} pgsql"
+ use sqlite && backends="${backends} sqlite3"
+
+ econf --with-backends="${backends}" || die "econf failed"
+}
+
+src_compile() {
+ # bug #322221
+ emake -j1 || die "emake failed"
+}
+
+src_install() {
+ emake -j1 install DESTDIR="${D}" || die "make install failed"
+ dodoc AUTHORS ChangeLog README
+
+ rm -f "${D}"/usr/$(get_libdir)/opendbx/*.{a,la}
+}
diff --git a/dev-db/opendbx/opendbx-1.5.0-r1.ebuild b/dev-db/opendbx/opendbx-1.5.0-r1.ebuild
new file mode 100644
index 000000000000..e377a26c8c0a
--- /dev/null
+++ b/dev-db/opendbx/opendbx-1.5.0-r1.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit flag-o-matic multilib
+
+MY_PN="lib${PN}"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="OpenDBX - A database abstraction layer"
+HOMEPAGE="https://www.linuxnetworks.de/doc/index.php/OpenDBX"
+SRC_URI="https://www.linuxnetworks.de/opendbx/download/${MY_P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~x64-solaris"
+IUSE="firebird +mysql oracle postgres sqlite"
+RESTRICT="firebird? ( bindist )"
+
+DEPEND="mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql:* )
+ sqlite? ( dev-db/sqlite:3 )
+ oracle? ( dev-db/oracle-instantclient-basic )
+ firebird? ( dev-db/firebird )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"/${MY_P}
+
+pkg_setup() {
+ if ! ( use firebird || use mysql || use oracle || use postgres || use sqlite )
+ then
+ ewarn "You should enable at least one of the following USE flags:"
+ ewarn "firebird, mysql, oracle, postgres or sqlite"
+ fi
+
+ if use oracle && [[ ! -d ${ORACLE_HOME} ]]
+ then
+ die "Oracle support requested, but ORACLE_HOME not set to a valid directory!"
+ fi
+
+ use mysql && append-cppflags -I/usr/include/mysql
+ use firebird && append-cppflags -I/opt/firebird/include
+ use oracle && append-ldflags -L"${ORACLE_HOME}"/lib
+}
+
+src_configure() {
+ local backends=""
+
+ use firebird && backends="${backends} firebird"
+ use mysql && backends="${backends} mysql"
+ use oracle && backends="${backends} oracle"
+ use postgres && backends="${backends} pgsql"
+ use sqlite && backends="${backends} sqlite3"
+
+ econf --with-backends="${backends}" || die "econf failed"
+}
+
+src_compile() {
+ # bug #322221
+ emake -j1 || die "emake failed"
+}
+
+src_install() {
+ emake -j1 install DESTDIR="${D}" || die "make install failed"
+ dodoc AUTHORS ChangeLog README
+
+ rm -f "${D}"/usr/$(get_libdir)/opendbx/*.{a,la}
+}
diff --git a/dev-db/oracle-instantclient-12.1.0.2 b/dev-db/oracle-instantclient-12.1.0.2
deleted file mode 100644
index 8a9cce62ea8f..000000000000
--- a/dev-db/oracle-instantclient-12.1.0.2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install nofetch postinst preinst prepare test unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Oracle 12c Instant Client with SDK
-EAPI=6
-HOMEPAGE=http://www.oracle.com/technetwork/database/features/instant-client/index.html
-IUSE=jdbc odbc +sdk +sqlplus tools abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=~amd64 ~x86
-LICENSE=OTN
-RDEPEND=>=dev-libs/libaio-0.3.109-r5[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] !<dev-db/oracle-instantclient-basic-12 !<dev-db/oracle-instantclient-odbc-12 !<dev-db/oracle-instantclient-jdbc-12 !<dev-db/oracle-instantclient-sqlplus-12
-RESTRICT=fetch splitdebug
-SLOT=0/12.1
-SRC_URI=abi_x86_32? ( instantclient-basic-linux-12.1.0.2.0.zip odbc? ( instantclient-odbc-linux-12.1.0.2.0.zip ) jdbc? ( instantclient-jdbc-linux-12.1.0.2.0.zip ) !abi_x86_64? ( sdk? ( instantclient-sdk-linux-12.1.0.2.0.zip ) sqlplus? ( instantclient-sqlplus-linux-12.1.0.2.0.zip ) tools? ( instantclient-tools-linux-12.1.0.2.0.zip ) ) ) abi_x86_64? ( instantclient-basic-linux.x64-12.1.0.2.0.zip odbc? ( instantclient-odbc-linux.x64-12.1.0.2.0.zip ) jdbc? ( instantclient-jdbc-linux.x64-12.1.0.2.0.zip ) sdk? ( instantclient-sdk-linux.x64-12.1.0.2.0.zip ) sqlplus? ( instantclient-sqlplus-linux.x64-12.1.0.2.0.zip ) tools? ( instantclient-tools-linux.x64-12.1.0.2.0.zip ) )
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=abba05b7b42ec4de716249eb22fe9cab
diff --git a/dev-db/oracle-instantclient-12.2.0.1_p2 b/dev-db/oracle-instantclient-12.2.0.1_p2
deleted file mode 100644
index e918125de0c0..000000000000
--- a/dev-db/oracle-instantclient-12.2.0.1_p2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install nofetch postinst preinst prepare test unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Oracle 12c Instant Client with SDK
-EAPI=6
-HOMEPAGE=http://www.oracle.com/technetwork/database/features/instant-client/index.html
-IUSE=jdbc odbc +sdk +sqlplus tools abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=~amd64 ~x86
-LICENSE=OTN
-RDEPEND=>=dev-libs/libaio-0.3.109-r5[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] !<dev-db/oracle-instantclient-basic-12 !<dev-db/oracle-instantclient-odbc-12 !<dev-db/oracle-instantclient-jdbc-12 !<dev-db/oracle-instantclient-sqlplus-12
-RESTRICT=fetch splitdebug
-SLOT=0/12.1
-SRC_URI=abi_x86_32? ( instantclient-basic-linux-12.2.0.1.0.zip odbc? ( instantclient-odbc-linux-12.2.0.1.0-2.zip ) jdbc? ( instantclient-jdbc-linux-12.2.0.1.0.zip ) !abi_x86_64? ( sdk? ( instantclient-sdk-linux-12.2.0.1.0.zip ) sqlplus? ( instantclient-sqlplus-linux-12.2.0.1.0.zip ) tools? ( instantclient-tools-linux-12.2.0.1.0.zip ) ) ) abi_x86_64? ( instantclient-basic-linux.x64-12.2.0.1.0.zip odbc? ( instantclient-odbc-linux.x64-12.2.0.1.0-2.zip ) jdbc? ( instantclient-jdbc-linux.x64-12.2.0.1.0.zip ) sdk? ( instantclient-sdk-linux.x64-12.2.0.1.0.zip ) sqlplus? ( instantclient-sqlplus-linux.x64-12.2.0.1.0.zip ) tools? ( instantclient-tools-linux.x64-12.2.0.1.0.zip ) )
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=2e44ba42a0212159362d2c134929f0c5
diff --git a/dev-db/oracle-instantclient-basic-11.2.0.3 b/dev-db/oracle-instantclient-basic-11.2.0.3
deleted file mode 100644
index d3fb7e4861e7..000000000000
--- a/dev-db/oracle-instantclient-basic-11.2.0.3
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=install nofetch postinst prepare unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Oracle 11g Instant Client with SDK
-EAPI=4
-HOMEPAGE=http://www.oracle.com/technetwork/database/features/instant-client/index.html
-IUSE=multilib
-KEYWORDS=amd64 x86
-LICENSE=OTN
-RDEPEND=dev-libs/libaio multilib? ( >=dev-libs/libaio-0.3.109-r3 )
-RESTRICT=fetch
-SLOT=0
-SRC_URI=x86? ( instantclient-basic-linux-11.2.0.3.0.zip instantclient-sdk-linux-11.2.0.3.0.zip ) amd64? ( instantclient-basic-linux.x64-11.2.0.3.0.zip instantclient-sdk-linux.x64-11.2.0.3.0.zip multilib? ( instantclient-basic-linux-11.2.0.3.0.zip ) )
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=305dd4f40cf49f8c8fdb971f25cc69a8
diff --git a/dev-db/oracle-instantclient-basic-11.2.0.4 b/dev-db/oracle-instantclient-basic-11.2.0.4
deleted file mode 100644
index 83128040b657..000000000000
--- a/dev-db/oracle-instantclient-basic-11.2.0.4
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install nofetch postinst prepare test unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Oracle 11g Instant Client with SDK
-EAPI=4
-HOMEPAGE=http://www.oracle.com/technetwork/database/features/instant-client/index.html
-IUSE=abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=amd64 x86
-LICENSE=OTN
-RDEPEND=>=dev-libs/libaio-0.3.109-r5[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?]
-RESTRICT=fetch splitdebug
-SLOT=0
-SRC_URI=abi_x86_32? ( instantclient-basic-linux-11.2.0.4.0.zip !abi_x86_64? ( instantclient-sdk-linux-11.2.0.4.0.zip ) ) abi_x86_64? ( instantclient-basic-linux.x64-11.2.0.4.0.zip instantclient-sdk-linux.x64-11.2.0.4.0.zip )
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=8456a5c04379f0529ee8239e3d75d954
diff --git a/dev-db/oracle-instantclient-basic-12 b/dev-db/oracle-instantclient-basic-12
deleted file mode 100644
index 0eda654217dc..000000000000
--- a/dev-db/oracle-instantclient-basic-12
+++ /dev/null
@@ -1,9 +0,0 @@
-DEFINED_PHASES=-
-DESCRIPTION=Transition package moving to single dev-db/oracle-instantclient package
-EAPI=6
-HOMEPAGE=https://bugs.gentoo.org/show_bug.cgi?id=524922#c12
-KEYWORDS=~x86 ~amd64
-LICENSE=metapackage
-RDEPEND=>=dev-db/oracle-instantclient-12[sdk]
-SLOT=0
-_md5_=44117f11650738441e331266656b49c4
diff --git a/dev-db/oracle-instantclient-basic/Manifest b/dev-db/oracle-instantclient-basic/Manifest
new file mode 100644
index 000000000000..6d7edbde7b32
--- /dev/null
+++ b/dev-db/oracle-instantclient-basic/Manifest
@@ -0,0 +1,14 @@
+AUX 11.2.0.3-makefile.patch 2250 BLAKE2B f680a9dbe7a8fb51c09667b3a49eaa86cc965a36f3d3df6c789e944ce83126fef1f12e0fa083f41e94b0b56ff1bcef5c9128f959f553730ec679051e83523da2 SHA512 1573f20608cf1e8a9c6dc94b40f4a7dac822f7888b2232ff13bf3db5456bbc0f653022acb194bdb2014698665042108d7f2b13e95ce00bd492c4c0eb03f4c9db
+AUX tnsnames.ora.sample 2939 BLAKE2B d02d4be5eae8c8da346f8b0ddd2b6808e59f8e77f805b22154a77d22db325d415ecaf811323de3c7a6764a9167fb7f9a9708d1cf2de891858bc43bd5e050954d SHA512 25bb734bf4b7ea1d2ce2bddfd241204e796cad0d1d49036e567237d7ca92d158ab7bf69ff3abe210050c8ee0a0630f9217ced22dc31770814d822f93b2af5845
+DIST instantclient-basic-linux-11.2.0.3.0.zip 58502865 BLAKE2B da0f428447a4300dc64b9845d6f55c3dbeff38af06b1cb38b083f661a575a5c1749737ab389b7222f7be2a05ccdf367830642b1656505b078c0c3ca523159ae8 SHA512 c790f593e67bcc7c114a6287e1f064c03f292472e0a1a5e617a9f19017f06442f31502f66af8e6cfdf2235a18546104dc9aac164a3aa641db5728b66685c9302
+DIST instantclient-basic-linux-11.2.0.4.0.zip 58793148 BLAKE2B e0f92f119a5e8890a4507160179cd49af15ed14bd7c48480d3f685a3e4918a96e6444e75c6ea11d34681a6c66ff0e8011f44840de5f080e2dc3c03079361e4a1 SHA512 b333c9334e960617ac7cc68ad1c7b45f990d5c24c7a5bc8e51b3bc8ff6476acfb6a032521f75ba39327c71ee9676d1163b252066d52e97c1dfe9c092a92a62a0
+DIST instantclient-basic-linux.x64-11.2.0.3.0.zip 60331694 BLAKE2B 8d3e4946c04edd515f0d2495e8ce25b152ded0d903d58244d0d2a2b8bbaf263b0de67829a932f637193c08e96f4a532c131f50b6594009ca4ee1dc228d6a06d1 SHA512 708940b5ca5bc4e0617da2c4da61d0a85834e3e0731ac328a201954558a624162f71d342d674b08ec2cf076e8f639c230f88a73f6d9bfe8908b0e76805e617b7
+DIST instantclient-basic-linux.x64-11.2.0.4.0.zip 60704657 BLAKE2B 77735e81a0acf88221fefff38447536a81a32a6f5cb09dcd4526d43315be1fabb6882bb9e7a5703a4188ac9e112fba611f3e2c064a128eb66512935a1af62b33 SHA512 01ed32f1771bfa2f8ef1b81314843fb2b7b81582f33c07d86670c959bbb08355dc7cc8da586852bb353a3a914658d1e7828d6b5df884215de8d76881c956a989
+DIST instantclient-sdk-linux-11.2.0.3.0.zip 639306 BLAKE2B 80d0cac2061156fd4cfe0792a7bebcaca77ce855335c651472d0ee74cf87350ae4925d92ecd12407b285605fb0d533dcf2a6dfc46d8a0eaa6172461e9c96dc2f SHA512 fa0f98d4b2002982fab4438f734904e0ebfab777d601321423b454f9188c3b863e853fc5486c9958771f7ff8c9a544ce73e80750d745c3142872927ed1777ee1
+DIST instantclient-sdk-linux-11.2.0.4.0.zip 643080 BLAKE2B 9ea15b227d260f7e24b572be1238074dc3a3033a2ab6313d95b750ae48468bda018c52ac604664caa128396024c0ff4bcbc0d401b7900ae27f5f3877a4b44123 SHA512 09e14a0ed88182b685a00b6370da4379710c4179fcf2d5ebdb43684b7099484122f7f5181a80352464f03ae9d0150f5c2ee5f20ede98faa9073294324b9faec8
+DIST instantclient-sdk-linux.x64-11.2.0.3.0.zip 641586 BLAKE2B b3a3fa4c362031aa9d9e926f852e2bccc41dd12c8dac0a18b707f22130a8bfc1b04e12c13b7f94a845439d922884d9f83c149ac0d59af498a73f4c74730be715 SHA512 08b3fdc68e09f262549e2505867943aff5c3927d158569ea7e0bca4f958af725a46143d325dcf80a6d48d09f9240f147470439ac55ea848a27df3eeedd28f732
+DIST instantclient-sdk-linux.x64-11.2.0.4.0.zip 643089 BLAKE2B 710f0a2a81dde6cabdfb2e1472f40cb715d1e060377bec1d05d8b1c794ec05b023f4feca30603202487b52527723ed9d60f73371443ce76ad2781da9c1ed5412 SHA512 7198ddc7d8804353900e45b36de79659d75dee0197c4dd58bd4d69408e7131c95025223bbd1f39ef208269bff379daa6e05f4371af83a82b83997cafadc1d642
+EBUILD oracle-instantclient-basic-11.2.0.3.ebuild 5382 BLAKE2B fcd3cecc4c386c1b4f3f1e9de11c5a93747711faa0eb4b83f49ed06262f04b18d542431212d9d5353291c9a3f6e66264f6ddb17b6eaa972d50dccd516abf1952 SHA512 c64cd1bff11ed6a11251bc3aca214b7b8a4d9a75d01702eb29ce935f9f02fb72bb9128247d2e32d87fbc1e042b0b19a72dfb6009f940bb69b455adc4f38128fe
+EBUILD oracle-instantclient-basic-11.2.0.4.ebuild 5545 BLAKE2B 787d424a25ba6407ac3e0576929a93912ec5d56edcef22fe464bfd30aefb04848a43417124e5540b7d4e8d9e7376a12fcee6fb86b8fa53d29236871592d9d87f SHA512 f7f97eca82b62f43dd17170d5c9ee492f029f8e99b746511712b56cdc4cd45a96a68757101350ab05aab6e7ed5cfe2fd70154c8b28fa4e3c07bc6f961e1fec2b
+EBUILD oracle-instantclient-basic-12.ebuild 402 BLAKE2B e28e2e4f9eac3eb342bb4e2eba6595db3ae6ce88019c2b46ee291ddab39aab08426ffb560e3180d5e14fd5e0e8344258d8e8d3cfa79d850d1da092ab86846da1 SHA512 374a6cf7a0aa7f2942a86dffcfdfa2ae52c637986f5920a295820e8ab13446962eff19653f347274c20b68c4466400fd2467da935bc0633fe12ba2fb3f1cf414
+MISC metadata.xml 344 BLAKE2B aa2fb436f1a0beb301e255d537071307f1439cdba758954f3983fcbd82fccb2d0caefb88ab646e2b56a03f3b0ac859b04a7181c3e0cc59680c5f7ff2c7daa70e SHA512 650f29483a89a65b3855aeb65fc486d38365660ed2a67e9ab18e96534c5dd453d7897b0443fd1b12dfceaee3b542840ab1648c36b07728014dfd57ac1c95e3e9
diff --git a/dev-db/oracle-instantclient-basic/files/11.2.0.3-makefile.patch b/dev-db/oracle-instantclient-basic/files/11.2.0.3-makefile.patch
new file mode 100644
index 000000000000..efcc2c6fac7c
--- /dev/null
+++ b/dev-db/oracle-instantclient-basic/files/11.2.0.3-makefile.patch
@@ -0,0 +1,57 @@
+Fake demo_xe.mk found in Oracle eXpress Edition,
+known by CPAN DBD::Oracle (bug#165834).
+This provides absolute paths for headers and libraries.
+
+Paranoia drops those REMOVE lines.
+--- sdk/demo/demo.mk.orig 2012-03-06 17:11:57.636990449 +0100
++++ sdk/demo/demo.mk 2012-03-06 17:19:37.985324293 +0100
+@@ -28,8 +28,9 @@
+ CC=/opt/SunProd/SUNWspro6.1/bin/CC
+ cc=/opt/SunProd/SUNWspro6.1/bin/cc
+
+-ICINCHOME=../
+-ICLIBHOME=../../
++LIBDIR=lib
++ICINCHOME=$(ORACLE_HOME)/
++ICLIBHOME=$(ORACLE_HOME)/$(LIBDIR)
+ ICLIBPATH=-L$(ICLIBHOME)
+ THREADLIBS=-lthread
+ CCLIB=$(ICLIBPATH) -locci -lclntsh $(THREADLIBS)
+@@ -64,18 +64,18 @@
+ all: clean buildoci $(OCCIDEMO) $(OCCIOBJDEMO)
+
+ buildoci: $(CLNCACHE) $(LIBCLNT) $(CDEMOOBJS)
+- $(MKLINK) $(ICLIBHOME)libclntsh$(SO_EXT).11.1 $(ICLIBHOME)libclntsh$(SO_EXT)
+- $(MKLINK) $(ICLIBHOME)libocci$(SO_EXT).11.1 $(ICLIBHOME)libocci$(SO_EXT)
++# $(MKLINK) $(ICLIBHOME)libclntsh$(SO_EXT).11.1 $(ICLIBHOME)libclntsh$(SO_EXT)
++# $(MKLINK) $(ICLIBHOME)libocci$(SO_EXT).11.1 $(ICLIBHOME)libocci$(SO_EXT)
+ $(CC) -o $(CDEMOEXE) $(LDFLAGS) $(CDEMOOBJS) $(CCLIB)
+- $(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT)
+- $(REMOVE) $(ICLIBHOME)libocci$(SO_EXT)
++# $(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT)
++# $(REMOVE) $(ICLIBHOME)libocci$(SO_EXT)
+
+ buildocci: $(CLNCACHE) $(LIBCLNT) $(OBJS)
+- $(MKLINK) $(ICLIBHOME)libclntsh$(SO_EXT).11.1 $(ICLIBHOME)libclntsh$(SO_EXT)
+- $(MKLINK) $(ICLIBHOME)libocci$(SO_EXT).11.1 $(ICLIBHOME)libocci$(SO_EXT)
++# $(MKLINK) $(ICLIBHOME)libclntsh$(SO_EXT).11.1 $(ICLIBHOME)libclntsh$(SO_EXT)
++# $(MKLINK) $(ICLIBHOME)libocci$(SO_EXT).11.1 $(ICLIBHOME)libocci$(SO_EXT)
+ $(CC) -o $(EXE) $(LDFLAGS) $(OBJS) $(CCLIB)
+- $(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT)
+- $(REMOVE) $(ICLIBHOME)libocci$(SO_EXT)
++# $(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT)
++# $(REMOVE) $(ICLIBHOME)libocci$(SO_EXT)
+
+ $(OCCIDEMO):
+ $(MAKE) -f $(MAKEFILE) buildocci OBJS=$@.o EXE=$@
+@@ -93,8 +93,8 @@
+
+ cleancache:
+ $(REMOVE) $(CACHEDIR)
+- $(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT)
+- $(REMOVE) $(ICLIBHOME)libocci$(SO_EXT)
++# $(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT)
++# $(REMOVE) $(ICLIBHOME)libocci$(SO_EXT)
+
+ clean: $(CLNCACHE)
+ $(REMOVE) cdemo81 cdemo81.o occidml occidml.o occiobj occiobj.o occiobjo* occiobjm* occiobj.h occiobjout.type
diff --git a/dev-db/oracle-instantclient-basic/files/tnsnames.ora.sample b/dev-db/oracle-instantclient-basic/files/tnsnames.ora.sample
new file mode 100644
index 000000000000..f0524f5993cd
--- /dev/null
+++ b/dev-db/oracle-instantclient-basic/files/tnsnames.ora.sample
@@ -0,0 +1,93 @@
+# This file contains the syntax information for
+# the entries to be put in any tnsnames.ora file
+# The entries in this file are need based.
+# There are no defaults for entries in this file
+# that Sqlnet/Net3 use that need to be overridden
+#
+# Typically you could have two tnsnames.ora files
+# in the system, one that is set for the entire system
+# and is called the system tnsnames.ora file, and a
+# second file that is used by each user locally so that
+# he can override the definitions dictated by the system
+# tnsnames.ora file.
+
+# The entries in tnsnames.ora are an alternative to using
+# the names server with the onames adapter.
+# They are a collection of aliases for the addresses that
+# the listener(s) is(are) listening for a database or
+# several databases.
+
+# The following is the general syntax for any entry in
+# a tnsnames.ora file. There could be several such entries
+# tailored to the user's needs.
+
+<alias>= [ (DESCRIPTION_LIST = # Optional depending on whether u have
+ # one or more descriptions
+ # If there is just one description, unnecessary ]
+ (DESCRIPTION=
+ [ (SDU=2048) ] # Optional, defaults to 2048
+ # Can take values between 512 and 32K
+ [ (ADDRESS_LIST= # Optional depending on whether u have
+ # one or more addresses
+ # If there is just one address, unnecessary ]
+ (ADDRESS=
+ [ (COMMUNITY=<community_name>) ]
+ (PROTOCOL=tcp)
+ (HOST=<hostname>)
+ (PORT=<portnumber (1521 is a standard port used)>)
+ )
+ [ (ADDRESS=
+ (PROTOCOL=ipc)
+ (KEY=<ipckey (PNPKEY is a standard key used)>)
+ )
+ ]
+ [ (ADDRESS=
+ [ (COMMUNITY=<community_name>) ]
+ (PROTOCOL=decnet)
+ (NODE=<nodename>)
+ (OBJECT=<objectname>)
+ )
+ ]
+ ... # More addresses
+ [ ) ] # Optional depending on whether ADDRESS_LIST is used or not
+ [ (CONNECT_DATA=
+ (SID=<oracle_sid>)
+ [ (GLOBAL_NAME=<global_database_name>) ]
+ )
+ ]
+ [ (SOURCE_ROUTE=yes) ]
+ )
+ (DESCRIPTION=
+ [ (SDU=2048) ] # Optional, defaults to 2048
+ # Can take values between 512 and 32K
+ [ (ADDRESS_LIST= ] # Optional depending on whether u have more
+ # than one address or not
+ # If there is just one address, unnecessary
+ (ADDRESS
+ [ (COMMUNITY=<community_name>) ]
+ (PROTOCOL=tcp)
+ (HOST=<hostname>)
+ (PORT=<portnumber (1521 is a standard port used)>)
+ )
+ [ (ADDRESS=
+ (PROTOCOL=ipc)
+ (KEY=<ipckey (PNPKEY is a standard key used)>)
+ )
+ ]
+ ... # More addresses
+ [ ) ] # Optional depending on whether ADDRESS_LIST
+ # is being used
+ [ (CONNECT_DATA=
+ (SID=<oracle_sid>)
+ [ (GLOBAL_NAME=<global_database_name>) ]
+ )
+ ]
+ [ (SOURCE_ROUTE=yes) ]
+ )
+ [ (CONNECT_DATA=
+ (SID=<oracle_sid>)
+ [ (GLOBAL_NAME=<global_database_name>) ]
+ )
+ ]
+ ... # More descriptions
+ [ ) ] # Optional depending on whether DESCRIPTION_LIST is used or not
diff --git a/dev-db/oracle-instantclient-basic/metadata.xml b/dev-db/oracle-instantclient-basic/metadata.xml
new file mode 100644
index 000000000000..8b032de8ebf6
--- /dev/null
+++ b/dev-db/oracle-instantclient-basic/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>haubi@gentoo.org</email>
+</maintainer>
+<longdescription>Instant Client Package - Basic: All files required to run OCI, OCCI, and JDBC-OCI applications</longdescription>
+</pkgmetadata>
diff --git a/dev-db/oracle-instantclient-basic/oracle-instantclient-basic-11.2.0.3.ebuild b/dev-db/oracle-instantclient-basic/oracle-instantclient-basic-11.2.0.3.ebuild
new file mode 100644
index 000000000000..a63d14bc52b8
--- /dev/null
+++ b/dev-db/oracle-instantclient-basic/oracle-instantclient-basic-11.2.0.3.ebuild
@@ -0,0 +1,197 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils multilib
+
+MY_PLAT_x86="Linux x86"
+MY_BITS_x86=32
+MY_A_x86="${PN/oracle-/}-linux-${PV}.0.zip"
+MY_ASDK_x86="${MY_A_x86/basic/sdk}"
+
+MY_PLAT_amd64="Linux x86-64"
+MY_BITS_amd64=64
+MY_A_amd64="${PN/oracle-}-linux.x64-${PV}.0.zip"
+MY_ASDK_amd64="${MY_A_amd64/basic/sdk}"
+
+DESCRIPTION="Oracle 11g Instant Client with SDK"
+HOMEPAGE="http://www.oracle.com/technetwork/database/features/instant-client/index.html"
+SRC_URI="
+ x86? ( ${MY_A_x86} ${MY_ASDK_x86} )
+ amd64? ( ${MY_A_amd64} ${MY_ASDK_amd64} multilib? ( ${MY_A_x86} ) )
+"
+
+LICENSE="OTN"
+SLOT="0"
+KEYWORDS="amd64 x86"
+RESTRICT="fetch"
+IUSE="multilib"
+
+EMULTILIB_PKG="true"
+
+DEPEND="app-arch/unzip"
+RDEPEND="
+ dev-libs/libaio
+ multilib? ( >=dev-libs/libaio-0.3.109-r3 )
+"
+
+S="${WORKDIR}"
+
+QA_PREBUILT="usr/lib*/oracle/${PV}/client/lib*/lib*"
+
+set_my_abivars() {
+ S="${WORKDIR}/${ABI}/instantclient_11_2"
+
+ local abi=${ABI}
+ [[ ${abi} == 'default' ]] && abi=${ARCH}
+ MY_PLAT=MY_PLAT_${abi}; MY_PLAT=${!MY_PLAT} # platform name
+ MY_BITS=MY_BITS_${abi}; MY_BITS=${!MY_BITS} # platform bitwidth
+ MY_A=MY_A_${abi} ; MY_A=${!MY_A} # runtime distfile
+ MY_ASDK=MY_ASDK_${abi}; MY_ASDK=${!MY_ASDK} # sdk distfile
+
+ [[ -n ${MY_PLAT} ]]
+}
+
+oic_distfile_status() {
+ if [[ -r ${DISTDIR}/${1} ]]; then
+ echo "already here"
+ else
+ echo "still absent"
+ fi
+}
+
+pkg_nofetch() {
+ eerror "Please go to"
+ eerror " ${HOMEPAGE%/*}/index-097480.html"
+ eerror " and download"
+ for ABI in $(get_install_abis)
+ do
+ set_my_abivars || continue
+ eerror "Instant Client for ${MY_PLAT}"
+ eerror " Basic: ($(oic_distfile_status ${MY_A})) ${MY_A}"
+ if is_final_abi; then
+ eerror " SDK: ($(oic_distfile_status ${MY_ASDK})) ${MY_ASDK}"
+ fi
+ done
+ eerror "After downloading these files (for *all* shown architectures), put them in:"
+ eerror " ${DISTDIR}/"
+}
+
+src_unpack() {
+ for ABI in $(get_install_abis)
+ do
+ set_my_abivars || continue
+ mkdir "${WORKDIR}"/${ABI} || die
+ cd "${WORKDIR}"/${ABI} || die
+ unpack ${MY_A}
+ if is_final_abi; then
+ unpack ${MY_ASDK}
+ fi
+ done
+}
+
+src_prepare() {
+ # need to patch for the final ABI only
+ set_my_abivars || die "${ABI} ABI not supported!"
+ cd "${S}" || die
+ epatch "${FILESDIR}"/11.2.0.3-makefile.patch
+}
+
+src_install() {
+ # all binaries go here
+ local oracle_home=/usr/$(get_libdir)/oracle/${PV}/client
+ into "${oracle_home}"
+
+ local ldpath=
+ for ABI in $(get_install_abis) # last iteration is final ABI
+ do
+ if ! set_my_abivars; then
+ elog "Skipping unsupported ABI ${ABI}."
+ continue
+ fi
+ einfo "Installing runtime for ${MY_PLAT} ..."
+
+ cd "${S}" || die
+
+ # shared libraries
+ dolib.so lib*$(get_libname)*
+
+ # ensure to be linkable
+ [[ -e libocci$(get_libname) ]] ||
+ dosym libocci$(get_libname 11.1) \
+ "${oracle_home}"/$(get_libdir)/libocci$(get_libname)
+ [[ -e libclntsh$(get_libname) ]] ||
+ dosym libclntsh$(get_libname 11.1) \
+ "${oracle_home}"/$(get_libdir)/libclntsh$(get_libname)
+
+ # java archives
+ insinto "${oracle_home}"/$(get_libdir)
+ doins *.jar
+
+ # runtime library path
+ ldpath+=${ldpath:+:}${oracle_home}/$(get_libdir)
+
+ eend $?
+ done
+
+ # ensure ORACLE_HOME/lib exists
+ [[ -e ${ED}${oracle_home}/lib ]] ||
+ dosym $(get_libdir) "${oracle_home}"/lib
+
+ einfo "Installing SDK ..."
+ cd "${S}"/sdk || die
+
+ # SDK makefile, for #165834
+ # As we change the relative filesystem layout compared
+ # to vanilla instantclient.zip content, it feels easier
+ # to fake the layout found in Oracle eXpress Edition.
+ # Both layouts are known to DBD::Oracle (cpan).
+ insinto "${oracle_home}"/rdbms/demo
+ newins demo/demo.mk demo_xe.mk
+
+ # Remove ldap.h, #299562
+ rm include/ldap.h || die
+ # DBD::Oracle needs rdbms/public as real directory
+ insinto "${oracle_home}"/rdbms/public
+ doins include/*.h
+ dosym rdbms/public "${oracle_home}"/include
+ # ruby-oci8 expects the headers here
+ dosym "${oracle_home}"/rdbms/public /usr/include/oracle/${PV}/client
+
+ dodoc demo/*
+
+ eend $?
+
+ # create path for tnsnames.ora
+ insinto /etc/oracle
+ doins "${FILESDIR}"/tnsnames.ora.sample
+
+ # Add OCI libs to library path
+ {
+ echo "ORACLE_HOME=${EPREFIX}${oracle_home}"
+ echo "LDPATH=${ldpath}"
+# who does need this?
+# echo "C_INCLUDE_PATH=${oracle_home}/include"
+ echo "TNS_ADMIN=/etc/oracle/"
+ } > "${T}"/50oracle-instantclient-basic
+ doenvd "${T}"/50oracle-instantclient-basic
+}
+
+pkg_postinst() {
+ elog "${P} does not provide an sqlnet.ora"
+ elog "configuration file, redirecting oracle diagnostics for database-"
+ elog "and network-issues into ~USER/oradiag_USER/ instead."
+ elog "It should be safe to ignore this message in sqlnet.log there:"
+ elog " Directory does not exist for read/write [ORACLE_HOME/client/log] []"
+ elog "See https://bugs.gentoo.org/show_bug.cgi?id=465252 for reference."
+ elog "If you want to directly analyse low-level debug info or don't want"
+ elog "to see it at all, so you really need an sqlnet.ora file, please"
+ elog "consult http://search.oracle.com/search/search?q=sqlnet.ora"
+ elog ""
+ elog "TNS_ADMIN has been set to ${EROOT}etc/oracle by default,"
+ elog "put your tnsnames.ora there or configure TNS_ADMIN"
+ elog "to point to your user specific configuration."
+ ewarn "Please re-source your shell settings for ORACLE_HOME"
+ ewarn " changes, such as: source /etc/profile"
+}
diff --git a/dev-db/oracle-instantclient-basic/oracle-instantclient-basic-11.2.0.4.ebuild b/dev-db/oracle-instantclient-basic/oracle-instantclient-basic-11.2.0.4.ebuild
new file mode 100644
index 000000000000..0dfbc6395439
--- /dev/null
+++ b/dev-db/oracle-instantclient-basic/oracle-instantclient-basic-11.2.0.4.ebuild
@@ -0,0 +1,199 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils multilib-minimal
+
+MY_PLAT_x86="Linux x86"
+MY_BITS_x86=32
+MY_A_x86="${PN/oracle-/}-linux-${PV}.0.zip"
+MY_ASDK_x86="${MY_A_x86/basic/sdk}"
+
+MY_PLAT_amd64="Linux x86-64"
+MY_BITS_amd64=64
+MY_A_amd64="${PN/oracle-}-linux.x64-${PV}.0.zip"
+MY_ASDK_amd64="${MY_A_amd64/basic/sdk}"
+
+DESCRIPTION="Oracle 11g Instant Client with SDK"
+HOMEPAGE="http://www.oracle.com/technetwork/database/features/instant-client/index.html"
+SRC_URI="
+ abi_x86_32? ( ${MY_A_x86} !abi_x86_64? ( ${MY_ASDK_x86} ) )
+ abi_x86_64? ( ${MY_A_amd64} ${MY_ASDK_amd64} )
+"
+
+LICENSE="OTN"
+SLOT="0"
+KEYWORDS="amd64 x86"
+RESTRICT="fetch splitdebug"
+IUSE=""
+
+DEPEND="app-arch/unzip"
+RDEPEND=">=dev-libs/libaio-0.3.109-r5[${MULTILIB_USEDEP}]"
+
+S="${WORKDIR}"
+
+QA_PREBUILT="usr/lib*/oracle/${PV}/client/lib*/lib*"
+
+set_my_abivars() {
+ S="${WORKDIR}/${ABI}/instantclient_11_2"
+
+ local abi=${ABI}
+ [[ ${abi} == 'default' ]] && abi=${ARCH}
+ MY_PLAT=MY_PLAT_${abi}; MY_PLAT=${!MY_PLAT} # platform name
+ MY_BITS=MY_BITS_${abi}; MY_BITS=${!MY_BITS} # platform bitwidth
+ MY_A=MY_A_${abi} ; MY_A=${!MY_A} # runtime distfile
+ MY_ASDK=MY_ASDK_${abi}; MY_ASDK=${!MY_ASDK} # sdk distfile
+
+ [[ -n ${MY_PLAT} ]]
+}
+
+oic_distfile_status() {
+ if [[ -r ${DISTDIR}/${1} ]]; then
+ echo "already here"
+ else
+ echo "still absent"
+ fi
+}
+
+pkg_nofetch() {
+ eerror "Please go to"
+ eerror " ${HOMEPAGE%/*}/index-097480.html"
+ eerror " and download"
+ local ABI
+ for ABI in $(multilib_get_enabled_abis)
+ do
+ set_my_abivars || continue
+ eerror "Instant Client for ${MY_PLAT}"
+ eerror " Basic: ($(oic_distfile_status ${MY_A})) ${MY_A}"
+ multilib_is_native_abi &&
+ eerror " SDK: ($(oic_distfile_status ${MY_ASDK})) ${MY_ASDK}"
+ done
+ eerror "After downloading these files (for *all* shown architectures), put them in:"
+ eerror " ${DISTDIR}/"
+}
+
+src_unpack() {
+ local ABI
+ for ABI in $(multilib_get_enabled_abis)
+ do
+ set_my_abivars || continue
+ mkdir "${WORKDIR}"/${ABI} || die
+ cd "${WORKDIR}"/${ABI} || die
+ unpack ${MY_A}
+ multilib_is_native_abi &&
+ unpack ${MY_ASDK}
+ done
+}
+
+src_prepare() {
+ local ABI
+ for ABI in $(multilib_get_enabled_abis)
+ do : # need to patch for the final ABI only
+ done
+ set_my_abivars || die "${ABI} ABI not supported!"
+ cd "${S}" || die
+ epatch "${FILESDIR}"/11.2.0.3-makefile.patch
+}
+
+# suppress configure&compile messages from multilib-minimal
+src_configure() { :; }
+src_compile() { :; }
+
+src_install() {
+ # all binaries go here
+ local oracle_home=/usr/$(get_libdir)/oracle/${PV}/client
+ into "${oracle_home}"
+
+ local ldpath= ABI
+ for ABI in $(multilib_get_enabled_abis) # last iteration is final ABI
+ do
+ if ! set_my_abivars; then
+ elog "Skipping unsupported ABI ${ABI}."
+ continue
+ fi
+ einfo "Installing runtime for ${MY_PLAT} ..."
+
+ cd "${S}" || die
+
+ # shared libraries
+ dolib.so lib*$(get_libname)*
+
+ # ensure to be linkable
+ [[ -e libocci$(get_libname) ]] ||
+ dosym libocci$(get_libname 11.1) \
+ "${oracle_home}"/$(get_libdir)/libocci$(get_libname)
+ [[ -e libclntsh$(get_libname) ]] ||
+ dosym libclntsh$(get_libname 11.1) \
+ "${oracle_home}"/$(get_libdir)/libclntsh$(get_libname)
+
+ # java archives
+ insinto "${oracle_home}"/$(get_libdir)
+ doins *.jar
+
+ # runtime library path
+ ldpath+=${ldpath:+:}${oracle_home}/$(get_libdir)
+
+ eend $?
+ done
+
+ # ensure ORACLE_HOME/lib exists
+ [[ -e ${ED}${oracle_home}/lib ]] ||
+ dosym $(get_libdir) "${oracle_home}"/lib
+
+ einfo "Installing SDK ..."
+ cd "${S}"/sdk || die
+
+ # SDK makefile, for #165834
+ # As we change the relative filesystem layout compared
+ # to vanilla instantclient.zip content, it feels easier
+ # to fake the layout found in Oracle eXpress Edition.
+ # Both layouts are known to DBD::Oracle (cpan).
+ insinto "${oracle_home}"/rdbms/demo
+ newins demo/demo.mk demo_xe.mk
+
+ # Remove ldap.h, #299562
+ rm include/ldap.h || die
+ # DBD::Oracle needs rdbms/public as real directory
+ insinto "${oracle_home}"/rdbms/public
+ doins include/*.h
+ dosym rdbms/public "${oracle_home}"/include
+ # ruby-oci8 expects the headers here
+ dosym "${oracle_home}"/rdbms/public /usr/include/oracle/${PV}/client
+
+ dodoc demo/*
+
+ eend $?
+
+ # create path for tnsnames.ora
+ insinto /etc/oracle
+ doins "${FILESDIR}"/tnsnames.ora.sample
+
+ # Add OCI libs to library path
+ {
+ echo "ORACLE_HOME=${EPREFIX}${oracle_home}"
+ echo "LDPATH=${ldpath}"
+# who does need this?
+# echo "C_INCLUDE_PATH=${oracle_home}/include"
+ echo "TNS_ADMIN=/etc/oracle/"
+ } > "${T}"/50oracle-instantclient-basic
+ doenvd "${T}"/50oracle-instantclient-basic
+}
+
+pkg_postinst() {
+ elog "${P} does not provide an sqlnet.ora"
+ elog "configuration file, redirecting oracle diagnostics for database-"
+ elog "and network-issues into ~USER/oradiag_USER/ instead."
+ elog "It should be safe to ignore this message in sqlnet.log there:"
+ elog " Directory does not exist for read/write [ORACLE_HOME/client/log] []"
+ elog "See https://bugs.gentoo.org/show_bug.cgi?id=465252 for reference."
+ elog "If you want to directly analyse low-level debug info or don't want"
+ elog "to see it at all, so you really need an sqlnet.ora file, please"
+ elog "consult http://search.oracle.com/search/search?q=sqlnet.ora"
+ elog ""
+ elog "TNS_ADMIN has been set to ${EROOT}etc/oracle by default,"
+ elog "put your tnsnames.ora there or configure TNS_ADMIN"
+ elog "to point to your user specific configuration."
+ ewarn "Please re-source your shell settings for ORACLE_HOME"
+ ewarn " changes, such as: source /etc/profile"
+}
diff --git a/dev-db/oracle-instantclient-basic/oracle-instantclient-basic-12.ebuild b/dev-db/oracle-instantclient-basic/oracle-instantclient-basic-12.ebuild
new file mode 100644
index 000000000000..7125f39aec7e
--- /dev/null
+++ b/dev-db/oracle-instantclient-basic/oracle-instantclient-basic-12.ebuild
@@ -0,0 +1,16 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Transition package moving to single ${CATEGORY}/oracle-instantclient package"
+HOMEPAGE="https://bugs.gentoo.org/show_bug.cgi?id=524922#c12"
+SRC_URI=""
+
+LICENSE="metapackage"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+
+DEPEND=""
+RDEPEND=">=dev-db/oracle-instantclient-12[sdk]"
diff --git a/dev-db/oracle-instantclient-jdbc-11.2.0.3 b/dev-db/oracle-instantclient-jdbc-11.2.0.3
deleted file mode 100644
index 4010ca36e6e4..000000000000
--- a/dev-db/oracle-instantclient-jdbc-11.2.0.3
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=install nofetch unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Oracle 11g Instant Client: JDBC supplement
-EAPI=4
-HOMEPAGE=http://www.oracle.com/technetwork/database/features/instant-client/index.html
-IUSE=multilib
-KEYWORDS=amd64 x86
-LICENSE=OTN
-RDEPEND=~dev-db/oracle-instantclient-basic-11.2.0.3
-RESTRICT=fetch
-SLOT=0
-SRC_URI=x86? ( instantclient-jdbc-linux-11.2.0.3.0.zip ) amd64? ( instantclient-jdbc-linux.x64-11.2.0.3.0.zip multilib? ( instantclient-jdbc-linux-11.2.0.3.0.zip ) )
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=a2ca08480bdd8a665a9dac1ab05d7634
diff --git a/dev-db/oracle-instantclient-jdbc-11.2.0.4 b/dev-db/oracle-instantclient-jdbc-11.2.0.4
deleted file mode 100644
index f43e5265d82d..000000000000
--- a/dev-db/oracle-instantclient-jdbc-11.2.0.4
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install nofetch test unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Oracle 11g Instant Client: JDBC supplement
-EAPI=4
-HOMEPAGE=http://www.oracle.com/technetwork/database/features/instant-client/index.html
-IUSE=abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=amd64 x86
-LICENSE=OTN
-RDEPEND=~dev-db/oracle-instantclient-basic-11.2.0.4
-RESTRICT=fetch splitdebug
-SLOT=0
-SRC_URI=abi_x86_32? ( instantclient-jdbc-linux-11.2.0.4.0.zip ) abi_x86_64? ( instantclient-jdbc-linux.x64-11.2.0.4.0.zip )
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=9e320a9e948ba5e6b30fefb9c5030ea7
diff --git a/dev-db/oracle-instantclient-jdbc-12 b/dev-db/oracle-instantclient-jdbc-12
deleted file mode 100644
index 09b9d8555788..000000000000
--- a/dev-db/oracle-instantclient-jdbc-12
+++ /dev/null
@@ -1,9 +0,0 @@
-DEFINED_PHASES=-
-DESCRIPTION=Transition package moving to single dev-db/oracle-instantclient package
-EAPI=6
-HOMEPAGE=https://bugs.gentoo.org/show_bug.cgi?id=524922#c12
-KEYWORDS=~x86 ~amd64
-LICENSE=metapackage
-RDEPEND=>=dev-db/oracle-instantclient-basic-12 >=dev-db/oracle-instantclient-12[jdbc]
-SLOT=0
-_md5_=f55f0afdbd172c03905df226c00b2455
diff --git a/dev-db/oracle-instantclient-jdbc/Manifest b/dev-db/oracle-instantclient-jdbc/Manifest
new file mode 100644
index 000000000000..0c90bb578df5
--- /dev/null
+++ b/dev-db/oracle-instantclient-jdbc/Manifest
@@ -0,0 +1,8 @@
+DIST instantclient-jdbc-linux-11.2.0.3.0.zip 1562543 BLAKE2B 7f32c39cb7c4fbdd54db0015e081bc8d913e9570c4651d2e41f17155f2a77772826ec823adaf36b44d1264ff686c3735835a483f3cd1551a1f5274c028692fd3 SHA512 f78991e57eed2b095e8659825723bfc107d3c4519d1864769a0190f22e3d5667a1a4213a067470a8fb07c1f0562ec950c9fbe37f70e9475811dd1edfaf3f17f0
+DIST instantclient-jdbc-linux-11.2.0.4.0.zip 1562440 BLAKE2B e3f377802958b22aede4d91c9bc16a85f5c0ff2cec3066a4a49f5c71ab90c17f9b7c6f29da146304327569cb3d5d533a3807941e4061254e0cf57a8387a55b04 SHA512 0a92a6529642203d48846d3f22f3756ada22942ea5e7c36d779d220dc7195301d4016edd8ee5124f9e51429bb77d9890602c1a18884eec58ff40c2aed24e55f9
+DIST instantclient-jdbc-linux.x64-11.2.0.3.0.zip 1562504 BLAKE2B 07f0753ff2add12924d05c6a4b4d07356726c7ca7d8a3118e0d65bf30db04eb89aeb0255591583714cd168782313eb083764d6ca9ed64b2081dc119c46222114 SHA512 afb824786e01f316dfa244e304fae7d9a34f4175de8ff6622bed116a9810bfca9ec5eceda6a1de95d46f7170fb63f1345dc1886efd168f1daa8c8498d2b3c8d7
+DIST instantclient-jdbc-linux.x64-11.2.0.4.0.zip 1562474 BLAKE2B f93a05ad324bb364ddab83b0bc75f6c0bc8d7224f53cf337c9887f99e07c98a8752e7d4581b19ca38c70bbe3fcf1b492d753f715bed7ba8144f37c03cc9524c0 SHA512 289a08bddc81687b73a42fb35ae6ea294dd8f536ae9d3e95142ab78ad72eeebf66947fa6f5585e48e35b7f92e65fe6a295fb564b8353d389e76bfecf35c48c18
+EBUILD oracle-instantclient-jdbc-11.2.0.3.ebuild 2156 BLAKE2B a3d41f3326b3241c08b0237fb368016b2150b5d9c92f09b1e46c557cbab7a8f6409e86caf396adf65823cc0c941d4019057aeb319780c9767f2a7f6e9c9f4076 SHA512 ab75d9b8d07156987e55c734a2e4ae1f73f5ff8261f944481b3ad49885f15d9c3ed6c20cadf48081efde9b70f3b9bf3a6bb2546f172c02ab1955ed36fcfa137f
+EBUILD oracle-instantclient-jdbc-11.2.0.4.ebuild 1940 BLAKE2B 82d646597b770e00aba5ba209e201bda7712e4907cc1e8ad657f9fa017b5fb88e9e6127ca383c7b307abedcab2b3c184c43b17d6071912f8c1aa4956cddeaab0 SHA512 02c6e4f6e355c47ca49f179ed5ba429e9129f7a23dbaa544f8e63c65e76d3aa9e9ce5e3d5ec72bda68eacfa7b368e7b00ef79daf0ed7e02ff9c125e47807f453
+EBUILD oracle-instantclient-jdbc-12.ebuild 446 BLAKE2B 4c4ac2052431b4860dcce08f0a62983b678714cf5ac3886e961947cc8c1ef889ab3c9a68ac80a0aff20fda54ac8760b70822eb844d2a3be3433f2ae2fe5a625f SHA512 cf45109d2f12847fee0eb95f9de3b72607669dde197e3b1859847b1934568b29b0059c1eb2fb83e08e5ace86078d357df26ee0e8b3dbe44a6372ea9387ea720d
+MISC metadata.xml 344 BLAKE2B aa2fb436f1a0beb301e255d537071307f1439cdba758954f3983fcbd82fccb2d0caefb88ab646e2b56a03f3b0ac859b04a7181c3e0cc59680c5f7ff2c7daa70e SHA512 650f29483a89a65b3855aeb65fc486d38365660ed2a67e9ab18e96534c5dd453d7897b0443fd1b12dfceaee3b542840ab1648c36b07728014dfd57ac1c95e3e9
diff --git a/dev-db/oracle-instantclient-jdbc/metadata.xml b/dev-db/oracle-instantclient-jdbc/metadata.xml
new file mode 100644
index 000000000000..8b032de8ebf6
--- /dev/null
+++ b/dev-db/oracle-instantclient-jdbc/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>haubi@gentoo.org</email>
+</maintainer>
+<longdescription>Instant Client Package - Basic: All files required to run OCI, OCCI, and JDBC-OCI applications</longdescription>
+</pkgmetadata>
diff --git a/dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-11.2.0.3.ebuild b/dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-11.2.0.3.ebuild
new file mode 100644
index 000000000000..303d9dbd2c5b
--- /dev/null
+++ b/dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-11.2.0.3.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils multilib
+
+MY_PLAT_x86="Linux x86"
+MY_A_x86="${PN/oracle-/}-linux-${PV}.0.zip"
+
+MY_PLAT_amd64="Linux x86-64"
+MY_A_amd64="${PN/oracle-/}-linux.x64-${PV}.0.zip"
+
+DESCRIPTION="Oracle 11g Instant Client: JDBC supplement"
+HOMEPAGE="http://www.oracle.com/technetwork/database/features/instant-client/index.html"
+SRC_URI="
+ x86? ( ${MY_A_x86} )
+ amd64? ( ${MY_A_amd64} multilib? ( ${MY_A_x86} ) )
+"
+
+LICENSE="OTN"
+SLOT="0"
+KEYWORDS="amd64 x86"
+RESTRICT="fetch"
+IUSE="multilib"
+
+DEPEND="app-arch/unzip"
+RDEPEND="~dev-db/oracle-instantclient-basic-${PV}"
+
+S="${WORKDIR}"
+
+QA_PREBUILT="usr/lib*/oracle/${PV}/client/lib*/lib*"
+
+default_abi() {
+ [[ ${DEFAULT_ABI} == 'default' ]] && echo ${ARCH} || echo ${DEFAULT_ABI}
+}
+
+abi_list() {
+ if use multilib; then
+ echo ${MULTILIB_ABIS}
+ else
+ default_abi
+ fi
+ return 0
+}
+
+set_abivars() {
+ local abi=$1
+ # platform name
+ MY_PLAT=MY_PLAT_${abi}
+ MY_PLAT=${!MY_PLAT}
+ # runtime distfile
+ MY_A=MY_A_${abi}
+ MY_A=${!MY_A}
+ # abi sourcedir
+ MY_S="${S}/${abi}/instantclient_11_2"
+ # ABI might not need to be set at all
+ [[ -n ${ABI} ]] && MY_ABI=${abi} || MY_ABI=
+ # abi libdir
+ MY_LIBDIR=$(ABI=${MY_ABI} get_libdir)
+}
+
+pkg_nofetch() {
+ eerror "Please go to"
+ eerror " ${HOMEPAGE%/*}/index-097480.html"
+ eerror " and download"
+ local abi
+ for abi in $(abi_list)
+ do
+ set_abivars ${abi}
+ eerror "Instant Client for ${MY_PLAT}"
+ eerror " JDBC: ${MY_A}"
+ done
+ eerror "After downloading, put them in:"
+ eerror " ${DISTDIR}/"
+}
+
+src_unpack() {
+ local abi
+ for abi in $(abi_list)
+ do
+ set_abivars ${abi}
+ mkdir -p "${MY_S%/*}" || die
+ cd "${MY_S%/*}" || die
+ unpack ${MY_A}
+ done
+}
+
+src_install() {
+ # all binaries go here
+ local oracle_home=/usr/$(get_libdir)/oracle/${PV}/client
+ into "${oracle_home}"
+
+ local abi
+ for abi in $(abi_list)
+ do
+ set_abivars ${abi}
+ einfo "Installing runtime for ${MY_PLAT} ..."
+
+ cd "${MY_S}" || die
+
+ ABI=${MY_ABI} dolib.so lib*$(get_libname)*
+
+ insinto "${oracle_home}"/${MY_LIBDIR}
+ doins *.jar
+
+ eend $?
+ done
+}
diff --git a/dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-11.2.0.4.ebuild b/dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-11.2.0.4.ebuild
new file mode 100644
index 000000000000..75696a7a33b6
--- /dev/null
+++ b/dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-11.2.0.4.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils multilib-minimal
+
+MY_PLAT_x86="Linux x86"
+MY_A_x86="${PN/oracle-/}-linux-${PV}.0.zip"
+
+MY_PLAT_amd64="Linux x86-64"
+MY_A_amd64="${PN/oracle-/}-linux.x64-${PV}.0.zip"
+
+DESCRIPTION="Oracle 11g Instant Client: JDBC supplement"
+HOMEPAGE="http://www.oracle.com/technetwork/database/features/instant-client/index.html"
+SRC_URI="
+ abi_x86_32? ( ${MY_A_x86} )
+ abi_x86_64? ( ${MY_A_amd64} )
+"
+
+LICENSE="OTN"
+SLOT="0"
+KEYWORDS="amd64 x86"
+RESTRICT="fetch splitdebug"
+IUSE=""
+
+DEPEND="app-arch/unzip"
+RDEPEND="~dev-db/oracle-instantclient-basic-${PV}"
+
+S="${WORKDIR}"
+
+QA_PREBUILT="usr/lib*/oracle/${PV}/client/lib*/lib*"
+
+set_my_abivars() {
+ MY_PLAT=MY_PLAT_${ABI}; MY_PLAT=${!MY_PLAT} # platform name
+ MY_A=MY_A_${ABI} ; MY_A=${!MY_A} # runtime distfile
+ # ABI sourcedir
+ MY_S="${S}/${ABI}/instantclient_11_2"
+
+ [[ -n ${MY_PLAT} ]]
+}
+
+pkg_nofetch() {
+ eerror "Please go to"
+ eerror " ${HOMEPAGE%/*}/index-097480.html"
+ eerror " and download"
+ local ABI
+ for ABI in $(multilib_get_enabled_abis)
+ do
+ set_my_abivars || continue
+ eerror "Instant Client for ${MY_PLAT}"
+ eerror " JDBC: ${MY_A}"
+ done
+ eerror "After downloading, put them in:"
+ eerror " ${DISTDIR}/"
+}
+
+src_unpack() {
+ local ABI
+ for ABI in $(multilib_get_enabled_abis)
+ do
+ set_my_abivars || continue
+ mkdir -p "${MY_S%/*}" || die
+ cd "${MY_S%/*}" || die
+ unpack ${MY_A}
+ done
+}
+
+src_install() {
+ # all binaries go here
+ local oracle_home=/usr/$(get_libdir)/oracle/${PV}/client
+ into "${oracle_home}"
+
+ local ABI
+ for ABI in $(multilib_get_enabled_abis)
+ do
+ if ! set_my_abivars; then
+ elog "Skipping unsupported ABI ${ABI}."
+ continue
+ fi
+ einfo "Installing runtime for ${MY_PLAT} ..."
+
+ cd "${MY_S}" || die
+
+ dolib.so lib*$(get_libname)*
+
+ insinto "${oracle_home}"/$(get_libdir)
+ doins *.jar
+
+ eend $?
+ done
+}
diff --git a/dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-12.ebuild b/dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-12.ebuild
new file mode 100644
index 000000000000..9936028925c9
--- /dev/null
+++ b/dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-12.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Transition package moving to single ${CATEGORY}/oracle-instantclient package"
+HOMEPAGE="https://bugs.gentoo.org/show_bug.cgi?id=524922#c12"
+SRC_URI=""
+
+LICENSE="metapackage"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+
+DEPEND=""
+RDEPEND="
+ >=dev-db/oracle-instantclient-basic-12
+ >=dev-db/oracle-instantclient-12[jdbc]
+"
diff --git a/dev-db/oracle-instantclient-odbc-11.2.0.3 b/dev-db/oracle-instantclient-odbc-11.2.0.3
deleted file mode 100644
index 37392922d260..000000000000
--- a/dev-db/oracle-instantclient-odbc-11.2.0.3
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=install nofetch unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Oracle 11g Instant Client: ODBC supplement
-EAPI=4
-HOMEPAGE=http://www.oracle.com/technetwork/database/features/instant-client/index.html
-IUSE=multilib
-KEYWORDS=amd64 x86
-LICENSE=OTN
-RDEPEND=~dev-db/oracle-instantclient-basic-11.2.0.3
-RESTRICT=fetch
-SLOT=0
-SRC_URI=x86? ( instantclient-odbc-linux-11.2.0.3.0.zip ) amd64? ( instantclient-odbc-linux.x64-11.2.0.3.0.zip multilib? ( instantclient-odbc-linux-11.2.0.3.0.zip ) )
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=c7b5d79ed8cd45e63962814d413376d4
diff --git a/dev-db/oracle-instantclient-odbc-11.2.0.4 b/dev-db/oracle-instantclient-odbc-11.2.0.4
deleted file mode 100644
index 58596c7be60c..000000000000
--- a/dev-db/oracle-instantclient-odbc-11.2.0.4
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install nofetch test unpack
-DEPEND=app-arch/unzip
-DESCRIPTION=Oracle 11g Instant Client: ODBC supplement
-EAPI=4
-HOMEPAGE=http://www.oracle.com/technetwork/database/features/instant-client/index.html
-IUSE=abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=amd64 x86
-LICENSE=OTN
-RDEPEND=~dev-db/oracle-instantclient-basic-11.2.0.4
-RESTRICT=fetch splitdebug
-SLOT=0
-SRC_URI=abi_x86_32? ( instantclient-odbc-linux-11.2.0.4.0.zip ) abi_x86_64? ( instantclient-odbc-linux.x64-11.2.0.4.0.zip )
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=d764fddaffffb132deb0e794ea948c5e
diff --git a/dev-db/oracle-instantclient-odbc-12 b/dev-db/oracle-instantclient-odbc-12
deleted file mode 100644
index 2e7fc08d3ced..000000000000
--- a/dev-db/oracle-instantclient-odbc-12
+++ /dev/null
@@ -1,9 +0,0 @@
-DEFINED_PHASES=-
-DESCRIPTION=Transition package moving to single dev-db/oracle-instantclient package
-EAPI=6
-HOMEPAGE=https://bugs.gentoo.org/show_bug.cgi?id=524922#c12
-KEYWORDS=~x86 ~amd64
-LICENSE=metapackage
-RDEPEND=>=dev-db/oracle-instantclient-basic-12 >=dev-db/oracle-instantclient-12[odbc]
-SLOT=0
-_md5_=8a541d1fa03a4a2593557e84981992b5
diff --git a/dev-db/oracle-instantclient-odbc/Manifest b/dev-db/oracle-instantclient-odbc/Manifest
new file mode 100644
index 000000000000..841f8b911643
--- /dev/null
+++ b/dev-db/oracle-instantclient-odbc/Manifest
@@ -0,0 +1,8 @@
+DIST instantclient-odbc-linux-11.2.0.3.0.zip 273840 BLAKE2B 54fd920bb69a12f2df387e89907c6c2a64f05fd611cb53737d6773752c3a08fbe4cb36cc43017a62e7861cd6245b4d92cbf635fabc921c0aeeaa8d00f9e012d5 SHA512 4d928e9eb3deb26db7a95a0e5417bd9355e97956d9394dc2792752fd45002b0abc3463fbb7f337f4731084aa6006d1ff635443c5503f94c6bd97d1bae7245885
+DIST instantclient-odbc-linux-11.2.0.4.0.zip 274999 BLAKE2B 33855608fcd61a7f4ebcab3f969b028069d636d5a709676c07733aeb20dcb4335f485844ec72cb0816307e36c7f0b6748c08ea6e5c67c853999ddc1b0c23eae8 SHA512 64d75c6f9aa4e5b74da12a2a293e6ee7017017a12a724596d51606d3a8d7a9d9653c158d389a5faeb02893ca6a6a93650605d71f885f9439427847583f5cc820
+DIST instantclient-odbc-linux.x64-11.2.0.3.0.zip 309061 BLAKE2B 9ddd2569364a383f525052d4c795c423ed4b44a588ec4e11e5f5130604b6d74b4ede2afdb326023d8a0167b1522669c9acc6f9e74928423f62d08c93404cd98d SHA512 a18c040fc780f893ea22fd6c79b3299d9327975a768a6518622a8ff522dd29a7019494ca7a1227483098f13afe1af1655611a32e06806bab94ab2fce2dc55e3a
+DIST instantclient-odbc-linux.x64-11.2.0.4.0.zip 310560 BLAKE2B dc97373ac00f07b4d02beb45ed053d5aa8909fc380990426c118e3fb42b08e8e5e699a518aa137b3fe159107c73929e61d59c997e741a343803f5c26036adf9b SHA512 19f999207e5ea2b5db18b40c0eb40c6ec1ea8a3117915a723338e5c423122b747c5e371446d631c00a5c01005453f85da1d2e680a2c1771a495dc0b68812df69
+EBUILD oracle-instantclient-odbc-11.2.0.3.ebuild 2353 BLAKE2B c0d060beb5acf0c3220cb4ee2bb4726f56c2b3e89de34b1025f6301ecc3f4bb1f920f8877831acdeadc9a5d0288b6171f78adb6572995540987506d73962f1d6 SHA512 598894987ea0d942faf418f1041e0cd71929c748cb12e4f0039195cb06dff3de6a058ee59665b9981944c1565d0c4bb3face220f5f9c552804033053deac9f8f
+EBUILD oracle-instantclient-odbc-11.2.0.4.ebuild 2083 BLAKE2B 07ff5ed964d5fa8b0d71bc98ec0cac68fba5baab2eeb20aa1e8f8d6512ddce221aa38ca512e57176a2530375bc32495c13bbb9ef830f580c316c0fbfad93ec83 SHA512 41b13fd6d264e51176e54496cbd149893649e6ffde2cf38098ee71adfb07b50eb20e00b840ec1f263910df0341d2ba33bd420ae51203102b93a2b3f1e1be3741
+EBUILD oracle-instantclient-odbc-12.ebuild 446 BLAKE2B 9c962da89fa2a005b07f71c926e5d07d86c4f04fc630e240e94496bc1f4ee15bba490588832cc2de0a9992a2efa528539deea58ac48d5895a640a340b01bc356 SHA512 093eea8b2f3c0873ca091a2a353132d35eb73ee707cca22b6b59ccbf3bcca72617b4a9f2f7d08db3a86f034b6f9a849aba9c09bb966f6f96a3ef9c92aaccfcac
+MISC metadata.xml 290 BLAKE2B a404ae8c35022299d637b31c334cca481c107b5fd2ae2c4930d058ef4d1968a6d4e338873e045f63215f78033ebc0854f6d6904c88f3a2ad2fe2fe107349ace6 SHA512 2aadc171bc54a828cc74443808808b03df115c72f6589d254bbe408c87a10bbdf6cff4da820aff86a917b4fdc95818d605293651085afcb876c8e3063778287b
diff --git a/dev-db/oracle-instantclient-odbc/metadata.xml b/dev-db/oracle-instantclient-odbc/metadata.xml
new file mode 100644
index 000000000000..1e9748f0e268
--- /dev/null
+++ b/dev-db/oracle-instantclient-odbc/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>haubi@gentoo.org</email>
+</maintainer>
+<longdescription>Instant Client Package - ODBC Supplement</longdescription>
+</pkgmetadata>
diff --git a/dev-db/oracle-instantclient-odbc/oracle-instantclient-odbc-11.2.0.3.ebuild b/dev-db/oracle-instantclient-odbc/oracle-instantclient-odbc-11.2.0.3.ebuild
new file mode 100644
index 000000000000..e0fbfdf509ab
--- /dev/null
+++ b/dev-db/oracle-instantclient-odbc/oracle-instantclient-odbc-11.2.0.3.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils multilib
+
+MY_PLAT_x86="Linux x86"
+MY_A_x86="${PN/oracle-/}-linux-${PV}.0.zip"
+
+MY_PLAT_amd64="Linux x86-64"
+MY_A_amd64="${PN/oracle-/}-linux.x64-${PV}.0.zip"
+
+DESCRIPTION="Oracle 11g Instant Client: ODBC supplement"
+HOMEPAGE="http://www.oracle.com/technetwork/database/features/instant-client/index.html"
+SRC_URI="
+ x86? ( ${MY_A_x86} )
+ amd64? ( ${MY_A_amd64} multilib? ( ${MY_A_x86} ) )
+"
+
+LICENSE="OTN"
+SLOT="0"
+KEYWORDS="amd64 x86"
+RESTRICT="fetch"
+IUSE="multilib"
+
+DEPEND="app-arch/unzip"
+RDEPEND="~dev-db/oracle-instantclient-basic-${PV}"
+
+S="${WORKDIR}"
+
+QA_PREBUILT="usr/lib*/oracle/${PV}/client/lib*/lib*"
+
+default_abi() {
+ [[ ${DEFAULT_ABI} == 'default' ]] && echo ${ARCH} || echo ${DEFAULT_ABI}
+}
+
+abi_list() {
+ if use multilib; then
+ echo ${MULTILIB_ABIS}
+ else
+ default_abi
+ fi
+ return 0
+}
+
+set_abivars() {
+ local abi=$1
+ # platform name
+ MY_PLAT=MY_PLAT_${abi}
+ MY_PLAT=${!MY_PLAT}
+ # runtime distfile
+ MY_A=MY_A_${abi}
+ MY_A=${!MY_A}
+ # abi sourcedir
+ MY_S="${S}/${abi}/instantclient_11_2"
+ # ABI might not need to be set at all
+ [[ -n ${ABI} ]] && MY_ABI=${abi} || MY_ABI=
+ # abi libdir
+ MY_LIBDIR=$(ABI=${MY_ABI} get_libdir)
+}
+
+pkg_nofetch() {
+ eerror "Please go to"
+ eerror " ${HOMEPAGE%/*}/index-097480.html"
+ eerror " and download"
+ local abi
+ for abi in $(abi_list)
+ do
+ set_abivars ${abi}
+ eerror "Instant Client for ${MY_PLAT}"
+ eerror " ODBC: ${MY_A}"
+ done
+ eerror "After downloading, put them in:"
+ eerror " ${DISTDIR}/"
+}
+
+src_unpack() {
+ local abi
+ for abi in $(abi_list)
+ do
+ set_abivars ${abi}
+ mkdir -p "${MY_S%/*}" || die
+ cd "${MY_S%/*}" || die
+ unpack ${MY_A}
+ done
+}
+
+src_install() {
+ # all binaries go here
+ local oracle_home=/usr/$(get_libdir)/oracle/${PV}/client
+ into "${oracle_home}"
+
+ local abi
+ for abi in $(abi_list)
+ do
+ set_abivars ${abi}
+ einfo "Installing runtime for ${MY_PLAT} ..."
+
+ cd "${MY_S}" || die
+
+ ABI=${MY_ABI} dolib.so libsqora*$(get_libname)*
+
+ # ensure to be linkable
+ [[ -e libsqora$(get_libname) ]] ||
+ dosym libsqora$(get_libname 11.1) \
+ "${oracle_home}"/${MY_LIBDIR}/libsqora$(get_libname)
+
+ eend $?
+ done
+
+ set_abivars $(default_abi)
+ cd "${MY_S}" || die
+ dobin odbc_update_ini.sh
+ dodoc *htm*
+}
diff --git a/dev-db/oracle-instantclient-odbc/oracle-instantclient-odbc-11.2.0.4.ebuild b/dev-db/oracle-instantclient-odbc/oracle-instantclient-odbc-11.2.0.4.ebuild
new file mode 100644
index 000000000000..716c88d51cad
--- /dev/null
+++ b/dev-db/oracle-instantclient-odbc/oracle-instantclient-odbc-11.2.0.4.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils multilib-minimal
+
+MY_PLAT_x86="Linux x86"
+MY_A_x86="${PN/oracle-/}-linux-${PV}.0.zip"
+
+MY_PLAT_amd64="Linux x86-64"
+MY_A_amd64="${PN/oracle-/}-linux.x64-${PV}.0.zip"
+
+DESCRIPTION="Oracle 11g Instant Client: ODBC supplement"
+HOMEPAGE="http://www.oracle.com/technetwork/database/features/instant-client/index.html"
+SRC_URI="
+ abi_x86_32? ( ${MY_A_x86} )
+ abi_x86_64? ( ${MY_A_amd64} )
+"
+
+LICENSE="OTN"
+SLOT="0"
+KEYWORDS="amd64 x86"
+RESTRICT="fetch splitdebug"
+IUSE=""
+
+DEPEND="app-arch/unzip"
+RDEPEND="~dev-db/oracle-instantclient-basic-${PV}"
+
+S="${WORKDIR}"
+
+QA_PREBUILT="usr/lib*/oracle/${PV}/client/lib*/lib*"
+
+set_my_abivars() {
+ MY_PLAT=MY_PLAT_${ABI}; MY_PLAT=${!MY_PLAT} # platform name
+ MY_A=MY_A_${ABI} ; MY_A=${!MY_A} # runtime distfile
+ # ABI sourcedir
+ MY_S="${S}/${ABI}/instantclient_11_2"
+
+ [[ -n ${MY_PLAT} ]]
+}
+
+pkg_nofetch() {
+ eerror "Please go to"
+ eerror " ${HOMEPAGE%/*}/index-097480.html"
+ eerror " and download"
+ local ABI
+ for ABI in $(multilib_get_enabled_abis)
+ do
+ set_my_abivars || continue
+ eerror "Instant Client for ${MY_PLAT}"
+ eerror " ODBC: ${MY_A}"
+ done
+ eerror "After downloading, put them in:"
+ eerror " ${DISTDIR}/"
+}
+
+src_unpack() {
+ local ABI
+ for ABI in $(multilib_get_enabled_abis)
+ do
+ set_my_abivars || continue
+ mkdir -p "${MY_S%/*}" || die
+ cd "${MY_S%/*}" || die
+ unpack ${MY_A}
+ done
+}
+
+src_install() {
+ # all binaries go here
+ local oracle_home=/usr/$(get_libdir)/oracle/${PV}/client
+ into "${oracle_home}"
+
+ local ABI
+ for ABI in $(multilib_get_enabled_abis)
+ do
+ if ! set_my_abivars; then
+ elog "Skipping unsupported ABI ${ABI}."
+ continue
+ fi
+ einfo "Installing runtime for ${MY_PLAT} ..."
+
+ cd "${MY_S}" || die
+
+ dolib.so libsqora*$(get_libname)*
+
+ # ensure to be linkable
+ [[ -e libsqora$(get_libname) ]] ||
+ dosym libsqora$(get_libname 11.1) "${oracle_home}"/$(get_libdir)/libsqora$(get_libname)
+
+ eend $?
+ done
+
+ dobin odbc_update_ini.sh
+ dodoc *htm*
+}
diff --git a/dev-db/oracle-instantclient-odbc/oracle-instantclient-odbc-12.ebuild b/dev-db/oracle-instantclient-odbc/oracle-instantclient-odbc-12.ebuild
new file mode 100644
index 000000000000..e6e33c8c69f7
--- /dev/null
+++ b/dev-db/oracle-instantclient-odbc/oracle-instantclient-odbc-12.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Transition package moving to single ${CATEGORY}/oracle-instantclient package"
+HOMEPAGE="https://bugs.gentoo.org/show_bug.cgi?id=524922#c12"
+SRC_URI=""
+
+LICENSE="metapackage"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+
+DEPEND=""
+RDEPEND="
+ >=dev-db/oracle-instantclient-basic-12
+ >=dev-db/oracle-instantclient-12[odbc]
+"
diff --git a/dev-db/oracle-instantclient-sqlplus-11.2.0.3 b/dev-db/oracle-instantclient-sqlplus-11.2.0.3
deleted file mode 100644
index 78737fc78ca6..000000000000
--- a/dev-db/oracle-instantclient-sqlplus-11.2.0.3
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=install nofetch
-DEPEND=app-arch/unzip
-DESCRIPTION=Oracle 11g Instant Client: SQL*Plus
-EAPI=4
-HOMEPAGE=http://www.oracle.com/technetwork/database/features/instant-client/index.html
-KEYWORDS=amd64 x86
-LICENSE=OTN
-RDEPEND=~dev-db/oracle-instantclient-basic-11.2.0.3
-RESTRICT=fetch
-SLOT=0
-SRC_URI=x86? ( instantclient-sqlplus-linux-11.2.0.3.0.zip ) amd64? ( instantclient-sqlplus-linux.x64-11.2.0.3.0.zip )
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=7c171f1653e7bc20166aa206c82a2d44
diff --git a/dev-db/oracle-instantclient-sqlplus-11.2.0.3-r1 b/dev-db/oracle-instantclient-sqlplus-11.2.0.3-r1
deleted file mode 100644
index dbc4f72a0c42..000000000000
--- a/dev-db/oracle-instantclient-sqlplus-11.2.0.3-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=install nofetch
-DEPEND=app-arch/unzip
-DESCRIPTION=Oracle 11g Instant Client: SQL*Plus
-EAPI=4
-HOMEPAGE=http://www.oracle.com/technetwork/database/features/instant-client/index.html
-KEYWORDS=amd64 x86
-LICENSE=OTN
-RDEPEND=~dev-db/oracle-instantclient-basic-11.2.0.3
-RESTRICT=fetch
-SLOT=0
-SRC_URI=x86? ( instantclient-sqlplus-linux-11.2.0.3.0.zip ) amd64? ( instantclient-sqlplus-linux.x64-11.2.0.3.0.zip )
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=9f83c32b93f6ba4a1f8f08c7e0723ead
diff --git a/dev-db/oracle-instantclient-sqlplus-11.2.0.4 b/dev-db/oracle-instantclient-sqlplus-11.2.0.4
deleted file mode 100644
index 28440d48e5a1..000000000000
--- a/dev-db/oracle-instantclient-sqlplus-11.2.0.4
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=install nofetch
-DEPEND=app-arch/unzip
-DESCRIPTION=Oracle 11g Instant Client: SQL*Plus
-EAPI=4
-HOMEPAGE=http://www.oracle.com/technetwork/database/features/instant-client/index.html
-KEYWORDS=amd64 x86
-LICENSE=OTN
-RDEPEND=~dev-db/oracle-instantclient-basic-11.2.0.4
-RESTRICT=fetch splitdebug
-SLOT=0
-SRC_URI=x86? ( instantclient-sqlplus-linux-11.2.0.4.0.zip ) amd64? ( instantclient-sqlplus-linux.x64-11.2.0.4.0.zip )
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=73a95cf7ac4ae5fa1543768dbbef3ed9
diff --git a/dev-db/oracle-instantclient-sqlplus-12 b/dev-db/oracle-instantclient-sqlplus-12
deleted file mode 100644
index b238fae2a7eb..000000000000
--- a/dev-db/oracle-instantclient-sqlplus-12
+++ /dev/null
@@ -1,9 +0,0 @@
-DEFINED_PHASES=-
-DESCRIPTION=Transition package moving to single dev-db/oracle-instantclient package
-EAPI=6
-HOMEPAGE=https://bugs.gentoo.org/show_bug.cgi?id=524922#c12
-KEYWORDS=~x86 ~amd64
-LICENSE=metapackage
-RDEPEND=>=dev-db/oracle-instantclient-basic-12 >=dev-db/oracle-instantclient-12[sqlplus]
-SLOT=0
-_md5_=290631d9357e5735918e61e691117897
diff --git a/dev-db/oracle-instantclient-sqlplus/Manifest b/dev-db/oracle-instantclient-sqlplus/Manifest
new file mode 100644
index 000000000000..fbdfa87041c2
--- /dev/null
+++ b/dev-db/oracle-instantclient-sqlplus/Manifest
@@ -0,0 +1,9 @@
+DIST instantclient-sqlplus-linux-11.2.0.3.0.zip 796570 BLAKE2B 0492185103d5fb36f3acb8f52e937fca35bb8b7308eb9317d43f25f4fbde39f15b8b6de0fc9065d04c809a94731c7c011dcac1daf4e734405d065d9959cf215f SHA512 241d812b3955b11efba7764f463417e79dd973ce7ad0624144e661403b71b1c4fb091c6e42d05759eaf74355dfe432970375064d4018cae9ae67cd1401095460
+DIST instantclient-sqlplus-linux-11.2.0.4.0.zip 792608 BLAKE2B c3e8f0843700df9f95428b01520400d95076df5e19169f2a79982293e54ce6cc74321de0f34a0e7865d5d29535e38b60bcca127be06343c979a40985bf349012 SHA512 8f5ff27043a036eab038080bbdc056325cc2c197e12de34e74a8da17bf69b44e4fd4200b638881d86fdf1dc1450d8e1d033daaa56386bd2c8784d556ba0093ce
+DIST instantclient-sqlplus-linux.x64-11.2.0.3.0.zip 837574 BLAKE2B c1f123b68b60f211843af954e33922e46d05ff89ce68e8357a8839e7fce83cccc31ab3f16b87204343376657839fd582fb2c80be3148cc34f2340191ed261526 SHA512 55bbac5e8267a4de2c7f9f6750f0e38dcf7c775bccc2e1e05df7fda9e6ffa7d394776e605980d8b67176acf52ba88f2dcaa959934740a1ca6f91d10b12d14024
+DIST instantclient-sqlplus-linux.x64-11.2.0.4.0.zip 834491 BLAKE2B 487091d97c0f2ec383018c39a957c8a27b030c4c8754a6c2714237dc875b89b250b47dbd28ca228a98c6199323ddd031452e1cc90c60824fbcca536aa38bff1f SHA512 b7180b5667e604564cf379b9eb55a2fc8994b87cfb993e728b4c1bdd297cab134a55580018429bdbb2b101ebdf8a350bacc1ddf5a30e1cc419092054c79a108b
+EBUILD oracle-instantclient-sqlplus-11.2.0.3-r1.ebuild 1550 BLAKE2B 28d750f61c9f3665fb3c0083adc4c6c5adf18ed22d2d6ae2e0272b434554535ecc55c7351a75822139ae225caca1b4cb5cd0f3ec317f10af25db9f2426e63c8c SHA512 09b716cbfa86620541cd8b9840c80e73b4b0de080421367fba7cade2ffd43426b63985ec9085fb7711bd257f65dcb34396f594ce5e6c3992f276a77836469dc7
+EBUILD oracle-instantclient-sqlplus-11.2.0.3.ebuild 1483 BLAKE2B 5c7b206bb6e6d906b360d51124ef2c764a60c6e1c0e2f107ab09eadcf629f6a52c5994113c1fc75ec9f149cb1a28b92f30bb6c323bb4d3a85f61003faa14a2c6 SHA512 c64c6d2e3f059bfeb0b4dfaf974952599327ff9af7045a51a4109a2b2505df441872effe01b4c4dfbe5a01e8ee58d65fa69e84c4b6943092fd3e6b377e35bd92
+EBUILD oracle-instantclient-sqlplus-11.2.0.4.ebuild 1552 BLAKE2B d48c484eea73e4aa3348b27f0a20938e8af78df16fd6d449462b113411c3d64cdb1b20561bf39bc7c0f3c86009e63ff8526055bcf0de25df33077845fd9d13bf SHA512 dc5a6ea8f004fd66ea4e4a1cbe5c96ba9f1ccc573c208735c78eacd6b678b2b4cd3bb8c3da57f6fb0f45e3fe402cca0d4c4eaa4431e08dbeb973426134c1bfa8
+EBUILD oracle-instantclient-sqlplus-12.ebuild 449 BLAKE2B 7a1aecc9c28508795b98ec8f2fc564aef62aa686680a8feae8427ed1b4d6380beb9ab5ae27ceb045ba6e3d62e2f102a927a2217e55267631e1d0414fd8e6bdfc SHA512 d09d490d5b195a486ba5afd25fdbef0dd2e99f04cfadc17182dc52344c8620c6114a06c0cbcdba38fc59a578ac5e8468aa3fd81fbf4b4de15018c4103e7faed1
+MISC metadata.xml 344 BLAKE2B aa2fb436f1a0beb301e255d537071307f1439cdba758954f3983fcbd82fccb2d0caefb88ab646e2b56a03f3b0ac859b04a7181c3e0cc59680c5f7ff2c7daa70e SHA512 650f29483a89a65b3855aeb65fc486d38365660ed2a67e9ab18e96534c5dd453d7897b0443fd1b12dfceaee3b542840ab1648c36b07728014dfd57ac1c95e3e9
diff --git a/dev-db/oracle-instantclient-sqlplus/metadata.xml b/dev-db/oracle-instantclient-sqlplus/metadata.xml
new file mode 100644
index 000000000000..8b032de8ebf6
--- /dev/null
+++ b/dev-db/oracle-instantclient-sqlplus/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>haubi@gentoo.org</email>
+</maintainer>
+<longdescription>Instant Client Package - Basic: All files required to run OCI, OCCI, and JDBC-OCI applications</longdescription>
+</pkgmetadata>
diff --git a/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-11.2.0.3-r1.ebuild b/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-11.2.0.3-r1.ebuild
new file mode 100644
index 000000000000..2af3e70ae266
--- /dev/null
+++ b/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-11.2.0.3-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils multilib pax-utils
+
+MY_PLAT_x86="Linux x86"
+MY_A_x86="${PN#oracle-}-linux-${PV}.0.zip"
+
+MY_PLAT_amd64="Linux x86-64"
+MY_A_amd64="${PN#oracle-}-linux.x64-${PV}.0.zip"
+
+DESCRIPTION="Oracle 11g Instant Client: SQL*Plus"
+HOMEPAGE="http://www.oracle.com/technetwork/database/features/instant-client/index.html"
+SRC_URI="
+ x86? ( ${MY_A_x86} )
+ amd64? ( ${MY_A_amd64} )
+"
+
+LICENSE="OTN"
+SLOT="0"
+KEYWORDS="amd64 x86"
+RESTRICT="fetch"
+IUSE=""
+
+DEPEND="app-arch/unzip"
+RDEPEND="~dev-db/oracle-instantclient-basic-${PV}"
+
+S="${WORKDIR}"/instantclient_11_2
+
+QA_PREBUILT="
+ usr/lib*/oracle/${PV}/client/lib*/lib*
+ usr/lib*/oracle/${PV}/client/bin/sqlplus
+"
+
+my_arch() {
+ # platform name
+ MY_PLAT=MY_PLAT_${ARCH}
+ export MY_PLAT=${!MY_PLAT}
+ # distfile
+ MY_A=MY_A_${ARCH}
+ export MY_A=${!MY_A}
+}
+
+pkg_nofetch() {
+ my_arch
+ eerror "Please go to"
+ eerror " ${HOMEPAGE%/*}/index-097480.html"
+ eerror " and download"
+ eerror "Instant Client for ${MY_PLAT}"
+ eerror " SQL*Plus: ${MY_A}"
+ eerror "After downloading, put it in:"
+ eerror " ${DISTDIR}/"
+}
+
+src_install() {
+ # all binaries go here
+ local oracle_home=usr/$(get_libdir)/oracle/${PV}/client
+ into /"${oracle_home}"
+
+ dolib.so libsqlplus$(get_libname) libsqlplusic$(get_libname)
+ dobin sqlplus
+
+ insinto /"${oracle_home}"/sqlplus/admin
+ doins glogin.sql
+
+ pax-mark -c "${ED}${oracle_home}"/bin/sqlplus || die
+
+ dosym /"${oracle_home}"/bin/sqlplus /usr/bin/sqlplus
+}
diff --git a/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-11.2.0.3.ebuild b/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-11.2.0.3.ebuild
new file mode 100644
index 000000000000..6df81c9c2bec
--- /dev/null
+++ b/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-11.2.0.3.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils multilib
+
+MY_PLAT_x86="Linux x86"
+MY_A_x86="${PN#oracle-}-linux-${PV}.0.zip"
+
+MY_PLAT_amd64="Linux x86-64"
+MY_A_amd64="${PN#oracle-}-linux.x64-${PV}.0.zip"
+
+DESCRIPTION="Oracle 11g Instant Client: SQL*Plus"
+HOMEPAGE="http://www.oracle.com/technetwork/database/features/instant-client/index.html"
+SRC_URI="
+ x86? ( ${MY_A_x86} )
+ amd64? ( ${MY_A_amd64} )
+"
+
+LICENSE="OTN"
+SLOT="0"
+KEYWORDS="amd64 x86"
+RESTRICT="fetch"
+IUSE=""
+
+DEPEND="app-arch/unzip"
+RDEPEND="~dev-db/oracle-instantclient-basic-${PV}"
+
+S="${WORKDIR}"/instantclient_11_2
+
+QA_PREBUILT="
+ usr/lib*/oracle/${PV}/client/lib*/lib*
+ usr/lib*/oracle/${PV}/client/bin/sqlplus
+"
+
+my_arch() {
+ # platform name
+ MY_PLAT=MY_PLAT_${ARCH}
+ export MY_PLAT=${!MY_PLAT}
+ # distfile
+ MY_A=MY_A_${ARCH}
+ export MY_A=${!MY_A}
+}
+
+pkg_nofetch() {
+ my_arch
+ eerror "Please go to"
+ eerror " ${HOMEPAGE%/*}/index-097480.html"
+ eerror " and download"
+ eerror "Instant Client for ${MY_PLAT}"
+ eerror " SQL*Plus: ${MY_A}"
+ eerror "After downloading, put it in:"
+ eerror " ${DISTDIR}/"
+}
+
+src_install() {
+ # all binaries go here
+ local oracle_home=/usr/$(get_libdir)/oracle/${PV}/client
+ into "${oracle_home}"
+
+ dolib.so libsqlplus$(get_libname) libsqlplusic$(get_libname)
+ dobin sqlplus
+
+ insinto "${oracle_home}"/sqlplus/admin
+ doins glogin.sql
+
+ dosym "${oracle_home}"/bin/sqlplus /usr/bin/sqlplus
+}
diff --git a/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-11.2.0.4.ebuild b/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-11.2.0.4.ebuild
new file mode 100644
index 000000000000..8cb35bf91e1f
--- /dev/null
+++ b/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-11.2.0.4.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils pax-utils
+
+MY_PLAT_x86="Linux x86"
+MY_A_x86="${PN#oracle-}-linux-${PV}.0.zip"
+
+MY_PLAT_amd64="Linux x86-64"
+MY_A_amd64="${PN#oracle-}-linux.x64-${PV}.0.zip"
+
+DESCRIPTION="Oracle 11g Instant Client: SQL*Plus"
+HOMEPAGE="http://www.oracle.com/technetwork/database/features/instant-client/index.html"
+SRC_URI="
+ x86? ( ${MY_A_x86} )
+ amd64? ( ${MY_A_amd64} )
+"
+
+LICENSE="OTN"
+SLOT="0"
+KEYWORDS="amd64 x86"
+RESTRICT="fetch splitdebug"
+IUSE=""
+
+DEPEND="app-arch/unzip"
+RDEPEND="~dev-db/oracle-instantclient-basic-${PV}"
+
+S="${WORKDIR}"/instantclient_11_2
+
+QA_PREBUILT="
+ usr/lib*/oracle/${PV}/client/lib*/lib*
+ usr/lib*/oracle/${PV}/client/bin/sqlplus
+"
+
+my_arch() {
+ # platform name
+ MY_PLAT=MY_PLAT_${ARCH}
+ export MY_PLAT=${!MY_PLAT}
+ # distfile
+ MY_A=MY_A_${ARCH}
+ export MY_A=${!MY_A}
+}
+
+pkg_nofetch() {
+ my_arch
+ eerror "Please go to"
+ eerror " ${HOMEPAGE%/*}/index-097480.html"
+ eerror " and download"
+ eerror "Instant Client for ${MY_PLAT}"
+ eerror " SQL*Plus: ${MY_A}"
+ eerror "After downloading, put it in:"
+ eerror " ${DISTDIR}/"
+}
+
+src_install() {
+ # all binaries go here
+ local oracle_home=usr/$(get_libdir)/oracle/${PV}/client
+ into /"${oracle_home}"
+
+ dolib.so libsqlplus$(get_libname) libsqlplusic$(get_libname)
+ dobin sqlplus
+
+ insinto /"${oracle_home}"/sqlplus/admin
+ doins glogin.sql
+
+ pax-mark -c "${ED}${oracle_home}"/bin/sqlplus || die
+
+ dosym /"${oracle_home}"/bin/sqlplus /usr/bin/sqlplus
+}
diff --git a/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-12.ebuild b/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-12.ebuild
new file mode 100644
index 000000000000..892487bdecdf
--- /dev/null
+++ b/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-12.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Transition package moving to single ${CATEGORY}/oracle-instantclient package"
+HOMEPAGE="https://bugs.gentoo.org/show_bug.cgi?id=524922#c12"
+SRC_URI=""
+
+LICENSE="metapackage"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+
+DEPEND=""
+RDEPEND="
+ >=dev-db/oracle-instantclient-basic-12
+ >=dev-db/oracle-instantclient-12[sqlplus]
+"
diff --git a/dev-db/oracle-instantclient/Manifest b/dev-db/oracle-instantclient/Manifest
new file mode 100644
index 000000000000..24989252a86f
--- /dev/null
+++ b/dev-db/oracle-instantclient/Manifest
@@ -0,0 +1,29 @@
+AUX 12.1.0.2-makefile.patch 2211 BLAKE2B 404433299397601d40d168c4ca7530fffdb9d5a39de630b04d51d3a9de70bae8859bfe047e7ac09318fa6b561ff9d94775ee08ba384c92908569855b9b42a209 SHA512 b42672e4c46f3f8a9e9bbb5bda935e20516a72ac71c9a7ba561f29fa7ff654da7abb7e6ddf3e4e236a29d29c1b7b35e469bbe60af62c5ff9065f7d8aa867b758
+AUX tnsnames.ora.sample 2939 BLAKE2B d02d4be5eae8c8da346f8b0ddd2b6808e59f8e77f805b22154a77d22db325d415ecaf811323de3c7a6764a9167fb7f9a9708d1cf2de891858bc43bd5e050954d SHA512 25bb734bf4b7ea1d2ce2bddfd241204e796cad0d1d49036e567237d7ca92d158ab7bf69ff3abe210050c8ee0a0630f9217ced22dc31770814d822f93b2af5845
+DIST instantclient-basic-linux-12.1.0.2.0.zip 59727331 BLAKE2B 8a4beb891fd6693b74be4f575bff3af7f70cb751a9fbfab80aa145737008cc745f83f2ec349a5959fcaac9aa789210ecd6da88e0eea63d23ce62fcb402274ea8 SHA512 5d93c72c43ba2ca765209f4c1d518b9e93c80ff33625bf0bc33b974413e2b91ab22681e0922d2148fbfa6b6043fe84eee5334aa398e1ee7b1c2663ff2b3bb235
+DIST instantclient-basic-linux-12.2.0.1.0.zip 64594237 BLAKE2B bd74522486ec6be857ed83e23a1a64a2794dc14ac184ef9dd4324fc4b9d0d61be8b6b70e32cfe814c6c8972bc7c9aef1d48a60180b8310d861fa66179027c391 SHA512 35cdd84765f1e020cd1e7fe3a765449bcad1c3b09189ab64f6a969da27d7ff2932bad319037ec066615e672d2b3105d4c36b42ec30ab60d6c577a2796908d22b
+DIST instantclient-basic-linux.x64-12.1.0.2.0.zip 63352239 BLAKE2B 88042fbdccc6b79e8ed82f78f47ac985af413c53b9f2c9654a8ab10008ca9f7cdc4c46a12af5eca6aca47f27bd4d28ee465cd6ed91076268a361faa247440162 SHA512 e4cbdf40f00521651002f0753ead292b7a33352a7dae5d77635fbdb784451a1b9331ad614326dccdea34ecff3d44ddd0932b83c4bd405e69d95c7decae945f2c
+DIST instantclient-basic-linux.x64-12.2.0.1.0.zip 68965195 BLAKE2B 11e4a995f00ec4f218fe08ddd139c6d60b28bd9ffb78ce566be989eb5d229e5186e60406598b78067f480755e49bbeb6675dd3081186599fc0cac89e66a6f2eb SHA512 13f9b80d1021309fa48ca6c9dd6406ba6f97dcd611f786e940db42eeaba40cdf603b108954b9b3195f830e49377593e31b04f8d9310f619418bcd129b39f2ff1
+DIST instantclient-jdbc-linux-12.1.0.2.0.zip 1571004 BLAKE2B 5d6d8f2ad86eff24be192ff0984a92351cb0dbf56619428a3c5c339dc0a5cc0048e2143e252803f5def6f0f111c4f69081d8aa41bc28002361586bef8ecff44b SHA512 ed3e5f831f1ac7351bd6eb7b3c10a09bba0f1989384ff1f041fdf94a5ca6acbf06e8285283f48731be6ece3dce55d307ac31e8bab57548dca0e3b3056060b5b2
+DIST instantclient-jdbc-linux-12.2.0.1.0.zip 1572140 BLAKE2B ac8a5767924a991503d64b7127e801bd09116ff5155a4943db76bf8678bccfd38c35d744d5a1654a51368feef97df39cad8a9b62ceb69f0cdf416af742385dea SHA512 3b57ab454645f8719a75c8778ab33589548018ec09d187ca88252006f44b014d62659a622ae423f79f9bf0f11149cafaa33880e90278c94a847e69e409bd3dca
+DIST instantclient-jdbc-linux.x64-12.1.0.2.0.zip 1571639 BLAKE2B 1e50ff99548aa22e32ae48b629e6a83477cf7ad6d56b622e4c03831b43377841d3892b1f3079148a2a93b42d7d2be2670233c33edebac219f5a71384e43ab495 SHA512 1e6aa33c159d5769d10b16da3c5ff16629dae049c7e7d3ab1504a0ad625968f4d3f655a83ff128bff726c3ed03eab9ef7603c897aad288d1dc4e557c03ac7e2a
+DIST instantclient-jdbc-linux.x64-12.2.0.1.0.zip 1572942 BLAKE2B 3521505368a46046149ae28e2fae0bb85d5a70da33c029c684289a3586341fc0e63b0a88b93cbaa28aacbffaca678260f94658faa2b7e8aa31d1103a41660dac SHA512 79c939442431e14b9f30e94821fc4d8eeb34cd35b887fd8fa90a045357a241a58a53d591d22a5f42b188540c50350b842391a3871c86eb4fe8169ea23001a21a
+DIST instantclient-odbc-linux-12.1.0.2.0.zip 1100875 BLAKE2B f8b1475962ab8b66b0e24b7bebc74cd13278e2dfe24885e5ef41e051319baee615ed5015a6b7d87e363e8915ff07fde8e17764a8e6aaa4b5b516f266ef1649dd SHA512 ff3b13a338f0acbae07f23d0e54f0ffa803afcda1a798b9cf38ced103201c0698a7240a062fb67af3547c17e906089e236cc3454685ca4645161a8b14414235e
+DIST instantclient-odbc-linux-12.2.0.1.0-2.zip 590200 BLAKE2B 732c07ecd7d19fd425873f2ddec00ffbe3da3b07b05bb902d2e3bcf6bcdcd62c7cecdf2bf2289f2c60df4d6dab3f337729eb7c4aacb64dacf73eadcf3ae3f99a SHA512 78a237d165dab3e991bc9bb495c67913c78b660922bfce872be5c774176eaee2ba2af08798b983ad513a33451cde06fe3a727dec66b91b944dc698bf048c7ef5
+DIST instantclient-odbc-linux.x64-12.1.0.2.0.zip 1289004 BLAKE2B 674b50e841c66af1d17c5293e3b1909b937664d106864d7709a921ee6f1e46f6571b3c00d064c6ffae0583f4fd84a0e1e7f0b8f635338856c429d9986208c69d SHA512 b6dd02a2566aba66bbdd61e37e00f0c0ec2d466ad969658d4943657642e6e385cb08d0bee3a127b38a7077ec71c8f341aa4696f381e4d9978f807caa1f3ccb91
+DIST instantclient-odbc-linux.x64-12.2.0.1.0-2.zip 634023 BLAKE2B 82cd7683bde15a6ff2c96b6b45da95509a7acf0dc7f6a58a19276a526a397481075fc27a450c1a6ac053a460bf075222a3d5afeba9c33f35cff9365b38eb922a SHA512 48d831c798b455349e1a79cecdeee96652d1911f2371d67c4d280b6595ac253ddff5b052ff2f680b42a5fc77b655ee438837ad4abde3137e251facd22c31cf2e
+DIST instantclient-sdk-linux-12.1.0.2.0.zip 667183 BLAKE2B 7dc36af0ea105ea97a961a2332b3643ec22cd64b81adbfc7206fce6e963948d5e59f860b8d4fe1318ed238adfb95effa2a138aec3e017a54bd7ce4c4cf1941be SHA512 fdc0111dba77aa88dc7a39c8d9afbd08c4ffde63890595501915be48a70f6fc623762657a1f3e3b54dd08b0d1e5ce00f99ec5ce40990bb17fab63ae38b986dc9
+DIST instantclient-sdk-linux-12.2.0.1.0.zip 674751 BLAKE2B 385a51450ed05c0e80151545037ed58b08dd400c01c8cbb1140045bc6372d4e1d334854881498a5c5833746c796ff94694d495257748442bd49267cc830fda88 SHA512 b2e53e95aaee283f9077f422c7ea8e961a42decb0f58d438eeb32edb32e8c88321261ffd009ca453b531c4aa22a74b8cf71b9a91754c2bd082c83f644523c72e
+DIST instantclient-sdk-linux.x64-12.1.0.2.0.zip 667174 BLAKE2B ad3f85a45fa04a579c7233d549a2c4083f0c07348503baea20f8b5404f097c36aed382d0316fbfcd6ec85f56524c288933613de2fc9fcafe961fed32108e002a SHA512 451918e34c4e41dcaea6d678cf10a20a3fb80be5c060aa1a2890f2eb528e6e4982bfd758598eaa115cd367cde0468f7f0f811bac2ef28671075868857eaf9f2e
+DIST instantclient-sdk-linux.x64-12.2.0.1.0.zip 674743 BLAKE2B fd1ab9b7fb2c3151a30d4f3f01d4003f46f95ae78f822214beed071bd52caddb3df39488d4341cb39a1f9a3259be0bc65b53df7f221055d8540d8fcc531455e9 SHA512 4a62ae1be31514664a0f442f65df633b93bea25f1ebe84e405865b9e363017726075bf2d5b2181600018ee122f74649aaa8ec5b507ee8938e33ae056a7f828b6
+DIST instantclient-sqlplus-linux-12.1.0.2.0.zip 828190 BLAKE2B b047e7ea3bbf1390c7ce3ad96c883d6a234798284b91b8ca8de2b086c27128144a0a3fdee2062c826e7e16b5dc263efdaab7e464371ef63deca4d9ffe4f668a7 SHA512 e521f141f0bb4fe62bda6da389a9c1038be879f1456500a9e70ac0a41d4f35cf2051181a03223521aa24ee06a33b67614d3afd91f01099afa0081f2771876d43
+DIST instantclient-sqlplus-linux-12.2.0.1.0.zip 869831 BLAKE2B f6c04823b1a6ac45594f13cc2ef45ab0ed25e5dd68bc33cc6412a578647df4472a71293cadbe1e98ea2983664a083b9b148aea04e717e5039e6def065d1ea583 SHA512 83894a72192ea9ca86d361ba70a6c011f297afa5d186a49fbab7050d9615de300d54b12af8d948fe18a75dcf51bd04f9feaa8460a1c69df9c55f9854e3cee61e
+DIST instantclient-sqlplus-linux.x64-12.1.0.2.0.zip 861284 BLAKE2B fe2c3e3cd90c61aba7220c7782bcb540017aaa82f884b730b0ab3dfce462f866b468cda71106e016f9581a186582701239c282cb52927face949b0c1f8690692 SHA512 ad0af692bcae1231b58c7ea55fa79d85c7a5c9875a805565b1b5956ed30e608d753ac9210f6169ab3ff4e42ac2f1d871ccff47bd2656f7684925136fef1f30c2
+DIST instantclient-sqlplus-linux.x64-12.2.0.1.0.zip 904309 BLAKE2B 5d2dca2c98187674a506808f18ef8032f595d250c2a2577cf0cd7a9d785384a29d612b686575ac15516848792539d362745cc1c8aa321d2c84c10df01c896017 SHA512 7d31a5262138f8ae0429cf08f0743b9c8c7863fc8e6abfa8ef089cee2059da75bf23503f9f1f09c28b82c5209aca27f81da6c890799236307395b59fea3bf012
+DIST instantclient-tools-linux-12.1.0.2.0.zip 187088 BLAKE2B 41b68efbbe5925c64a869c71a12a947743e40b7d268c45a1b18c187a8b2179e224cd4ea940248d690b8f334c91afd901c1b3be34b2e8c2748e7f79487890cb60 SHA512 37a9eb3e2fdbbbf32f0fb5d017209db1b62d54efe48a875625e9d6162ea894d93d144358b2360989fa71704b346f86b36f1640a5c98f8aac7c1e6853b2d078fd
+DIST instantclient-tools-linux-12.2.0.1.0.zip 1032131 BLAKE2B 1a5d94b129d2d8a23031daee3882aef0b783c019baa69fcbd2a5d4ca4c97585212580196be158bdccaff2097027ceee881e948604ea2aa15525f36ea16e04ebd SHA512 e547d571bf881e787dc19bf23f82c4396f14dbca35a51a21e4133ff463f3c3c2c308cc2263f55b49ce70604569158266cd88d7ebf8b5cf51c9cd58b2871133e2
+DIST instantclient-tools-linux.x64-12.1.0.2.0.zip 203511 BLAKE2B 6482cfa3ba521a5f5ad3e1517037f514daa1f452d8a5b38f0b4c949681a87dc54fe9551f52fcdc4e1ea6d243a808d3bd763147eaa72d9f656274ac7185823754 SHA512 f18ca11300fc20925c72122d03fc00402b9a52b39f7f70cfd3fa97264a1a2a173e7f77059affba98e897546e05c6ac1e3a546ce1c7e63ef049130496d346342b
+DIST instantclient-tools-linux.x64-12.2.0.1.0.zip 1132671 BLAKE2B a9ae6d2cd4e5661cb6a5dbb08cbc08ae4a5c28ce0bcc43db86ebd37997f8b14ec27f76613a1429d9359a765b98b465964bc5d24f1fce1d7964597191be658957 SHA512 1697289fc4b6a37277036dbef1892bd113892fcd3b0f347f0960ef8a1b90f3e91411bb237060e88bfdd418e50600372b710df08d97a4e847fd90d077ed0647d2
+EBUILD oracle-instantclient-12.1.0.2.ebuild 8668 BLAKE2B 9f26688a731756debbc5ab9181e2c51289c7ba17cff45f018356c7fce4f17ef0429490a2f768c6e7d1e0b96d75ad722fa6343b5dec55bbc05eb7971465cc62af SHA512 6b395cc48970d9ee0401947a70306732688c2b8fc6c15b11139c395a31ba82cc66bcee8e16ea200468759709ad9bb0f1f270afda4507cf9d6c4fb698aa685706
+EBUILD oracle-instantclient-12.2.0.1_p2.ebuild 9015 BLAKE2B 25c9c2d664b7a8938f2dea9c2a1ade5be23cc56b753c028efd5b82f2c4462462772dccaa319ecf9694ec73f8d23c9bfe029d1d7d91c10446752bc3ce6bc99bf3 SHA512 a7d154e698de828593be605f5e47ad33251e7bad643d34ee667d531b1348053ff0ce2e06cc0e3b22f77a0732fd815ab6da2f4c33cfb8c713f2816a797cce286f
+MISC metadata.xml 827 BLAKE2B 3a06fcafb74d62d5edd44cd958f72c11da88dfb22becf03d6af168d4cf7d0f21f198df024be409cabae066de5a088064b86141668ebf31cdf984c87f477a184a SHA512 7c9b7c73eaaac80da5d48089c2537e26edf2e5788eafdef53416f84389fa88c5f3f470d888a8af4641a75303bab57226e82bb96e46c3bc66042890e1b1cd3204
diff --git a/dev-db/oracle-instantclient/files/12.1.0.2-makefile.patch b/dev-db/oracle-instantclient/files/12.1.0.2-makefile.patch
new file mode 100644
index 000000000000..999d8c35f0d6
--- /dev/null
+++ b/dev-db/oracle-instantclient/files/12.1.0.2-makefile.patch
@@ -0,0 +1,57 @@
+Fake demo_xe.mk found in Oracle eXpress Edition,
+known by CPAN DBD::Oracle (bug#165834).
+This provides absolute paths for headers and libraries.
+
+Paranoia drops those REMOVE lines.
+--- instantclient_12_1/sdk/demo/demo.mk
++++ instantclient_12_1/sdk/demo/demo.mk
+@@ -28,8 +28,9 @@
+ CC=/opt/SunProd/SUNWspro6.1/bin/CC
+ cc=/opt/SunProd/SUNWspro6.1/bin/cc
+
+-ICINCHOME=../
+-ICLIBHOME=../../
++LIBDIR=lib
++ICINCHOME=$(ORACLE_HOME)/
++ICLIBHOME=$(ORACLE_HOME)/$(LIBDIR)
+ ICLIBPATH=-L$(ICLIBHOME)
+ THREADLIBS=-lthread
+ CCLIB=$(ICLIBPATH) -locci -lclntsh $(THREADLIBS)
+@@ -64,18 +65,18 @@
+ all: clean buildoci $(OCCIDEMO) $(OCCIOBJDEMO)
+
+ buildoci: $(CLNCACHE) $(LIBCLNT) $(CDEMOOBJS)
+- $(MKLINK) $(ICLIBHOME)libclntsh$(SO_EXT).12.1 $(ICLIBHOME)libclntsh$(SO_EXT)
+- $(MKLINK) $(ICLIBHOME)libocci$(SO_EXT).12.1 $(ICLIBHOME)libocci$(SO_EXT)
++# $(MKLINK) $(ICLIBHOME)libclntsh$(SO_EXT).12.1 $(ICLIBHOME)libclntsh$(SO_EXT)
++# $(MKLINK) $(ICLIBHOME)libocci$(SO_EXT).12.1 $(ICLIBHOME)libocci$(SO_EXT)
+ $(CC) -o $(CDEMOEXE) $(LDFLAGS) $(CDEMOOBJS) $(CCLIB)
+- $(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT)
+- $(REMOVE) $(ICLIBHOME)libocci$(SO_EXT)
++# $(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT)
++# $(REMOVE) $(ICLIBHOME)libocci$(SO_EXT)
+
+ buildocci: $(CLNCACHE) $(LIBCLNT) $(OBJS)
+- $(MKLINK) $(ICLIBHOME)libclntsh$(SO_EXT).12.1 $(ICLIBHOME)libclntsh$(SO_EXT)
+- $(MKLINK) $(ICLIBHOME)libocci$(SO_EXT).12.1 $(ICLIBHOME)libocci$(SO_EXT)
++# $(MKLINK) $(ICLIBHOME)libclntsh$(SO_EXT).12.1 $(ICLIBHOME)libclntsh$(SO_EXT)
++# $(MKLINK) $(ICLIBHOME)libocci$(SO_EXT).12.1 $(ICLIBHOME)libocci$(SO_EXT)
+ $(CC) -o $(EXE) $(LDFLAGS) $(OBJS) $(CCLIB)
+- $(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT)
+- $(REMOVE) $(ICLIBHOME)libocci$(SO_EXT)
++# $(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT)
++# $(REMOVE) $(ICLIBHOME)libocci$(SO_EXT)
+
+ $(OCCIDEMO):
+ $(MAKE) -f $(MAKEFILE) buildocci OBJS=$@.o EXE=$@
+@@ -93,8 +94,8 @@
+
+ cleancache:
+ $(REMOVE) $(CACHEDIR)
+- $(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT)
+- $(REMOVE) $(ICLIBHOME)libocci$(SO_EXT)
++# $(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT)
++# $(REMOVE) $(ICLIBHOME)libocci$(SO_EXT)
+
+ clean: $(CLNCACHE)
+ $(REMOVE) cdemo81 cdemo81.o occidml occidml.o occiobj occiobj.o occiobjo* occiobjm* occiobj.h occiobjout.type
diff --git a/dev-db/oracle-instantclient/files/tnsnames.ora.sample b/dev-db/oracle-instantclient/files/tnsnames.ora.sample
new file mode 100644
index 000000000000..f0524f5993cd
--- /dev/null
+++ b/dev-db/oracle-instantclient/files/tnsnames.ora.sample
@@ -0,0 +1,93 @@
+# This file contains the syntax information for
+# the entries to be put in any tnsnames.ora file
+# The entries in this file are need based.
+# There are no defaults for entries in this file
+# that Sqlnet/Net3 use that need to be overridden
+#
+# Typically you could have two tnsnames.ora files
+# in the system, one that is set for the entire system
+# and is called the system tnsnames.ora file, and a
+# second file that is used by each user locally so that
+# he can override the definitions dictated by the system
+# tnsnames.ora file.
+
+# The entries in tnsnames.ora are an alternative to using
+# the names server with the onames adapter.
+# They are a collection of aliases for the addresses that
+# the listener(s) is(are) listening for a database or
+# several databases.
+
+# The following is the general syntax for any entry in
+# a tnsnames.ora file. There could be several such entries
+# tailored to the user's needs.
+
+<alias>= [ (DESCRIPTION_LIST = # Optional depending on whether u have
+ # one or more descriptions
+ # If there is just one description, unnecessary ]
+ (DESCRIPTION=
+ [ (SDU=2048) ] # Optional, defaults to 2048
+ # Can take values between 512 and 32K
+ [ (ADDRESS_LIST= # Optional depending on whether u have
+ # one or more addresses
+ # If there is just one address, unnecessary ]
+ (ADDRESS=
+ [ (COMMUNITY=<community_name>) ]
+ (PROTOCOL=tcp)
+ (HOST=<hostname>)
+ (PORT=<portnumber (1521 is a standard port used)>)
+ )
+ [ (ADDRESS=
+ (PROTOCOL=ipc)
+ (KEY=<ipckey (PNPKEY is a standard key used)>)
+ )
+ ]
+ [ (ADDRESS=
+ [ (COMMUNITY=<community_name>) ]
+ (PROTOCOL=decnet)
+ (NODE=<nodename>)
+ (OBJECT=<objectname>)
+ )
+ ]
+ ... # More addresses
+ [ ) ] # Optional depending on whether ADDRESS_LIST is used or not
+ [ (CONNECT_DATA=
+ (SID=<oracle_sid>)
+ [ (GLOBAL_NAME=<global_database_name>) ]
+ )
+ ]
+ [ (SOURCE_ROUTE=yes) ]
+ )
+ (DESCRIPTION=
+ [ (SDU=2048) ] # Optional, defaults to 2048
+ # Can take values between 512 and 32K
+ [ (ADDRESS_LIST= ] # Optional depending on whether u have more
+ # than one address or not
+ # If there is just one address, unnecessary
+ (ADDRESS
+ [ (COMMUNITY=<community_name>) ]
+ (PROTOCOL=tcp)
+ (HOST=<hostname>)
+ (PORT=<portnumber (1521 is a standard port used)>)
+ )
+ [ (ADDRESS=
+ (PROTOCOL=ipc)
+ (KEY=<ipckey (PNPKEY is a standard key used)>)
+ )
+ ]
+ ... # More addresses
+ [ ) ] # Optional depending on whether ADDRESS_LIST
+ # is being used
+ [ (CONNECT_DATA=
+ (SID=<oracle_sid>)
+ [ (GLOBAL_NAME=<global_database_name>) ]
+ )
+ ]
+ [ (SOURCE_ROUTE=yes) ]
+ )
+ [ (CONNECT_DATA=
+ (SID=<oracle_sid>)
+ [ (GLOBAL_NAME=<global_database_name>) ]
+ )
+ ]
+ ... # More descriptions
+ [ ) ] # Optional depending on whether DESCRIPTION_LIST is used or not
diff --git a/dev-db/oracle-instantclient/metadata.xml b/dev-db/oracle-instantclient/metadata.xml
new file mode 100644
index 000000000000..4021726b1f0e
--- /dev/null
+++ b/dev-db/oracle-instantclient/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>haubi@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+ Free, light-weight and easily installed Oracle Database libraries
+ and SDKs for building and connecting client applications to local
+ or remote Oracle Databases.
+ </longdescription>
+ <use>
+ <flag name="jdbc">Support for XA, Internationalization, and RowSet operations under JDBC</flag>
+ <flag name="odbc">Libraries for enabling ODBC applications</flag>
+ <flag name="sdk">Header files and an example makefile for developing Oracle applications</flag>
+ <flag name="sqlplus">Libraries and executable for running SQL*Plus</flag>
+ <flag name="tools">Workload Replay Client</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-db/oracle-instantclient/oracle-instantclient-12.1.0.2.ebuild b/dev-db/oracle-instantclient/oracle-instantclient-12.1.0.2.ebuild
new file mode 100644
index 000000000000..a9ec364908a1
--- /dev/null
+++ b/dev-db/oracle-instantclient/oracle-instantclient-12.1.0.2.ebuild
@@ -0,0 +1,303 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit eutils versionator pax-utils multilib-minimal
+
+MY_PVM=$(get_version_component_range 1-2)
+
+MY_PLAT_x86="Linux x86"
+MY_BITS_x86=32
+MY_A_x86="${PN/oracle-/}-basic-linux-${PV}.0.zip"
+MY_A_x86_sdk="${MY_A_x86/basic/sdk}"
+MY_A_x86_odbc="${MY_A_x86/basic/odbc}"
+MY_A_x86_jdbc="${MY_A_x86/basic/jdbc}"
+MY_A_x86_sqlplus="${MY_A_x86/basic/sqlplus}"
+MY_A_x86_tools="${MY_A_x86/basic/tools}"
+
+MY_PLAT_amd64="Linux x86-64"
+MY_BITS_amd64=64
+MY_A_amd64="${PN/oracle-}-basic-linux.x64-${PV}.0.zip"
+MY_A_amd64_sdk="${MY_A_amd64/basic/sdk}"
+MY_A_amd64_odbc="${MY_A_amd64/basic/odbc}"
+MY_A_amd64_jdbc="${MY_A_amd64/basic/jdbc}"
+MY_A_amd64_sqlplus="${MY_A_amd64/basic/sqlplus}"
+MY_A_amd64_tools="${MY_A_amd64/basic/tools}"
+
+DESCRIPTION="Oracle 12c Instant Client with SDK"
+HOMEPAGE="http://www.oracle.com/technetwork/database/features/instant-client/index.html"
+SRC_URI="
+ abi_x86_32? (
+ ${MY_A_x86}
+ odbc? ( ${MY_A_x86_odbc} )
+ jdbc? ( ${MY_A_x86_jdbc} )
+ !abi_x86_64? (
+ sdk? ( ${MY_A_x86_sdk} )
+ sqlplus? ( ${MY_A_x86_sqlplus} )
+ tools? ( ${MY_A_x86_tools} )
+ ) )
+ abi_x86_64? (
+ ${MY_A_amd64}
+ odbc? ( ${MY_A_amd64_odbc} )
+ jdbc? ( ${MY_A_amd64_jdbc} )
+ sdk? ( ${MY_A_amd64_sdk} )
+ sqlplus? ( ${MY_A_amd64_sqlplus} )
+ tools? ( ${MY_A_amd64_tools} )
+ )
+"
+
+LICENSE="OTN"
+SLOT="0/${MY_PVM}"
+KEYWORDS="~amd64 ~x86"
+RESTRICT="fetch splitdebug"
+IUSE="jdbc odbc +sdk +sqlplus tools"
+
+DEPEND="app-arch/unzip"
+RDEPEND="
+ >=dev-libs/libaio-0.3.109-r5[${MULTILIB_USEDEP}]
+ !<dev-db/oracle-instantclient-basic-12
+ !<dev-db/oracle-instantclient-odbc-12
+ !<dev-db/oracle-instantclient-jdbc-12
+ !<dev-db/oracle-instantclient-sqlplus-12
+"
+
+S="${WORKDIR}"
+
+QA_PREBUILT="usr/lib*/oracle/*/client/lib*/lib*"
+
+set_my_abivars() {
+ S="${WORKDIR}/${ABI}/instantclient_$(
+ replace_version_separator 1 "_" "${MY_PVM}"
+ )"
+
+ local abi=${ABI}
+ [[ ${abi} == 'default' ]] && abi=${ARCH}
+ MY_PLAT=MY_PLAT_${abi} ; MY_PLAT=${!MY_PLAT} # platform name
+ MY_BITS=MY_BITS_${abi} ; MY_BITS=${!MY_BITS} # platform bitwidth
+ MY_A=MY_A_${abi} ; MY_A=${!MY_A} # runtime distfile
+ MY_A_sdk=MY_A_${abi}_sdk ; MY_A_sdk=${!MY_A_sdk} # sdk distfile
+ MY_A_odbc=MY_A_${abi}_odbc ; MY_A_odbc=${!MY_A_odbc} # odbc distfile
+ MY_A_jdbc=MY_A_${abi}_jdbc ; MY_A_jdbc=${!MY_A_jdbc} # jdbc distfile
+ MY_A_sqlplus=MY_A_${abi}_sqlplus; MY_A_sqlplus=${!MY_A_sqlplus} # sqlplus distfile
+ MY_A_tools=MY_A_${abi}_tools ; MY_A_tools=${!MY_A_tools} # tools distfile
+
+ [[ -n ${MY_PLAT} ]]
+}
+
+oic_distfile_status() {
+ if [[ -r ${DISTDIR}/${1} ]]; then
+ echo "already here"
+ else
+ echo "still absent"
+ fi
+}
+
+pkg_nofetch() {
+ eerror "Please go to"
+ eerror " ${HOMEPAGE%/*}/index-097480.html"
+ eerror " and download"
+ local ABI
+ for ABI in $(multilib_get_enabled_abis)
+ do
+ set_my_abivars || continue
+ eerror "Instant Client for ${MY_PLAT}"
+ eerror " Basic: ($(oic_distfile_status ${MY_A})) ${MY_A}"
+ use odbc &&
+ eerror " ODBC: ($(oic_distfile_status ${MY_A_odbc})) ${MY_A_odbc}"
+ use jdbc &&
+ eerror " JDBC: ($(oic_distfile_status ${MY_A_jdbc})) ${MY_A_jdbc}"
+ if multilib_is_native_abi; then
+ use sdk &&
+ eerror " SDK: ($(oic_distfile_status ${MY_A_sdk})) ${MY_A_sdk}"
+ use sqlplus &&
+ eerror " SQL*Plus: ($(oic_distfile_status ${MY_A_sqlplus})) ${MY_A_sqlplus}"
+ use tools &&
+ eerror " WRC: ($(oic_distfile_status ${MY_A_tools})) ${MY_A_tools}"
+ fi
+ done
+ eerror "After downloading these files (for *all* shown architectures), put them in:"
+ eerror " ${DISTDIR}/"
+}
+
+src_unpack() {
+ local ABI
+ for ABI in $(multilib_get_enabled_abis)
+ do
+ set_my_abivars || continue
+ mkdir "${WORKDIR}"/${ABI} || die
+ cd "${WORKDIR}"/${ABI} || die
+ unpack ${MY_A}
+ use odbc && unpack ${MY_A_odbc}
+ use jdbc && unpack ${MY_A_jdbc}
+ if multilib_is_native_abi; then
+ use sdk && unpack ${MY_A_sdk}
+ use sqlplus && unpack ${MY_A_sqlplus}
+ use tools && unpack ${MY_A_tools}
+ fi
+ done
+}
+
+src_prepare() {
+ use sdk && PATCHES=( "${FILESDIR}"/12.1.0.2-makefile.patch )
+ default
+}
+
+# silence configure&compile messages from multilib-minimal
+src_configure() { :; }
+src_compile() { :; }
+
+src_install() {
+ # all content goes here
+ local oracle_home=usr/$(get_libdir)/oracle/${MY_PVM}/client
+ into "/${oracle_home}"
+
+ local ldpath= ABI
+ for ABI in $(multilib_get_enabled_abis) # last iteration is final ABI
+ do
+ if ! set_my_abivars; then
+ elog "Skipping unsupported ABI ${ABI}."
+ continue
+ fi
+ einfo "Installing runtime for ${MY_PLAT} ..."
+
+ cd "${S}" || die
+
+ # shared libraries
+ dolib.so lib*$(get_libname)*
+
+ # ensure to be linkable
+ [[ -e libocci$(get_libname) ]] ||
+ dosym libocci$(get_libname ${MY_PVM}) \
+ "/${oracle_home}"/$(get_libdir)/libocci$(get_libname)
+ [[ -e libclntsh$(get_libname) ]] ||
+ dosym libclntsh$(get_libname ${MY_PVM}) \
+ "/${oracle_home}"/$(get_libdir)/libclntsh$(get_libname)
+
+ # java archives
+ insinto "/${oracle_home}"/$(get_libdir)
+ doins *.jar
+
+ # runtime library path
+ ldpath+=${ldpath:+:}/${oracle_home}/$(get_libdir)
+
+ eend $?
+ done
+
+ local DOCS=()
+ local HTML_DOCS=()
+ local paxbins=( adrci genezi uidrvci )
+ local scripts=()
+
+ use sqlplus && paxbins+=( sqlplus )
+ use tools && paxbins+=( wrc )
+
+ if use odbc; then
+ scripts+=( odbc_update_ini.sh )
+ HTML_DOCS+=( ODBC_IC_Readme_Unix.html help )
+ fi
+
+ einfo "Installing binaries for ${MY_PLAT} ..."
+ dobin ${paxbins[@]} ${scripts}
+ cd "${ED}${oracle_home}"/bin || die
+ pax-mark -c ${paxbins[@]} || die
+ cd "${S}" || die
+ eend $?
+
+ if use sqlplus; then
+ insinto "/${oracle_home}"/sqlplus/admin
+ doins glogin.sql
+ dosym "/${oracle_home}"/bin/sqlplus /usr/bin/sqlplus
+ fi
+
+ if use sdk; then
+ einfo "Installing SDK ..."
+
+ DOCS+=( sdk/demo )
+ cd "${S}"/sdk || die
+
+ # SDK makefile, for #165834
+ # As we change the relative filesystem layout compared
+ # to vanilla instantclient.zip content, it feels easier
+ # to fake the layout found in Oracle eXpress Edition.
+ # Both layouts are known to DBD::Oracle (cpan).
+ insinto "/${oracle_home}"/rdbms/demo
+ newins demo/demo.mk demo_xe.mk
+
+ # Remove ldap.h, #299562
+ rm include/ldap.h || die
+ # DBD::Oracle needs rdbms/public as real directory
+ insinto "/${oracle_home}"/rdbms/public
+ doins include/*.h
+ dosym rdbms/public "/${oracle_home}"/include
+ # ruby-oci8 expects the headers here
+ dosym "/${oracle_home}"/rdbms/public /usr/include/oracle/${MY_PVM}/client
+
+ # ott
+ insinto "/${oracle_home}"/$(get_libdir)
+ dobin ott
+ doins *.zip
+
+ # more files found in the zip
+ insinto "/${oracle_home}"/admin
+ doins admin/oraaccess.xsd
+
+ eend $?
+ fi
+
+ cd "${S}" || die
+ einstalldocs
+
+ # create path for tnsnames.ora
+ insinto /etc/oracle
+ doins "${FILESDIR}"/tnsnames.ora.sample
+
+ # Add OCI libs to library path
+ {
+ echo "# ${EPREFIX}/etc/env.d/50${PN}"
+ echo "# Do not edit this file, but 99${PN} instead"
+ echo
+ echo "ORACLE_HOME=${EPREFIX}/${oracle_home}"
+ echo "LDPATH=${ldpath}"
+ echo "TNS_ADMIN=/etc/oracle/"
+ } > "${T}"/50${PN}
+
+ doenvd "${T}"/50${PN}
+
+ # ensure ORACLE_HOME/lib exists
+ [[ -e ${ED}${oracle_home}/lib/. ]] ||
+ dosym $(get_libdir) "${oracle_home}"/lib
+}
+
+pkg_preinst() {
+ if [[ -r ${EROOT}/etc/env.d/99${PN} ]]; then
+ cp "${EROOT}/etc/env.d/99${PN}" "${ED}/etc/env.d/" || die
+ else
+ {
+ echo "# ${EPREFIX}/etc/env.d/99${PN}"
+ echo "# Configure system-wide defaults for your Oracle Instant Client here"
+ echo
+ echo "#$(grep '^ORACLE_HOME=' "${ED}/etc/env.d/50${PN}")"
+ echo "#$(grep '^TNS_ADMIN=' "${ED}/etc/env.d/50${PN}")"
+ echo "#NLS_LANG="
+ } > "${ED}/etc/env.d/99${PN}"
+ fi
+}
+
+pkg_postinst() {
+ elog "${P} does not provide an sqlnet.ora"
+ elog "configuration file, redirecting oracle diagnostics for database-"
+ elog "and network-issues into ~USER/oradiag_USER/ instead."
+ elog "It should be safe to ignore this message in sqlnet.log there:"
+ elog " Directory does not exist for read/write [ORACLE_HOME/client/log] []"
+ elog "See https://bugs.gentoo.org/show_bug.cgi?id=465252 for reference."
+ elog "If you want to directly analyse low-level debug info or don't want"
+ elog "to see it at all, so you really need an sqlnet.ora file, please"
+ elog "consult http://search.oracle.com/search/search?q=sqlnet.ora"
+ elog ""
+ elog "TNS_ADMIN has been set to ${EROOT}etc/oracle by default,"
+ elog "put your tnsnames.ora there or configure TNS_ADMIN"
+ elog "to point to your user specific configuration."
+ ewarn "Please re-source your shell settings for ORACLE_HOME"
+ ewarn " changes, such as: source /etc/profile"
+}
diff --git a/dev-db/oracle-instantclient/oracle-instantclient-12.2.0.1_p2.ebuild b/dev-db/oracle-instantclient/oracle-instantclient-12.2.0.1_p2.ebuild
new file mode 100644
index 000000000000..9bac87e49757
--- /dev/null
+++ b/dev-db/oracle-instantclient/oracle-instantclient-12.2.0.1_p2.ebuild
@@ -0,0 +1,315 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit eutils versionator pax-utils multilib-minimal
+
+MY_PVM=$(get_version_component_range 1-2)
+MYLIB_PVM=12.1
+
+MY_PV=$(get_version_component_range 1-4)
+MY_PVP=$(get_version_component_range 5) # p2
+
+MY_PLAT_x86="Linux x86"
+MY_BITS_x86=32
+MY_A_x86="${PN/oracle-/}-basic-linux-${MY_PV}.0.zip"
+MY_A_x86_sdk="${MY_A_x86/basic/sdk}"
+MY_A_x86_odbc="${MY_A_x86/basic/odbc}"
+MY_A_x86_jdbc="${MY_A_x86/basic/jdbc}"
+MY_A_x86_sqlplus="${MY_A_x86/basic/sqlplus}"
+MY_A_x86_tools="${MY_A_x86/basic/tools}"
+
+MY_PLAT_amd64="Linux x86-64"
+MY_BITS_amd64=64
+MY_A_amd64="${PN/oracle-}-basic-linux.x64-${MY_PV}.0.zip"
+MY_A_amd64_sdk="${MY_A_amd64/basic/sdk}"
+MY_A_amd64_odbc="${MY_A_amd64/basic/odbc}"
+MY_A_amd64_jdbc="${MY_A_amd64/basic/jdbc}"
+MY_A_amd64_sqlplus="${MY_A_amd64/basic/sqlplus}"
+MY_A_amd64_tools="${MY_A_amd64/basic/tools}"
+
+if [[ ${MY_PVP} == p* ]]
+then
+ MY_PVP=-${MY_PVP#p}
+ # Updated 9/22/2017: instantclient-odbc-linux-12.2.0.1.0-2.zip
+ MY_A_x86_odbc="${MY_A_x86_odbc%.zip}${MY_PVP}.zip"
+ MY_A_amd64_odbc="${MY_A_amd64_odbc%.zip}${MY_PVP}.zip"
+fi
+
+DESCRIPTION="Oracle 12c Instant Client with SDK"
+HOMEPAGE="http://www.oracle.com/technetwork/database/features/instant-client/index.html"
+SRC_URI="
+ abi_x86_32? (
+ ${MY_A_x86}
+ odbc? ( ${MY_A_x86_odbc} )
+ jdbc? ( ${MY_A_x86_jdbc} )
+ !abi_x86_64? (
+ sdk? ( ${MY_A_x86_sdk} )
+ sqlplus? ( ${MY_A_x86_sqlplus} )
+ tools? ( ${MY_A_x86_tools} )
+ ) )
+ abi_x86_64? (
+ ${MY_A_amd64}
+ odbc? ( ${MY_A_amd64_odbc} )
+ jdbc? ( ${MY_A_amd64_jdbc} )
+ sdk? ( ${MY_A_amd64_sdk} )
+ sqlplus? ( ${MY_A_amd64_sqlplus} )
+ tools? ( ${MY_A_amd64_tools} )
+ )
+"
+
+LICENSE="OTN"
+SLOT="0/${MYLIB_PVM}"
+KEYWORDS="~amd64 ~x86"
+RESTRICT="fetch splitdebug"
+IUSE="jdbc odbc +sdk +sqlplus tools"
+
+DEPEND="app-arch/unzip"
+RDEPEND="
+ >=dev-libs/libaio-0.3.109-r5[${MULTILIB_USEDEP}]
+ !<dev-db/oracle-instantclient-basic-12
+ !<dev-db/oracle-instantclient-odbc-12
+ !<dev-db/oracle-instantclient-jdbc-12
+ !<dev-db/oracle-instantclient-sqlplus-12
+"
+
+S="${WORKDIR}"
+
+QA_PREBUILT="usr/lib*/oracle/*/client/lib*/lib*"
+
+set_my_abivars() {
+ S="${WORKDIR}/${ABI}/instantclient_$(
+ replace_version_separator 1 "_" "${MY_PVM}"
+ )"
+
+ local abi=${ABI}
+ [[ ${abi} == 'default' ]] && abi=${ARCH}
+ MY_PLAT=MY_PLAT_${abi} ; MY_PLAT=${!MY_PLAT} # platform name
+ MY_BITS=MY_BITS_${abi} ; MY_BITS=${!MY_BITS} # platform bitwidth
+ MY_A=MY_A_${abi} ; MY_A=${!MY_A} # runtime distfile
+ MY_A_sdk=MY_A_${abi}_sdk ; MY_A_sdk=${!MY_A_sdk} # sdk distfile
+ MY_A_odbc=MY_A_${abi}_odbc ; MY_A_odbc=${!MY_A_odbc} # odbc distfile
+ MY_A_jdbc=MY_A_${abi}_jdbc ; MY_A_jdbc=${!MY_A_jdbc} # jdbc distfile
+ MY_A_sqlplus=MY_A_${abi}_sqlplus; MY_A_sqlplus=${!MY_A_sqlplus} # sqlplus distfile
+ MY_A_tools=MY_A_${abi}_tools ; MY_A_tools=${!MY_A_tools} # tools distfile
+
+ [[ -n ${MY_PLAT} ]]
+}
+
+oic_distfile_status() {
+ if [[ -r ${DISTDIR}/${1} ]]; then
+ echo "already here"
+ else
+ echo "still absent"
+ fi
+}
+
+pkg_nofetch() {
+ eerror "Please go to"
+ eerror " ${HOMEPAGE%/*}/index-097480.html"
+ eerror " and download"
+ local ABI
+ for ABI in $(multilib_get_enabled_abis)
+ do
+ set_my_abivars || continue
+ eerror "Instant Client for ${MY_PLAT}"
+ eerror " Basic: ($(oic_distfile_status ${MY_A})) ${MY_A}"
+ use odbc &&
+ eerror " ODBC: ($(oic_distfile_status ${MY_A_odbc})) ${MY_A_odbc}"
+ use jdbc &&
+ eerror " JDBC: ($(oic_distfile_status ${MY_A_jdbc})) ${MY_A_jdbc}"
+ if multilib_is_native_abi; then
+ use sdk &&
+ eerror " SDK: ($(oic_distfile_status ${MY_A_sdk})) ${MY_A_sdk}"
+ use sqlplus &&
+ eerror " SQL*Plus: ($(oic_distfile_status ${MY_A_sqlplus})) ${MY_A_sqlplus}"
+ use tools &&
+ eerror " WRC: ($(oic_distfile_status ${MY_A_tools})) ${MY_A_tools}"
+ fi
+ done
+ eerror "After downloading these files (for *all* shown architectures), put them in:"
+ eerror " ${DISTDIR}/"
+}
+
+src_unpack() {
+ local ABI
+ for ABI in $(multilib_get_enabled_abis)
+ do
+ set_my_abivars || continue
+ mkdir "${WORKDIR}"/${ABI} || die
+ cd "${WORKDIR}"/${ABI} || die
+ unpack ${MY_A}
+ use odbc && unpack ${MY_A_odbc}
+ use jdbc && unpack ${MY_A_jdbc}
+ if multilib_is_native_abi; then
+ use sdk && unpack ${MY_A_sdk}
+ use sqlplus && unpack ${MY_A_sqlplus}
+ use tools && unpack ${MY_A_tools}
+ fi
+ done
+}
+
+src_prepare() {
+ use sdk && PATCHES=( "${FILESDIR}"/12.1.0.2-makefile.patch )
+ default
+}
+
+# silence configure&compile messages from multilib-minimal
+src_configure() { :; }
+src_compile() { :; }
+
+src_install() {
+ # all content goes here
+ local oracle_home=usr/$(get_libdir)/oracle/${MY_PVM}/client
+ into "/${oracle_home}"
+
+ local ldpath= ABI
+ for ABI in $(multilib_get_enabled_abis) # last iteration is final ABI
+ do
+ if ! set_my_abivars; then
+ elog "Skipping unsupported ABI ${ABI}."
+ continue
+ fi
+ einfo "Installing runtime for ${MY_PLAT} ..."
+
+ cd "${S}" || die
+
+ # shared libraries
+ dolib.so lib*$(get_libname)*
+
+ # ensure to be linkable
+ [[ -e libocci$(get_libname) ]] ||
+ dosym libocci$(get_libname ${MYLIB_PVM}) \
+ "/${oracle_home}"/$(get_libdir)/libocci$(get_libname)
+ [[ -e libclntsh$(get_libname) ]] ||
+ dosym libclntsh$(get_libname ${MYLIB_PVM}) \
+ "/${oracle_home}"/$(get_libdir)/libclntsh$(get_libname)
+
+ # java archives
+ insinto "/${oracle_home}"/$(get_libdir)
+ doins *.jar
+
+ # runtime library path
+ ldpath+=${ldpath:+:}/${oracle_home}/$(get_libdir)
+
+ eend $?
+ done
+
+ local DOCS=()
+ local HTML_DOCS=()
+ local paxbins=( adrci genezi uidrvci )
+ local scripts=()
+
+ use sqlplus && paxbins+=( sqlplus )
+ use tools && paxbins+=( wrc )
+
+ if use odbc; then
+ scripts+=( odbc_update_ini.sh )
+ HTML_DOCS+=( ODBC_IC_Readme_Unix.html help )
+ fi
+
+ einfo "Installing binaries for ${MY_PLAT} ..."
+ dobin ${paxbins[@]} ${scripts}
+ cd "${ED}${oracle_home}"/bin || die
+ pax-mark -c ${paxbins[@]} || die
+ cd "${S}" || die
+ eend $?
+
+ if use sqlplus; then
+ insinto "/${oracle_home}"/sqlplus/admin
+ doins glogin.sql
+ dosym "/${oracle_home}"/bin/sqlplus /usr/bin/sqlplus
+ fi
+
+ if use sdk; then
+ einfo "Installing SDK ..."
+
+ DOCS+=( sdk/demo )
+ cd "${S}"/sdk || die
+
+ # SDK makefile, for #165834
+ # As we change the relative filesystem layout compared
+ # to vanilla instantclient.zip content, it feels easier
+ # to fake the layout found in Oracle eXpress Edition.
+ # Both layouts are known to DBD::Oracle (cpan).
+ insinto "/${oracle_home}"/rdbms/demo
+ newins demo/demo.mk demo_xe.mk
+
+ # Remove ldap.h, #299562
+ rm include/ldap.h || die
+ # DBD::Oracle needs rdbms/public as real directory
+ insinto "/${oracle_home}"/rdbms/public
+ doins include/*.h
+ dosym rdbms/public "/${oracle_home}"/include
+ # ruby-oci8 expects the headers here
+ dosym "/${oracle_home}"/rdbms/public /usr/include/oracle/${MYLIB_PVM}/client
+
+ # ott
+ insinto "/${oracle_home}"/$(get_libdir)
+ dobin ott
+ doins *.zip
+
+ # more files found in the zip
+ insinto "/${oracle_home}"/admin
+ doins admin/oraaccess.xsd
+
+ eend $?
+ fi
+
+ cd "${S}" || die
+ einstalldocs
+
+ # create path for tnsnames.ora
+ insinto /etc/oracle
+ doins "${FILESDIR}"/tnsnames.ora.sample
+
+ # Add OCI libs to library path
+ {
+ echo "# ${EPREFIX}/etc/env.d/50${PN}"
+ echo "# Do not edit this file, but 99${PN} instead"
+ echo
+ echo "ORACLE_HOME=${EPREFIX}/${oracle_home}"
+ echo "LDPATH=${ldpath}"
+ echo "TNS_ADMIN=/etc/oracle/"
+ } > "${T}"/50${PN}
+
+ doenvd "${T}"/50${PN}
+
+ # ensure ORACLE_HOME/lib exists
+ [[ -e ${ED}${oracle_home}/lib/. ]] ||
+ dosym $(get_libdir) "${oracle_home}"/lib
+}
+
+pkg_preinst() {
+ if [[ -r ${EROOT}/etc/env.d/99${PN} ]]; then
+ cp "${EROOT}/etc/env.d/99${PN}" "${ED}/etc/env.d/" || die
+ else
+ {
+ echo "# ${EPREFIX}/etc/env.d/99${PN}"
+ echo "# Configure system-wide defaults for your Oracle Instant Client here"
+ echo
+ echo "#$(grep '^ORACLE_HOME=' "${ED}/etc/env.d/50${PN}")"
+ echo "#$(grep '^TNS_ADMIN=' "${ED}/etc/env.d/50${PN}")"
+ echo "#NLS_LANG="
+ } > "${ED}/etc/env.d/99${PN}"
+ fi
+}
+
+pkg_postinst() {
+ elog "${P} does not provide an sqlnet.ora"
+ elog "configuration file, redirecting oracle diagnostics for database-"
+ elog "and network-issues into ~USER/oradiag_USER/ instead."
+ elog "It should be safe to ignore this message in sqlnet.log there:"
+ elog " Directory does not exist for read/write [ORACLE_HOME/client/log] []"
+ elog "See https://bugs.gentoo.org/show_bug.cgi?id=465252 for reference."
+ elog "If you want to directly analyse low-level debug info or don't want"
+ elog "to see it at all, so you really need an sqlnet.ora file, please"
+ elog "consult http://search.oracle.com/search/search?q=sqlnet.ora"
+ elog ""
+ elog "TNS_ADMIN has been set to ${EROOT}etc/oracle by default,"
+ elog "put your tnsnames.ora there or configure TNS_ADMIN"
+ elog "to point to your user specific configuration."
+ ewarn "Please re-source your shell settings for ORACLE_HOME"
+ ewarn " changes, such as: source /etc/profile"
+}
diff --git a/dev-db/percona-server-5.6.39.83.1 b/dev-db/percona-server-5.6.39.83.1
deleted file mode 100644
index b6021fdabb61..000000000000
--- a/dev-db/percona-server-5.6.39.83.1
+++ /dev/null
@@ -1,16 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst preinst prepare pretend setup test unpack
-DEPEND=numa? ( sys-process/numactl:= ) server? ( pam? ( virtual/pam:0= ) ) tokudb? ( app-arch/snappy ) tokudb-backup-plugin? ( dev-util/valgrind ) || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) test? ( || ( ( >=dev-lang/python-2.7.5-r2:2.7 dev-python/mysql-python[python_targets_python2_7(-),python_single_target_python2_7(+)] ) ) dev-perl/JSON ) virtual/pkgconfig sys-devel/make >=dev-util/cmake-3.9.6 kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 !dev-db/mariadb-native-client[mysqlcompat] jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) openssl? ( >=dev-libs/openssl-1.0.0:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) >=sys-libs/zlib-1.2.3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] sys-libs/ncurses:0= virtual/yacc static? ( sys-libs/ncurses[static-libs] )
-DESCRIPTION=An enhanced, drop-in replacement for MySQL from the Percona team
-EAPI=6
-HOMEPAGE=https://www.percona.com/software/percona-server
-IUSE=numa pam tokudb tokudb-backup-plugin kernel_linux abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64 debug embedded extraengine jemalloc latin1 libressl +openssl +perl profiling selinux +server systemtap static static-libs tcmalloc test yassl
-KEYWORDS=~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x86-linux
-LICENSE=GPL-2
-PDEPEND=perl? ( >=dev-perl/DBD-mysql-2.9004 ) server? ( ~virtual/mysql-5.6[embedded=,static=] ) virtual/libmysqlclient:0/18[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs=]
-RDEPEND=numa? ( sys-process/numactl:= ) server? ( pam? ( virtual/pam:0= ) ) tokudb? ( app-arch/snappy ) tokudb-backup-plugin? ( dev-util/valgrind ) kernel_linux? ( sys-process/procps:0= dev-libs/libaio:0= ) >=sys-apps/sed-4 >=sys-apps/texinfo-4.7-r1 !dev-db/mariadb-native-client[mysqlcompat] jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) systemtap? ( >=dev-util/systemtap-1.3:0= ) openssl? ( >=dev-libs/openssl-1.0.0:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] ) >=sys-libs/zlib-1.2.3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,static-libs?] sys-libs/ncurses:0= selinux? ( sec-policy/selinux-mysql ) !dev-db/mysql !dev-db/mariadb !dev-db/mariadb-galera !dev-db/mysql-cluster server? ( !prefix? ( dev-db/mysql-init-scripts ) ) !<virtual/mysql-5.6-r4
-REQUIRED_USE=tokudb-backup-plugin? ( tokudb ) tokudb? ( jemalloc !tcmalloc ) ^^ ( yassl openssl libressl ) !server? ( !extraengine !embedded ) ?? ( tcmalloc jemalloc ) static? ( !libressl !openssl yassl )
-RESTRICT=libressl? ( test )
-SLOT=0/18
-SRC_URI=http://www.percona.com/redir/downloads/Percona-Server-5.6/Percona-Server-5.6.39-83.1/source/tarball/percona-server-5.6.39-83.1.tar.gz mirror://gentoo/mysql-extras-20171121-1518Z.tar.bz2 https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-20171121-1518Z.tar.bz2 https://dev.gentoo.org/~grknight/distfiles/mysql-extras-20171121-1518Z.tar.bz2 https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-20171121-1518Z.tar.bz2 https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-20171121-1518Z.tar.bz2
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 linux-info 8e77ea4def23d38cdf0e8ffa69187d34 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 multiprocessing cac3169468f893670dac3e7cb940e045 mysql-multilib-r1 9823899e303dd74138fef85f4a116e13 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 python-any-r1 6faea633ae2f79f6d55dcfd431b79fbf python-utils-r1 7db901256449fef43c3aaa4d486c1c63 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=79c52cf93b0d1ea94be800fec7565f47
diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
new file mode 100644
index 000000000000..37a3ee0fd331
--- /dev/null
+++ b/dev-db/percona-server/Manifest
@@ -0,0 +1,5 @@
+AUX my.cnf-5.6 4568 BLAKE2B 633cc45bcc751046ef766dcabd1c8db2cd474f13cde436d41698a810787bc52cc8c11aee79c49ed884f4b01ea26fad11f9ffab08471eb10d6752007fd44d372b SHA512 498826f147ad01615358111511c88f671ff823c400782dbad5f359aff99fa88a7be66e3c3b42fd58a5634f17e12f6a18e1896340f1a5a7acecd75320671c3a10
+DIST mysql-extras-20171121-1518Z.tar.bz2 313539 BLAKE2B c397fdf7ffb3fcbcecda20933e18234062a9500dcf4031e9b17131e2a1f23dca7535ed33ff541fc075eb9995c67a9a8fd7261d7524dd42d8d333543c368b4c15 SHA512 dd0d4a00c0ed710e786d157a73f02c6f555ab7a68e57014d958627096a4245a0b45d22ec860dc5389002d106554e80166661c0b6ddcadff1f737e3fa195badda
+DIST percona-server-5.6.39-83.1.tar.gz 56307662 BLAKE2B 474e497a83e7a8f7bf628b2622a0bfeead0f5003ed87dd4228e85a8b1c75bfdfc40f75604e9ed621f6d143d69bcada29163bf140b765951cf0b23e5660623e52 SHA512 d014bc0ebf8d8f1842b4a79eb0a868e3c9e0e33d3eb3cbf301b5504dcb341e1f2a0d6c2c4003666f59fbf75eb274356ee6b059ff2cddf2b457143ee5e1aba471
+EBUILD percona-server-5.6.39.83.1.ebuild 8506 BLAKE2B fe867adcb0963c377b7f06ccba8b4d49fa878390321c5dd77562e27527c9503182cdd853fbcd42c5558d3ff8cb4676ec0e251fc65331bd31419bf92907ba8b2b SHA512 fd146e3f0db22253af87e4c98c34285ff9fd39bb640ab968cd58ee181d8b573c970ec71e7f34aa0999a05e6d4537055f4f588a2434412881431747e5c79c31ea
+MISC metadata.xml 1505 BLAKE2B 63c11ed734843c7f07a7b71525f21113828cf7bea4fe9f15cbfde952f5e27fbeb8ad1942306a3224478c1a2d19f2ea22d26ee124db19fa7122d573095f98847e SHA512 0ccb7a31827fa15606e060522daf9364bc843a64cfca8538292e989546e07784ea7a8af54ea7a1b02675c64515a1f2225b22971cda4110610836770d1ff33dd6
diff --git a/dev-db/percona-server/files/my.cnf-5.6 b/dev-db/percona-server/files/my.cnf-5.6
new file mode 100644
index 000000000000..047c8d79be41
--- /dev/null
+++ b/dev-db/percona-server/files/my.cnf-5.6
@@ -0,0 +1,140 @@
+# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file.
+
+# The following options will be passed to all MySQL clients
+[client]
+#password = your_password
+port = 3306
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
+
+[mysql]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqladmin]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlcheck]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqldump]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlimport]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlshow]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[myisamchk]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+
+[myisampack]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+
+# use [safe_mysqld] with mysql-3
+[mysqld_safe]
+err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err
+
+# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations
+[mysqld]
+character-set-server = utf8
+user = mysql
+port = 3306
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
+pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid
+log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err
+basedir = @GENTOO_PORTAGE_EPREFIX@/usr
+datadir = @DATADIR@
+skip-external-locking
+key_buffer_size = 16M
+max_allowed_packet = 4M
+table_open_cache = 400
+sort_buffer_size = 512K
+net_buffer_length = 16K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql
+#Set this to your desired error message language
+lc_messages = en_US
+
+# security:
+# using "localhost" in connects uses sockets by default
+# skip-networking
+bind-address = 127.0.0.1
+
+log-bin
+server-id = 1
+
+# point the following paths to different dedicated disks
+tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/
+#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname
+
+# you need the debug USE flag enabled to use the following directives,
+# if needed, uncomment them, start the server and issue
+# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace
+# this will show you *exactly* what's happening in your server ;)
+
+#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql
+#gdb
+#debug = d:t:i:o,/tmp/mysqld.trace
+#one-thread
+
+# the rest of the innodb config follows:
+# don't eat too much memory, we're trying to be safe on 64Mb boxes
+# you might want to bump this up a bit on boxes with more RAM
+innodb_buffer_pool_size = 128M
+#
+# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-(
+# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route
+# we have to take for the moment
+#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+#innodb_log_arch_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+# you may wish to change this size to be more suitable for your system
+# the max is there to avoid run-away growth on your machine
+innodb_data_file_path = ibdata1:10M:autoextend:max:128M
+# we keep this at around 25% of of innodb_buffer_pool_size
+# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size)
+innodb_log_file_size = 48M
+# this is the default, increase it if you have very large transactions going on
+innodb_log_buffer_size = 8M
+# this is the default and won't hurt you
+# you shouldn't need to tweak it
+innodb_log_files_in_group=2
+# see the innodb config docs, the other options are not always safe
+innodb_flush_log_at_trx_commit = 1
+innodb_lock_wait_timeout = 50
+innodb_file_per_table
+
+# Uncomment this to get FEDERATED engine support
+#plugin-load=federated=ha_federated.so
+loose-federated
+
+[mysqldump]
+quick
+max_allowed_packet = 16M
+
+[mysql]
+# uncomment the next directive if you are not familiar with SQL
+#safe-updates
+
+[isamchk]
+key_buffer_size = 20M
+sort_buffer_size = 20M
+read_buffer = 2M
+write_buffer = 2M
+
+[myisamchk]
+key_buffer_size = 20M
+sort_buffer_size = 20M
+read_buffer_size = 2M
+write_buffer_size = 2M
+
+[mysqlhotcopy]
+interactive-timeout
diff --git a/dev-db/percona-server/metadata.xml b/dev-db/percona-server/metadata.xml
new file mode 100644
index 000000000000..0754114167f5
--- /dev/null
+++ b/dev-db/percona-server/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>mysql-bugs@gentoo.org</email>
+ <name>MySQL</name>
+ </maintainer>
+<use>
+ <flag name="embedded">Build embedded server (libmysqld)</flag>
+ <flag name="extraengine">Add support for alternative storage engines (Archive, CSV, Blackhole, Federated(X), Partition)</flag>
+ <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for allocations.</flag>
+ <flag name="latin1">Use LATIN1 encoding instead of UTF8</flag>
+ <flag name="libressl">Enable SSL connections and crypto functions using <pkg>dev-libs/libressl</pkg></flag>
+ <flag name="numa">Enable NUMA support using <pkg>sys-process/numactl</pkg> (NUMA kernel support is also required)</flag>
+ <flag name="openssl">Enable SSL connections and crypto functions using <pkg>dev-libs/openssl</pkg></flag>
+ <flag name="profiling">Add support for statement profiling (requires USE=community).</flag>
+ <flag name="server">Build the server program</flag>
+ <flag name="systemtap">Build support for profiling and tracing using <pkg>dev-util/systemtap</pkg></flag>
+ <flag name="test">Install upstream testsuites for end use.</flag>
+ <flag name="tokudb">Add support for TokuDB storage engine</flag>
+ <flag name="tokudb-backup-plugin">Builds the TokuDB backup plugin</flag>
+ <flag name="yassl">Enable SSL connections and crypto functions using the bundled yaSSL</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-db/percona-server/percona-server-5.6.39.83.1.ebuild b/dev-db/percona-server/percona-server-5.6.39.83.1.ebuild
new file mode 100644
index 000000000000..2e7499a7dc6e
--- /dev/null
+++ b/dev-db/percona-server/percona-server-5.6.39.83.1.ebuild
@@ -0,0 +1,243 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+MY_EXTRAS_VER="20171121-1518Z"
+SUBSLOT="18"
+PYTHON_COMPAT=( python2_7 )
+# Build fails with ninja
+CMAKE_MAKEFILE_GENERATOR="emake"
+inherit linux-info python-any-r1 mysql-multilib-r1 toolchain-funcs
+
+IUSE="numa pam tokudb tokudb-backup-plugin"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x86-linux"
+HOMEPAGE="https://www.percona.com/software/percona-server"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+COMMON_DEPEND="numa? ( sys-process/numactl:= )
+ server? ( pam? ( virtual/pam:0= ) )
+ tokudb? ( app-arch/snappy )
+ tokudb-backup-plugin? ( dev-util/valgrind )
+ "
+
+DEPEND="${COMMON_DEPEND}
+ || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+ test? (
+ $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]')
+ dev-perl/JSON
+ )"
+RDEPEND="${COMMON_DEPEND}"
+
+REQUIRED_USE="tokudb-backup-plugin? ( tokudb ) tokudb? ( jemalloc !tcmalloc )"
+
+MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
+
+PATCHES=(
+ "${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
+ "${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
+ "${MY_PATCH_DIR}"/20001_all_fix-minimal-build-cmake-mysql-5.6.20.patch
+ "${MY_PATCH_DIR}"/20006_all_cmake_elib-percona-5.6.34.patch
+ "${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
+ "${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.6.37.patch
+ "${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
+ "${MY_PATCH_DIR}"/20018_all_percona-server-5.6.25-without-clientlibs-tools.patch
+)
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+pkg_pretend() {
+ mysql-multilib-r1_pkg_pretend
+
+ if use numa; then
+ 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
+}
+
+python_check_deps() {
+ has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
+}
+
+src_prepare() {
+ mysql-multilib-r1_src_prepare
+ if use libressl ; then
+ sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+ "${S}/cmake/ssl.cmake" || die
+ fi
+}
+
+src_configure() {
+ local MYSQL_CMAKE_NATIVE_DEFINES=( -DWITH_NUMA=$(usex numa)
+ -DWITH_PAM=$(usex pam)
+ $(mysql-cmake_use_plugin tokudb TOKUDB)
+ )
+ if use tokudb ; then
+ # TokuDB Backup plugin requires valgrind unconditionally
+ MYSQL_CMAKE_NATIVE_DEFINES+=(
+ $(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1)
+ )
+ fi
+ mysql-multilib-r1_src_configure
+}
+
+# Official test instructions:
+# USE='extraengine perl openssl static-libs' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild percona-server-X.X.XX.ebuild \
+# digest clean package
+multilib_src_test() {
+
+ if ! multilib_is_native_abi ; then
+ einfo "Server tests not available on non-native abi".
+ return 0;
+ fi
+
+ if ! use server ; then
+ einfo "Skipping server tests due to minimal build."
+ return 0
+ fi
+
+ local TESTDIR="${CMAKE_BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ # 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 [[ $UID -eq 0 ]]; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+ # Run CTest (test-units)
+ cmake-utils_src_test
+ retstatus_unit=$?
+ [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+ # Enable parallel testing, auto will try to detect number of cores
+ # You may set this by hand.
+ # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
+ export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
+
+ # create directories because mysqladmin might right out of order
+ mkdir -p "${T}"/var-tests{,/log}
+
+ # These are failing in Percona 5.6 for now and are believed to be
+ # false positives:
+ #
+ # main.information_schema, binlog.binlog_statement_insert_delayed,
+ # main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter
+ # perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt
+ # funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers
+ # engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate
+ # engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8
+ # engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate
+ # fails due to USE=-latin1 / utf8 default
+ #
+ # main.mysql_client_test:
+ # segfaults at random under Portage only, suspect resource limits.
+ #
+ # main.percona_bug1289599
+ # Looks to be a syntax error in the test file itself
+ #
+ # main.variables main.myisam main.merge_recover
+ # fails due to ulimit not able to open enough files (needs 5000)
+ #
+ # main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
+ # Called with bad parameters should be reported upstream
+ #
+
+ local t
+
+ for t in main.mysql_client_test \
+ binlog.binlog_statement_insert_delayed main.information_schema \
+ main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \
+ perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \
+ funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \
+ main.variables main.myisam main.merge_recover \
+ engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \
+ engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \
+ engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \
+ main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do
+ mysql-multilib-r1_disable_test "$t" "False positives in Gentoo"
+ done
+
+ if use numa && use kernel_linux ; then
+ # bug 584880
+ if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
+ for t in sys_vars.innodb_buffer_pool_populate_basic ; do
+ mysql-multilib-r1_disable_test "$t" "Test $t requires system with NUMA support"
+ done
+ fi
+ fi
+
+ if ! use extraengine ; then
+ # bug 401673, 530766
+ for t in federated.federated_plugin ; do
+ mysql-multilib-r1_disable_test "$t" "Test $t requires USE=extraengine (Need federated engine)"
+ done
+ fi
+
+ # Run mysql tests
+ pushd "${TESTDIR}" || die
+
+ # Set file limits higher so tests run
+ 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
+
+ python_setup
+ # run mysql-test tests
+ perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
+ --testcase-timeout=30 --reorder
+ retstatus_tests=$?
+ [[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+
+ popd || die
+
+ # Cleanup is important for these testcases.
+ pkill -9 -f "${S}/ndb" 2>/dev/null
+ pkill -9 -f "${S}/sql" 2>/dev/null
+
+ failures=""
+ [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+ [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+ if [[ -n "$failures" ]]; then
+ has usersandbox $FEATURES && eerror "Some tests may have failed due to FEATURES=usersandbox"
+ die "Test failures: $failures"
+ fi
+
+ einfo "Tests successfully completed"
+}
diff --git a/dev-db/percona-toolkit-2.2.11 b/dev-db/percona-toolkit-2.2.11
deleted file mode 100644
index 272ecec7a7a5..000000000000
--- a/dev-db/percona-toolkit-2.2.11
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test unpack
-DEPEND=dev-perl/DBI dev-perl/DBD-mysql virtual/perl-Time-HiRes virtual/perl-ExtUtils-MakeMaker dev-lang/perl[-build(-)] dev-lang/perl[-build(-)]
-DESCRIPTION=essential command-line utilities for MySQL
-EAPI=5
-HOMEPAGE=http://www.percona.com/software/percona-toolkit/
-KEYWORDS=amd64 x86 ~amd64-linux ~x86-linux
-LICENSE=|| ( GPL-2 Artistic )
-RDEPEND=dev-perl/DBI dev-perl/DBD-mysql virtual/perl-Time-HiRes dev-perl/JSON dev-perl/libwww-perl dev-perl/Role-Tiny virtual/perl-File-Path virtual/perl-Getopt-Long virtual/perl-Time-Local virtual/perl-Digest-MD5 virtual/perl-IO-Compress virtual/perl-File-Temp virtual/perl-File-Spec virtual/perl-Scalar-List-Utils dev-perl/TermReadKey dev-lang/perl[-build(-)] dev-lang/perl[-build(-)]
-SLOT=0
-SRC_URI=http://www.percona.com/downloads/percona-toolkit/2.2.11/percona-toolkit-2.2.11.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 perl-app 4b65c2afee485a204b0b22518141ae47 perl-functions 01e8c68d5a528bbcda4d3c60205983df perl-module 863b35d127db98823d439f8d73c2d011 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=335a28d1380bfeb07d3d3d2c1ecbb53b
diff --git a/dev-db/percona-toolkit-2.2.17 b/dev-db/percona-toolkit-2.2.17
deleted file mode 100644
index ad9a3ed10f6f..000000000000
--- a/dev-db/percona-toolkit-2.2.17
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-perl/DBI dev-perl/DBD-mysql virtual/perl-Time-HiRes virtual/perl-ExtUtils-MakeMaker dev-lang/perl:=
-DESCRIPTION=Advanced command-line tools to perform a variety of MySQL and system tasks
-EAPI=6
-HOMEPAGE=https://www.percona.com/software/mysql-tools/percona-toolkit
-KEYWORDS=~amd64 ~x86 ~amd64-linux ~x86-linux
-LICENSE=|| ( GPL-2 Artistic )
-RDEPEND=dev-perl/DBI dev-perl/DBD-mysql virtual/perl-Time-HiRes dev-perl/JSON dev-perl/libwww-perl dev-perl/Role-Tiny virtual/perl-File-Path virtual/perl-Getopt-Long virtual/perl-Time-Local virtual/perl-Digest-MD5 virtual/perl-IO-Compress virtual/perl-File-Temp virtual/perl-File-Spec virtual/perl-Scalar-List-Utils dev-perl/TermReadKey dev-lang/perl:=
-SLOT=0
-SRC_URI=https://www.percona.com/downloads/percona-toolkit/2.2.17/tarball/percona-toolkit-2.2.17.tar.gz
-_eclasses_=multiprocessing cac3169468f893670dac3e7cb940e045 perl-functions 01e8c68d5a528bbcda4d3c60205983df perl-module 863b35d127db98823d439f8d73c2d011
-_md5_=9ef8dfc946c5d3931a0e661523361bb6
diff --git a/dev-db/percona-toolkit-2.2.19 b/dev-db/percona-toolkit-2.2.19
deleted file mode 100644
index 0399017e264b..000000000000
--- a/dev-db/percona-toolkit-2.2.19
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-perl/DBI dev-perl/DBD-mysql virtual/perl-Time-HiRes virtual/perl-ExtUtils-MakeMaker dev-lang/perl:=
-DESCRIPTION=Advanced command-line tools to perform a variety of MySQL and system tasks
-EAPI=6
-HOMEPAGE=https://www.percona.com/software/mysql-tools/percona-toolkit
-KEYWORDS=~amd64 ~x86 ~amd64-linux ~x86-linux
-LICENSE=|| ( GPL-2 Artistic )
-RDEPEND=dev-perl/DBI dev-perl/DBD-mysql virtual/perl-Time-HiRes dev-perl/JSON dev-perl/libwww-perl dev-perl/Role-Tiny virtual/perl-File-Path virtual/perl-Getopt-Long virtual/perl-Time-Local virtual/perl-Digest-MD5 virtual/perl-IO-Compress virtual/perl-File-Temp virtual/perl-File-Spec virtual/perl-Scalar-List-Utils dev-perl/TermReadKey dev-lang/perl:=
-SLOT=0
-SRC_URI=https://www.percona.com/downloads/percona-toolkit/2.2.19/tarball/percona-toolkit-2.2.19.tar.gz
-_eclasses_=multiprocessing cac3169468f893670dac3e7cb940e045 perl-functions 01e8c68d5a528bbcda4d3c60205983df perl-module 863b35d127db98823d439f8d73c2d011
-_md5_=ce721c9c175d50da1fc99b4b3621e452
diff --git a/dev-db/percona-toolkit-2.2.20 b/dev-db/percona-toolkit-2.2.20
deleted file mode 100644
index c962d3d76388..000000000000
--- a/dev-db/percona-toolkit-2.2.20
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-perl/DBI dev-perl/DBD-mysql virtual/perl-Time-HiRes virtual/perl-ExtUtils-MakeMaker dev-lang/perl:=
-DESCRIPTION=Advanced command-line tools to perform a variety of MySQL and system tasks
-EAPI=6
-HOMEPAGE=https://www.percona.com/software/mysql-tools/percona-toolkit
-KEYWORDS=amd64 x86 ~amd64-linux ~x86-linux
-LICENSE=|| ( GPL-2 Artistic )
-RDEPEND=dev-perl/DBI dev-perl/DBD-mysql virtual/perl-Time-HiRes dev-perl/JSON dev-perl/libwww-perl dev-perl/Role-Tiny virtual/perl-File-Path virtual/perl-Getopt-Long virtual/perl-Time-Local virtual/perl-Digest-MD5 virtual/perl-IO-Compress virtual/perl-File-Temp virtual/perl-File-Spec virtual/perl-Scalar-List-Utils dev-perl/TermReadKey dev-lang/perl:=
-SLOT=0
-SRC_URI=https://www.percona.com/downloads/percona-toolkit/2.2.20/tarball/percona-toolkit-2.2.20.tar.gz
-_eclasses_=multiprocessing cac3169468f893670dac3e7cb940e045 perl-functions 01e8c68d5a528bbcda4d3c60205983df perl-module 863b35d127db98823d439f8d73c2d011
-_md5_=692a0df13341f0a2fbe7c44f8a0fbc43
diff --git a/dev-db/percona-toolkit-3.0.10 b/dev-db/percona-toolkit-3.0.10
deleted file mode 100644
index 35f1d31179e1..000000000000
--- a/dev-db/percona-toolkit-3.0.10
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-perl/DBI dev-perl/DBD-mysql virtual/perl-Time-HiRes virtual/perl-ExtUtils-MakeMaker dev-lang/perl:=
-DESCRIPTION=Advanced command-line tools to perform a variety of MySQL and system tasks
-EAPI=6
-HOMEPAGE=https://www.percona.com/software/mysql-tools/percona-toolkit
-KEYWORDS=~amd64 ~x86 ~amd64-linux ~x86-linux
-LICENSE=|| ( GPL-2 Artistic )
-RDEPEND=dev-perl/DBI dev-perl/DBD-mysql virtual/perl-Time-HiRes dev-perl/JSON dev-perl/libwww-perl dev-perl/Role-Tiny virtual/perl-File-Path virtual/perl-Getopt-Long virtual/perl-Time-Local virtual/perl-Digest-MD5 virtual/perl-IO-Compress virtual/perl-File-Temp virtual/perl-File-Spec virtual/perl-Scalar-List-Utils dev-perl/TermReadKey dev-lang/perl:=
-SLOT=0
-SRC_URI=https://www.percona.com/downloads/percona-toolkit/3.0.10/source/tarball/percona-toolkit-3.0.10.tar.gz
-_eclasses_=multiprocessing cac3169468f893670dac3e7cb940e045 perl-functions 01e8c68d5a528bbcda4d3c60205983df perl-module 863b35d127db98823d439f8d73c2d011
-_md5_=1f3b4275686c36c13f38a4c6faa7f44b
diff --git a/dev-db/percona-toolkit-3.0.10-r1 b/dev-db/percona-toolkit-3.0.10-r1
deleted file mode 100644
index 0c9acada782e..000000000000
--- a/dev-db/percona-toolkit-3.0.10-r1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-perl/DBI dev-perl/DBD-mysql virtual/perl-Time-HiRes virtual/perl-ExtUtils-MakeMaker dev-lang/perl:=
-DESCRIPTION=Advanced command-line tools to perform a variety of MySQL and system tasks
-EAPI=6
-HOMEPAGE=https://www.percona.com/software/mysql-tools/percona-toolkit
-KEYWORDS=~amd64 ~x86 ~amd64-linux ~x86-linux
-LICENSE=|| ( GPL-2 Artistic )
-RDEPEND=dev-perl/DBI dev-perl/DBD-mysql virtual/perl-Time-HiRes dev-perl/JSON dev-perl/libwww-perl dev-perl/Role-Tiny virtual/perl-File-Path virtual/perl-Getopt-Long virtual/perl-Time-Local virtual/perl-Digest-MD5 virtual/perl-IO-Compress virtual/perl-File-Temp virtual/perl-File-Spec virtual/perl-Scalar-List-Utils dev-perl/TermReadKey dev-lang/perl:=
-SLOT=0
-SRC_URI=https://www.percona.com/downloads/percona-toolkit/3.0.10/source/tarball/percona-toolkit-3.0.10.tar.gz
-_eclasses_=multiprocessing cac3169468f893670dac3e7cb940e045 perl-functions 01e8c68d5a528bbcda4d3c60205983df perl-module 863b35d127db98823d439f8d73c2d011
-_md5_=5a5cdb5a89bafb8283515c86c0014de4
diff --git a/dev-db/percona-toolkit-3.0.7 b/dev-db/percona-toolkit-3.0.7
deleted file mode 100644
index d2a1ba561b48..000000000000
--- a/dev-db/percona-toolkit-3.0.7
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-perl/DBI dev-perl/DBD-mysql virtual/perl-Time-HiRes virtual/perl-ExtUtils-MakeMaker dev-lang/perl:=
-DESCRIPTION=Advanced command-line tools to perform a variety of MySQL and system tasks
-EAPI=6
-HOMEPAGE=https://www.percona.com/software/mysql-tools/percona-toolkit
-KEYWORDS=~amd64 ~x86 ~amd64-linux ~x86-linux
-LICENSE=|| ( GPL-2 Artistic )
-RDEPEND=dev-perl/DBI dev-perl/DBD-mysql virtual/perl-Time-HiRes dev-perl/JSON dev-perl/libwww-perl dev-perl/Role-Tiny virtual/perl-File-Path virtual/perl-Getopt-Long virtual/perl-Time-Local virtual/perl-Digest-MD5 virtual/perl-IO-Compress virtual/perl-File-Temp virtual/perl-File-Spec virtual/perl-Scalar-List-Utils dev-perl/TermReadKey dev-lang/perl:=
-SLOT=0
-SRC_URI=https://www.percona.com/downloads/percona-toolkit/3.0.7/source/tarball/percona-toolkit-3.0.7.tar.gz
-_eclasses_=multiprocessing cac3169468f893670dac3e7cb940e045 perl-functions 01e8c68d5a528bbcda4d3c60205983df perl-module 863b35d127db98823d439f8d73c2d011
-_md5_=e308861445d2fd61f63924ff7aba688c
diff --git a/dev-db/percona-toolkit-3.0.8 b/dev-db/percona-toolkit-3.0.8
deleted file mode 100644
index eeceb2c2f447..000000000000
--- a/dev-db/percona-toolkit-3.0.8
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-perl/DBI dev-perl/DBD-mysql virtual/perl-Time-HiRes virtual/perl-ExtUtils-MakeMaker dev-lang/perl:=
-DESCRIPTION=Advanced command-line tools to perform a variety of MySQL and system tasks
-EAPI=6
-HOMEPAGE=https://www.percona.com/software/mysql-tools/percona-toolkit
-KEYWORDS=~amd64 ~x86 ~amd64-linux ~x86-linux
-LICENSE=|| ( GPL-2 Artistic )
-RDEPEND=dev-perl/DBI dev-perl/DBD-mysql virtual/perl-Time-HiRes dev-perl/JSON dev-perl/libwww-perl dev-perl/Role-Tiny virtual/perl-File-Path virtual/perl-Getopt-Long virtual/perl-Time-Local virtual/perl-Digest-MD5 virtual/perl-IO-Compress virtual/perl-File-Temp virtual/perl-File-Spec virtual/perl-Scalar-List-Utils dev-perl/TermReadKey dev-lang/perl:=
-SLOT=0
-SRC_URI=https://www.percona.com/downloads/percona-toolkit/3.0.8/source/tarball/percona-toolkit-3.0.8.tar.gz
-_eclasses_=multiprocessing cac3169468f893670dac3e7cb940e045 perl-functions 01e8c68d5a528bbcda4d3c60205983df perl-module 863b35d127db98823d439f8d73c2d011
-_md5_=1f3b4275686c36c13f38a4c6faa7f44b
diff --git a/dev-db/percona-toolkit-3.0.9 b/dev-db/percona-toolkit-3.0.9
deleted file mode 100644
index 522a12fd3e8a..000000000000
--- a/dev-db/percona-toolkit-3.0.9
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-perl/DBI dev-perl/DBD-mysql virtual/perl-Time-HiRes virtual/perl-ExtUtils-MakeMaker dev-lang/perl:=
-DESCRIPTION=Advanced command-line tools to perform a variety of MySQL and system tasks
-EAPI=6
-HOMEPAGE=https://www.percona.com/software/mysql-tools/percona-toolkit
-KEYWORDS=~amd64 ~x86 ~amd64-linux ~x86-linux
-LICENSE=|| ( GPL-2 Artistic )
-RDEPEND=dev-perl/DBI dev-perl/DBD-mysql virtual/perl-Time-HiRes dev-perl/JSON dev-perl/libwww-perl dev-perl/Role-Tiny virtual/perl-File-Path virtual/perl-Getopt-Long virtual/perl-Time-Local virtual/perl-Digest-MD5 virtual/perl-IO-Compress virtual/perl-File-Temp virtual/perl-File-Spec virtual/perl-Scalar-List-Utils dev-perl/TermReadKey dev-lang/perl:=
-SLOT=0
-SRC_URI=https://www.percona.com/downloads/percona-toolkit/3.0.9/source/tarball/percona-toolkit-3.0.9.tar.gz
-_eclasses_=multiprocessing cac3169468f893670dac3e7cb940e045 perl-functions 01e8c68d5a528bbcda4d3c60205983df perl-module 863b35d127db98823d439f8d73c2d011
-_md5_=1f3b4275686c36c13f38a4c6faa7f44b
diff --git a/dev-db/percona-toolkit/Manifest b/dev-db/percona-toolkit/Manifest
new file mode 100644
index 000000000000..a163a4627439
--- /dev/null
+++ b/dev-db/percona-toolkit/Manifest
@@ -0,0 +1,25 @@
+AUX percona-toolkit-2.2.17-fix-package-name.patch 872 BLAKE2B b8ce39ac4db7a38111b4622c081ee4d90023eee5cfd52c6a775786d8a0b540b9326c600e90960458d59364fba969f0598be3a5b4a89e9a426a6e36ec817972d8 SHA512 74cdd3d460811d6d7b03ca2c1c671cfe13e09de5789456f54a133803a1fd68f1506904a27d1bd41fd6423a52a96b9d8df485a750d8ac32773a04fd486173349d
+AUX percona-toolkit-2.2.19-fix-package-name.patch 334 BLAKE2B 3f9034f3c7e0b0783e19a2d8e94772b9c582f1198397e5f600bcdb424db337d5d8dd89d56424a310af2f9f30b9e6e292c40ce2591d3479de6dfcd3a43a7424d3 SHA512 6a9ffdcc98e65dfe3eb013170efb4c35ca53375aff4d816118908cb2de1e946591501a22a7ad2a64a19cdf0f68d17a4d2910d6a6fb814e8cb012d20e8d302164
+AUX percona-toolkit-2.2.20-fix-package-name.patch 334 BLAKE2B 3a36f40823194db89de326453d3a2b069edcd67fb50f1a65c27550002b0bf5f5c8631bf65fde8a4f83b7b90db434670c582a1a752b57ddb6c2acaecfc0ba8698 SHA512 eb87fa7d333160d0620ff56fb7e413024f573d05583b68a06aa0156f9a0332ce104ea38e9394d7a842bb5ab05349d77ec4ca3a5fdf28abd582241604f2337e09
+AUX percona-toolkit-2.2.7-no-versioncheck.patch 9310 BLAKE2B 8d102dcab97bc87ad1a98ffd7b600d7453eb449ba919908b5a5063b53a127562bbd419d19dd716a9b6c199a1a38055fd5593817ddfe5200892c4529146c6435b SHA512 6d571c017254e8ea37d128f1623cc4e813ebbfc611cbb84403540c786abc62ee9ba625ec914b101953e5d1d09431f9caa91e270684e00ec6e002b2777b105df9
+AUX percona-toolkit-3.0.10-slave-delay-fix.patch 1593 BLAKE2B 94bc49d581fbd453f650fe81b704ae042f3219495373c09bd750241cbdb3a1917e582927d3682072a1ac6369e2a564ee41bb16c25f662cab16748af1772c11b2 SHA512 40268aa6241416b80e6c076083a0ba2f75fb330529dc5de01438536cd6ce352b4dbee642cad1e1219441ababb054243731afdba0e4f8642dea20c0f1dada5646
+AUX percona-toolkit-3.0.7-fix-package-name.patch 320 BLAKE2B 174f7d5870ec75eb7b8b1282eac9bf4ad4f9834480c5ae5645c436ce8df1dfcb353aaab59eb98cbad9b44aff20f4b1aa09ea2de9fc5e25cf8c7fd1a728bdc72e SHA512 32a3de3fc1e845a26d7d1cad2071030d4376bd408b6b8dead781866bfb29abea754c353f30f3b52c72d2fdefc2ef8727f21c7ff891c1c33c766862c5e7865497
+AUX percona-toolkit-3.0.7-no-versioncheck.patch 5566 BLAKE2B 4def58c91dcdc35481c2ba89c78cb35db2a9121b86ba3a66896d0ef0175c9d6f47cf6eff0908847564ecc810243a3fdc0b893fbc3b2bd2131ec932f93a8694ad SHA512 a681b7f32f1acb509f01fe6c8e99106708729b8f8f5fe5fba0f2131b4380cfd22462f37bf0fbb95213b89d17375f0252b961d0257fb310295fe0e6e002b66e28
+DIST percona-toolkit-2.2.11.tar.gz 1389718 BLAKE2B 3d8c1207cda30aefc710ab5329aa94c76b3cd285a83f421b303e23e0544c4a51a0e8bf3ecdbb8532b67dcde808096bcb47c74ef63725b09ad59ca2b3f21e0fa5 SHA512 d5e34fce1b6b69dfc1a8ecd7bcbe84e586e950976553f4fd30afb887a850770c08990216e41fc194bdd0a5642034905ee2d69c2f8b3781503c9b4aab47017cdb
+DIST percona-toolkit-2.2.17.tar.gz 1420968 BLAKE2B 886634cb4f1ed196595c0ebe9d2d53bea898a41d81e6881173949181fbdbc752be671a22344e4e5b142d22e724e86389bf2885273a67222feb28511e1de429b0 SHA512 a6ac84db9fc77b57fffd4f18b1e6c147fa39821a8b8db128af15bac6884a2937f973aa59adb05b738c3a15d9006c71db49276207c5b321acbefd8bd3a6130b76
+DIST percona-toolkit-2.2.19.tar.gz 1425623 BLAKE2B fe9b363ec924b1af9110ea7e7dab70ad4471ddf30868391f9e02a2f6d5a5698a2cb0238dd1cca81428adcac2f21262f10ea2da272ffd881dee1b8b88be1405e0 SHA512 8da35e2ee4d81465131623e5b423c2c49c0bf0faf01862952dd5ca72c2ffea64fabcaf88dda883e633e23de8ae4a6c75a095a751708bac6a8136fc8daaae2383
+DIST percona-toolkit-2.2.20.tar.gz 1431840 BLAKE2B 76565662b4037010f7e8de98316f568c2994f55d042ae3a21b80dc3b839444a11014b61db675cc21c149f26c3b7df52013d7b06c9c1127ec325dae2942a4e4c0 SHA512 f7a5f47e9ca05c43dcb80866a1eacd13066e1f036f4f58d51145fc6354ddc86dd6515a9aa33c8f736029800bf4c80f7ba5fcb9f1e6ac41653b3351597885f679
+DIST percona-toolkit-3.0.10.tar.gz 17335242 BLAKE2B c24103576c537eb9afbdcedc6acf51671853c8e0764092f76d3ee4a1de338a521d91b956b13665ca92a06a70726b92cb9d530ab04b50ed30990868305bd0a7a0 SHA512 e9477f908bbcc5c975f11d42fe9b2b61adebe823657e23a2c74c639767c73f3f71ebdf2bec1d839ad14f2d5080c5f1f9620db07c6bf9694bd7623e86f390e902
+DIST percona-toolkit-3.0.7.tar.gz 79294306 BLAKE2B e3a556c823d355e5af504210dfb360e6fcf217ca6bfb7ba729e83e66cfdd09231c09d05fb51df1eac6bee0c6615620ac96ffce47c4f0473394d9c008ce8bdabe SHA512 e5a23ce6f4fd74f0956187679810de23a9d60f8073609289d641411c9f397f49b02c05cbcd0a68d78992849f17b70fb3ae411ac967e25c7be45f95ec374414fe
+DIST percona-toolkit-3.0.8.tar.gz 79316265 BLAKE2B 5d6efdbaa4fd3ac914c059c9240f6dcd0de89c6b2ea444c407b115b380bb676c51266f907f6e37a62a40032fd5aa6e1816752c8ec08150dddf71c7568f42c739 SHA512 d5380395b052aebe651806649ff22f259d1af9401112b7ffe86b10664b87f917fecfe91bdc72b401d00471fc9c141391006cd322c9464fca1343f704ecaa8623
+DIST percona-toolkit-3.0.9.tar.gz 15197340 BLAKE2B 095d8c0b26853caa6d2515de1d8fb8ff13b3084caa46498c8c789cd4e7b18473d41992701e393ad91cd7fdda8b3e56a099600285aeb4ba788110d36a028f76b6 SHA512 56a8732cfdbd58d0602e482d7bf049d2049104b7ae203d756db81a052cd837f16d2a35f75def4f23748534d0d2eb6441cb9fe49175a931fbcdbb6adeb42f1c53
+EBUILD percona-toolkit-2.2.11.ebuild 1262 BLAKE2B 8d33c609579606aac77a67c5d568a7c14d87f9f90ab3abcd1b6e225bd605a39359fb21f2f4cd845ac3bb27f2aa4e4e4e9e19407a84473db10b37f84364216826 SHA512 fb9ab1638b6aff2e43b55a2fb1872f07d36f3f41a7c7c02038681cbaf163e85291b0c79e422e4395b521a0bcb9bc9d0d9d4ae4aaa2654bcafcd39c6e85dca922
+EBUILD percona-toolkit-2.2.17.ebuild 1213 BLAKE2B 8602c2ac1859da4fbefa52c5714e07a9e44c3b148b35555e4977c1c4604fdf35de3a95a658065533e9f894f01a19f7b57b0eb2c537446622ab98ab59a7b13b6e SHA512 78b956efbe27586145cee31f784cb143cec4c40ef9f06efb315367178db085f2767f8b29180be0549ab407ad77ddc20527588102354eee23d3a328fc46f8a892
+EBUILD percona-toolkit-2.2.19.ebuild 1213 BLAKE2B 784c406e8b359b1c75c49725ee670c16d4e3ea91d845d83b9b5f032cbebcf455074fa7423f42102f257df571ad7b4cd9a21bbc318175c446867047c90d1cce95 SHA512 21caa33395129da3a11c2bd3bac9eff2a722bfc473d4e1065c9baa123542239531755b4b16965c5c470e7851027ce81b9a17b35bf6ba16cd922ca34a600f8fa2
+EBUILD percona-toolkit-2.2.20.ebuild 1213 BLAKE2B 2bcc433599d64b15225e508fa16c50634b34c9963c38fae7d8ac412e730c9566751bfa1c784254018e40b5a6d8fcb6b4e52c2f85df7362d43bcf153282f7766b SHA512 f1b0b8a48e99d616d9a54a5bf6c39a06ef5e6f48992fe3e0584d464d7ed1abc5f6f08a14488cbffd4fcf4d8afe8791112094438baf06a5a4b788a953d539288b
+EBUILD percona-toolkit-3.0.10-r1.ebuild 1330 BLAKE2B acf05bb59b278883dece85f7a60a6ae114a5a5253a867b0f2c5259196eddb4a95acdf66809c1ecb5ad47140f220b9cff47efeedc0ddc1f370db1ee6181c4f12c SHA512 cb5d77f6f689989ae2aa5e4eb4ca7273981b9f18e6308d67dd5ca25ddb163db24655b3d54e84f70f911ffd098bacf5d114dd8afd1a4b2c06198ad55f9fcbcff4
+EBUILD percona-toolkit-3.0.10.ebuild 1249 BLAKE2B bd743a722e60cade6307bd04c774a77d0e01b2272e82974be486b47d0462120910c1182ba6fc3f7cf268f4ebfa04d432e456f62079010621aeaf6b325c743b54 SHA512 988d423c3125592608caa659543b508dcea2048b0c905a24c924e75894ca7c93924908e49f5c6c2c5d660a7b90a242e558e874849f0793d58a82abec1ad38982
+EBUILD percona-toolkit-3.0.7.ebuild 1167 BLAKE2B f61aaf597895efa1b68a04f889e93fef6207d4e2cc9f14e986aee81cccb6ca7888d7479bc01bf11bea554bb9f860615ebfb95111420c641ad7e8b16808121a24 SHA512 940474cb8cf56cff984dffc33c3848808d184c33f6d31a4bcafdc2ee16feecbe6f4084c80e243d18eb62c9f09759f274144aff2c3f45d465bc01c8f82d1e5ac1
+EBUILD percona-toolkit-3.0.8.ebuild 1249 BLAKE2B bd743a722e60cade6307bd04c774a77d0e01b2272e82974be486b47d0462120910c1182ba6fc3f7cf268f4ebfa04d432e456f62079010621aeaf6b325c743b54 SHA512 988d423c3125592608caa659543b508dcea2048b0c905a24c924e75894ca7c93924908e49f5c6c2c5d660a7b90a242e558e874849f0793d58a82abec1ad38982
+EBUILD percona-toolkit-3.0.9.ebuild 1249 BLAKE2B bd743a722e60cade6307bd04c774a77d0e01b2272e82974be486b47d0462120910c1182ba6fc3f7cf268f4ebfa04d432e456f62079010621aeaf6b325c743b54 SHA512 988d423c3125592608caa659543b508dcea2048b0c905a24c924e75894ca7c93924908e49f5c6c2c5d660a7b90a242e558e874849f0793d58a82abec1ad38982
+MISC metadata.xml 833 BLAKE2B 4252a5af815b3d1ce0175c6e4755a7754092039be8836803a18a188dca0b09dc3a278b28a5ad088beffb0aeb438c12c8494d051a953d9331e567939ae8ad7c3d SHA512 000249923e3303c31bdb6a74806ef08f917c84fdfb93d6e844d3d77ab8f10143ba0a61de4c71dc7b54003c0cb152e9e7b6491245b44a54d80f8e98d7e4d00959
diff --git a/dev-db/percona-toolkit/files/percona-toolkit-2.2.17-fix-package-name.patch b/dev-db/percona-toolkit/files/percona-toolkit-2.2.17-fix-package-name.patch
new file mode 100644
index 000000000000..2cd7634840e1
--- /dev/null
+++ b/dev-db/percona-toolkit/files/percona-toolkit-2.2.17-fix-package-name.patch
@@ -0,0 +1,35 @@
+From 0e7c176b38c6ee286511e6bb7720390d31fc6233 Mon Sep 17 00:00:00 2001
+From: Thomas D.
+Date: Tue, 15 Mar 2016 22:21:48 +0100
+Subject: [PATCH] Fix package name
+
+The previous package name "percona-toolkit" is not a valid package name for
+ExtUtils::MakeMaker:
+
+ $ perl Makefile.PL
+ Checking if your kit is complete...
+ Looks good
+ Warning: NAME must be a package name
+ [...]
+
+Let us use the same package name (Percona::Toolkit) various scripts in bin/
+are already using.
+---
+ Makefile.PL | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.PL b/Makefile.PL
+index 7f46523..a9723f4 100644
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -1,7 +1,7 @@
+ use ExtUtils::MakeMaker;
+
+ WriteMakefile(
+- NAME => 'percona-toolkit',
++ NAME => 'Percona::Toolkit',
+ VERSION => '2.2.17',
+ EXE_FILES => [ <bin/*> ],
+ MAN1PODS => {
+--
+2.7.3
diff --git a/dev-db/percona-toolkit/files/percona-toolkit-2.2.19-fix-package-name.patch b/dev-db/percona-toolkit/files/percona-toolkit-2.2.19-fix-package-name.patch
new file mode 100644
index 000000000000..283299b14b42
--- /dev/null
+++ b/dev-db/percona-toolkit/files/percona-toolkit-2.2.19-fix-package-name.patch
@@ -0,0 +1,13 @@
+Source https://github.com/percona/percona-toolkit/pull/84
+Adapted to current version
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -1,7 +1,7 @@
+ use ExtUtils::MakeMaker;
+
+ WriteMakefile(
+- NAME => 'percona-toolkit',
++ NAME => 'Percona::Toolkit',
+ VERSION => '2.2.19',
+ EXE_FILES => [ <bin/*> ],
+ MAN1PODS => {
diff --git a/dev-db/percona-toolkit/files/percona-toolkit-2.2.20-fix-package-name.patch b/dev-db/percona-toolkit/files/percona-toolkit-2.2.20-fix-package-name.patch
new file mode 100644
index 000000000000..9865e1ba1a7a
--- /dev/null
+++ b/dev-db/percona-toolkit/files/percona-toolkit-2.2.20-fix-package-name.patch
@@ -0,0 +1,13 @@
+Source https://github.com/percona/percona-toolkit/pull/84
+Adapted to current version
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -1,7 +1,7 @@
+ use ExtUtils::MakeMaker;
+
+ WriteMakefile(
+- NAME => 'percona-toolkit',
++ NAME => 'Percona::Toolkit',
+ VERSION => '2.2.20',
+ EXE_FILES => [ <bin/*> ],
+ MAN1PODS => {
diff --git a/dev-db/percona-toolkit/files/percona-toolkit-2.2.7-no-versioncheck.patch b/dev-db/percona-toolkit/files/percona-toolkit-2.2.7-no-versioncheck.patch
new file mode 100644
index 000000000000..d6d38177b18f
--- /dev/null
+++ b/dev-db/percona-toolkit/files/percona-toolkit-2.2.7-no-versioncheck.patch
@@ -0,0 +1,216 @@
+diff -rupN old/percona-toolkit-2.2.7/bin/pt-archiver new/percona-toolkit-2.2.7/bin/pt-archiver
+--- old/percona-toolkit-2.2.7/bin/pt-archiver 2014-02-20 08:20:28.000000000 +0100
++++ new/percona-toolkit-2.2.7/bin/pt-archiver 2014-05-21 18:13:49.148631547 +0200
+@@ -7465,8 +7465,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+-
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+ This is a standard "check for updates automatically" feature, with two
+diff -rupN old/percona-toolkit-2.2.7/bin/pt-config-diff new/percona-toolkit-2.2.7/bin/pt-config-diff
+--- old/percona-toolkit-2.2.7/bin/pt-config-diff 2014-02-20 08:20:28.000000000 +0100
++++ new/percona-toolkit-2.2.7/bin/pt-config-diff 2014-05-21 18:13:38.012402960 +0200
+@@ -5563,8 +5563,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+-
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+ This is a standard "check for updates automatically" feature, with two
+diff -rupN old/percona-toolkit-2.2.7/bin/pt-deadlock-logger new/percona-toolkit-2.2.7/bin/pt-deadlock-logger
+--- old/percona-toolkit-2.2.7/bin/pt-deadlock-logger 2014-02-20 08:20:28.000000000 +0100
++++ new/percona-toolkit-2.2.7/bin/pt-deadlock-logger 2014-05-21 18:11:18.923569703 +0200
+@@ -5332,8 +5332,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+-
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+ This is a standard "check for updates automatically" feature, with two
+diff -rupN old/percona-toolkit-2.2.7/bin/pt-diskstats new/percona-toolkit-2.2.7/bin/pt-diskstats
+--- old/percona-toolkit-2.2.7/bin/pt-diskstats 2014-02-20 08:20:28.000000000 +0100
++++ new/percona-toolkit-2.2.7/bin/pt-diskstats 2014-05-21 18:11:04.041268359 +0200
+@@ -5468,8 +5468,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+-
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+ This is a standard "check for updates automatically" feature, with two
+diff -rupN old/percona-toolkit-2.2.7/bin/pt-duplicate-key-checker new/percona-toolkit-2.2.7/bin/pt-duplicate-key-checker
+--- old/percona-toolkit-2.2.7/bin/pt-duplicate-key-checker 2014-02-20 08:20:28.000000000 +0100
++++ new/percona-toolkit-2.2.7/bin/pt-duplicate-key-checker 2014-05-21 18:12:51.993462828 +0200
+@@ -5430,8 +5430,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+-
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+ This is a standard "check for updates automatically" feature, with two
+diff -rupN old/percona-toolkit-2.2.7/bin/pt-find new/percona-toolkit-2.2.7/bin/pt-find
+--- old/percona-toolkit-2.2.7/bin/pt-find 2014-02-20 08:20:28.000000000 +0100
++++ new/percona-toolkit-2.2.7/bin/pt-find 2014-05-21 18:09:46.496705351 +0200
+@@ -4440,8 +4440,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+-
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+ This is a standard "check for updates automatically" feature, with two
+diff -rupN old/percona-toolkit-2.2.7/bin/pt-fk-error-logger new/percona-toolkit-2.2.7/bin/pt-fk-error-logger
+--- old/percona-toolkit-2.2.7/bin/pt-fk-error-logger 2014-02-20 08:20:28.000000000 +0100
++++ new/percona-toolkit-2.2.7/bin/pt-fk-error-logger 2014-05-21 18:12:39.277202489 +0200
+@@ -4335,8 +4335,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+-
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+ This is a standard "check for updates automatically" feature, with two
+diff -rupN old/percona-toolkit-2.2.7/bin/pt-heartbeat new/percona-toolkit-2.2.7/bin/pt-heartbeat
+--- old/percona-toolkit-2.2.7/bin/pt-heartbeat 2014-02-20 08:20:28.000000000 +0100
++++ new/percona-toolkit-2.2.7/bin/pt-heartbeat 2014-05-21 18:09:29.885373476 +0200
+@@ -6019,8 +6019,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+-
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+ This is a standard "check for updates automatically" feature, with two
+diff -rupN old/percona-toolkit-2.2.7/bin/pt-index-usage new/percona-toolkit-2.2.7/bin/pt-index-usage
+--- old/percona-toolkit-2.2.7/bin/pt-index-usage 2014-02-20 08:20:28.000000000 +0100
++++ new/percona-toolkit-2.2.7/bin/pt-index-usage 2014-05-21 18:08:58.139739567 +0200
+@@ -7348,8 +7348,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+-
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+ This is a standard "check for updates automatically" feature, with two
+diff -rupN old/percona-toolkit-2.2.7/bin/pt-kill new/percona-toolkit-2.2.7/bin/pt-kill
+--- old/percona-toolkit-2.2.7/bin/pt-kill 2014-02-20 08:20:28.000000000 +0100
++++ new/percona-toolkit-2.2.7/bin/pt-kill 2014-05-21 18:11:45.264103271 +0200
+@@ -7626,8 +7626,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+-
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+ This is a standard "check for updates automatically" feature, with two
+diff -rupN old/percona-toolkit-2.2.7/bin/pt-online-schema-change new/percona-toolkit-2.2.7/bin/pt-online-schema-change
+--- old/percona-toolkit-2.2.7/bin/pt-online-schema-change 2014-02-20 08:20:28.000000000 +0100
++++ new/percona-toolkit-2.2.7/bin/pt-online-schema-change 2014-05-21 18:13:04.843724091 +0200
+@@ -11298,8 +11298,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+-
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+ This is a standard "check for updates automatically" feature, with two
+diff -rupN old/percona-toolkit-2.2.7/bin/pt-query-digest new/percona-toolkit-2.2.7/bin/pt-query-digest
+--- old/percona-toolkit-2.2.7/bin/pt-query-digest 2014-02-20 08:20:28.000000000 +0100
++++ new/percona-toolkit-2.2.7/bin/pt-query-digest 2014-05-21 18:12:23.127872894 +0200
+@@ -16265,8 +16265,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+-
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+ This is a standard "check for updates automatically" feature, with two
+diff -rupN old/percona-toolkit-2.2.7/bin/pt-slave-delay new/percona-toolkit-2.2.7/bin/pt-slave-delay
+--- old/percona-toolkit-2.2.7/bin/pt-slave-delay 2014-02-20 08:20:28.000000000 +0100
++++ new/percona-toolkit-2.2.7/bin/pt-slave-delay 2014-05-21 18:08:11.586811388 +0200
+@@ -4698,8 +4698,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+-
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+ This is a standard "check for updates automatically" feature, with two
+diff -rupN old/percona-toolkit-2.2.7/bin/pt-slave-restart new/percona-toolkit-2.2.7/bin/pt-slave-restart
+--- old/percona-toolkit-2.2.7/bin/pt-slave-restart 2014-02-20 08:20:28.000000000 +0100
++++ new/percona-toolkit-2.2.7/bin/pt-slave-restart 2014-05-21 18:11:32.423843497 +0200
+@@ -5638,8 +5638,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+-
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+ This is a standard "check for updates automatically" feature, with two
+diff -rupN old/percona-toolkit-2.2.7/bin/pt-table-checksum new/percona-toolkit-2.2.7/bin/pt-table-checksum
+--- old/percona-toolkit-2.2.7/bin/pt-table-checksum 2014-02-20 08:20:28.000000000 +0100
++++ new/percona-toolkit-2.2.7/bin/pt-table-checksum 2014-05-21 18:14:03.377924135 +0200
+@@ -12314,8 +12314,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+-
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+ This is a standard "check for updates automatically" feature, with two
+diff -rupN old/percona-toolkit-2.2.7/bin/pt-table-sync new/percona-toolkit-2.2.7/bin/pt-table-sync
+--- old/percona-toolkit-2.2.7/bin/pt-table-sync 2014-02-20 08:20:28.000000000 +0100
++++ new/percona-toolkit-2.2.7/bin/pt-table-sync 2014-05-21 18:10:18.476350097 +0200
+@@ -12501,8 +12501,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+-
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+ This is a standard "check for updates automatically" feature, with two
+diff -rupN old/percona-toolkit-2.2.7/bin/pt-upgrade new/percona-toolkit-2.2.7/bin/pt-upgrade
+--- old/percona-toolkit-2.2.7/bin/pt-upgrade 2014-02-20 08:20:28.000000000 +0100
++++ new/percona-toolkit-2.2.7/bin/pt-upgrade 2014-05-21 18:08:38.344342935 +0200
+@@ -11003,8 +11003,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+-
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+ This is a standard "check for updates automatically" feature, with two
+diff -rupN old/percona-toolkit-2.2.7/bin/pt-variable-advisor new/percona-toolkit-2.2.7/bin/pt-variable-advisor
+--- old/percona-toolkit-2.2.7/bin/pt-variable-advisor 2014-02-20 08:20:28.000000000 +0100
++++ new/percona-toolkit-2.2.7/bin/pt-variable-advisor 2014-05-21 18:10:01.967017827 +0200
+@@ -5968,8 +5968,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+-
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+ This is a standard "check for updates automatically" feature, with two
diff --git a/dev-db/percona-toolkit/files/percona-toolkit-3.0.10-slave-delay-fix.patch b/dev-db/percona-toolkit/files/percona-toolkit-3.0.10-slave-delay-fix.patch
new file mode 100644
index 000000000000..8b8e17d7bfd7
--- /dev/null
+++ b/dev-db/percona-toolkit/files/percona-toolkit-3.0.10-slave-delay-fix.patch
@@ -0,0 +1,44 @@
+https://bugs.launchpad.net/percona-toolkit/+bug/962330
+https://bugs.launchpad.net/percona-toolkit/+bug/1095476
+
+diff --git a/bin/pt-slave-delay b/bin/pt-slave-delay
+index 750b733..fca04e4 100755
+--- a/bin/pt-slave-delay
++++ b/bin/pt-slave-delay
+@@ -4244,6 +4244,7 @@ sub main {
+ my ( $TS, $FILE, $POS ) = ( 0, 1, 2 );
+ my @positions;
+ my $next_start = 0;
++ my $initial_delay = 0;
+ $now = time();
+ my $end = $now + ( $o->get('run-time') || 0 ); # When we should exit
+
+@@ -4258,6 +4259,10 @@ sub main {
+ die "Slave SQL thread is not running";
+ }
+
++ if (defined $status->{seconds_behind_master} and $status->{seconds_behind_master} > 0) {
++ $initial_delay = $status->{seconds_behind_master};
++ }
++
+ my $master_dbh;
+ if ( $master_dsn ) {
+ PTDEBUG && _d('Connecting to master via DSN from cmd-line');
+@@ -4383,7 +4388,7 @@ sub main {
+ || $pos->[$POS] != $res->{position} )
+ {
+ push @positions,
+- [ $now, $res->{file}, $res->{position} ];
++ [ $now - ( $initial_delay || 0 ), $res->{file}, $res->{position} ];
+ }
+ }
+ else {
+@@ -4403,7 +4408,7 @@ sub main {
+ # That happened because for an already lagged slave, $now
+ # isn't the correct time, but is actually
+ # $now - $seconds_lagged.
+- $now - ( $status->{seconds_behind_master} || 0 ),
++ $now - ( $initial_delay || 0 ),
+ $status->{master_log_file},
+ $status->{read_master_log_pos}
+ ];
diff --git a/dev-db/percona-toolkit/files/percona-toolkit-3.0.7-fix-package-name.patch b/dev-db/percona-toolkit/files/percona-toolkit-3.0.7-fix-package-name.patch
new file mode 100644
index 000000000000..4ca3ecf5fff0
--- /dev/null
+++ b/dev-db/percona-toolkit/files/percona-toolkit-3.0.7-fix-package-name.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile.PL b/Makefile.PL
+index a2136634..2a0f587b 100644
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -1,7 +1,7 @@
+ use ExtUtils::MakeMaker;
+
+ WriteMakefile(
+- NAME => 'percona-toolkit',
++ NAME => 'Percona::Toolkit',
+ VERSION => '3.0.7',
+ EXE_FILES => [ <bin/*> ],
+ MAN1PODS => {
diff --git a/dev-db/percona-toolkit/files/percona-toolkit-3.0.7-no-versioncheck.patch b/dev-db/percona-toolkit/files/percona-toolkit-3.0.7-no-versioncheck.patch
new file mode 100644
index 000000000000..8fb0c8f4102d
--- /dev/null
+++ b/dev-db/percona-toolkit/files/percona-toolkit-3.0.7-no-versioncheck.patch
@@ -0,0 +1,216 @@
+diff --git a/bin/pt-archiver b/bin/pt-archiver
+index bde24c7e..8f18f49c 100755
+--- a/bin/pt-archiver
++++ b/bin/pt-archiver
+@@ -8151,7 +8151,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+diff --git a/bin/pt-config-diff b/bin/pt-config-diff
+index cfbfd83f..4f7c1932 100755
+--- a/bin/pt-config-diff
++++ b/bin/pt-config-diff
+@@ -5713,7 +5713,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+diff --git a/bin/pt-deadlock-logger b/bin/pt-deadlock-logger
+index 7acc0b07..ae8b1c2c 100755
+--- a/bin/pt-deadlock-logger
++++ b/bin/pt-deadlock-logger
+@@ -5498,7 +5498,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+diff --git a/bin/pt-diskstats b/bin/pt-diskstats
+index 64e73457..8eac85e8 100755
+--- a/bin/pt-diskstats
++++ b/bin/pt-diskstats
+@@ -5557,7 +5557,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+diff --git a/bin/pt-duplicate-key-checker b/bin/pt-duplicate-key-checker
+index c8808198..1c89b04f 100755
+--- a/bin/pt-duplicate-key-checker
++++ b/bin/pt-duplicate-key-checker
+@@ -5565,7 +5565,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+diff --git a/bin/pt-find b/bin/pt-find
+index bdf03ee0..b72b3c4c 100755
+--- a/bin/pt-find
++++ b/bin/pt-find
+@@ -4551,7 +4551,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+diff --git a/bin/pt-fk-error-logger b/bin/pt-fk-error-logger
+index 75afca17..dce96c79 100755
+--- a/bin/pt-fk-error-logger
++++ b/bin/pt-fk-error-logger
+@@ -4485,7 +4485,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+diff --git a/bin/pt-heartbeat b/bin/pt-heartbeat
+index 5d39e46d..6f8c7bca 100755
+--- a/bin/pt-heartbeat
++++ b/bin/pt-heartbeat
+@@ -7127,7 +7127,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+diff --git a/bin/pt-index-usage b/bin/pt-index-usage
+index 0fa6e008..c9d62436 100755
+--- a/bin/pt-index-usage
++++ b/bin/pt-index-usage
+@@ -7495,7 +7495,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+diff --git a/bin/pt-kill b/bin/pt-kill
+index 65d627b3..b5afcef0 100755
+--- a/bin/pt-kill
++++ b/bin/pt-kill
+@@ -7936,7 +7936,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+diff --git a/bin/pt-online-schema-change b/bin/pt-online-schema-change
+index c43ddad6..524f060e 100755
+--- a/bin/pt-online-schema-change
++++ b/bin/pt-online-schema-change
+@@ -12661,7 +12661,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+diff --git a/bin/pt-query-digest b/bin/pt-query-digest
+index a4501819..ee3e2b7b 100755
+--- a/bin/pt-query-digest
++++ b/bin/pt-query-digest
+@@ -16541,7 +16541,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+diff --git a/bin/pt-slave-delay b/bin/pt-slave-delay
+index 0b7b9294..a6aa0afe 100755
+--- a/bin/pt-slave-delay
++++ b/bin/pt-slave-delay
+@@ -4788,7 +4788,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+diff --git a/bin/pt-slave-restart b/bin/pt-slave-restart
+index b3bf79e5..4eaaf8f9 100755
+--- a/bin/pt-slave-restart
++++ b/bin/pt-slave-restart
+@@ -5938,7 +5938,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+diff --git a/bin/pt-table-checksum b/bin/pt-table-checksum
+index 1ac4e500..981ca3d6 100755
+--- a/bin/pt-table-checksum
++++ b/bin/pt-table-checksum
+@@ -13653,7 +13653,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+diff --git a/bin/pt-table-sync b/bin/pt-table-sync
+index dedd789b..f4b9f367 100755
+--- a/bin/pt-table-sync
++++ b/bin/pt-table-sync
+@@ -12774,7 +12774,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+diff --git a/bin/pt-upgrade b/bin/pt-upgrade
+index 78ed0d82..d64c02ce 100755
+--- a/bin/pt-upgrade
++++ b/bin/pt-upgrade
+@@ -11206,7 +11206,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
+diff --git a/bin/pt-variable-advisor b/bin/pt-variable-advisor
+index 66d001f8..d7cbf247 100755
+--- a/bin/pt-variable-advisor
++++ b/bin/pt-variable-advisor
+@@ -6058,7 +6058,6 @@ Show version and exit.
+
+ =item --[no]version-check
+
+-default: yes
+
+ Check for the latest version of Percona Toolkit, MySQL, and other programs.
+
diff --git a/dev-db/percona-toolkit/metadata.xml b/dev-db/percona-toolkit/metadata.xml
new file mode 100644
index 000000000000..5579d6b912c3
--- /dev/null
+++ b/dev-db/percona-toolkit/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>idl0r@gentoo.org</email>
+ <name>Christian Ruppert</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>mysql-bugs@gentoo.org</email>
+ <name>MySQL</name>
+ </maintainer>
+ <longdescription>Percona Toolkit, formerly Maatkit and Aspersa, formerly MySQL Toolkit,
+ is a collection of command-line utilities that provide missing
+ functionality for MySQL. Some of the tools implement lacking server
+ functionality, such as online consistency checks for master/slave
+ replication; others are client-side utilities such as a query
+ profiler.</longdescription>
+ <!--
+ <upstream>
+ <remote-id type="launchpad">percona-toolkit</remote-id>
+ </upstream>
+ -->
+</pkgmetadata>
diff --git a/dev-db/percona-toolkit/percona-toolkit-2.2.11.ebuild b/dev-db/percona-toolkit/percona-toolkit-2.2.11.ebuild
new file mode 100644
index 000000000000..402e3ff753d1
--- /dev/null
+++ b/dev-db/percona-toolkit/percona-toolkit-2.2.11.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils perl-app perl-module toolchain-funcs
+
+DESCRIPTION="essential command-line utilities for MySQL"
+HOMEPAGE="http://www.percona.com/software/percona-toolkit/"
+SRC_URI="http://www.percona.com/downloads/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="|| ( GPL-2 Artistic )"
+SLOT="0"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+# Package warrants IUSE doc
+IUSE=""
+
+COMMON_DEPEND="dev-perl/DBI
+ dev-perl/DBD-mysql
+ virtual/perl-Time-HiRes"
+RDEPEND="${COMMON_DEPEND}
+ dev-perl/JSON
+ dev-perl/libwww-perl
+ dev-perl/Role-Tiny
+ virtual/perl-File-Path
+ virtual/perl-Getopt-Long
+ virtual/perl-Time-Local
+ virtual/perl-Digest-MD5
+ virtual/perl-IO-Compress
+ virtual/perl-File-Temp
+ virtual/perl-File-Spec
+ virtual/perl-Scalar-List-Utils
+ dev-perl/TermReadKey"
+DEPEND="${COMMON_DEPEND}
+ virtual/perl-ExtUtils-MakeMaker"
+
+src_prepare() {
+ # bug 501904 - CVE-2014-2029
+ # sed -i -e '/^=item --\[no\]version-check/,/^default: yes/{/^default: yes/d}' bin/*
+ epatch "${FILESDIR}/${PN}-2.2.7-no-versioncheck.patch"
+}
+
+# Percona Toolkit does NOT contain the UDF code for Murmur/FNV any more.
+src_install() {
+ perl-module_src_install
+ dodoc docs/percona-toolkit.pod
+}
diff --git a/dev-db/percona-toolkit/percona-toolkit-2.2.17.ebuild b/dev-db/percona-toolkit/percona-toolkit-2.2.17.ebuild
new file mode 100644
index 000000000000..1673b79d5a9d
--- /dev/null
+++ b/dev-db/percona-toolkit/percona-toolkit-2.2.17.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit perl-module
+
+DESCRIPTION="Advanced command-line tools to perform a variety of MySQL and system tasks"
+HOMEPAGE="https://www.percona.com/software/mysql-tools/percona-toolkit"
+SRC_URI="https://www.percona.com/downloads/${PN}/${PV}/tarball/${P}.tar.gz"
+
+LICENSE="|| ( GPL-2 Artistic )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+# Package warrants IUSE doc
+IUSE=""
+
+COMMON_DEPEND="dev-perl/DBI
+ dev-perl/DBD-mysql
+ virtual/perl-Time-HiRes"
+RDEPEND="${COMMON_DEPEND}
+ dev-perl/JSON
+ dev-perl/libwww-perl
+ dev-perl/Role-Tiny
+ virtual/perl-File-Path
+ virtual/perl-Getopt-Long
+ virtual/perl-Time-Local
+ virtual/perl-Digest-MD5
+ virtual/perl-IO-Compress
+ virtual/perl-File-Temp
+ virtual/perl-File-Spec
+ virtual/perl-Scalar-List-Utils
+ dev-perl/TermReadKey"
+DEPEND="${COMMON_DEPEND}
+ virtual/perl-ExtUtils-MakeMaker"
+
+src_prepare() {
+ # Bug #501904 - CVE-2014-2029
+ # sed -i -e '/^=item --\[no\]version-check/,/^default: yes/{/^default: yes/d}' bin/*
+ eapply -p2 "${FILESDIR}"/${PN}-2.2.7-no-versioncheck.patch
+ eapply -p1 "${FILESDIR}"/${PN}-2.2.17-fix-package-name.patch
+
+ default
+}
diff --git a/dev-db/percona-toolkit/percona-toolkit-2.2.19.ebuild b/dev-db/percona-toolkit/percona-toolkit-2.2.19.ebuild
new file mode 100644
index 000000000000..7ffe6c3da3be
--- /dev/null
+++ b/dev-db/percona-toolkit/percona-toolkit-2.2.19.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit perl-module
+
+DESCRIPTION="Advanced command-line tools to perform a variety of MySQL and system tasks"
+HOMEPAGE="https://www.percona.com/software/mysql-tools/percona-toolkit"
+SRC_URI="https://www.percona.com/downloads/${PN}/${PV}/tarball/${P}.tar.gz"
+
+LICENSE="|| ( GPL-2 Artistic )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+# Package warrants IUSE doc
+IUSE=""
+
+COMMON_DEPEND="dev-perl/DBI
+ dev-perl/DBD-mysql
+ virtual/perl-Time-HiRes"
+RDEPEND="${COMMON_DEPEND}
+ dev-perl/JSON
+ dev-perl/libwww-perl
+ dev-perl/Role-Tiny
+ virtual/perl-File-Path
+ virtual/perl-Getopt-Long
+ virtual/perl-Time-Local
+ virtual/perl-Digest-MD5
+ virtual/perl-IO-Compress
+ virtual/perl-File-Temp
+ virtual/perl-File-Spec
+ virtual/perl-Scalar-List-Utils
+ dev-perl/TermReadKey"
+DEPEND="${COMMON_DEPEND}
+ virtual/perl-ExtUtils-MakeMaker"
+
+src_prepare() {
+ # Bug #501904 - CVE-2014-2029
+ # sed -i -e '/^=item --\[no\]version-check/,/^default: yes/{/^default: yes/d}' bin/*
+ eapply -p2 "${FILESDIR}"/${PN}-2.2.7-no-versioncheck.patch
+ eapply -p1 "${FILESDIR}"/${PN}-2.2.19-fix-package-name.patch
+
+ default
+}
diff --git a/dev-db/percona-toolkit/percona-toolkit-2.2.20.ebuild b/dev-db/percona-toolkit/percona-toolkit-2.2.20.ebuild
new file mode 100644
index 000000000000..7b08f6262ae9
--- /dev/null
+++ b/dev-db/percona-toolkit/percona-toolkit-2.2.20.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit perl-module
+
+DESCRIPTION="Advanced command-line tools to perform a variety of MySQL and system tasks"
+HOMEPAGE="https://www.percona.com/software/mysql-tools/percona-toolkit"
+SRC_URI="https://www.percona.com/downloads/${PN}/${PV}/tarball/${P}.tar.gz"
+
+LICENSE="|| ( GPL-2 Artistic )"
+SLOT="0"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+# Package warrants IUSE doc
+IUSE=""
+
+COMMON_DEPEND="dev-perl/DBI
+ dev-perl/DBD-mysql
+ virtual/perl-Time-HiRes"
+RDEPEND="${COMMON_DEPEND}
+ dev-perl/JSON
+ dev-perl/libwww-perl
+ dev-perl/Role-Tiny
+ virtual/perl-File-Path
+ virtual/perl-Getopt-Long
+ virtual/perl-Time-Local
+ virtual/perl-Digest-MD5
+ virtual/perl-IO-Compress
+ virtual/perl-File-Temp
+ virtual/perl-File-Spec
+ virtual/perl-Scalar-List-Utils
+ dev-perl/TermReadKey"
+DEPEND="${COMMON_DEPEND}
+ virtual/perl-ExtUtils-MakeMaker"
+
+src_prepare() {
+ # Bug #501904 - CVE-2014-2029
+ # sed -i -e '/^=item --\[no\]version-check/,/^default: yes/{/^default: yes/d}' bin/*
+ eapply -p2 "${FILESDIR}"/${PN}-2.2.7-no-versioncheck.patch
+ eapply -p1 "${FILESDIR}"/${PN}-2.2.20-fix-package-name.patch
+
+ default
+}
diff --git a/dev-db/percona-toolkit/percona-toolkit-3.0.10-r1.ebuild b/dev-db/percona-toolkit/percona-toolkit-3.0.10-r1.ebuild
new file mode 100644
index 000000000000..4a54323f4338
--- /dev/null
+++ b/dev-db/percona-toolkit/percona-toolkit-3.0.10-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit perl-module
+
+DESCRIPTION="Advanced command-line tools to perform a variety of MySQL and system tasks"
+HOMEPAGE="https://www.percona.com/software/mysql-tools/percona-toolkit"
+SRC_URI="https://www.percona.com/downloads/${PN}/${PV}/source/tarball/${P}.tar.gz"
+
+LICENSE="|| ( GPL-2 Artistic )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+# Package warrants IUSE doc
+IUSE=""
+
+COMMON_DEPEND="dev-perl/DBI
+ dev-perl/DBD-mysql
+ virtual/perl-Time-HiRes"
+RDEPEND="${COMMON_DEPEND}
+ dev-perl/JSON
+ dev-perl/libwww-perl
+ dev-perl/Role-Tiny
+ virtual/perl-File-Path
+ virtual/perl-Getopt-Long
+ virtual/perl-Time-Local
+ virtual/perl-Digest-MD5
+ virtual/perl-IO-Compress
+ virtual/perl-File-Temp
+ virtual/perl-File-Spec
+ virtual/perl-Scalar-List-Utils
+ dev-perl/TermReadKey"
+DEPEND="${COMMON_DEPEND}
+ virtual/perl-ExtUtils-MakeMaker"
+
+# Bug #501904 - CVE-2014-2029
+# sed -i -e '/^=item --\[no\]version-check/,/^default: yes/{/^default: yes/d}' bin/*
+# ^ is *-no-versioncheck.patch
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.0.7-no-versioncheck.patch
+ "${FILESDIR}"/${PN}-3.0.10-slave-delay-fix.patch
+)
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e "s/=> 'percona-toolkit',/=> 'Percona::Toolkit',/g" \
+ Makefile.PL || die
+}
diff --git a/dev-db/percona-toolkit/percona-toolkit-3.0.10.ebuild b/dev-db/percona-toolkit/percona-toolkit-3.0.10.ebuild
new file mode 100644
index 000000000000..8cb91309b313
--- /dev/null
+++ b/dev-db/percona-toolkit/percona-toolkit-3.0.10.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit perl-module
+
+DESCRIPTION="Advanced command-line tools to perform a variety of MySQL and system tasks"
+HOMEPAGE="https://www.percona.com/software/mysql-tools/percona-toolkit"
+SRC_URI="https://www.percona.com/downloads/${PN}/${PV}/source/tarball/${P}.tar.gz"
+
+LICENSE="|| ( GPL-2 Artistic )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+# Package warrants IUSE doc
+IUSE=""
+
+COMMON_DEPEND="dev-perl/DBI
+ dev-perl/DBD-mysql
+ virtual/perl-Time-HiRes"
+RDEPEND="${COMMON_DEPEND}
+ dev-perl/JSON
+ dev-perl/libwww-perl
+ dev-perl/Role-Tiny
+ virtual/perl-File-Path
+ virtual/perl-Getopt-Long
+ virtual/perl-Time-Local
+ virtual/perl-Digest-MD5
+ virtual/perl-IO-Compress
+ virtual/perl-File-Temp
+ virtual/perl-File-Spec
+ virtual/perl-Scalar-List-Utils
+ dev-perl/TermReadKey"
+DEPEND="${COMMON_DEPEND}
+ virtual/perl-ExtUtils-MakeMaker"
+
+# Bug #501904 - CVE-2014-2029
+# sed -i -e '/^=item --\[no\]version-check/,/^default: yes/{/^default: yes/d}' bin/*
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.0.7-no-versioncheck.patch
+)
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e "s/=> 'percona-toolkit',/=> 'Percona::Toolkit',/g" \
+ Makefile.PL || die
+}
diff --git a/dev-db/percona-toolkit/percona-toolkit-3.0.7.ebuild b/dev-db/percona-toolkit/percona-toolkit-3.0.7.ebuild
new file mode 100644
index 000000000000..664d8424f999
--- /dev/null
+++ b/dev-db/percona-toolkit/percona-toolkit-3.0.7.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit perl-module
+
+DESCRIPTION="Advanced command-line tools to perform a variety of MySQL and system tasks"
+HOMEPAGE="https://www.percona.com/software/mysql-tools/percona-toolkit"
+SRC_URI="https://www.percona.com/downloads/${PN}/${PV}/source/tarball/${P}.tar.gz"
+
+LICENSE="|| ( GPL-2 Artistic )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+# Package warrants IUSE doc
+IUSE=""
+
+COMMON_DEPEND="dev-perl/DBI
+ dev-perl/DBD-mysql
+ virtual/perl-Time-HiRes"
+RDEPEND="${COMMON_DEPEND}
+ dev-perl/JSON
+ dev-perl/libwww-perl
+ dev-perl/Role-Tiny
+ virtual/perl-File-Path
+ virtual/perl-Getopt-Long
+ virtual/perl-Time-Local
+ virtual/perl-Digest-MD5
+ virtual/perl-IO-Compress
+ virtual/perl-File-Temp
+ virtual/perl-File-Spec
+ virtual/perl-Scalar-List-Utils
+ dev-perl/TermReadKey"
+DEPEND="${COMMON_DEPEND}
+ virtual/perl-ExtUtils-MakeMaker"
+
+# Bug #501904 - CVE-2014-2029
+# sed -i -e '/^=item --\[no\]version-check/,/^default: yes/{/^default: yes/d}' bin/*
+PATCHES=(
+ "${FILESDIR}/${P}-fix-package-name.patch"
+ "${FILESDIR}/${P}-no-versioncheck.patch"
+)
diff --git a/dev-db/percona-toolkit/percona-toolkit-3.0.8.ebuild b/dev-db/percona-toolkit/percona-toolkit-3.0.8.ebuild
new file mode 100644
index 000000000000..8cb91309b313
--- /dev/null
+++ b/dev-db/percona-toolkit/percona-toolkit-3.0.8.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit perl-module
+
+DESCRIPTION="Advanced command-line tools to perform a variety of MySQL and system tasks"
+HOMEPAGE="https://www.percona.com/software/mysql-tools/percona-toolkit"
+SRC_URI="https://www.percona.com/downloads/${PN}/${PV}/source/tarball/${P}.tar.gz"
+
+LICENSE="|| ( GPL-2 Artistic )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+# Package warrants IUSE doc
+IUSE=""
+
+COMMON_DEPEND="dev-perl/DBI
+ dev-perl/DBD-mysql
+ virtual/perl-Time-HiRes"
+RDEPEND="${COMMON_DEPEND}
+ dev-perl/JSON
+ dev-perl/libwww-perl
+ dev-perl/Role-Tiny
+ virtual/perl-File-Path
+ virtual/perl-Getopt-Long
+ virtual/perl-Time-Local
+ virtual/perl-Digest-MD5
+ virtual/perl-IO-Compress
+ virtual/perl-File-Temp
+ virtual/perl-File-Spec
+ virtual/perl-Scalar-List-Utils
+ dev-perl/TermReadKey"
+DEPEND="${COMMON_DEPEND}
+ virtual/perl-ExtUtils-MakeMaker"
+
+# Bug #501904 - CVE-2014-2029
+# sed -i -e '/^=item --\[no\]version-check/,/^default: yes/{/^default: yes/d}' bin/*
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.0.7-no-versioncheck.patch
+)
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e "s/=> 'percona-toolkit',/=> 'Percona::Toolkit',/g" \
+ Makefile.PL || die
+}
diff --git a/dev-db/percona-toolkit/percona-toolkit-3.0.9.ebuild b/dev-db/percona-toolkit/percona-toolkit-3.0.9.ebuild
new file mode 100644
index 000000000000..8cb91309b313
--- /dev/null
+++ b/dev-db/percona-toolkit/percona-toolkit-3.0.9.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit perl-module
+
+DESCRIPTION="Advanced command-line tools to perform a variety of MySQL and system tasks"
+HOMEPAGE="https://www.percona.com/software/mysql-tools/percona-toolkit"
+SRC_URI="https://www.percona.com/downloads/${PN}/${PV}/source/tarball/${P}.tar.gz"
+
+LICENSE="|| ( GPL-2 Artistic )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+# Package warrants IUSE doc
+IUSE=""
+
+COMMON_DEPEND="dev-perl/DBI
+ dev-perl/DBD-mysql
+ virtual/perl-Time-HiRes"
+RDEPEND="${COMMON_DEPEND}
+ dev-perl/JSON
+ dev-perl/libwww-perl
+ dev-perl/Role-Tiny
+ virtual/perl-File-Path
+ virtual/perl-Getopt-Long
+ virtual/perl-Time-Local
+ virtual/perl-Digest-MD5
+ virtual/perl-IO-Compress
+ virtual/perl-File-Temp
+ virtual/perl-File-Spec
+ virtual/perl-Scalar-List-Utils
+ dev-perl/TermReadKey"
+DEPEND="${COMMON_DEPEND}
+ virtual/perl-ExtUtils-MakeMaker"
+
+# Bug #501904 - CVE-2014-2029
+# sed -i -e '/^=item --\[no\]version-check/,/^default: yes/{/^default: yes/d}' bin/*
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.0.7-no-versioncheck.patch
+)
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e "s/=> 'percona-toolkit',/=> 'Percona::Toolkit',/g" \
+ Makefile.PL || die
+}
diff --git a/dev-db/percona-xtrabackup-2.4.10 b/dev-db/percona-xtrabackup-2.4.10
deleted file mode 100644
index df6cff802f22..000000000000
--- a/dev-db/percona-xtrabackup-2.4.10
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=app-arch/lz4:0= app-editors/vim-core <dev-libs/boost-1.65.0:= dev-libs/libaio <dev-libs/libedit-20170329.3.1 dev-libs/libev dev-libs/libevent:0= dev-libs/libgcrypt:0= dev-libs/libgpg-error dev-python/sphinx net-misc/curl sys-libs/zlib:= sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=Hot backup utility for MySQL based servers
-EAPI=6
-HOMEPAGE=https://www.percona.com/software/mysql-database/percona-xtrabackup
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=app-arch/lz4:0= app-editors/vim-core <dev-libs/boost-1.65.0:= dev-libs/libaio <dev-libs/libedit-20170329.3.1 dev-libs/libev dev-libs/libevent:0= dev-libs/libgcrypt:0= dev-libs/libgpg-error dev-python/sphinx net-misc/curl sys-libs/zlib:= !dev-db/xtrabackup-bin dev-perl/DBD-mysql
-SLOT=0
-SRC_URI=https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.4.10/source/tarball/percona-xtrabackup-2.4.10.tar.gz
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=2168719343ce5f734f58a300e99891bb
diff --git a/dev-db/percona-xtrabackup-2.4.11 b/dev-db/percona-xtrabackup-2.4.11
deleted file mode 100644
index 35644a67659d..000000000000
--- a/dev-db/percona-xtrabackup-2.4.11
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=app-arch/lz4:0= app-editors/vim-core <dev-libs/boost-1.65.0:= dev-libs/libaio <dev-libs/libedit-20170329.3.1 dev-libs/libev dev-libs/libevent:0= dev-libs/libgcrypt:0= dev-libs/libgpg-error dev-python/sphinx net-misc/curl sys-libs/zlib:= sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=Hot backup utility for MySQL based servers
-EAPI=6
-HOMEPAGE=https://www.percona.com/software/mysql-database/percona-xtrabackup
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=app-arch/lz4:0= app-editors/vim-core <dev-libs/boost-1.65.0:= dev-libs/libaio <dev-libs/libedit-20170329.3.1 dev-libs/libev dev-libs/libevent:0= dev-libs/libgcrypt:0= dev-libs/libgpg-error dev-python/sphinx net-misc/curl sys-libs/zlib:= !dev-db/xtrabackup-bin dev-perl/DBD-mysql
-SLOT=0
-SRC_URI=https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.4.11/source/tarball/percona-xtrabackup-2.4.11.tar.gz
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=26fa56202f8d3baf9701c9fafeae7f4b
diff --git a/dev-db/percona-xtrabackup-2.4.12 b/dev-db/percona-xtrabackup-2.4.12
deleted file mode 100644
index f49184ac8a3e..000000000000
--- a/dev-db/percona-xtrabackup-2.4.12
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=app-arch/lz4:0= app-editors/vim-core <dev-libs/boost-1.65.0:= dev-libs/libaio <dev-libs/libedit-20170329.3.1 dev-libs/libev dev-libs/libevent:0= dev-libs/libgcrypt:0= dev-libs/libgpg-error dev-python/sphinx net-misc/curl sys-libs/zlib:= sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=Hot backup utility for MySQL based servers
-EAPI=6
-HOMEPAGE=https://www.percona.com/software/mysql-database/percona-xtrabackup
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=app-arch/lz4:0= app-editors/vim-core <dev-libs/boost-1.65.0:= dev-libs/libaio <dev-libs/libedit-20170329.3.1 dev-libs/libev dev-libs/libevent:0= dev-libs/libgcrypt:0= dev-libs/libgpg-error dev-python/sphinx net-misc/curl sys-libs/zlib:= !dev-db/xtrabackup-bin dev-perl/DBD-mysql
-SLOT=0
-SRC_URI=https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.4.12/source/tarball/percona-xtrabackup-2.4.12.tar.gz
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=26fa56202f8d3baf9701c9fafeae7f4b
diff --git a/dev-db/percona-xtrabackup-2.4.9 b/dev-db/percona-xtrabackup-2.4.9
deleted file mode 100644
index 479ece4d899e..000000000000
--- a/dev-db/percona-xtrabackup-2.4.9
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=app-arch/lz4:0= app-editors/vim-core <dev-libs/boost-1.65.0:= dev-libs/libaio <dev-libs/libedit-20170329.3.1 dev-libs/libev dev-libs/libevent:0= dev-libs/libgcrypt:0= dev-libs/libgpg-error dev-python/sphinx net-misc/curl sys-libs/zlib sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=Hot backup utility for MySQL based servers
-EAPI=6
-HOMEPAGE=https://www.percona.com/software/mysql-database/percona-xtrabackup
-KEYWORDS=amd64 x86
-LICENSE=GPL-2
-RDEPEND=app-arch/lz4:0= app-editors/vim-core <dev-libs/boost-1.65.0:= dev-libs/libaio <dev-libs/libedit-20170329.3.1 dev-libs/libev dev-libs/libevent:0= dev-libs/libgcrypt:0= dev-libs/libgpg-error dev-python/sphinx net-misc/curl sys-libs/zlib !dev-db/xtrabackup-bin dev-perl/DBD-mysql
-SLOT=0
-SRC_URI=https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.4.9/source/tarball/percona-xtrabackup-2.4.9.tar.gz
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=bcdeead9783a1bc580037c06a3a45324
diff --git a/dev-db/percona-xtrabackup-bin-2.4.10 b/dev-db/percona-xtrabackup-bin-2.4.10
deleted file mode 100644
index 6ffeab31e93c..000000000000
--- a/dev-db/percona-xtrabackup-bin-2.4.10
+++ /dev/null
@@ -1,10 +0,0 @@
-DEFINED_PHASES=install postinst unpack
-DESCRIPTION=MySQL hot backup software. non-blocking backups for InnoDB/XtraDB databases
-EAPI=6
-HOMEPAGE=https://www.percona.com/software/percona-xtrabackup
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=dev-libs/libaio dev-libs/libgcrypt:0/20 dev-libs/libgpg-error dev-perl/DBD-mysql sys-libs/zlib sys-process/numactl
-SLOT=0
-SRC_URI=amd64? ( https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.4.10/binary/tarball/percona-xtrabackup-2.4.10-Linux-x86_64.libgcrypt20.tar.gz ) x86? ( https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.4.10/binary/tarball/percona-xtrabackup-2.4.10-Linux-i686.libgcrypt20.tar.gz )
-_md5_=d89f231429321b7c2adbe9314b4dd5a7
diff --git a/dev-db/percona-xtrabackup-bin-2.4.11 b/dev-db/percona-xtrabackup-bin-2.4.11
deleted file mode 100644
index 44604c68fda8..000000000000
--- a/dev-db/percona-xtrabackup-bin-2.4.11
+++ /dev/null
@@ -1,10 +0,0 @@
-DEFINED_PHASES=install postinst unpack
-DESCRIPTION=MySQL hot backup software. non-blocking backups for InnoDB/XtraDB databases
-EAPI=6
-HOMEPAGE=https://www.percona.com/software/percona-xtrabackup
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=dev-libs/libaio dev-libs/libgcrypt:0/20 dev-libs/libgpg-error dev-perl/DBD-mysql sys-libs/zlib sys-process/numactl
-SLOT=0
-SRC_URI=amd64? ( https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.4.11/binary/tarball/percona-xtrabackup-2.4.11-Linux-x86_64.libgcrypt20.tar.gz ) x86? ( https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.4.11/binary/tarball/percona-xtrabackup-2.4.11-Linux-i686.libgcrypt20.tar.gz )
-_md5_=d89f231429321b7c2adbe9314b4dd5a7
diff --git a/dev-db/percona-xtrabackup-bin-2.4.9 b/dev-db/percona-xtrabackup-bin-2.4.9
deleted file mode 100644
index a57b54c1aa52..000000000000
--- a/dev-db/percona-xtrabackup-bin-2.4.9
+++ /dev/null
@@ -1,10 +0,0 @@
-DEFINED_PHASES=install postinst unpack
-DESCRIPTION=MySQL hot backup software. non-blocking backups for InnoDB/XtraDB databases
-EAPI=6
-HOMEPAGE=https://www.percona.com/software/percona-xtrabackup
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=dev-libs/libaio dev-libs/libgcrypt:11/11 dev-libs/libgpg-error dev-perl/DBD-mysql sys-libs/zlib
-SLOT=0
-SRC_URI=amd64? ( https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.4.9/binary/tarball/percona-xtrabackup-2.4.9-Linux-x86_64.tar.gz ) x86? ( https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.4.9/binary/tarball/percona-xtrabackup-2.4.9-Linux-i686.tar.gz )
-_md5_=7863434d61f62c05fa855f5af29e2b5a
diff --git a/dev-db/percona-xtrabackup-bin/Manifest b/dev-db/percona-xtrabackup-bin/Manifest
new file mode 100644
index 000000000000..ff13d570863a
--- /dev/null
+++ b/dev-db/percona-xtrabackup-bin/Manifest
@@ -0,0 +1,10 @@
+DIST percona-xtrabackup-2.4.10-Linux-i686.libgcrypt20.tar.gz 84004091 BLAKE2B 0fde32a53aaba54d71e34b729ba4d3dc94c21d8852a4c87da221b6967b6e9c6b59c7fc4966724cbdf3fd474082b3e14717dc34b30b3f235b2271c0f7fdbf52e8 SHA512 07e75c0770736f2566d44395a5ed455b5f90a64244754e621e9c90d8e7a0ad3fe1d7a05037b9f0ecba53b821a8f1ad4d51914ef0b414ae470091ccd489379b19
+DIST percona-xtrabackup-2.4.10-Linux-x86_64.libgcrypt20.tar.gz 86736776 BLAKE2B b55915b1ad34bb55668b90de2441502491e98d2a685932848e756ea61562592416a05eba33d0c6df2bcad9f113b867b64eca39813a3683b25c18574535ba2b70 SHA512 1293e9511e09cd8cac2ef2a117282d3f79573974b7b7c3ffe6e80fe1c57edb27f32fe19e14c0ea643084c62ad83f6e5e25b5f01671628735fae940fcfb7795f1
+DIST percona-xtrabackup-2.4.11-Linux-i686.libgcrypt20.tar.gz 85158090 BLAKE2B 3d6565542208d1a9c74154d0a7e23610a34416f4840bcff240a262958fe4e4b0f489883349760934469619d225dccc7a2d531919e716dfdc3c2f10b1f98263e2 SHA512 bd6419f1b2e79e8e41817c677209a0d08912b247314f611689e0208028d4870e1e2a2b559fe8d60a3a369704aaee57e300643d9d355f083bb89c950f13d724bb
+DIST percona-xtrabackup-2.4.11-Linux-x86_64.libgcrypt20.tar.gz 87975988 BLAKE2B 850b06d3e063b2884f0731ada7ad20e09816e38f60ee5eef2b1150c2b1f0cd59082d26fa026bf7e80ccebdf6b513ab8af6c7d228ade96d532ef41a74490093e9 SHA512 dc412e3ad65a5d3aed6053e107a79094760b868f008171c9aaee190c97e666a38716b0c7d3e7f3db74eecff98b35c114be29114d50630f554a0c2cb0b1b71cfe
+DIST percona-xtrabackup-2.4.9-Linux-i686.tar.gz 79816483 BLAKE2B 0fd97ee14c97f66edf629fa0300bfa2d6b333ac5942f5cee46dd9d0ad04ef2fe12750209971ff8f6a8ca225a85deaa42ca64c484e12e60c85789153689e55c42 SHA512 014921b0ea9fec783adbdd4556301e8df77f801729faae5b2b7245c349df069fc3af33ebef5ec65ef0e020c7b0ec8ebf4aa7a7acc0e9936c6f4a90b721a5de19
+DIST percona-xtrabackup-2.4.9-Linux-x86_64.tar.gz 90282874 BLAKE2B 2c4cdb8c6da443baf01857fbe4b27be002df370b67687f417a9fde6b08a5e72482552b165a9f27fda305787b42089fb138a4fca2f1d683afbd42efa23746b13c SHA512 24138c098d8e674de291dc494c38f2fce52f4d6a5a2552a62b34ea801b867431917449656f990043c7bbbc1e18a8806c4343eadbe1fea17e36ff1b10109e5047
+EBUILD percona-xtrabackup-bin-2.4.10.ebuild 1530 BLAKE2B 87233dfc8725ce661367ff5d426fdf0b4e1f9335295abbe1f154715a19cc2658a60d84e4040ea837d2c6b0b0d61b493fe1836dd632cec01211e8eb96b803d308 SHA512 87ab06a801645538a5d8a335c22ab16a21a507681ffbefeeaeb2fa0069e231cf8f332ffce63481bd6ffd8a185d451cbdd56f93ce74fd9b70693f62a660efbc29
+EBUILD percona-xtrabackup-bin-2.4.11.ebuild 1530 BLAKE2B 87233dfc8725ce661367ff5d426fdf0b4e1f9335295abbe1f154715a19cc2658a60d84e4040ea837d2c6b0b0d61b493fe1836dd632cec01211e8eb96b803d308 SHA512 87ab06a801645538a5d8a335c22ab16a21a507681ffbefeeaeb2fa0069e231cf8f332ffce63481bd6ffd8a185d451cbdd56f93ce74fd9b70693f62a660efbc29
+EBUILD percona-xtrabackup-bin-2.4.9.ebuild 1461 BLAKE2B fbe02435623b2c09f811dc5683733fbc2768e67a498f4e465c27f0f28a6341eb2ce92ab1192dc99aaed1a590da8a9c4f0183e1a030ad49253a35ff7cd81779e1 SHA512 9227a8efb509e94bd6be062959de7447bc8461b7278a0b7b633a58ac2a65f17726902ba9ec5d5a407d5e913cbe1c62620d01b139fd303d798567ce1b81b92dd2
+MISC metadata.xml 249 BLAKE2B f870f9dc7bc1a515f782f4c1c544b6473b3ec16235b88a9930783ed8f7aa7f010838c37e225840b61a56c5f01c70ac3b50560fc2f5bc908418c341f51620ffe7 SHA512 1723b9b2663814b898832e18aea1a02520775e545e256fb70a8829e2b0515e59b5abab985c995b9ae2f509d95ea4601ac0085ab0d1653cdda0ebe90f775f6e5b
diff --git a/dev-db/percona-xtrabackup-bin/metadata.xml b/dev-db/percona-xtrabackup-bin/metadata.xml
new file mode 100644
index 000000000000..5840601f180f
--- /dev/null
+++ b/dev-db/percona-xtrabackup-bin/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>idl0r@gentoo.org</email>
+ <name>Christian Ruppert</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-db/percona-xtrabackup-bin/percona-xtrabackup-bin-2.4.10.ebuild b/dev-db/percona-xtrabackup-bin/percona-xtrabackup-bin-2.4.10.ebuild
new file mode 100644
index 000000000000..2e9e7ddc7525
--- /dev/null
+++ b/dev-db/percona-xtrabackup-bin/percona-xtrabackup-bin-2.4.10.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+MY_PN="${PN%-bin}"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="MySQL hot backup software. non-blocking backups for InnoDB/XtraDB databases"
+HOMEPAGE="https://www.percona.com/software/percona-xtrabackup"
+SRC_URI="
+ amd64? (
+ https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-${PV}/binary/tarball/${MY_P}-Linux-x86_64.libgcrypt20.tar.gz
+ )
+ x86? (
+ https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-${PV}/binary/tarball/${MY_P}-Linux-i686.libgcrypt20.tar.gz
+ )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# NOTE: dev-perl/DBD-mysql still necessary, now for bin/xtrabackup?
+DEPEND=""
+RDEPEND="dev-libs/libaio
+ dev-libs/libgcrypt:0/20
+ dev-libs/libgpg-error
+ dev-perl/DBD-mysql
+ sys-libs/zlib
+ sys-process/numactl"
+
+QA_PREBUILT="usr/bin/*"
+
+src_unpack() {
+ default
+
+ if use amd64; then
+ S="${WORKDIR}/${MY_P}-Linux-x86_64"
+ elif use x86; then
+ S="${WORKDIR}/${MY_P}-Linux-i686"
+ fi
+}
+
+src_install() {
+ # Two new tools with an old libcurl.so.3 dep...
+ # TODO: Wait for a new release using libcurl.so.4
+ # net-misc/curl dev-libs/libev
+ # dobin bin/xbcloud{,_osenv}
+
+ for tool in xbcrypt xbstream xtrabackup; do
+ dobin bin/${tool}
+ done
+
+ for man in innobackupex xbcrypt xbstream xtrabackup; do
+ doman man/man1/${man}.1
+ done
+
+ dosym xtrabackup /usr/bin/innobackupex
+}
+
+pkg_postinst() {
+ ewarn "innobackupex got deprecated in 2.3.x series and is just a symlink to xtrabackup"
+}
diff --git a/dev-db/percona-xtrabackup-bin/percona-xtrabackup-bin-2.4.11.ebuild b/dev-db/percona-xtrabackup-bin/percona-xtrabackup-bin-2.4.11.ebuild
new file mode 100644
index 000000000000..2e9e7ddc7525
--- /dev/null
+++ b/dev-db/percona-xtrabackup-bin/percona-xtrabackup-bin-2.4.11.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+MY_PN="${PN%-bin}"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="MySQL hot backup software. non-blocking backups for InnoDB/XtraDB databases"
+HOMEPAGE="https://www.percona.com/software/percona-xtrabackup"
+SRC_URI="
+ amd64? (
+ https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-${PV}/binary/tarball/${MY_P}-Linux-x86_64.libgcrypt20.tar.gz
+ )
+ x86? (
+ https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-${PV}/binary/tarball/${MY_P}-Linux-i686.libgcrypt20.tar.gz
+ )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# NOTE: dev-perl/DBD-mysql still necessary, now for bin/xtrabackup?
+DEPEND=""
+RDEPEND="dev-libs/libaio
+ dev-libs/libgcrypt:0/20
+ dev-libs/libgpg-error
+ dev-perl/DBD-mysql
+ sys-libs/zlib
+ sys-process/numactl"
+
+QA_PREBUILT="usr/bin/*"
+
+src_unpack() {
+ default
+
+ if use amd64; then
+ S="${WORKDIR}/${MY_P}-Linux-x86_64"
+ elif use x86; then
+ S="${WORKDIR}/${MY_P}-Linux-i686"
+ fi
+}
+
+src_install() {
+ # Two new tools with an old libcurl.so.3 dep...
+ # TODO: Wait for a new release using libcurl.so.4
+ # net-misc/curl dev-libs/libev
+ # dobin bin/xbcloud{,_osenv}
+
+ for tool in xbcrypt xbstream xtrabackup; do
+ dobin bin/${tool}
+ done
+
+ for man in innobackupex xbcrypt xbstream xtrabackup; do
+ doman man/man1/${man}.1
+ done
+
+ dosym xtrabackup /usr/bin/innobackupex
+}
+
+pkg_postinst() {
+ ewarn "innobackupex got deprecated in 2.3.x series and is just a symlink to xtrabackup"
+}
diff --git a/dev-db/percona-xtrabackup-bin/percona-xtrabackup-bin-2.4.9.ebuild b/dev-db/percona-xtrabackup-bin/percona-xtrabackup-bin-2.4.9.ebuild
new file mode 100644
index 000000000000..061d2fc6a0c8
--- /dev/null
+++ b/dev-db/percona-xtrabackup-bin/percona-xtrabackup-bin-2.4.9.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+MY_PN="${PN%-bin}"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="MySQL hot backup software. non-blocking backups for InnoDB/XtraDB databases"
+HOMEPAGE="https://www.percona.com/software/percona-xtrabackup"
+SRC_URI="
+ amd64? (
+ https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-${PV}/binary/tarball/${MY_P}-Linux-x86_64.tar.gz
+ )
+ x86? (
+ https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-${PV}/binary/tarball/${MY_P}-Linux-i686.tar.gz
+ )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# NOTE: dev-perl/DBD-mysql still necessary, now for bin/xtrabackup?
+DEPEND=""
+RDEPEND="dev-libs/libaio
+ dev-libs/libgcrypt:11/11
+ dev-libs/libgpg-error
+ dev-perl/DBD-mysql
+ sys-libs/zlib"
+
+src_unpack() {
+ default
+
+ if use amd64; then
+ S="${WORKDIR}/${MY_P}-Linux-x86_64"
+ elif use x86; then
+ S="${WORKDIR}/${MY_P}-Linux-i686"
+ fi
+}
+
+src_install() {
+ # Two new tools with an old libcurl.so.3 dep...
+ # TODO: Wait for a new release using libcurl.so.4
+ # net-misc/curl dev-libs/libev
+ # dobin bin/xbcloud{,_osenv}
+
+ for tool in xbcrypt xbstream xtrabackup; do
+ dobin bin/${tool}
+ done
+
+ for man in innobackupex xbcrypt xbstream xtrabackup; do
+ doman man/man1/${man}.1
+ done
+
+ dosym xtrabackup /usr/bin/innobackupex
+}
+
+pkg_postinst() {
+ ewarn "innobackupex got deprecated in 2.3.x series and is just a symlink to xtrabackup"
+}
diff --git a/dev-db/percona-xtrabackup/Manifest b/dev-db/percona-xtrabackup/Manifest
new file mode 100644
index 000000000000..7c967866d293
--- /dev/null
+++ b/dev-db/percona-xtrabackup/Manifest
@@ -0,0 +1,13 @@
+AUX percona-xtrabackup-2.4.10-fix-gcc6-isystem.patch 3822 BLAKE2B 796553a8760ecbf1c64e8aa349168a6a3c3ee2b03ee0ce123b574f20b2056b7238733486d78ecb90b2681ae15431aecf67dab26734324840c1b0ad5af319d69e SHA512 223ce359c662be6b67f5bb056c468aa14f73a54657a737e76d674e9549a18f924a34f34f0ab5a27a00f42f16c50b32553ee64f72e7bb8c76305c6d72aa34a7fd
+AUX percona-xtrabackup-2.4.11-fix-gcc6-isystem.patch 4034 BLAKE2B 0ce65196d4679481d3197e95d9efc3783c1e4f37dcd602588fc3e8da5957f63cf68b9222a7ab12fe2e8fd19d69e8a24e9f86cc7dd2ba776d473a95b9279a1f24 SHA512 4dd9352b8d8ae46782925daae27cd5ad1765c5f4ab26f1f5f07fbac68f0cb83e4979009dddacd8a55ba818c93014b46dee997b43f6951820337e0cb79733f60e
+AUX percona-xtrabackup-2.4.6-fix-gcc6-isystem.patch 3801 BLAKE2B 2494f55253e820c6b9bc079ff96d7894c9c16aedb6ed6017c7d5474007ebf19ef03b735a5b76bc67265b858205285f82f626f1058a216e0094c11a9440a11cd0 SHA512 8ab3cb41092f3ce324213917842d0cf72d2b501c60238007b57702458c572ea0d7faa159dec10367bfef97584b0b2dfc0a153bba5f13ac9efebeae2f1e2c7a39
+AUX percona-xtrabackup-2.4.6-remove-boost-version-check.patch 485 BLAKE2B c9330c5b0a163a0d95682a81cee9e3c99cebdb2a6ed124cb5f424ade92728b11b29685e2c1eee0fbf9df613f5a1b08cc4021daec8b60a6c66ab51b08a397b33d SHA512 31277d6bef14a6b642ce425ce9f2c92fe49f905c42c720a583cb45406c1ee18ccbf2bef224b9b89bb02de18aecc1ec48576f5ca0c9bfef0cc683d78218506906
+DIST percona-xtrabackup-2.4.10.tar.gz 59217573 BLAKE2B 3a4485b6d8c5b9ad2ca4b60603383b18ec0a3da7e4cca3b5a1ee2d24b6ca17844cc406123bbaf9313fc17570db0168c13af16d17404e075fc8140731ef9b79c2 SHA512 a4ebbebabc8b9b5fec9777fc3569c530b4a88a1b75d3e78d2edf7627a2e8cadf7aa2d8988963136b331a274c80371ff9b7fafcc7d8a129f446eb58777ce1764f
+DIST percona-xtrabackup-2.4.11.tar.gz 59267058 BLAKE2B 1de9905a2c191a58290e87a90e36c263f66935ce0846af205e1a0accc6e9b2938dd8679f65acc4b51ca956f2bcbca831cd10c9d50c01c2ecfd9d059fde500e20 SHA512 2fa4757fe944fb4c8113dca1fa25beaa23de5d5f9fc830b36a6d9eb4efb7e7fb1eec10f91be5e91fd3b7980bc157832ed52c9da59a342f6aae05ceae8ecdf760
+DIST percona-xtrabackup-2.4.12.tar.gz 57232309 BLAKE2B 71b1dc0448b521b252463fb68ff111def3b71aebe187d3196e3c82f56539db02347d94713bea3dda5978f13b86b88a564ad6f12e3907134edc49a41dcde98e51 SHA512 228a48617eec3b824c7cb33882796ac2beb6ca1895fe73f7004e8dfd0b8bd1df471c39ba1c3fca2a819140d934a8a884f61dafae7cb56023dc7bc844d2846c8a
+DIST percona-xtrabackup-2.4.9.tar.gz 58001052 BLAKE2B d2a25a5ca2190ccf82a600245a0e21848abd9a33ea937a81b2ba9c7e518b24291080a3d3c4b8e6d02f51523e5cf2e78680e4b351c4f2bcd8f122c58f62c14418 SHA512 913431f0fa648731efa2e9bc87c9431a28816b0eca12e1c6df6e7ab04a4148ddd8fa03c9792335ad152b05bede5b9fe64ce94a393b5e4e37d4b18f4989b0ccdb
+EBUILD percona-xtrabackup-2.4.10.ebuild 2055 BLAKE2B 9fc3b57d1f24e80c5925eff40aa0822a1742756f897f1980341fe2778c47b12a35102422c703cbc44f5734377c8be2678ea0c05a32caf0f0fa34d631eaf31199 SHA512 5fe655f9fba940d50af9b633d4f5f8b6d88eb9add49ee5fa1233bd71e1f67f60b998b3775800e527f54c4f8fd4c39c527eb48fa8badaddac257622615dece9f8
+EBUILD percona-xtrabackup-2.4.11.ebuild 2055 BLAKE2B 99a8568224308799d84c2ccfbebb1935e065b53ae2bdd3ca07e3cb33d5be6b53042389483941e06a7d58284a79bd09b96c15584456fbb051c516b5979c9d8117 SHA512 d353ded350a186cd244e8fdda2081cfe79bc78ee0a5ea4a9104afd4795b7a827096dec0ada7e1d268561cf910da0004b0015ac0b2e20a333bb972b15895c7bde
+EBUILD percona-xtrabackup-2.4.12.ebuild 2055 BLAKE2B 99a8568224308799d84c2ccfbebb1935e065b53ae2bdd3ca07e3cb33d5be6b53042389483941e06a7d58284a79bd09b96c15584456fbb051c516b5979c9d8117 SHA512 d353ded350a186cd244e8fdda2081cfe79bc78ee0a5ea4a9104afd4795b7a827096dec0ada7e1d268561cf910da0004b0015ac0b2e20a333bb972b15895c7bde
+EBUILD percona-xtrabackup-2.4.9.ebuild 1804 BLAKE2B db219c17e234b628a1730f23fa96f1766353b0de1615f1f93cc3b5ebb45faf405ea31215547fe0c1778dd65e48b743ea2b68727792695ca014e2d6f13bc20839 SHA512 25a54c649707d02e84ae5504122d725b1045fed258ed12d3643022c5d03fa1a008f13982cb7c5dbb02d212225ba8230057634dc867ab082bc9fc9692155c2dc2
+MISC metadata.xml 563 BLAKE2B 5c657288a3cd0ece118920159db14756bad6a2faa308e5495cdf1eca6dd160dfbd05c979857fd55a031bc0acacdc7a81db628c0ca31a9b2d3dae226838e2abf5 SHA512 050e1a78c8c7f4b024b207754005dcec28188697b3be2d93c30f800f8a91da1a3376b4501a4a6e061dcd096a958a9a4cba62251f5003b2056dfadee5bfda6716
diff --git a/dev-db/percona-xtrabackup/files/percona-xtrabackup-2.4.10-fix-gcc6-isystem.patch b/dev-db/percona-xtrabackup/files/percona-xtrabackup-2.4.10-fix-gcc6-isystem.patch
new file mode 100644
index 000000000000..c38398a1ce77
--- /dev/null
+++ b/dev-db/percona-xtrabackup/files/percona-xtrabackup-2.4.10-fix-gcc6-isystem.patch
@@ -0,0 +1,112 @@
+Do not use -isystem to add headers, as they break GCC 6's header wrapping.
+See also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129
+
+--- a/client/CMakeLists.txt
++++ b/client/CMakeLists.txt
+@@ -52,7 +52,7 @@ IF(NOT WITHOUT_SERVER)
+ upgrade/program.cc
+ )
+ ADD_COMPILE_FLAGS(
+- upgrade/program.cc COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ upgrade/program.cc COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+ TARGET_LINK_LIBRARIES(mysql_upgrade mysqlclient client_base mysqlcheck_core)
+ ADD_DEPENDENCIES(mysql_upgrade GenFixPrivs GenSysSchema)
+--- a/client/base/CMakeLists.txt
++++ b/client/base/CMakeLists.txt
+@@ -49,7 +49,7 @@ ADD_COMPILE_FLAGS(
+ mutex.cc
+ mysql_query_runner.cc
+ show_variable_query_extractor.cc
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+
+ TARGET_LINK_LIBRARIES(client_base mysqlclient)
+--- a/client/dump/CMakeLists.txt
++++ b/client/dump/CMakeLists.txt
+@@ -50,7 +50,7 @@ IF(USING_LOCAL_BOOST)
+
+ ADD_COMPILE_FLAGS(
+ ${BOOST_LIB_SOURCES}
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+
+ IF(HAVE_clock_gettime_IN_rt)
+@@ -145,7 +145,7 @@ TARGET_LINK_LIBRARIES(mysqlpump_lib
+
+ ADD_COMPILE_FLAGS(
+ ${MYSQLPUMP_LIB_SOURCES}
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+
+ # Files that use Boost sources that trigger compilation warnings
+@@ -179,7 +179,7 @@ ADD_COMPILE_FLAGS(
+ )
+ MYSQL_ADD_EXECUTABLE(mysqlpump program.cc)
+ ADD_COMPILE_FLAGS(
+- program.cc COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ program.cc COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+
+ TARGET_LINK_LIBRARIES(mysqlpump mysqlpump_lib ${LOCAL_BOOST_LIB})
+--- a/libmysqld/CMakeLists.txt
++++ b/libmysqld/CMakeLists.txt
+@@ -123,7 +123,7 @@ ADD_COMPILE_FLAGS(
+ ../sql/item_geofunc_setops.cc
+ ../sql/item_json_func.cc
+ ../sql/spatial.cc
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+
+ ADD_COMPILE_FLAGS(
+--- a/sql/CMakeLists.txt
++++ b/sql/CMakeLists.txt
+@@ -311,7 +311,7 @@ ADD_COMPILE_FLAGS(
+ item_geofunc_setops.cc
+ item_json_func.cc
+ spatial.cc
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+
+ ADD_COMPILE_FLAGS(
+--- a/storage/innobase/xtrabackup/src/CMakeLists.txt
++++ b/storage/innobase/xtrabackup/src/CMakeLists.txt
+@@ -79,7 +79,7 @@ SET(keyring_source_files
+
+ ADD_COMPILE_FLAGS(
+ ${keyring_source_files}
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ -DEMBEDDED_LIBRARY
+ )
+
+--- a/unittest/gunit/CMakeLists.txt
++++ b/unittest/gunit/CMakeLists.txt
+@@ -385,7 +385,7 @@ IF (MERGE_UNITTESTS)
+ ENDIF()
+ ADD_COMPILE_FLAGS(
+ ${MERGE_SMALL_TESTS}
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+ # Fixes "C1128: number of sections exceeded object file format limit" in MSVC
+ IF(WIN32)
+@@ -467,11 +467,11 @@ ENDIF(MERGE_UNITTESTS)
+ ENDIF()
+ ADD_COMPILE_FLAGS(
+ bounded_queue-t.cc
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+ ADD_COMPILE_FLAGS(
+ pump_object_filter-t.cc
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+
+ FOREACH(test ${SERVER_TESTS})
diff --git a/dev-db/percona-xtrabackup/files/percona-xtrabackup-2.4.11-fix-gcc6-isystem.patch b/dev-db/percona-xtrabackup/files/percona-xtrabackup-2.4.11-fix-gcc6-isystem.patch
new file mode 100644
index 000000000000..4fed659cdae6
--- /dev/null
+++ b/dev-db/percona-xtrabackup/files/percona-xtrabackup-2.4.11-fix-gcc6-isystem.patch
@@ -0,0 +1,113 @@
+Do not use -isystem to add headers, as they break GCC 6's header wrapping.
+See also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129
+
+diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
+index dbf1c48..e5d7347 100644
+--- a/client/CMakeLists.txt
++++ b/client/CMakeLists.txt
+@@ -52,7 +52,7 @@ IF(NOT WITHOUT_SERVER)
+ upgrade/program.cc
+ )
+ ADD_COMPILE_FLAGS(
+- upgrade/program.cc COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ upgrade/program.cc COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+ TARGET_LINK_LIBRARIES(mysql_upgrade mysqlclient client_base mysqlcheck_core)
+ ADD_DEPENDENCIES(mysql_upgrade GenFixPrivs GenSysSchema)
+diff --git a/client/base/CMakeLists.txt b/client/base/CMakeLists.txt
+index b206de7..91cce4c 100644
+--- a/client/base/CMakeLists.txt
++++ b/client/base/CMakeLists.txt
+@@ -49,7 +49,7 @@ ADD_COMPILE_FLAGS(
+ mutex.cc
+ mysql_query_runner.cc
+ show_variable_query_extractor.cc
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+
+ TARGET_LINK_LIBRARIES(client_base mysqlclient)
+diff --git a/client/dump/CMakeLists.txt b/client/dump/CMakeLists.txt
+index fdbb631..bae2ce7 100644
+--- a/client/dump/CMakeLists.txt
++++ b/client/dump/CMakeLists.txt
+@@ -50,7 +50,7 @@ IF(USING_LOCAL_BOOST)
+
+ ADD_COMPILE_FLAGS(
+ ${BOOST_LIB_SOURCES}
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+
+ IF(HAVE_clock_gettime_IN_rt)
+@@ -145,7 +145,7 @@ TARGET_LINK_LIBRARIES(mysqlpump_lib
+
+ ADD_COMPILE_FLAGS(
+ ${MYSQLPUMP_LIB_SOURCES}
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+
+ # Files that use Boost sources that trigger compilation warnings
+@@ -179,7 +179,7 @@ ADD_COMPILE_FLAGS(
+ )
+ MYSQL_ADD_EXECUTABLE(mysqlpump program.cc)
+ ADD_COMPILE_FLAGS(
+- program.cc COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ program.cc COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+
+ TARGET_LINK_LIBRARIES(mysqlpump mysqlpump_lib ${LOCAL_BOOST_LIB})
+diff --git a/libmysqld/CMakeLists.txt b/libmysqld/CMakeLists.txt
+index 44c1d26..dac03d9 100644
+--- a/libmysqld/CMakeLists.txt
++++ b/libmysqld/CMakeLists.txt
+@@ -123,7 +123,7 @@ ADD_COMPILE_FLAGS(
+ ../sql/item_geofunc_setops.cc
+ ../sql/item_json_func.cc
+ ../sql/spatial.cc
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+
+ ADD_COMPILE_FLAGS(
+diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt
+index 1d1231f..9a35fa8 100644
+--- a/sql/CMakeLists.txt
++++ b/sql/CMakeLists.txt
+@@ -312,7 +312,7 @@ ADD_COMPILE_FLAGS(
+ item_geofunc_setops.cc
+ item_json_func.cc
+ spatial.cc
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+
+ ADD_COMPILE_FLAGS(
+diff --git a/unittest/gunit/CMakeLists.txt b/unittest/gunit/CMakeLists.txt
+index f0123b8..f2169f9 100644
+--- a/unittest/gunit/CMakeLists.txt
++++ b/unittest/gunit/CMakeLists.txt
+@@ -385,7 +385,7 @@ IF (MERGE_UNITTESTS)
+ ENDIF()
+ ADD_COMPILE_FLAGS(
+ ${MERGE_SMALL_TESTS}
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+ # Fixes "C1128: number of sections exceeded object file format limit" in MSVC
+ IF(WIN32)
+@@ -467,11 +467,11 @@ ENDIF(MERGE_UNITTESTS)
+ ENDIF()
+ ADD_COMPILE_FLAGS(
+ bounded_queue-t.cc
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+ ADD_COMPILE_FLAGS(
+ pump_object_filter-t.cc
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+
+ FOREACH(test ${SERVER_TESTS})
diff --git a/dev-db/percona-xtrabackup/files/percona-xtrabackup-2.4.6-fix-gcc6-isystem.patch b/dev-db/percona-xtrabackup/files/percona-xtrabackup-2.4.6-fix-gcc6-isystem.patch
new file mode 100644
index 000000000000..6418e34a8d6b
--- /dev/null
+++ b/dev-db/percona-xtrabackup/files/percona-xtrabackup-2.4.6-fix-gcc6-isystem.patch
@@ -0,0 +1,112 @@
+Do not use -isystem to add headers, as they break GCC 6's header wrapping.
+See also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129
+
+--- a/client/base/CMakeLists.txt
++++ b/client/base/CMakeLists.txt
+@@ -49,7 +49,7 @@
+ mutex.cc
+ mysql_query_runner.cc
+ show_variable_query_extractor.cc
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+
+ TARGET_LINK_LIBRARIES(client_base mysqlclient)
+--- a/client/CMakeLists.txt
++++ b/client/CMakeLists.txt
+@@ -52,7 +52,7 @@
+ upgrade/program.cc
+ )
+ ADD_COMPILE_FLAGS(
+- upgrade/program.cc COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ upgrade/program.cc COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+ TARGET_LINK_LIBRARIES(mysql_upgrade mysqlclient client_base mysqlcheck_core)
+ ADD_DEPENDENCIES(mysql_upgrade GenFixPrivs GenSysSchema)
+--- a/client/dump/CMakeLists.txt
++++ b/client/dump/CMakeLists.txt
+@@ -68,7 +68,7 @@
+ ADD_COMPILE_FLAGS(
+ ${BOOST_LIB_SOURCES}
+ ${BOOST_THREAD_SOURCES}
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+
+ IF(HAVE_clock_gettime_IN_rt)
+@@ -163,7 +163,7 @@
+
+ ADD_COMPILE_FLAGS(
+ ${MYSQLPUMP_LIB_SOURCES}
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+
+ # Files that use Boost sources that trigger compilation warnings
+@@ -199,7 +199,7 @@
+ )
+ MYSQL_ADD_EXECUTABLE(mysqlpump program.cc)
+ ADD_COMPILE_FLAGS(
+- program.cc COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ program.cc COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+
+ TARGET_LINK_LIBRARIES(mysqlpump mysqlpump_lib ${LOCAL_BOOST_LIB})
+--- a/libmysqld/CMakeLists.txt
++++ b/libmysqld/CMakeLists.txt
+@@ -115,7 +115,7 @@
+ ../sql/item_geofunc_setops.cc
+ ../sql/item_json_func.cc
+ ../sql/spatial.cc
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+
+ # Fixes "C1128: number of sections exceeded object file format limit" in MSVC /MD
+--- a/sql/CMakeLists.txt
++++ b/sql/CMakeLists.txt
+@@ -309,7 +309,7 @@
+ item_geofunc_setops.cc
+ item_json_func.cc
+ spatial.cc
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+
+ # Fixes "C1128: number of sections exceeded object file format limit" in MSVC /MD
+--- a/storage/innobase/xtrabackup/src/CMakeLists.txt
++++ b/storage/innobase/xtrabackup/src/CMakeLists.txt
+@@ -68,7 +68,7 @@
+ ../../../../plugin/keyring/keyring_key.cc
+ ../../../../plugin/keyring/buffered_file_io.cc
+ ../../../../plugin/keyring/keys_container.cc
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+
+ ADD_COMPILE_FLAGS(
+--- a/unittest/gunit/CMakeLists.txt
++++ b/unittest/gunit/CMakeLists.txt
+@@ -378,7 +378,7 @@
+ ENDIF()
+ ADD_COMPILE_FLAGS(
+ ${MERGE_SMALL_TESTS}
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
+
+@@ -453,11 +453,11 @@
+ ENDIF()
+ ADD_COMPILE_FLAGS(
+ bounded_queue-t.cc
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+ ADD_COMPILE_FLAGS(
+ pump_object_filter-t.cc
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+
+ FOREACH(test ${SERVER_TESTS})
diff --git a/dev-db/percona-xtrabackup/files/percona-xtrabackup-2.4.6-remove-boost-version-check.patch b/dev-db/percona-xtrabackup/files/percona-xtrabackup-2.4.6-remove-boost-version-check.patch
new file mode 100644
index 000000000000..48a7fcc783f0
--- /dev/null
+++ b/dev-db/percona-xtrabackup/files/percona-xtrabackup-2.4.6-remove-boost-version-check.patch
@@ -0,0 +1,19 @@
+Remove Boost version check which makes using the
+system boost libraries close to impossible.
+
+--- a/cmake/boost.cmake
++++ b/cmake/boost.cmake
+@@ -262,13 +262,6 @@
+ COULD_NOT_FIND_BOOST()
+ ENDIF()
+
+-IF(NOT BOOST_MINOR_VERSION EQUAL 59)
+- MESSAGE(WARNING "Boost minor version found is ${BOOST_MINOR_VERSION} "
+- "we need 59"
+- )
+- COULD_NOT_FIND_BOOST()
+-ENDIF()
+-
+ MESSAGE(STATUS "BOOST_INCLUDE_DIR ${BOOST_INCLUDE_DIR}")
+
+ # We have a limited set of patches/bugfixes here:
diff --git a/dev-db/percona-xtrabackup/metadata.xml b/dev-db/percona-xtrabackup/metadata.xml
new file mode 100644
index 000000000000..927d7f85fdf7
--- /dev/null
+++ b/dev-db/percona-xtrabackup/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>hydrapolic@gmail.com</email>
+ <name>Tomáš Mózes</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>manwe@manwe.pl</email>
+ <name>Michał Zając</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">percona/percona-xtrabackup</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/percona-xtrabackup/percona-xtrabackup-2.4.10.ebuild b/dev-db/percona-xtrabackup/percona-xtrabackup-2.4.10.ebuild
new file mode 100644
index 000000000000..ec724c075e65
--- /dev/null
+++ b/dev-db/percona-xtrabackup/percona-xtrabackup-2.4.10.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils flag-o-matic
+
+DESCRIPTION="Hot backup utility for MySQL based servers"
+HOMEPAGE="https://www.percona.com/software/mysql-database/percona-xtrabackup"
+SRC_URI="https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-${PV}/source/tarball/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="
+ app-arch/lz4:0=
+ app-editors/vim-core
+ <dev-libs/boost-1.65.0:=
+ dev-libs/libaio
+ <dev-libs/libedit-20170329.3.1
+ dev-libs/libev
+ dev-libs/libevent:0=
+ dev-libs/libgcrypt:0=
+ dev-libs/libgpg-error
+ dev-python/sphinx
+ net-misc/curl
+ sys-libs/zlib:="
+
+RDEPEND="
+ ${DEPEND}
+ !dev-db/xtrabackup-bin
+ dev-perl/DBD-mysql"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.4.6-remove-boost-version-check.patch
+ "${FILESDIR}"/${PN}-2.4.10-fix-gcc6-isystem.patch
+)
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ # remove bundled boost, libedit, libevent, zlib
+ # just to be safe...
+ # We keep lz4 directory because we use extra/lz4/xxhash.c in cmake/libutils.cmake
+ rm -rv \
+ include/boost_1_59_0 \
+ cmd-line-utils/libedit \
+ libevent \
+ zlib || die
+}
+
+src_configure() {
+ # Needed, due to broken handling of CMAKE_BUILD_TYPE leading to
+ #
+ # error: 'fts_ast_node_type_get' was not declared in this scope
+ #
+ append-cppflags -DDBUG_OFF
+
+ # Upstream doesn't support C++14 -- build will fail with -fpermissive error
+ # https://bugs.mysql.com/bug.php?id=87956
+ append-cxxflags $(test-flags-CXX -std=gnu++03) -std=gnu++03
+
+ local mycmakeargs=(
+ -DBUILD_CONFIG=xtrabackup_release
+ -DWITH_EDITLINE=system
+ -DWITH_LIBEVENT=system
+ -DWITH_LZ4=system
+ -DWITH_SSL=bundled # uses yassl, which isn't packaged
+ -DWITH_ZLIB=system
+ -DWITH_PIC=ON
+ )
+
+ local CMAKE_BUILD_TYPE="Release"
+ cmake-utils_src_configure
+}
+
+src_install() {
+ local p="${BUILD_DIR}/storage/innobase/xtrabackup"
+
+ dobin "${p}"/src/{xbcloud,xbcrypt,xbstream,xtrabackup}
+ dosym xtrabackup /usr/bin/innobackupex
+
+ einstalldocs
+ doman "${p}"/doc/source/build/man/*
+}
diff --git a/dev-db/percona-xtrabackup/percona-xtrabackup-2.4.11.ebuild b/dev-db/percona-xtrabackup/percona-xtrabackup-2.4.11.ebuild
new file mode 100644
index 000000000000..8842c1a74b73
--- /dev/null
+++ b/dev-db/percona-xtrabackup/percona-xtrabackup-2.4.11.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils flag-o-matic
+
+DESCRIPTION="Hot backup utility for MySQL based servers"
+HOMEPAGE="https://www.percona.com/software/mysql-database/percona-xtrabackup"
+SRC_URI="https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-${PV}/source/tarball/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="
+ app-arch/lz4:0=
+ app-editors/vim-core
+ <dev-libs/boost-1.65.0:=
+ dev-libs/libaio
+ <dev-libs/libedit-20170329.3.1
+ dev-libs/libev
+ dev-libs/libevent:0=
+ dev-libs/libgcrypt:0=
+ dev-libs/libgpg-error
+ dev-python/sphinx
+ net-misc/curl
+ sys-libs/zlib:="
+
+RDEPEND="
+ ${DEPEND}
+ !dev-db/xtrabackup-bin
+ dev-perl/DBD-mysql"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.4.6-remove-boost-version-check.patch
+ "${FILESDIR}"/${PN}-2.4.11-fix-gcc6-isystem.patch
+)
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ # remove bundled boost, libedit, libevent, zlib
+ # just to be safe...
+ # We keep lz4 directory because we use extra/lz4/xxhash.c in cmake/libutils.cmake
+ rm -rv \
+ include/boost_1_59_0 \
+ cmd-line-utils/libedit \
+ libevent \
+ zlib || die
+}
+
+src_configure() {
+ # Needed, due to broken handling of CMAKE_BUILD_TYPE leading to
+ #
+ # error: 'fts_ast_node_type_get' was not declared in this scope
+ #
+ append-cppflags -DDBUG_OFF
+
+ # Upstream doesn't support C++14 -- build will fail with -fpermissive error
+ # https://bugs.mysql.com/bug.php?id=87956
+ append-cxxflags $(test-flags-CXX -std=gnu++03) -std=gnu++03
+
+ local mycmakeargs=(
+ -DBUILD_CONFIG=xtrabackup_release
+ -DWITH_EDITLINE=system
+ -DWITH_LIBEVENT=system
+ -DWITH_LZ4=system
+ -DWITH_SSL=bundled # uses yassl, which isn't packaged
+ -DWITH_ZLIB=system
+ -DWITH_PIC=ON
+ )
+
+ local CMAKE_BUILD_TYPE="Release"
+ cmake-utils_src_configure
+}
+
+src_install() {
+ local p="${BUILD_DIR}/storage/innobase/xtrabackup"
+
+ dobin "${p}"/src/{xbcloud,xbcrypt,xbstream,xtrabackup}
+ dosym xtrabackup /usr/bin/innobackupex
+
+ einstalldocs
+ doman "${p}"/doc/source/build/man/*
+}
diff --git a/dev-db/percona-xtrabackup/percona-xtrabackup-2.4.12.ebuild b/dev-db/percona-xtrabackup/percona-xtrabackup-2.4.12.ebuild
new file mode 100644
index 000000000000..8842c1a74b73
--- /dev/null
+++ b/dev-db/percona-xtrabackup/percona-xtrabackup-2.4.12.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils flag-o-matic
+
+DESCRIPTION="Hot backup utility for MySQL based servers"
+HOMEPAGE="https://www.percona.com/software/mysql-database/percona-xtrabackup"
+SRC_URI="https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-${PV}/source/tarball/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="
+ app-arch/lz4:0=
+ app-editors/vim-core
+ <dev-libs/boost-1.65.0:=
+ dev-libs/libaio
+ <dev-libs/libedit-20170329.3.1
+ dev-libs/libev
+ dev-libs/libevent:0=
+ dev-libs/libgcrypt:0=
+ dev-libs/libgpg-error
+ dev-python/sphinx
+ net-misc/curl
+ sys-libs/zlib:="
+
+RDEPEND="
+ ${DEPEND}
+ !dev-db/xtrabackup-bin
+ dev-perl/DBD-mysql"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.4.6-remove-boost-version-check.patch
+ "${FILESDIR}"/${PN}-2.4.11-fix-gcc6-isystem.patch
+)
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ # remove bundled boost, libedit, libevent, zlib
+ # just to be safe...
+ # We keep lz4 directory because we use extra/lz4/xxhash.c in cmake/libutils.cmake
+ rm -rv \
+ include/boost_1_59_0 \
+ cmd-line-utils/libedit \
+ libevent \
+ zlib || die
+}
+
+src_configure() {
+ # Needed, due to broken handling of CMAKE_BUILD_TYPE leading to
+ #
+ # error: 'fts_ast_node_type_get' was not declared in this scope
+ #
+ append-cppflags -DDBUG_OFF
+
+ # Upstream doesn't support C++14 -- build will fail with -fpermissive error
+ # https://bugs.mysql.com/bug.php?id=87956
+ append-cxxflags $(test-flags-CXX -std=gnu++03) -std=gnu++03
+
+ local mycmakeargs=(
+ -DBUILD_CONFIG=xtrabackup_release
+ -DWITH_EDITLINE=system
+ -DWITH_LIBEVENT=system
+ -DWITH_LZ4=system
+ -DWITH_SSL=bundled # uses yassl, which isn't packaged
+ -DWITH_ZLIB=system
+ -DWITH_PIC=ON
+ )
+
+ local CMAKE_BUILD_TYPE="Release"
+ cmake-utils_src_configure
+}
+
+src_install() {
+ local p="${BUILD_DIR}/storage/innobase/xtrabackup"
+
+ dobin "${p}"/src/{xbcloud,xbcrypt,xbstream,xtrabackup}
+ dosym xtrabackup /usr/bin/innobackupex
+
+ einstalldocs
+ doman "${p}"/doc/source/build/man/*
+}
diff --git a/dev-db/percona-xtrabackup/percona-xtrabackup-2.4.9.ebuild b/dev-db/percona-xtrabackup/percona-xtrabackup-2.4.9.ebuild
new file mode 100644
index 000000000000..fc4d5f95ea80
--- /dev/null
+++ b/dev-db/percona-xtrabackup/percona-xtrabackup-2.4.9.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils flag-o-matic
+
+DESCRIPTION="Hot backup utility for MySQL based servers"
+HOMEPAGE="https://www.percona.com/software/mysql-database/percona-xtrabackup"
+SRC_URI="https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-${PV}/source/tarball/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+DEPEND="
+ app-arch/lz4:0=
+ app-editors/vim-core
+ <dev-libs/boost-1.65.0:=
+ dev-libs/libaio
+ <dev-libs/libedit-20170329.3.1
+ dev-libs/libev
+ dev-libs/libevent:0=
+ dev-libs/libgcrypt:0=
+ dev-libs/libgpg-error
+ dev-python/sphinx
+ net-misc/curl
+ sys-libs/zlib"
+
+RDEPEND="
+ ${DEPEND}
+ !dev-db/xtrabackup-bin
+ dev-perl/DBD-mysql"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.4.6-remove-boost-version-check.patch
+ "${FILESDIR}"/${PN}-2.4.6-fix-gcc6-isystem.patch
+)
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ # remove bundled lz4, boost, libedit, libevent, zlib
+ # just to be safe...
+ rm -rv \
+ extra/lz4 \
+ include/boost_1_59_0 \
+ cmd-line-utils/libedit \
+ libevent \
+ zlib || die
+}
+
+src_configure() {
+ # Needed, due to broken handling of CMAKE_BUILD_TYPE leading to
+ #
+ # error: 'fts_ast_node_type_get' was not declared in this scope
+ #
+ append-cppflags -DDBUG_OFF
+
+ local mycmakeargs=(
+ -DBUILD_CONFIG=xtrabackup_release
+ -DWITH_EDITLINE=system
+ -DWITH_LIBEVENT=system
+ -DWITH_LZ4=system
+ -DWITH_SSL=bundled # uses yassl, which isn't packaged
+ -DWITH_ZLIB=system
+ -DWITH_PIC=ON
+ )
+
+ local CMAKE_BUILD_TYPE="Release"
+ cmake-utils_src_configure
+}
+
+src_install() {
+ local p="${BUILD_DIR}/storage/innobase/xtrabackup"
+
+ dobin "${p}"/src/{xbcloud,xbcrypt,xbstream,xtrabackup}
+ dosym xtrabackup /usr/bin/innobackupex
+
+ einstalldocs
+ doman "${p}"/doc/source/build/man/*
+}
diff --git a/dev-db/pg_activity-1.2.0 b/dev-db/pg_activity-1.2.0
deleted file mode 100644
index 758861dda8ea..000000000000
--- a/dev-db/pg_activity-1.2.0
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)]
-DESCRIPTION=Realtime PostgreSQL database server monitoring tool
-EAPI=5
-HOMEPAGE=https://github.com/julmon/pg_activity/
-IUSE=python_targets_python2_7
-KEYWORDS=~amd64 ~x86
-LICENSE=POSTGRESQL
-RDEPEND=dev-python/psutil[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] dev-python/setuptools[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] dev-python/psycopg:2[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)]
-REQUIRED_USE=|| ( python_targets_python2_7 )
-SLOT=0
-SRC_URI=https://github.com/julmon/pg_activity/archive/v1.2.0.tar.gz -> pg_activity-1.2.0.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 distutils-r1 63fea93ca1cc4fdc5fa2247afc4e3a15 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 preserve-libs ef207dc62baddfddfd39a164d9797648 python-r1 0b5829eb6369d7af3a834b6eed7b7107 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=2b4affcf624ed4a7fbc4f74a05b8ca55
diff --git a/dev-db/pg_activity/Manifest b/dev-db/pg_activity/Manifest
new file mode 100644
index 000000000000..f4c00f73c1c4
--- /dev/null
+++ b/dev-db/pg_activity/Manifest
@@ -0,0 +1,3 @@
+DIST pg_activity-1.2.0.tar.gz 88863 BLAKE2B 2436b206bc9aec2d5ee678e753191020520f282f62e25f23aa8182bbc215716b82bf800af5e68567c0cff7eb3ff9ff02c46b8f646e4ffc4d2401e89830d8811a SHA512 0bf2f3f746755cb3bc6cbff6a9377d172b15a82c836a19cd52ef8073c39cbb8ffaf2f9583fca437cabc7251bab55a874e1ee8e0559778881d42bcc030bf5d0c4
+EBUILD pg_activity-1.2.0.ebuild 623 BLAKE2B 0734295c8ddb694cb0ac1a10831aacc3fdec44b9d426918c27170918bc301cb76a665d786cf7f5fbd39658bedae20133cd6f35cf20dd417c07682c3daebb39c1 SHA512 1f7debcfb9165f69f7e52b8f40470e3449a4aa4fb8773f2a1ed5baea0c158d74f9758d430a1f513fde5ebc6dfba45f27823bff8fb49966acac27c8ba4e197d32
+MISC metadata.xml 339 BLAKE2B e80c6ca98d1020eb5d6dffdd9cc41239d8dee1131c977d54666293044bd1804e08b3d88a439e867df26e541bc75a084752a19287591643a1cd20e687e9f7e223 SHA512 db6f9da66f99eb53ef5c118ebb7e6d2ecde79c118a0a7b3094375405cf02700bb2f423b830d23ad4819819557bf35a1073a67bafe0de01654f9651e956840355
diff --git a/dev-db/pg_activity/metadata.xml b/dev-db/pg_activity/metadata.xml
new file mode 100644
index 000000000000..77dc3c3999e2
--- /dev/null
+++ b/dev-db/pg_activity/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>ago@gentoo.org</email>
+ <name>Agostino Sarubbo</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">julmon/pg_activity</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/pg_activity/pg_activity-1.2.0.ebuild b/dev-db/pg_activity/pg_activity-1.2.0.ebuild
new file mode 100644
index 000000000000..ab84a426b26f
--- /dev/null
+++ b/dev-db/pg_activity/pg_activity-1.2.0.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="Realtime PostgreSQL database server monitoring tool"
+HOMEPAGE="https://github.com/julmon/pg_activity/"
+SRC_URI="https://github.com/julmon/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+LICENSE="POSTGRESQL"
+
+DEPEND=""
+RDEPEND="dev-python/psutil[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ dev-python/psycopg:2[${PYTHON_USEDEP}]"
+
+src_install() {
+ distutils-r1_src_install
+ doman docs/man/${PN}.1
+}
diff --git a/dev-db/pg_top-3.7.0 b/dev-db/pg_top-3.7.0
deleted file mode 100644
index 5b315e5f5b60..000000000000
--- a/dev-db/pg_top-3.7.0
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-db/postgresql virtual/pkgconfig >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION='top' for PostgreSQL
-EAPI=5
-HOMEPAGE=http://ptop.projects.postgresql.org/
-IUSE=debug
-KEYWORDS=amd64 x86
-LICENSE=BSD
-RDEPEND=dev-db/postgresql
-SLOT=0
-SRC_URI=http://pgfoundry.org/frs/download.php/3504/pg_top-3.7.0.tar.bz2
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 autotools-utils 5a4611dfba155b1659528663fad4cd5e desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=284c4772aa9e6ddf83bfcb359594e859
diff --git a/dev-db/pg_top/Manifest b/dev-db/pg_top/Manifest
new file mode 100644
index 000000000000..7acc44a00036
--- /dev/null
+++ b/dev-db/pg_top/Manifest
@@ -0,0 +1,4 @@
+AUX pg_top-3.7.0.patch 749 BLAKE2B 26d3d391e33a55b5af857ec3262b5f37e97a64262c050e00d9e0980eb954c100810885f53e27c2e917468b196b8280c705b2ebd41d7420a085bce082498d1cb8 SHA512 e94b14318f22f35fb28de3e0d53e6ff785a36e1eed37fe0f8066a0e0e4adb5c2c280de5c577ba7969715bee594ed2686b41fde0ce2930990064ab80132c760e4
+DIST pg_top-3.7.0.tar.bz2 236076 BLAKE2B 87a29d0237aad48b683c17ba56fdbc4a90f854f4f497057ffc978be1797d978f02694781e83d296fca82e03c8bc737f7cfd74e996987eea0bd8d6a66ae433ce0 SHA512 509cd3ce65a9b549097eaab5ae27106fa469cdeb4f37950564654f3df01390e1a771c8fa4f5858c3e4c1e76470b6c0fd9b07e8268564f59285e30bf824d7c4ec
+EBUILD pg_top-3.7.0.ebuild 621 BLAKE2B 3f411c73e55bdbe3db445d6cb23de24d478d7edeb18e8657da639f73400655eb1dfd95036f469b014ca8e467b02438640a0495ab60697478896735004f15d1f1 SHA512 b78758656bc4e2a1fa702bf2e03f108aa91c7815db10da22a16ca1e6f8939e443577b82d4458f741c991d8742c5d8ebfbf22ca977a638b9e224d1dc425b61564
+MISC metadata.xml 461 BLAKE2B e6f8d76b546b6b6b6cb13dc1158f71d20f3c68fc9ecc9b37ccf8d8581ec8699e5faab5bd4b10100a0897f668e04449e8f67622e3e3eeb3fdbc54023af536ec0a SHA512 ef6740e37b9d51eb8d303e393d826c91519e8fbd2fe66930486bfbf16bf3bfe09f1a90040a044428841ed61dd6885eefefa2fc9bc43a08e6d4e2dec4a67ba9fc
diff --git a/dev-db/pg_top/files/pg_top-3.7.0.patch b/dev-db/pg_top/files/pg_top-3.7.0.patch
new file mode 100644
index 000000000000..6367a1dc03dc
--- /dev/null
+++ b/dev-db/pg_top/files/pg_top-3.7.0.patch
@@ -0,0 +1,29 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -103,7 +103,7 @@
+ AC_SEARCH_LIBS(elf32_getphdr, elf)
+ # -lmld -lmach
+ AC_SEARCH_LIBS(vm_statistics, mach)
+-AC_SEARCH_LIBS(tgetent, termcap curses ncurses)
++AC_SEARCH_LIBS(tgetent, termcap tinfo curses ncurses)
+ AC_SEARCH_LIBS(exp, m)
+
+ AC_SEARCH_LIBS(dlerror, dl)
+@@ -111,6 +111,8 @@
+ AC_SEARCH_LIBS(inet_aton, resolv, AC_DEFINE(HAVE_INET_ATON, 1,
+ [inet_aton is already defined]))
+
++AC_SEARCH_LIBS(PQexec, pq)
++
+ # check for libraries required by extension
+ extlibs=""
+ if test -n "$with_ext" -a -f "${srcdir}/ext/$with_ext.libs"; then
+@@ -217,8 +219,6 @@
+ AC_SUBST(SRC)
+ AC_SUBST(OBJ)
+
+-CFLAGS="-Wall -g"
+-
+ AC_MSG_CHECKING(for installation settings)
+ # calculate appropriate settings
+ OWNER=""
diff --git a/dev-db/pg_top/metadata.xml b/dev-db/pg_top/metadata.xml
new file mode 100644
index 000000000000..7bf9e26e0d40
--- /dev/null
+++ b/dev-db/pg_top/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>pgsql-bugs@gentoo.org</email>
+ <name>PostgreSQL and Related Package Development</name>
+ </maintainer>
+ <longdescription lang="en">
+ pg_top is 'top' for PostgreSQL. It is derived from Unix Top. Similar to
+ top, pg_top allows you to monitor PostgreSQL processes.
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-db/pg_top/pg_top-3.7.0.ebuild b/dev-db/pg_top/pg_top-3.7.0.ebuild
new file mode 100644
index 000000000000..5b311408477c
--- /dev/null
+++ b/dev-db/pg_top/pg_top-3.7.0.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+inherit autotools-utils eutils
+
+DESCRIPTION="'top' for PostgreSQL"
+HOMEPAGE="http://ptop.projects.postgresql.org/"
+SRC_URI="http://pgfoundry.org/frs/download.php/3504/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug"
+
+RDEPEND="dev-db/postgresql"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( FAQ HISTORY README TODO Y2K )
+PATCHES=( "${FILESDIR}/${P}.patch" )
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable debug)
+ )
+ autotools-utils_src_configure
+}
diff --git a/dev-db/pgadmin3-1.22.2 b/dev-db/pgadmin3-1.22.2
deleted file mode 100644
index 9c96020d3cad..000000000000
--- a/dev-db/pgadmin3-1.22.2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=configure install
-DEPEND=x11-libs/wxGTK:3.0=[X] >=dev-db/postgresql-8.4.0:= >=dev-libs/libxml2-2.6.18 >=dev-libs/libxslt-1.1
-DESCRIPTION=wxWidgets GUI for PostgreSQL
-EAPI=6
-HOMEPAGE=https://www.pgadmin.org/
-IUSE=debug +databasedesigner
-KEYWORDS=amd64 ppc x86 ~x86-fbsd
-LICENSE=POSTGRESQL
-RDEPEND=x11-libs/wxGTK:3.0=[X] >=dev-db/postgresql-8.4.0:= >=dev-libs/libxml2-2.6.18 >=dev-libs/libxslt-1.1
-SLOT=0
-SRC_URI=mirror://postgresql/pgadmin/pgadmin3/v1.22.2/src/pgadmin3-1.22.2.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 wxwidgets 04e063b0eff26daaea83d859dd9d6e05
-_md5_=c36edaf7c734e21845783b05c1e95250
diff --git a/dev-db/pgadmin3/Manifest b/dev-db/pgadmin3/Manifest
new file mode 100644
index 000000000000..2f1984a49376
--- /dev/null
+++ b/dev-db/pgadmin3/Manifest
@@ -0,0 +1,5 @@
+AUX pgadmin3-desktop-r1.patch 512 BLAKE2B feba83e9311785f2bd47f76328d5ec25fb8dbd6686207ecf22cbcf22bb863850ed6ee87f051ae8c709901b4d06e99742b8fa9a5d74a0758632eb29a89f8c9a7f SHA512 8a3253318ad6b98136b8fd4539dffc030d9625a256d7f802a399e972b9a5cf3440a3c602bde8ee21091eed4aae8c736643b9a15246dfd3bae56c8dbd80847ae6
+AUX pgadmin3-gcc6-null-pointer.patch 421 BLAKE2B 8e3c27ce3c80a01e4536253086eb2e6d4bb41e487db3084052acf5ba96a185ad186373d5ca9d5fe3a864cfdfa728350be8a44b66e04c3565e1bb0995f0b6e6a0 SHA512 c0fe3d3cc5c1c29f69f3b81b0c78fbe2cf6e484e3ace9e35a3352d93246fc8227047c7c59a168bedfdc7b4f67d3db800c8b1d7cd962d7952436e080a2ea1e083
+DIST pgadmin3-1.22.2.tar.gz 14788481 BLAKE2B fd38ae523bfc554138f56a99ee5fe0aaf2446d3b77416552861d4c3d3d939e553ee160264720af3095f91d270b6c719e078ec29b998c2f4a13739ed34c4c0312 SHA512 dcfc72cc2e33dbf1c9d1ce287f9d1d46eb047c99a165372cb74ef1716098f90f2ce2a8d0cd21b511a1ac8c0569dc7b3c0593208a74641f5a8f29dc9c04e40bbd
+EBUILD pgadmin3-1.22.2.ebuild 983 BLAKE2B 5ac3559d8547070ae9c6dc6018549406880dcbef8bf733a77637dd63a56d6a20f8a7c0708770c97364344928ef0c1c5f6296abadd039fdaa84b28032564f659e SHA512 e7e039b7ee56e62ff07e3326cc8338fda848b58936afeeda80238a826f9a13bf06c9da13c1fcc3b3b7f6465c889460fc66f6fbcdf3356caaca990a729167c317
+MISC metadata.xml 368 BLAKE2B ea267a284f54ca0becf05f4a7579a167ee591178e17e3922d1c493bdb24fcd63400f2146625108a0d42f7816c75bdd7b1c836c8c354f2058c4fad15c8a0f2a6b SHA512 435f2da400e35d133390ec90860cfe1dd135281156ae1ed6c28e32b4e9f67d93cdb5e7e9ffa183244984e689a131838e6301a50d5366216bccc2df5cd97b54ea
diff --git a/dev-db/pgadmin3/files/pgadmin3-desktop-r1.patch b/dev-db/pgadmin3/files/pgadmin3-desktop-r1.patch
new file mode 100644
index 000000000000..64a599e00cdb
--- /dev/null
+++ b/dev-db/pgadmin3/files/pgadmin3-desktop-r1.patch
@@ -0,0 +1,15 @@
+diff -Naruw a/pkg/pgadmin3.desktop b/pkg/pgadmin3.desktop
+--- a/pkg/pgadmin3.desktop 2013-02-22 12:21:19.000000000 -0500
++++ b/pkg/pgadmin3.desktop 2015-02-04 15:36:34.845312953 -0500
+@@ -2,9 +2,8 @@
+ Encoding=UTF-8
+ Name=pgAdmin III
+ Exec=/usr/bin/pgadmin3
+-Icon=/usr/share/pgadmin3/pgAdmin3.png
++Icon=/usr/share/pixmaps/pgadmin3.png
+ Type=Application
+-Categories=Application;Development;
+-MimeType=text/html
++Categories=Development;
+ DocPath=/usr/share/pgadmin3/docs/en_US/index.html
+ Comment=PostgreSQL Tools
diff --git a/dev-db/pgadmin3/files/pgadmin3-gcc6-null-pointer.patch b/dev-db/pgadmin3/files/pgadmin3-gcc6-null-pointer.patch
new file mode 100644
index 000000000000..1396f8de8aab
--- /dev/null
+++ b/dev-db/pgadmin3/files/pgadmin3-gcc6-null-pointer.patch
@@ -0,0 +1,11 @@
+--- a/pgadmin/frm/plugins.cpp
++++ b/pgadmin/frm/plugins.cpp
+@@ -380,7 +380,7 @@ bool pluginUtilityFactory::CheckEnable(p
+ {
+ // If we need a specific server type, we can't enable unless
+ // we have a connection.
+- if (!obj || !(obj->GetConnection()->GetStatus() == PGCONN_OK))
++ if (!obj || !obj->GetConnection() || !(obj->GetConnection()->GetStatus() == PGCONN_OK))
+ return false;
+
+ // Get the server type.
diff --git a/dev-db/pgadmin3/metadata.xml b/dev-db/pgadmin3/metadata.xml
new file mode 100644
index 000000000000..7d8a73bc92c1
--- /dev/null
+++ b/dev-db/pgadmin3/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>pgsql-bugs@gentoo.org</email>
+ <name>PostgreSQL and Related Package Development</name>
+ </maintainer>
+<use>
+ <flag name="databasedesigner">Enable the Database Designer component</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-db/pgadmin3/pgadmin3-1.22.2.ebuild b/dev-db/pgadmin3/pgadmin3-1.22.2.ebuild
new file mode 100644
index 000000000000..5498f4be6fd3
--- /dev/null
+++ b/dev-db/pgadmin3/pgadmin3-1.22.2.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit eutils multilib versionator wxwidgets
+
+DESCRIPTION="wxWidgets GUI for PostgreSQL"
+HOMEPAGE="https://www.pgadmin.org/"
+SRC_URI="mirror://postgresql/pgadmin/pgadmin3/v${PV}/src/${P}.tar.gz"
+
+LICENSE="POSTGRESQL"
+KEYWORDS="amd64 ppc x86 ~x86-fbsd"
+SLOT="0"
+IUSE="debug +databasedesigner"
+
+DEPEND="
+ x11-libs/wxGTK:3.0=[X]
+ >=dev-db/postgresql-8.4.0:=
+ >=dev-libs/libxml2-2.6.18
+ >=dev-libs/libxslt-1.1"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}"/pgadmin3-{desktop-r1,gcc6-null-pointer}.patch )
+
+src_configure() {
+ WX_GTK_VER="3.0"
+
+ setup-wxwidgets
+
+ econf --with-wx-version=${WX_GTK_VER} \
+ $(use_enable debug) \
+ $(use_enable databasedesigner)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ newicon "${S}/pgadmin/include/images/pgAdmin3.png" ${PN}.png
+
+ domenu "${S}/pkg/pgadmin3.desktop"
+
+ # Fixing world-writable files
+ fperms -R go-w /usr/share
+}
diff --git a/dev-db/pgadmin4-2.0-r1 b/dev-db/pgadmin4-2.0-r1
deleted file mode 100644
index ab4754ff3f4f..000000000000
--- a/dev-db/pgadmin4-2.0-r1
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup
-DEPEND=python_single_target_python3_4? ( dev-lang/python:3.4[sqlite] ) python_single_target_python3_5? ( dev-lang/python:3.5[sqlite] ) >=dev-lang/python-exec-2:=[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] dev-qt/qtwidgets:5 dev-qt/qtwebkit:5 dev-qt/qtwebengine:5[widgets] doc? ( dev-python/sphinx[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] )
-DESCRIPTION=GUI administration and development platform for PostgreSQL
-EAPI=6
-HOMEPAGE=https://www.pgadmin.org/
-IUSE=doc python_targets_python3_4 python_targets_python3_5 python_single_target_python3_4 python_single_target_python3_5
-KEYWORDS=amd64 x86
-LICENSE=POSTGRESQL
-RDEPEND=python_single_target_python3_4? ( dev-lang/python:3.4[sqlite] ) python_single_target_python3_5? ( dev-lang/python:3.5[sqlite] ) >=dev-lang/python-exec-2:=[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] dev-qt/qtwidgets:5 dev-qt/qtwebkit:5 dev-qt/qtwebengine:5[widgets] >=app-text/htmlmin-0.1.10[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/Babel-2.3.4[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/beautifulsoup-4.4.1[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/blinker-1.3[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/click-6.6[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/extras-0.0.3[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/fixtures-2.0.0[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/flask-0.11.1[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/flask-babel-0.11.1[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/flask-gravatar-0.4.2[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/flask-htmlmin-1.2[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/flask-login-0.3.2[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/flask-mail-0.9.1[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/flask-migrate-2.0.3[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/flask-paranoid-0.1.0[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/flask-principal-0.4.0[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/flask-security-1.7.5[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/flask-sqlalchemy-2.1[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/flask-wtf-0.12[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/html5lib-0.9999999[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/itsdangerous-0.24[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/jinja-2.7.3[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/linecache2-1.0.0[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/markupsafe-0.23[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/mimeparse-1.5.1[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/passlib-1.6.2[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/pbr-1.9.1[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/psycopg-2.7.1[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/pycrypto-2.6.1[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/pyrsistent-0.11.13[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/python-dateutil-2.5.0[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/python-sqlparse-0.1.19[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/pytz-2014.10[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/simplejson-3.6.5[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/six-1.9.0[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/speaklater-1.3[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/sqlalchemy-1.0.14[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/werkzeug-0.9.6[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/wtforms-2.0.2[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?]
-REQUIRED_USE=^^ ( python_single_target_python3_4 python_single_target_python3_5 ) python_single_target_python3_4? ( python_targets_python3_4 ) python_single_target_python3_5? ( python_targets_python3_5 )
-RESTRICT=test
-SLOT=0
-SRC_URI=mirror://postgresql/pgadmin/pgadmin4/v2.0/source/pgadmin4-2.0.tar.gz
-_eclasses_=estack 43ddf5aaffa7a8d0482df54d25a66a1f multilib 97f470f374f2e94ccab04a2fb21d811e python-single-r1 26fdbe5e685d53f67303a3a43d9e4848 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 qmake-utils bdf97e69a34b864d6d545f4ec3143ff7 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=f627831b5cf2a7a1fb5dd21a0748fe79
diff --git a/dev-db/pgadmin4-2.1 b/dev-db/pgadmin4-2.1
deleted file mode 100644
index e4829f00f8d1..000000000000
--- a/dev-db/pgadmin4-2.1
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup
-DEPEND=python_single_target_python3_4? ( dev-lang/python:3.4[sqlite] ) python_single_target_python3_5? ( dev-lang/python:3.5[sqlite] ) >=dev-lang/python-exec-2:=[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] dev-qt/qtwidgets:5 dev-qt/qtwebkit:5 dev-qt/qtwebengine:5[widgets] doc? ( dev-python/sphinx[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] )
-DESCRIPTION=GUI administration and development platform for PostgreSQL
-EAPI=6
-HOMEPAGE=https://www.pgadmin.org/
-IUSE=doc python_targets_python3_4 python_targets_python3_5 python_single_target_python3_4 python_single_target_python3_5
-KEYWORDS=~amd64 ~x86
-LICENSE=POSTGRESQL
-RDEPEND=python_single_target_python3_4? ( dev-lang/python:3.4[sqlite] ) python_single_target_python3_5? ( dev-lang/python:3.5[sqlite] ) >=dev-lang/python-exec-2:=[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] dev-qt/qtwidgets:5 dev-qt/qtwebkit:5 dev-qt/qtwebengine:5[widgets] >=app-text/htmlmin-0.1.10[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/Babel-2.3.4[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/beautifulsoup-4.4.1[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/blinker-1.3[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/click-6.6[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/extras-0.0.3[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/fixtures-2.0.0[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/flask-0.11.1[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/flask-babel-0.11.1[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/flask-gravatar-0.4.2[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/flask-htmlmin-1.2[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/flask-login-0.3.2[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/flask-mail-0.9.1[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/flask-migrate-2.0.3[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/flask-paranoid-0.1.0[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/flask-principal-0.4.0[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/flask-security-1.7.5[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/flask-sqlalchemy-2.1[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/flask-wtf-0.12[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/html5lib-0.9999999[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/itsdangerous-0.24[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/jinja-2.7.3[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/linecache2-1.0.0[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/markupsafe-0.23[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/mimeparse-1.5.1[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/passlib-1.6.2[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/pbr-1.9.1[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/psycopg-2.7.3.2[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/pycrypto-2.6.1[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/pyrsistent-0.11.13[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/python-dateutil-2.5.0[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/python-sqlparse-0.1.19[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/pytz-2014.10[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/simplejson-3.6.5[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/six-1.9.0[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/speaklater-1.3[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/sqlalchemy-1.0.14[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/werkzeug-0.9.6[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?] >=dev-python/wtforms-2.0.2[python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?]
-REQUIRED_USE=^^ ( python_single_target_python3_4 python_single_target_python3_5 ) python_single_target_python3_4? ( python_targets_python3_4 ) python_single_target_python3_5? ( python_targets_python3_5 )
-RESTRICT=test
-SLOT=0
-SRC_URI=mirror://postgresql/pgadmin/pgadmin4/v2.1/source/pgadmin4-2.1.tar.gz
-_eclasses_=estack 43ddf5aaffa7a8d0482df54d25a66a1f multilib 97f470f374f2e94ccab04a2fb21d811e python-single-r1 26fdbe5e685d53f67303a3a43d9e4848 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 qmake-utils bdf97e69a34b864d6d545f4ec3143ff7 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=6ff4c0341fd461a6c89cb5f70e06ab0c
diff --git a/dev-db/pgadmin4-3.0 b/dev-db/pgadmin4-3.0
deleted file mode 100644
index 0949cfc21ff8..000000000000
--- a/dev-db/pgadmin4-3.0
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup
-DEPEND=python_single_target_python3_4? ( dev-lang/python:3.4[sqlite] ) python_single_target_python3_5? ( dev-lang/python:3.5[sqlite] ) python_single_target_python3_6? ( dev-lang/python:3.6[sqlite] ) >=dev-lang/python-exec-2:=[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] dev-qt/qtwidgets:5 dev-qt/qtwebkit:5 dev-qt/qtwebengine:5[widgets] doc? ( dev-python/sphinx[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] )
-DESCRIPTION=GUI administration and development platform for PostgreSQL
-EAPI=6
-HOMEPAGE=https://www.pgadmin.org/
-IUSE=doc python_targets_python3_4 python_targets_python3_5 python_targets_python3_6 python_single_target_python3_4 python_single_target_python3_5 python_single_target_python3_6
-KEYWORDS=amd64 x86
-LICENSE=POSTGRESQL
-RDEPEND=python_single_target_python3_4? ( dev-lang/python:3.4[sqlite] ) python_single_target_python3_5? ( dev-lang/python:3.5[sqlite] ) python_single_target_python3_6? ( dev-lang/python:3.6[sqlite] ) >=dev-lang/python-exec-2:=[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] dev-qt/qtwidgets:5 dev-qt/qtwebkit:5 dev-qt/qtwebengine:5[widgets] >=app-text/htmlmin-0.1.12[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/Babel-2.3.4[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/beautifulsoup-4.4.1[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/blinker-1.4[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/click-6.6[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/extras-1.0.0[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/fixtures-3.0.0[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/flask-0.12.2[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/flask-babel-0.11.1[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/flask-babelex-0.9.3[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/flask-gravatar-0.5.0[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/flask-htmlmin-1.3.2[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/flask-login-0.3.2[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/flask-mail-0.9.1[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/flask-migrate-2.1.1[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/flask-paranoid-0.2.0[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/flask-principal-0.4.0[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/flask-security-3.0.0[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/flask-sqlalchemy-2.3.2[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/flask-wtf-0.14.2[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/html5lib-1.0.1[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/itsdangerous-0.24[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/jinja-2.7.3[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/linecache2-1.0.0[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/markupsafe-0.23[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/mimeparse-1.6.0[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/passlib-1.7.1[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/pbr-3.1.1[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/psycopg-2.7.4[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/pycrypto-2.6.1[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/pyrsistent-0.14.2[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/python-dateutil-2.7.1[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/python-sqlparse-0.2.4[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/pytz-2018.3[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/simplejson-3.13.2[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/six-1.11.0[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/speaklater-1.3[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/sqlalchemy-1.2.5[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/werkzeug-0.9.6[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] >=dev-python/wtforms-2.1[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?]
-REQUIRED_USE=^^ ( python_single_target_python3_4 python_single_target_python3_5 python_single_target_python3_6 ) python_single_target_python3_4? ( python_targets_python3_4 ) python_single_target_python3_5? ( python_targets_python3_5 ) python_single_target_python3_6? ( python_targets_python3_6 )
-RESTRICT=test
-SLOT=0
-SRC_URI=mirror://postgresql/pgadmin/pgadmin4/v3.0/source/pgadmin4-3.0.tar.gz
-_eclasses_=estack 43ddf5aaffa7a8d0482df54d25a66a1f multilib 97f470f374f2e94ccab04a2fb21d811e python-single-r1 26fdbe5e685d53f67303a3a43d9e4848 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 qmake-utils bdf97e69a34b864d6d545f4ec3143ff7 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=d3b329aad8f590ebf3461918be5d07da
diff --git a/dev-db/pgadmin4/Manifest b/dev-db/pgadmin4/Manifest
new file mode 100644
index 000000000000..cb26e6d50791
--- /dev/null
+++ b/dev-db/pgadmin4/Manifest
@@ -0,0 +1,7 @@
+DIST pgadmin4-2.0.tar.gz 24988176 BLAKE2B 96e942d5001b1d590fb1b642933c665a13bca5429d3a3e74eefe4a8090c76515cc08b656ebfea3a170b4fa6077d7086fbffdd5fddfcb517be08fd4ecc20052ab SHA512 463e95a341dec74ac0a08a647af1cbe83b514b0595b8469ab9c7b5335e24604e082b906d530aa735fef7b08c58d8a8a6df3edf5dc65402f6521165f1cbb72f67
+DIST pgadmin4-2.1.tar.gz 27842212 BLAKE2B 26c12dff8e2e5e37dd2911f6eb582a0f706d73490c8d93e83b07b7537fc201547d095d4f34181d2502bbc29b2741614adabf876b7e6ea3ef5f555eab94caa240 SHA512 02bc122ae53db595a1fd395e634fc4d0891f024a2e5e341c81b306a8c1d07bc18e5673cda440c7ba56754be4902ae4441010db0140132352e12b8986c8c0f47c
+DIST pgadmin4-3.0.tar.gz 28915010 BLAKE2B 7e6dccd91f082f7b5514f5d3abdf4653a9961b4efc706e10ce58d817785d514508233e25068762fe0e4bca4c1a3cf10a2515afa38e6f9ba3c99b4af3fa32f3d2 SHA512 5921340176e6748ef13112d906061f195d4bb2f73917d762371bbaeb44ef66cf8e0edcd1cd241eb78dae46ed0b3af014c749468a930fb0c0983b38b2c54dfc3a
+EBUILD pgadmin4-2.0-r1.ebuild 3429 BLAKE2B d252add75134ec26117e9ff39c1c25922d077b47ae48b4c9fe9a447bd7b08d7b6329d92773fc96567b0ff0801427f21ed02262bab80265e9df7f63ca651c6af1 SHA512 81e3244cf422995ef773b916a4e25e0ea492dac0d2c9a19b5e9eb0f2cec89ad820f4488d531eb82bff794fc43d72a27f9ef817db911d73f634404f26d53150e4
+EBUILD pgadmin4-2.1.ebuild 3433 BLAKE2B 21e4f8e594915801087b5f248b5c7f3c2b4f58eb38bbcbfe9702f2edb5afd7527ee048f8175adde257d4782358f3d201808094059fc417e834feaaeb7b8bba14 SHA512 0cabdc6a6d02180e43ea68ba3547272d6974d5de7b1b6f2064840bcdf93cf0046085db634632d8fecfcf47c2aab8f8c912bd3a70684b544cbacff0b7b555de0d
+EBUILD pgadmin4-3.0.ebuild 3481 BLAKE2B 697a5b6250d747aff9b4216603077a977a84c44bd344f935315eb0ca9a41b85527b32df819738d42626759fb8244392c15edd4909c9b8f03cdb82debf24f5172 SHA512 5f14d65bc3dac207fd3ced4105be3115cd0821a6a5054ce9d150d31d19ca5de44c66b3971444e200d79bfc6b11949cd437a0cbec388f26beef94ccdacb1c3b19
+MISC metadata.xml 266 BLAKE2B 9d5988ab45f9939f9be5ee7f4b7a9950a3d62252aa0d3e6c953265467428c59fb8c05b2bb72085431b7aa9fc18d31f2b3273e8fdb33443d786b2237db697b7e2 SHA512 9f85990c7ce6a1de5c1067e4781af18bede2d3bd02963a7b2927766b70dbe98d3fb63bb01e19b1cf6e2b77038d9788bf38155b3cc33f9e5ff8430b10a4006325
diff --git a/dev-db/pgadmin4/metadata.xml b/dev-db/pgadmin4/metadata.xml
new file mode 100644
index 000000000000..f1828406d76b
--- /dev/null
+++ b/dev-db/pgadmin4/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>pgsql-bugs@gentoo.org</email>
+ <name>PostgreSQL</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-db/pgadmin4/pgadmin4-2.0-r1.ebuild b/dev-db/pgadmin4/pgadmin4-2.0-r1.ebuild
new file mode 100644
index 000000000000..f06a6e951ffc
--- /dev/null
+++ b/dev-db/pgadmin4/pgadmin4-2.0-r1.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_{4,5} )
+PYTHON_REQ_USE="sqlite"
+
+inherit python-single-r1 qmake-utils
+
+DESCRIPTION="GUI administration and development platform for PostgreSQL"
+HOMEPAGE="https://www.pgadmin.org/"
+SRC_URI="mirror://postgresql/pgadmin/${PN}/v${PV}/source/${P}.tar.gz"
+
+LICENSE="POSTGRESQL"
+KEYWORDS="amd64 x86"
+SLOT="0"
+IUSE="doc"
+
+RESTRICT="test"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+COMMON_DEPEND="${PYTHON_DEPS}
+ dev-qt/qtwidgets:5
+ dev-qt/qtwebkit:5
+ dev-qt/qtwebengine:5[widgets]
+"
+
+DEPEND="${COMMON_DEPEND}
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+"
+
+RDEPEND="${COMMON_DEPEND}
+ >=app-text/htmlmin-0.1.10[${PYTHON_USEDEP}]
+ >=dev-python/Babel-2.3.4[${PYTHON_USEDEP}]
+ >=dev-python/beautifulsoup-4.4.1[${PYTHON_USEDEP}]
+ >=dev-python/blinker-1.3[${PYTHON_USEDEP}]
+ >=dev-python/click-6.6[${PYTHON_USEDEP}]
+ >=dev-python/extras-0.0.3[${PYTHON_USEDEP}]
+ >=dev-python/fixtures-2.0.0[${PYTHON_USEDEP}]
+ >=dev-python/flask-0.11.1[${PYTHON_USEDEP}]
+ >=dev-python/flask-babel-0.11.1[${PYTHON_USEDEP}]
+ >=dev-python/flask-gravatar-0.4.2[${PYTHON_USEDEP}]
+ >=dev-python/flask-htmlmin-1.2[${PYTHON_USEDEP}]
+ >=dev-python/flask-login-0.3.2[${PYTHON_USEDEP}]
+ >=dev-python/flask-mail-0.9.1[${PYTHON_USEDEP}]
+ >=dev-python/flask-migrate-2.0.3[${PYTHON_USEDEP}]
+ >=dev-python/flask-paranoid-0.1.0[${PYTHON_USEDEP}]
+ >=dev-python/flask-principal-0.4.0[${PYTHON_USEDEP}]
+ >=dev-python/flask-security-1.7.5[${PYTHON_USEDEP}]
+ >=dev-python/flask-sqlalchemy-2.1[${PYTHON_USEDEP}]
+ >=dev-python/flask-wtf-0.12[${PYTHON_USEDEP}]
+ >=dev-python/html5lib-0.9999999[${PYTHON_USEDEP}]
+ >=dev-python/itsdangerous-0.24[${PYTHON_USEDEP}]
+ >=dev-python/jinja-2.7.3[${PYTHON_USEDEP}]
+ >=dev-python/linecache2-1.0.0[${PYTHON_USEDEP}]
+ >=dev-python/markupsafe-0.23[${PYTHON_USEDEP}]
+ >=dev-python/mimeparse-1.5.1[${PYTHON_USEDEP}]
+ >=dev-python/passlib-1.6.2[${PYTHON_USEDEP}]
+ >=dev-python/pbr-1.9.1[${PYTHON_USEDEP}]
+ >=dev-python/psycopg-2.7.1[${PYTHON_USEDEP}]
+ >=dev-python/pycrypto-2.6.1[${PYTHON_USEDEP}]
+ >=dev-python/pyrsistent-0.11.13[${PYTHON_USEDEP}]
+ >=dev-python/python-dateutil-2.5.0[${PYTHON_USEDEP}]
+ >=dev-python/python-sqlparse-0.1.19[${PYTHON_USEDEP}]
+ >=dev-python/pytz-2014.10[${PYTHON_USEDEP}]
+ >=dev-python/simplejson-3.6.5[${PYTHON_USEDEP}]
+ >=dev-python/six-1.9.0[${PYTHON_USEDEP}]
+ >=dev-python/speaklater-1.3[${PYTHON_USEDEP}]
+ >=dev-python/sqlalchemy-1.0.14[${PYTHON_USEDEP}]
+ >=dev-python/werkzeug-0.9.6[${PYTHON_USEDEP}]
+ >=dev-python/wtforms-2.0.2[${PYTHON_USEDEP}]
+"
+
+S="${WORKDIR}"/${P}/runtime
+
+src_prepare() {
+ cd "${WORKDIR}"/${P} || die
+ default
+}
+
+src_configure() {
+ eqmake5
+}
+
+src_compile() {
+ default
+ if use doc; then
+ cd "${WORKDIR}"/${P} || die
+ emake docs
+ fi
+}
+
+src_install() {
+ dobin pgAdmin4
+
+ cd "${WORKDIR}"/${P} || die
+
+ local APP_DIR=/usr/share/${PN}/web
+ insinto "${APP_DIR}"
+ doins -r web/*
+ cat > "${D}${APP_DIR}"/config_local.py <<-EOF
+ SERVER_MODE = False
+ UPGRADE_CHECK_ENABLED = False
+ EOF
+ python_optimize "${D}${APP_DIR}"
+
+ local CONFIG_DIR="/etc/xdg/pgadmin"
+ dodir "${CONFIG_DIR}"
+ cat > "${D}${CONFIG_DIR}"/pgadmin4.conf <<-EOF
+ [General]
+ ApplicationPath=${APP_DIR}
+ PythonPath=$(python_get_sitedir)
+ EOF
+
+ if use doc; then
+ rm -r docs/en_US/_build/html/_sources || die
+ insinto /usr/share/${PN}/docs/en_US/_build
+ doins -r docs/en_US/_build/html
+ fi
+}
diff --git a/dev-db/pgadmin4/pgadmin4-2.1.ebuild b/dev-db/pgadmin4/pgadmin4-2.1.ebuild
new file mode 100644
index 000000000000..2170883f8a21
--- /dev/null
+++ b/dev-db/pgadmin4/pgadmin4-2.1.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_{4,5} )
+PYTHON_REQ_USE="sqlite"
+
+inherit python-single-r1 qmake-utils
+
+DESCRIPTION="GUI administration and development platform for PostgreSQL"
+HOMEPAGE="https://www.pgadmin.org/"
+SRC_URI="mirror://postgresql/pgadmin/${PN}/v${PV}/source/${P}.tar.gz"
+
+LICENSE="POSTGRESQL"
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+IUSE="doc"
+
+RESTRICT="test"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+COMMON_DEPEND="${PYTHON_DEPS}
+ dev-qt/qtwidgets:5
+ dev-qt/qtwebkit:5
+ dev-qt/qtwebengine:5[widgets]
+"
+
+DEPEND="${COMMON_DEPEND}
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+"
+
+RDEPEND="${COMMON_DEPEND}
+ >=app-text/htmlmin-0.1.10[${PYTHON_USEDEP}]
+ >=dev-python/Babel-2.3.4[${PYTHON_USEDEP}]
+ >=dev-python/beautifulsoup-4.4.1[${PYTHON_USEDEP}]
+ >=dev-python/blinker-1.3[${PYTHON_USEDEP}]
+ >=dev-python/click-6.6[${PYTHON_USEDEP}]
+ >=dev-python/extras-0.0.3[${PYTHON_USEDEP}]
+ >=dev-python/fixtures-2.0.0[${PYTHON_USEDEP}]
+ >=dev-python/flask-0.11.1[${PYTHON_USEDEP}]
+ >=dev-python/flask-babel-0.11.1[${PYTHON_USEDEP}]
+ >=dev-python/flask-gravatar-0.4.2[${PYTHON_USEDEP}]
+ >=dev-python/flask-htmlmin-1.2[${PYTHON_USEDEP}]
+ >=dev-python/flask-login-0.3.2[${PYTHON_USEDEP}]
+ >=dev-python/flask-mail-0.9.1[${PYTHON_USEDEP}]
+ >=dev-python/flask-migrate-2.0.3[${PYTHON_USEDEP}]
+ >=dev-python/flask-paranoid-0.1.0[${PYTHON_USEDEP}]
+ >=dev-python/flask-principal-0.4.0[${PYTHON_USEDEP}]
+ >=dev-python/flask-security-1.7.5[${PYTHON_USEDEP}]
+ >=dev-python/flask-sqlalchemy-2.1[${PYTHON_USEDEP}]
+ >=dev-python/flask-wtf-0.12[${PYTHON_USEDEP}]
+ >=dev-python/html5lib-0.9999999[${PYTHON_USEDEP}]
+ >=dev-python/itsdangerous-0.24[${PYTHON_USEDEP}]
+ >=dev-python/jinja-2.7.3[${PYTHON_USEDEP}]
+ >=dev-python/linecache2-1.0.0[${PYTHON_USEDEP}]
+ >=dev-python/markupsafe-0.23[${PYTHON_USEDEP}]
+ >=dev-python/mimeparse-1.5.1[${PYTHON_USEDEP}]
+ >=dev-python/passlib-1.6.2[${PYTHON_USEDEP}]
+ >=dev-python/pbr-1.9.1[${PYTHON_USEDEP}]
+ >=dev-python/psycopg-2.7.3.2[${PYTHON_USEDEP}]
+ >=dev-python/pycrypto-2.6.1[${PYTHON_USEDEP}]
+ >=dev-python/pyrsistent-0.11.13[${PYTHON_USEDEP}]
+ >=dev-python/python-dateutil-2.5.0[${PYTHON_USEDEP}]
+ >=dev-python/python-sqlparse-0.1.19[${PYTHON_USEDEP}]
+ >=dev-python/pytz-2014.10[${PYTHON_USEDEP}]
+ >=dev-python/simplejson-3.6.5[${PYTHON_USEDEP}]
+ >=dev-python/six-1.9.0[${PYTHON_USEDEP}]
+ >=dev-python/speaklater-1.3[${PYTHON_USEDEP}]
+ >=dev-python/sqlalchemy-1.0.14[${PYTHON_USEDEP}]
+ >=dev-python/werkzeug-0.9.6[${PYTHON_USEDEP}]
+ >=dev-python/wtforms-2.0.2[${PYTHON_USEDEP}]
+"
+
+S="${WORKDIR}"/${P}/runtime
+
+src_prepare() {
+ cd "${WORKDIR}"/${P} || die
+ default
+}
+
+src_configure() {
+ eqmake5
+}
+
+src_compile() {
+ default
+ if use doc; then
+ cd "${WORKDIR}"/${P} || die
+ emake docs
+ fi
+}
+
+src_install() {
+ dobin pgAdmin4
+
+ cd "${WORKDIR}"/${P} || die
+
+ local APP_DIR=/usr/share/${PN}/web
+ insinto "${APP_DIR}"
+ doins -r web/*
+ cat > "${D}${APP_DIR}"/config_local.py <<-EOF
+ SERVER_MODE = False
+ UPGRADE_CHECK_ENABLED = False
+ EOF
+ python_optimize "${D}${APP_DIR}"
+
+ local CONFIG_DIR="/etc/xdg/pgadmin"
+ dodir "${CONFIG_DIR}"
+ cat > "${D}${CONFIG_DIR}"/pgadmin4.conf <<-EOF
+ [General]
+ ApplicationPath=${APP_DIR}
+ PythonPath=$(python_get_sitedir)
+ EOF
+
+ if use doc; then
+ rm -r docs/en_US/_build/html/_sources || die
+ insinto /usr/share/${PN}/docs/en_US/_build
+ doins -r docs/en_US/_build/html
+ fi
+}
diff --git a/dev-db/pgadmin4/pgadmin4-3.0.ebuild b/dev-db/pgadmin4/pgadmin4-3.0.ebuild
new file mode 100644
index 000000000000..a11b61dfef09
--- /dev/null
+++ b/dev-db/pgadmin4/pgadmin4-3.0.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_{4,5,6} )
+PYTHON_REQ_USE="sqlite"
+
+inherit python-single-r1 qmake-utils
+
+DESCRIPTION="GUI administration and development platform for PostgreSQL"
+HOMEPAGE="https://www.pgadmin.org/"
+SRC_URI="mirror://postgresql/pgadmin/${PN}/v${PV}/source/${P}.tar.gz"
+
+LICENSE="POSTGRESQL"
+KEYWORDS="amd64 x86"
+SLOT="0"
+IUSE="doc"
+
+RESTRICT="test"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+COMMON_DEPEND="${PYTHON_DEPS}
+ dev-qt/qtwidgets:5
+ dev-qt/qtwebkit:5
+ dev-qt/qtwebengine:5[widgets]
+"
+
+DEPEND="${COMMON_DEPEND}
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+"
+
+RDEPEND="${COMMON_DEPEND}
+ >=app-text/htmlmin-0.1.12[${PYTHON_USEDEP}]
+ >=dev-python/Babel-2.3.4[${PYTHON_USEDEP}]
+ >=dev-python/beautifulsoup-4.4.1[${PYTHON_USEDEP}]
+ >=dev-python/blinker-1.4[${PYTHON_USEDEP}]
+ >=dev-python/click-6.6[${PYTHON_USEDEP}]
+ >=dev-python/extras-1.0.0[${PYTHON_USEDEP}]
+ >=dev-python/fixtures-3.0.0[${PYTHON_USEDEP}]
+ >=dev-python/flask-0.12.2[${PYTHON_USEDEP}]
+ >=dev-python/flask-babel-0.11.1[${PYTHON_USEDEP}]
+ >=dev-python/flask-babelex-0.9.3[${PYTHON_USEDEP}]
+ >=dev-python/flask-gravatar-0.5.0[${PYTHON_USEDEP}]
+ >=dev-python/flask-htmlmin-1.3.2[${PYTHON_USEDEP}]
+ >=dev-python/flask-login-0.3.2[${PYTHON_USEDEP}]
+ >=dev-python/flask-mail-0.9.1[${PYTHON_USEDEP}]
+ >=dev-python/flask-migrate-2.1.1[${PYTHON_USEDEP}]
+ >=dev-python/flask-paranoid-0.2.0[${PYTHON_USEDEP}]
+ >=dev-python/flask-principal-0.4.0[${PYTHON_USEDEP}]
+ >=dev-python/flask-security-3.0.0[${PYTHON_USEDEP}]
+ >=dev-python/flask-sqlalchemy-2.3.2[${PYTHON_USEDEP}]
+ >=dev-python/flask-wtf-0.14.2[${PYTHON_USEDEP}]
+ >=dev-python/html5lib-1.0.1[${PYTHON_USEDEP}]
+ >=dev-python/itsdangerous-0.24[${PYTHON_USEDEP}]
+ >=dev-python/jinja-2.7.3[${PYTHON_USEDEP}]
+ >=dev-python/linecache2-1.0.0[${PYTHON_USEDEP}]
+ >=dev-python/markupsafe-0.23[${PYTHON_USEDEP}]
+ >=dev-python/mimeparse-1.6.0[${PYTHON_USEDEP}]
+ >=dev-python/passlib-1.7.1[${PYTHON_USEDEP}]
+ >=dev-python/pbr-3.1.1[${PYTHON_USEDEP}]
+ >=dev-python/psycopg-2.7.4[${PYTHON_USEDEP}]
+ >=dev-python/pycrypto-2.6.1[${PYTHON_USEDEP}]
+ >=dev-python/pyrsistent-0.14.2[${PYTHON_USEDEP}]
+ >=dev-python/python-dateutil-2.7.1[${PYTHON_USEDEP}]
+ >=dev-python/python-sqlparse-0.2.4[${PYTHON_USEDEP}]
+ >=dev-python/pytz-2018.3[${PYTHON_USEDEP}]
+ >=dev-python/simplejson-3.13.2[${PYTHON_USEDEP}]
+ >=dev-python/six-1.11.0[${PYTHON_USEDEP}]
+ >=dev-python/speaklater-1.3[${PYTHON_USEDEP}]
+ >=dev-python/sqlalchemy-1.2.5[${PYTHON_USEDEP}]
+ >=dev-python/werkzeug-0.9.6[${PYTHON_USEDEP}]
+ >=dev-python/wtforms-2.1[${PYTHON_USEDEP}]
+"
+
+S="${WORKDIR}"/${P}/runtime
+
+src_prepare() {
+ cd "${WORKDIR}"/${P} || die
+ default
+}
+
+src_configure() {
+ eqmake5
+}
+
+src_compile() {
+ default
+ if use doc; then
+ cd "${WORKDIR}"/${P} || die
+ emake docs
+ fi
+}
+
+src_install() {
+ dobin pgAdmin4
+
+ cd "${WORKDIR}"/${P} || die
+
+ local APP_DIR=/usr/share/${PN}/web
+ insinto "${APP_DIR}"
+ doins -r web/*
+ cat > "${D}${APP_DIR}"/config_local.py <<-EOF
+ SERVER_MODE = False
+ UPGRADE_CHECK_ENABLED = False
+ EOF
+ python_optimize "${D}${APP_DIR}"
+
+ local CONFIG_DIR="/etc/xdg/pgadmin"
+ dodir "${CONFIG_DIR}"
+ cat > "${D}${CONFIG_DIR}"/pgadmin4.conf <<-EOF
+ [General]
+ ApplicationPath=${APP_DIR}
+ PythonPath=$(python_get_sitedir)
+ EOF
+
+ if use doc; then
+ rm -r docs/en_US/_build/html/_sources || die
+ insinto /usr/share/${PN}/docs/en_US/_build
+ doins -r docs/en_US/_build/html
+ fi
+}
diff --git a/dev-db/pgagent-3.4.0-r3 b/dev-db/pgagent-3.4.0-r3
deleted file mode 100644
index 8f9322ab1283..000000000000
--- a/dev-db/pgagent-3.4.0-r3
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare test
-DEPEND=dev-db/postgresql:* x11-libs/wxGTK:3.0 sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=pgAgent is a job scheduler for PostgreSQL
-EAPI=6
-HOMEPAGE=http://www.pgadmin.org/download/pgagent.php
-KEYWORDS=amd64 x86
-LICENSE=POSTGRESQL GPL-2
-RDEPEND=dev-db/postgresql:* x11-libs/wxGTK:3.0
-SLOT=0
-SRC_URI=mirror://postgresql/pgadmin3/release/pgagent/pgAgent-3.4.0-Source.tar.gz
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf wxwidgets 04e063b0eff26daaea83d859dd9d6e05 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=3ca0791c9d8a8426761fb89dc99fea9b
diff --git a/dev-db/pgagent/Manifest b/dev-db/pgagent/Manifest
new file mode 100644
index 000000000000..08b7572768ee
--- /dev/null
+++ b/dev-db/pgagent/Manifest
@@ -0,0 +1,10 @@
+AUX add-log-timestamps.patch 18087 BLAKE2B f5febe934692aa8c6a794aa711de5152629c6f4e88ba1582378f0bfbc6e6e4de0f1464a62da63c76060c5672db460c7c7a1763279052f2ffdcb5b84c20bcbc97 SHA512 ce5d00aeda35bc4282ca65e8112be35e6f28cb70ff64316e47ab2247574ba71edbc99a1b4567df6a5a40bda1c8dbb5a1d65faa45054a7c63444c8591c9c059c5
+AUX fix-dbconn-getlasterror-crash.patch 1242 BLAKE2B f60c02a1044d1768dd8e9ae6c30281d893ee31219b0cfc2a736def73620b716e0c67878691229908599c362f29b8e92a4cf68c6f1890efde719bc68998e38391 SHA512 fa5553592878a6778d56306b515804ff60510c2327ea13d2f11f6b1259c13dc908237065bcc3e79a975128fa5e48e68135f1357e9c5053fb667e52c8d1a14dc0
+AUX fix-job-success-test.patch 1119 BLAKE2B f21cd2d132fc272be1f2add642f8b8b92c0b43aa94d84d824a40b16baf2a79818dbcf8344a6689ba33f326a56f902a79c746d55300c8da272789ba633d096688 SHA512 67f8c882b548057095b6914e6462b4e87be02fedc9c281d4aa4a4f1b936d257b9b0c9e01cd06e5a5e065e5ee128dc0da9416a436e78ab956b7d68f117e0bd102
+AUX pgagent.confd 292 BLAKE2B e40e12a1a915653ffa62b113733db93cc7b1c3fc7200ef476a91080fdc054fdb64b6ee9b838583b93b27827a7858e905df8fbe0084dedd8d70deee6887469005 SHA512 a7346ae4dc7231efb8c29d3b7a1d7d377a2b1dabe01b0be9b090e070bec927b29d8e8c20ce30d437cab2ab5c119af89dfcdc6f75fecaca7366b2c10c5e48ed11
+AUX pgagent.initd-r1 837 BLAKE2B 27bd762c0fd56cf63d1c31c2c0d94b6d8ed62dbfeaed42e260294604a5059c55dc9d204a526bfd5725831c99f712f1e5812a8bb7ee80cb745fc9bebfa06d7359 SHA512 ec6843ad55a7b2800c146ce7ee0551c5ede319d1fca1cfd700acd2245c6fcbaa36a87ad6cda04f33e124b479e6ca6b040cb57d0f78e40d335276e29c800f6627
+AUX postgres-10-build-fix.patch 2421 BLAKE2B 3b6865e7843edf420b59b1f2ededbca9707145d2b98a8d1cd015cadbe1dcf8729eb39d300c63ee847ae5c229a3583b4bd137139a007e8eda4bf8af670f99f6c4 SHA512 52aaf0582d8132904d7b95fc523d597749f045f9d465401ed851ebfeeb0824d2c8668ba0525db5e15a3966b388215e885aaea5626e3102a765fb7f2a2ba0b349
+AUX save-stderr-jobstep-output.patch 2626 BLAKE2B 8a0eb06fecb9450e027219f2ede7b9dc3fbeb6ad1d70e15f5294c954a924c9eb82b10569a6b045e6acd79430b1f5d7116ba4f19316599a2354dc9795ae274458 SHA512 b84b52e5a96d98067eab5e4877c54e02e3c912215067f4e1a1c9d3983a29acfd3e63fe666c6e62cf46391fb72cb02b4197d23e305cadf88da096f80d8e0c8167
+DIST pgAgent-3.4.0-Source.tar.gz 45081 BLAKE2B 81f074213285253743127188d9e203cb01d8492ce502dc5215279c7c557fdd7f532fa383a4578a8d9cc8ea46668ea971015e4cc5989d1b8022ed8924a92b988b SHA512 3b068fc6f5e51ff20604f8cec3e067d04b5b1537229da15ee442000f5fe834697a4eae86be0e9a58b8ee5da24cc985c8c9804d71cb2a50e93ec4cf9a424a4ff0
+EBUILD pgagent-3.4.0-r3.ebuild 2048 BLAKE2B 31024adad4855032de45c132b387ca6ab77b77f25a377bd99a41b01e762e3894b4bfaaa4473ea7b59bdb5ce9ec29fa74b3d9103293a967e1f4836a73a246908f SHA512 e4eb7d78268f4198159480b5105a815aff8c4d408b85f5a005057cdd04bf1393da136efe0f85b728de1e268d1053d7ace2b36ddc2d6d8f5271afb73706a9e013
+MISC metadata.xml 298 BLAKE2B 40abb765b052aa2cbbf749c54c686f1c98968cb1af2e93c149bfbfe6244d3c17e827189d7a1da90a566016758bfbed63b16ad0a0328725349748d1b18b2437b1 SHA512 167896d1d92ccb4b171cce16d63405369a9e28b0d01c12b2ed94fcec1f982892e179c007287fc3386e1c00393d6570a2ae9e8efe9420e53a82308426075d5c89
diff --git a/dev-db/pgagent/files/add-log-timestamps.patch b/dev-db/pgagent/files/add-log-timestamps.patch
new file mode 100644
index 000000000000..8d9eb4a3e8e2
--- /dev/null
+++ b/dev-db/pgagent/files/add-log-timestamps.patch
@@ -0,0 +1,535 @@
+From 2eef6cc4928c611cecdca3c1daecb60568deca4e Mon Sep 17 00:00:00 2001
+From: Sanket Mehta <sanket.mehta@enterprisedb.com>
+Date: Fri, 17 Jul 2015 09:07:09 +0100
+Subject: [PATCH] Add log timestamps and a --version option per Josh Berkus.
+ Update copyright notices while passing.
+
+---
+ CMakeLists.txt | 8 ++++----
+ LICENSE | 2 +-
+ cmake/MakeExt.cmake | 2 +-
+ connection.cpp | 2 +-
+ include/connection.h | 2 +-
+ include/job.h | 2 +-
+ include/misc.h | 3 ++-
+ include/pgAgent.h | 2 +-
+ job.cpp | 2 +-
+ misc.cpp | 14 +++++++++++++-
+ pgAgent.cpp | 2 +-
+ pgAgent.rc | 14 +++++++-------
+ pgaevent/CMakeLists.txt | 2 +-
+ pgaevent/pgaevent.c | 2 +-
+ pgaevent/pgaevent.def | 2 +-
+ pgaevent/pgamsgevent.h | 2 +-
+ pgaevent/pgamsgevent.rc | 14 +++++++-------
+ precomp.cpp | 2 +-
+ sql/pgagent--unpackaged--3.4.sql | 2 +-
+ sql/pgagent.sql | 2 +-
+ sql/pgagent_upgrade.sql | 2 +-
+ unix.cpp | 16 +++++++++++-----
+ win32.cpp | 5 ++++-
+ 23 files changed, 64 insertions(+), 42 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab02fea..c8bfa4a 100755
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ #######################################################################
+ #
+ # pgAgent - PostgreSQL tools
+-# Copyright (C) 2002 - 2014, The pgAdmin Development Team
++# Copyright (C) 2002 - 2015, The pgAdmin Development Team
+ # This software is released under the PostgreSQL Licence
+ #
+ # CMakeLists.txt - CMake build configuration
+@@ -27,7 +27,6 @@ SET(CMAKE_FIND_LIBRARY_PREFIXES "")
+ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib")
+
+ SET(STATIC_BUILD YES CACHE BOOL "Statically link the executable?")
+-
+ ################################################################################
+ # Apple stuff
+ ################################################################################
+@@ -61,12 +60,12 @@ PROJECT(pgagent)
+ # in pgagent.sql and upgrade_pgagent.sql if the major version number is
+ # changed. The full version number also needs to be included in pgAgent.rc and
+ # pgaevent/pgamsgevent.rc at present.
+-SET(VERSION 3.4.0)
++SET(VERSION "3.4.1")
+
+ # CPack stuff
+ SET(CPACK_PACKAGE_VERSION_MAJOR 3)
+ SET(CPACK_PACKAGE_VERSION_MINOR 4)
+-SET(CPACK_PACKAGE_VERSION_PATCH 0)
++SET(CPACK_PACKAGE_VERSION_PATCH 1)
+ SET(CPACK_PACKAGE_NAME "pgAgent")
+ SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "pgAgent is a job scheduling engine for PostgreSQL")
+ SET(CPACK_PACKAGE_VENDOR "the pgAdmin Development Team")
+@@ -79,6 +78,7 @@ SET(CPACK_SOURCE_GENERATOR TGZ)
+ SET(CPACK_SOURCE_IGNORE_FILES "\\\\.DS_Store;/CVS/;/\\\\.svn/;\\\\.swp$;\\\\.#;/#;.*~;cscope.*")
+
+ ADD_DEFINITIONS(-DPGAGENT_VERSION_MAJOR=${CPACK_PACKAGE_VERSION_MAJOR})
++ADD_DEFINITIONS(-DPGAGENT_VERSION="${VERSION}")
+
+ # This must come after we set the CPACK variables!!
+ INCLUDE(CPack)
+diff --git a/LICENSE b/LICENSE
+index 3b2638a..c460d6f 100644
+--- a/LICENSE
++++ b/LICENSE
+@@ -1,6 +1,6 @@
+ pgAgent
+
+-Copyright (c) 2002 - 2014, The pgAdmin Development Team
++Copyright (c) 2002 - 2015, The pgAdmin Development Team
+
+ Permission to use, copy, modify, and distribute this software and its
+ documentation for any purpose, without fee, and without a written agreement is
+diff --git a/cmake/MakeExt.cmake b/cmake/MakeExt.cmake
+index 5777c97..ae30e30 100644
+--- a/cmake/MakeExt.cmake
++++ b/cmake/MakeExt.cmake
+@@ -1,7 +1,7 @@
+ #######################################################################
+ #
+ # pgAgent - PostgreSQL tools
+-# Copyright (C) 2002 - 2014, The pgAdmin Development Team
++# Copyright (C) 2002 - 2015, The pgAdmin Development Team
+ # This software is released under the PostgreSQL Licence
+ #
+ # MakeExt,cmake - Create the PG Extension
+diff --git a/connection.cpp b/connection.cpp
+index f2213bd..25432bb 100644
+--- a/connection.cpp
++++ b/connection.cpp
+@@ -2,7 +2,7 @@
+ //
+ // pgAgent - PostgreSQL Tools
+ //
+-// Copyright (C) 2002 - 2014, The pgAdmin Development Team
++// Copyright (C) 2002 - 2015, The pgAdmin Development Team
+ // This software is released under the PostgreSQL Licence
+ //
+ // connection.cpp - database connection
+diff --git a/include/connection.h b/include/connection.h
+index a201450..064067c 100644
+--- a/include/connection.h
++++ b/include/connection.h
+@@ -2,7 +2,7 @@
+ //
+ // pgAgent - PostgreSQL Tools
+ //
+-// Copyright (C) 2002 - 2014, The pgAdmin Development Team
++// Copyright (C) 2002 - 2015, The pgAdmin Development Team
+ // This software is released under the PostgreSQL Licence
+ //
+ // connection.h - database connection
+diff --git a/include/job.h b/include/job.h
+index e511852..abc33d4 100644
+--- a/include/job.h
++++ b/include/job.h
+@@ -2,7 +2,7 @@
+ //
+ // pgAgent - PostgreSQL Tools
+ //
+-// Copyright (C) 2002 - 2014, The pgAdmin Development Team
++// Copyright (C) 2002 - 2015, The pgAdmin Development Team
+ // This software is released under the PostgreSQL Licence
+ //
+ // job.h - agent job
+diff --git a/include/misc.h b/include/misc.h
+index 14b4edc..59847d1 100644
+--- a/include/misc.h
++++ b/include/misc.h
+@@ -2,7 +2,7 @@
+ //
+ // pgAgent - PostgreSQL Tools
+ //
+-// Copyright (C) 2002 - 2014, The pgAdmin Development Team
++// Copyright (C) 2002 - 2015, The pgAdmin Development Team
+ // This software is released under the PostgreSQL Licence
+ //
+ // misc.h - misc functions
+@@ -18,6 +18,7 @@ void WaitAWhile(const bool waitLong = false);
+ void setOptions(int argc, char **argv, const wxString &executable);
+ wxString getArg(int &argc, char **&argv);
+ wxString NumToStr(const long l);
++void printVersion();
+
+ #endif // MISC_H
+
+diff --git a/include/pgAgent.h b/include/pgAgent.h
+index 6ef4944..059e0ca 100644
+--- a/include/pgAgent.h
++++ b/include/pgAgent.h
+@@ -2,7 +2,7 @@
+ //
+ // pgAgent - PostgreSQL Tools
+ //
+-// Copyright (C) 2002 - 2014, The pgAdmin Development Team
++// Copyright (C) 2002 - 2015, The pgAdmin Development Team
+ // This software is released under the PostgreSQL Licence
+ //
+ // pgAgent.h - main include
+diff --git a/job.cpp b/job.cpp
+index c4b39ce..f3eaa03 100644
+--- a/job.cpp
++++ b/job.cpp
+@@ -2,7 +2,7 @@
+ //
+ // pgAgent - PostgreSQL Tools
+ //
+-// Copyright (C) 2002 - 2014 The pgAdmin Development Team
++// Copyright (C) 2002 - 2015 The pgAdmin Development Team
+ // This software is released under the PostgreSQL Licence
+ //
+ // job.cpp - pgAgent job
+diff --git a/misc.cpp b/misc.cpp
+index dfd56a0..2252d83 100644
+--- a/misc.cpp
++++ b/misc.cpp
+@@ -2,7 +2,7 @@
+ //
+ // pgAgent - PostgreSQL Tools
+ //
+-// Copyright (C) 2002 - 2014 The pgAdmin Development Team
++// Copyright (C) 2002 - 2015 The pgAdmin Development Team
+ // This software is released under the PostgreSQL Licence
+ //
+ // misc.cpp - misc functions
+@@ -16,6 +16,8 @@
+ #include <unistd.h>
+ #endif
+
++#define APPVERSION_STR wxT(PGAGENT_VERSION)
++
+ // In unix.c or win32.c
+ void usage(const wxString &executable);
+
+@@ -42,6 +44,11 @@ wxString getArg(int &argc, char **&argv)
+ return s;
+ }
+
++void printVersion()
++{
++ wxPrintf(_("PostgreSQL Scheduling Agent\n"));
++ wxPrintf(_("Version: %s\n"), APPVERSION_STR);
++}
+
+ void setOptions(int argc, char **argv, const wxString &executable)
+ {
+@@ -72,6 +79,11 @@ void setOptions(int argc, char **argv, const wxString &executable)
+ minLogLevel = val;
+ break;
+ }
++ case 'v':
++ {
++ printVersion();
++ exit (0);
++ }
+ #ifndef __WXMSW__
+ case 'f':
+ {
+diff --git a/pgAgent.cpp b/pgAgent.cpp
+index 5ed43fb..9238fa1 100644
+--- a/pgAgent.cpp
++++ b/pgAgent.cpp
+@@ -2,7 +2,7 @@
+ //
+ // pgAgent - PostgreSQL Tools
+ //
+-// Copyright (C) 2002 - 2014, The pgAdmin Development Team
++// Copyright (C) 2002 - 2015, The pgAdmin Development Team
+ // This software is released under the PostgreSQL Licence
+ //
+ // pgAgent.cpp - pgAgent main entry
+diff --git a/pgAgent.rc b/pgAgent.rc
+index 3c51bfa..c4169e1 100644
+--- a/pgAgent.rc
++++ b/pgAgent.rc
+@@ -2,7 +2,7 @@
+ //
+ // pgAgent - PostgreSQL Tools
+ //
+-// Copyright (C) 2002 - 2014, The pgAdmin Development Team
++// Copyright (C) 2002 - 2015, The pgAdmin Development Team
+ // This software is released under the PostgreSQL Licence
+ //
+ // pgAgent.rc - win32 Resources
+@@ -16,8 +16,8 @@ aaaPGAGENT ICON DISCARDABLE "include/pgAgent.ico"
+
+
+ VS_VERSION_INFO VERSIONINFO
+-FILEVERSION 3,4,0,0
+-PRODUCTVERSION 3,4,0,0
++FILEVERSION 3,4,1,0
++PRODUCTVERSION 3,4,1,0
+ FILEOS VOS__WINDOWS32
+ FILETYPE VFT_APP
+ BEGIN
+@@ -25,15 +25,15 @@ BEGIN
+ BEGIN
+ BLOCK "040904E4"
+ BEGIN
+- VALUE "FileVersion", "3.4.0", "\0"
+- VALUE "File Version", "3.4.0", "\0"
++ VALUE "FileVersion", "3.4.1", "\0"
++ VALUE "File Version", "3.4.1", "\0"
+ VALUE "FileDescription", "pgAgent - PostgreSQL Scheduling Agent", "\0"
+- VALUE "LegalCopyright", "\251 2002 - 2012, The pgAdmin Development Team", "\0"
++ VALUE "LegalCopyright", "\251 2002 - 2015, The pgAdmin Development Team", "\0"
+ VALUE "LegalTrademarks", "This software is released under the PostgreSQL Licence.", "\0"
+ VALUE "InternalName", "pgAgent", "\0"
+ VALUE "OriginalFilename","pgagent.exe", "\0"
+ VALUE "ProductName", "pgAgent", "\0"
+- VALUE "ProductVersion", "3.4.0", "\0"
++ VALUE "ProductVersion", "3.4.1", "\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+diff --git a/pgaevent/CMakeLists.txt b/pgaevent/CMakeLists.txt
+index 10478c3..2fd6192 100644
+--- a/pgaevent/CMakeLists.txt
++++ b/pgaevent/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ #######################################################################
+ #
+ # pgAgent - PostgreSQL tools
+-# Copyright (C) 2002 - 2014, The pgAdmin Development Team
++# Copyright (C) 2002 - 2015, The pgAdmin Development Team
+ # This software is released under the PostgreSQL Licence
+ #
+ # pgaevent/CMakeLists.txt - CMake build configuration
+diff --git a/pgaevent/pgaevent.c b/pgaevent/pgaevent.c
+index a66ed42..c9fac75 100644
+--- a/pgaevent/pgaevent.c
++++ b/pgaevent/pgaevent.c
+@@ -2,7 +2,7 @@
+ //
+ // pgAgent - PostgreSQL Tools
+ //
+-// Copyright (C) 2002 - 2014, The pgAdmin Development Team
++// Copyright (C) 2002 - 2015, The pgAdmin Development Team
+ // This software is released under the PostgreSQL Licence
+ //
+ // pgaevent.c - win32 message format dll
+diff --git a/pgaevent/pgaevent.def b/pgaevent/pgaevent.def
+index c9e222d..34e03c1 100644
+--- a/pgaevent/pgaevent.def
++++ b/pgaevent/pgaevent.def
+@@ -2,7 +2,7 @@
+ ; //
+ ; // pgAgent - PostgreSQL Tools
+ ; //
+-; // Copyright (C) 2002 - 2014 The pgAdmin Development Team
++; // Copyright (C) 2002 - 2015 The pgAdmin Development Team
+ ; // This software is released under the PostgreSQL Licence
+ ; //
+ ; // pgaeventdef - pgaevent.dll exports
+diff --git a/pgaevent/pgamsgevent.h b/pgaevent/pgamsgevent.h
+index b8e11a5..f589d60 100644
+--- a/pgaevent/pgamsgevent.h
++++ b/pgaevent/pgamsgevent.h
+@@ -2,7 +2,7 @@
+ //
+ // pgAgent - PostgreSQL Tools
+ //
+-// Copyright (C) 2002 - 2014, The pgAdmin Development Team
++// Copyright (C) 2002 - 2015, The pgAdmin Development Team
+ // This software is released under the PostgreSQL Licence
+ //
+ // pgamsgevent.h - Message id declarations
+diff --git a/pgaevent/pgamsgevent.rc b/pgaevent/pgamsgevent.rc
+index 79e77aa..510ab65 100644
+--- a/pgaevent/pgamsgevent.rc
++++ b/pgaevent/pgamsgevent.rc
+@@ -2,7 +2,7 @@
+ //
+ // pgAgent - PostgreSQL Tools
+ //
+-// Copyright (C) 2002 - 2014, The pgAdmin Development Team
++// Copyright (C) 2002 - 2015, The pgAdmin Development Team
+ // This software is released under the PostgreSQL Licence
+ //
+ // pgaevent.rc - win32 Resources
+@@ -19,8 +19,8 @@ aaaPGAEVENT ICON DISCARDABLE "../include/pgagent.ico"
+
+
+ VS_VERSION_INFO VERSIONINFO
+-FILEVERSION 3,4,0,0
+-PRODUCTVERSION 3,4,0,0
++FILEVERSION 3,4,1,0
++PRODUCTVERSION 3,4,1,0
+ FILEOS VOS__WINDOWS32
+ FILETYPE VFT_APP
+ BEGIN
+@@ -28,15 +28,15 @@ BEGIN
+ BEGIN
+ BLOCK "040904E4"
+ BEGIN
+- VALUE "FileVersion", "3.4.0", "\0"
+- VALUE "File Version", "3.4.0", "\0"
++ VALUE "FileVersion", "3.4.1", "\0"
++ VALUE "File Version", "3.4.1", "\0"
+ VALUE "FileDescription", "pgaevent - pgAgent Event Log Message DLL", "\0"
+- VALUE "LegalCopyright", "\251 2002 - 2014, The pgAdmin Development Team", "\0"
++ VALUE "LegalCopyright", "\251 2002 - 2015, The pgAdmin Development Team", "\0"
+ VALUE "LegalTrademarks", "This software is released under the PostgreSQL Licence.", "\0"
+ VALUE "InternalName", "pgaevent", "\0"
+ VALUE "OriginalFilename","pgaevent.dll", "\0"
+ VALUE "ProductName", "pgAgent", "\0"
+- VALUE "ProductVersion", "3.4.0", "\0"
++ VALUE "ProductVersion", "3.4.1", "\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+diff --git a/precomp.cpp b/precomp.cpp
+index 02c969f..56766bb 100644
+--- a/precomp.cpp
++++ b/precomp.cpp
+@@ -2,7 +2,7 @@
+ //
+ // pgAgent - PostgreSQL Tools
+ //
+-// Copyright (C) 2002 - 2014, The pgAdmin Development Team
++// Copyright (C) 2002 - 2015, The pgAdmin Development Team
+ // This software is released under the PostgreSQL Licence
+ //
+ // precomp.cpp - pgAgent precompiled headers
+diff --git a/sql/pgagent--unpackaged--3.4.sql b/sql/pgagent--unpackaged--3.4.sql
+index 536640e..f5ffc63 100644
+--- a/sql/pgagent--unpackaged--3.4.sql
++++ b/sql/pgagent--unpackaged--3.4.sql
+@@ -1,7 +1,7 @@
+ /*
+ // pgAgent - PostgreSQL Tools
+ //
+-// Copyright (C) 2002 - 2014 The pgAdmin Development Team
++// Copyright (C) 2002 - 2015 The pgAdmin Development Team
+ // This software is released under the PostgreSQL Licence
+ //
+ // pgagent--unpackaged--3.4.sql - Convert pgAgent existing tables and functions to an extension
+diff --git a/sql/pgagent.sql b/sql/pgagent.sql
+index 3708adf..1118833 100644
+--- a/sql/pgagent.sql
++++ b/sql/pgagent.sql
+@@ -1,7 +1,7 @@
+ /*
+ // pgAgent - PostgreSQL Tools
+ //
+-// Copyright (C) 2002 - 2014 The pgAdmin Development Team
++// Copyright (C) 2002 - 2015 The pgAdmin Development Team
+ // This software is released under the PostgreSQL Licence
+ //
+ // pgagent.sql - pgAgent tables and functions
+diff --git a/sql/pgagent_upgrade.sql b/sql/pgagent_upgrade.sql
+index ae0d995..c256c93 100644
+--- a/sql/pgagent_upgrade.sql
++++ b/sql/pgagent_upgrade.sql
+@@ -1,7 +1,7 @@
+ /*
+ // pgAgent - PostgreSQL Tools
+ //
+-// Copyright (C) 2002 - 2014 The pgAdmin Development Team
++// Copyright (C) 2002 - 2015 The pgAdmin Development Team
+ // This software is released under the PostgreSQL Licence
+ //
+ // pgagent_upgrade.sql - Upgrade pgAgent tables and functions
+diff --git a/unix.cpp b/unix.cpp
+index 34ad0f6..e206408 100644
+--- a/unix.cpp
++++ b/unix.cpp
+@@ -2,7 +2,7 @@
+ //
+ // pgAgent - PostgreSQL Tools
+ //
+-// Copyright (C) 2002 - 2014, The pgAdmin Development Team
++// Copyright (C) 2002 - 2015, The pgAdmin Development Team
+ // This software is released under the PostgreSQL Licence
+ //
+ // unix.cpp - pgAgent unix specific functions
+@@ -17,14 +17,17 @@
+ #include <wx/filename.h>
+ #include <wx/ffile.h>
+ #include <fcntl.h>
++void printVersion();
+
+ void usage(const wxString &executable)
+ {
+ wxFileName *fn = new wxFileName(executable);
++ printVersion();
+
+ wxPrintf(_("Usage:\n"));
+ wxPrintf(fn->GetName() + _(" [options] <connect-string>\n"));
+ wxPrintf(_("options:\n"));
++ wxPrintf(_("-v (display version info and then exit)\n"));
+ wxPrintf(_("-f run in the foreground (do not detach from the terminal)\n"));
+ wxPrintf(_("-t <poll time interval in seconds (default 10)>\n"));
+ wxPrintf(_("-r <retry period after connection abort in seconds (>=10, default 30)>\n"));
+@@ -50,22 +53,25 @@ void LogMessage(wxString msg, int level)
+ return;
+ }
+
++ wxDateTime logTime = wxDateTime::Now();
++ wxString logTimeString = logTime.Format() + wxT(" : ");
++
+ switch (level)
+ {
+ case LOG_DEBUG:
+ if (minLogLevel >= LOG_DEBUG)
+- file.Write(_("DEBUG: ") + msg + wxT("\n"));
++ file.Write(logTimeString + _("DEBUG: ") + msg + wxT("\n"));
+ break;
+ case LOG_WARNING:
+ if (minLogLevel >= LOG_WARNING)
+- file.Write(_("WARNING: ") + msg + wxT("\n"));
++ file.Write(logTimeString + _("WARNING: ") + msg + wxT("\n"));
+ break;
+ case LOG_ERROR:
+- file.Write(_("ERROR: ") + msg + wxT("\n"));
++ file.Write(logTimeString + _("ERROR: ") + msg + wxT("\n"));
+ exit(1);
+ break;
+ case LOG_STARTUP:
+- file.Write(_("WARNING: ") + msg + wxT("\n"));
++ file.Write(logTimeString + _("WARNING: ") + msg + wxT("\n"));
+ break;
+ }
+
+diff --git a/win32.cpp b/win32.cpp
+index aa5d5d7..624ae77 100644
+--- a/win32.cpp
++++ b/win32.cpp
+@@ -2,7 +2,7 @@
+ //
+ // pgAgent - PostgreSQL Tools
+ //
+-// Copyright (C) 2002 - 2014 The pgAdmin Development Team
++// Copyright (C) 2002 - 2015 The pgAdmin Development Team
+ // This software is released under the PostgreSQL Licence
+ //
+ // win32.cpp - pgAgent win32 specific functions
+@@ -36,6 +36,7 @@ static HANDLE serviceSync;
+ static HANDLE eventHandle;
+
+ bool stopService();
++void printVersion();
+
+ // This will be called from MainLoop, if pgagent is initialized properly
+ void Initialized()
+@@ -435,12 +436,14 @@ bool removeService(const wxString &serviceName)
+ void usage(const wxString &executable)
+ {
+ wxFileName *fn = new wxFileName(executable);
++ printVersion();
+
+ wxPrintf(_("Usage:\n"));
+ wxPrintf(fn->GetName() + _(" REMOVE <serviceName>\n"));
+ wxPrintf(fn->GetName() + _(" INSTALL <serviceName> [options] <connect-string>\n"));
+ wxPrintf(fn->GetName() + _(" DEBUG [options] <connect-string>\n"));
+ wxPrintf(_("options:\n"));
++ wxPrintf(_("-v (display version info and then exit)\n"));
+ wxPrintf(_("-u <user or DOMAIN\\user>\n"));
+ wxPrintf(_("-p <password>\n"));
+ wxPrintf(_("-d <displayname>\n"));
diff --git a/dev-db/pgagent/files/fix-dbconn-getlasterror-crash.patch b/dev-db/pgagent/files/fix-dbconn-getlasterror-crash.patch
new file mode 100644
index 000000000000..633a359b6765
--- /dev/null
+++ b/dev-db/pgagent/files/fix-dbconn-getlasterror-crash.patch
@@ -0,0 +1,32 @@
+From f9bf1ccb27ebcfce00e7a6d467bc0e1b5ee9555e Mon Sep 17 00:00:00 2001
+From: Ashesh Vashi <ashesh.vashi@enterprisedb.com>
+Date: Wed, 1 Apr 2015 15:24:11 +0530
+Subject: [PATCH] Fixed a bug in DBconn::GetLastError() function.
+
+pgAgent was crashing, while removing the trailing new-lines from the
+empty error message string (Reported by: Thomas Krennwallner)
+---
+ connection.cpp | 10 +---------
+ 1 file changed, 1 insertion(+), 9 deletions(-)
+
+diff --git a/connection.cpp b/connection.cpp
+index b7623e6..f2213bd 100644
+--- a/connection.cpp
++++ b/connection.cpp
+@@ -313,15 +313,7 @@ int DBconn::ExecuteVoid(const wxString &query)
+
+ wxString DBconn::GetLastError()
+ {
+- // Return the last error message, minus any trailing line ends
+- if (lastError.substr(lastError.length() - 2, 2) == wxT("\r\n")) // DOS
+- return lastError.substr(0, lastError.length() - 2);
+- else if (lastError.substr(lastError.length() - 1, 1) == wxT("\n")) // Unix
+- return lastError.substr(0, lastError.length() - 1);
+- else if (lastError.substr(lastError.length() - 1, 1) == wxT("\r")) // Mac
+- return lastError.substr(0, lastError.length() - 1);
+- else
+- return lastError;
++ return lastError.Trim(true);
+ }
+
+ ///////////////////////////////////////////////////////7
diff --git a/dev-db/pgagent/files/fix-job-success-test.patch b/dev-db/pgagent/files/fix-job-success-test.patch
new file mode 100644
index 000000000000..cd5495a52aa9
--- /dev/null
+++ b/dev-db/pgagent/files/fix-job-success-test.patch
@@ -0,0 +1,30 @@
+From 01b72d867cc2bdbaff1765499a6395f7bc94e2be Mon Sep 17 00:00:00 2001
+From: Sanket Mehta <sanket.mehta@enterprisedb.com>
+Date: Tue, 1 Dec 2015 11:34:32 +0530
+Subject: [PATCH] Set 'succeeded' flag to true/false by checking for the step
+ failure everytime (it gets executed).
+
+These was an issue with the current implementation.
+
+Once the 'succeeded' flag is set to true, the following batch step
+execution does not stop executiong of following steps on failure, even
+we have set 'onerror' to 'f' for that step.
+---
+ job.cpp | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/job.cpp b/job.cpp
+index f3eaa03..9864f57 100644
+--- a/job.cpp
++++ b/job.cpp
+@@ -307,9 +307,7 @@ int Job::Execute()
+
+ // set success status for batch runs, be pessimistic by default
+ LogMessage(wxString::Format(_("Script return code: %d"), rc), LOG_DEBUG);
+- if (rc == 0)
+- succeeded = true;
+-
++ succeeded = ((rc == 0) ? true : false);
+ // If output is empty then either script did not return any output
+ // or script threw some error into stderr.
+ // Check script threw some error into stderr
diff --git a/dev-db/pgagent/files/pgagent.confd b/dev-db/pgagent/files/pgagent.confd
new file mode 100644
index 000000000000..0b2c7d788dd2
--- /dev/null
+++ b/dev-db/pgagent/files/pgagent.confd
@@ -0,0 +1,22 @@
+# Pool time interval
+PGA_POLL="10"
+
+# Retry period
+PGA_RETRY="30"
+
+# Log file
+PGA_LOG="/var/log/pgagent.log"
+
+# Logging verbosity
+# ERROR=0, WARNING=1, DEBUG=2
+PGA_LEVEL="1"
+
+# Server parameters
+# Host address
+PG_HOST="localhost"
+
+# DB name
+PG_DBNAME="postgres"
+
+# Username
+PG_USER="postgres" \ No newline at end of file
diff --git a/dev-db/pgagent/files/pgagent.initd-r1 b/dev-db/pgagent/files/pgagent.initd-r1
new file mode 100644
index 000000000000..a555006d3bd2
--- /dev/null
+++ b/dev-db/pgagent/files/pgagent.initd-r1
@@ -0,0 +1,31 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command="/usr/bin/pgagent"
+command_user="pgagent"
+
+# If pgagent daemonizes itself, it won't write a PID file and
+# we have to work a little harder to stop() it. So let it run
+# in the foreground, and have OpenRC manage its PID file.
+command_args="-f
+ -t ${PGA_POLL}
+ -r ${PGA_RETRY}
+ -s ${PGA_LOG}
+ -l ${PGA_LEVEL}
+ hostaddr=${PG_HOST}
+ dbname=${PG_DBNAME}
+ user=${PG_USER}"
+
+command_background="true"
+pidfile="/run/pgagent.pid"
+
+depend() {
+ use net
+ need postgresql
+}
+
+start_pre() {
+ # The log file needs to be writable by the daemon user.
+ checkpath --file --owner root:pgagent --mode 0660 "${PGA_LOG}"
+}
diff --git a/dev-db/pgagent/files/postgres-10-build-fix.patch b/dev-db/pgagent/files/postgres-10-build-fix.patch
new file mode 100644
index 000000000000..e2ecb0aa60b7
--- /dev/null
+++ b/dev-db/pgagent/files/postgres-10-build-fix.patch
@@ -0,0 +1,52 @@
+From a7b82fb3d3bd3de3ce624d9e4b0da53cb9835c2d Mon Sep 17 00:00:00 2001
+From: Ashesh Vashi <ashesh.vashi@enterprisedb.com>
+Date: Mon, 31 Jul 2017 14:57:55 +0530
+Subject: [PATCH] Added support two digits version for PostgreSQL/EDB Postgres
+ Advanced Server >= 10
+
+---
+ CMakeLists.txt | 6 +++++-
+ cmake/FindPG.cmake | 6 +++---
+ 2 files changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8214650..29755b4 100755
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -176,7 +176,11 @@ MESSAGE(STATUS " Description : ${CPACK_PACKAGE_DESCRIPTION_SUMM
+ MESSAGE(STATUS " Version : ${VERSION}")
+ MESSAGE(STATUS " ")
+ MESSAGE(STATUS " PostgreSQL version string : ${PG_VERSION_STRING}")
+-MESSAGE(STATUS " PostgreSQL version parts : ${PG_MAJOR_VERSION}.${PG_MINOR_VERSION}.${PG_PATCH_VERSION}")
++IF(${PG_MAJOR_VERSION} GREATER 9)
++ MESSAGE(STATUS " PostgreSQL version parts : ${PG_MAJOR_VERSION}")
++ELSE()
++ MESSAGE(STATUS " PostgreSQL version parts : ${PG_MAJOR_VERSION}.${PG_MINOR_VERSION}")
++ENDIF(${PG_MAJOR_VERSION} GREATER 10)
+ MESSAGE(STATUS " PostgreSQL path : ${PG_ROOT_DIR}")
+ MESSAGE(STATUS " PostgreSQL config binary : ${PG_CONFIG_PATH}")
+ MESSAGE(STATUS " PostgreSQL include path : ${PG_INCLUDE_DIRS}")
+diff --git a/cmake/FindPG.cmake b/cmake/FindPG.cmake
+index 349086c..9768771 100644
+--- a/cmake/FindPG.cmake
++++ b/cmake/FindPG.cmake
+@@ -28,7 +28,6 @@
+ # PG_VERSION_STRING - The PostgreSQL version number.
+ # PG_MAJOR_VERSION - The PostgreSQL major version (x in x.y.z).
+ # PG_MINOR_VERSION - The PostgreSQL minor version (y in x.y.z).
+-# PG_PATCH_VERSION - The PostgreSQL patch version (z in x.y.z).
+ # PG_EXTENSION - Set to TRUE if PostgreSQL supports extensions.
+
+ IF(NOT PG_STATIC OR PG_STATIC STREQUAL "")
+@@ -70,8 +69,9 @@ IF(NOT _retval)
+ # Split the version into its component parts.
+ STRING(REGEX MATCHALL "[0-9]+" PG_VERSION_PARTS "${PG_VERSION_STRING}")
+ LIST(GET PG_VERSION_PARTS 0 PG_MAJOR_VERSION)
+- LIST(GET PG_VERSION_PARTS 1 PG_MINOR_VERSION)
+- LIST(GET PG_VERSION_PARTS 2 PG_PATCH_VERSION)
++ IF((PG_MAJOR_VERSION LESS 10))
++ LIST(GET PG_VERSION_PARTS 1 PG_MINOR_VERSION)
++ ENDIF((PG_MAJOR_VERSION LESS 10))
+
+ # Are extensions supported?
+ IF((PG_MAJOR_VERSION GREATER 9) OR ((PG_MAJOR_VERSION EQUAL 9) AND (PG_MINOR_VERSION GREATER 0)))
diff --git a/dev-db/pgagent/files/save-stderr-jobstep-output.patch b/dev-db/pgagent/files/save-stderr-jobstep-output.patch
new file mode 100644
index 000000000000..245dbe2764ea
--- /dev/null
+++ b/dev-db/pgagent/files/save-stderr-jobstep-output.patch
@@ -0,0 +1,79 @@
+From 5d2e0d3500a8e144215cdfe10b52cf7415b58046 Mon Sep 17 00:00:00 2001
+From: Ashesh Vashi <ashesh.vashi@enterprisedb.com>
+Date: Mon, 25 May 2015 12:37:42 +0530
+Subject: [PATCH] Save the standarad error too along with the standard output
+ in the jobstep output for the batch jobs.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+[Worked on by: Mehmet Emin KARAKAŞ, Akshay Joshi]
+[Reviewed and improvised by: Sanket Joshi, Ashesh Vashi]
+---
+ job.cpp | 37 +++++++++++++++++++++++++++++++++++++
+ 1 file changed, 37 insertions(+)
+
+diff --git a/job.cpp b/job.cpp
+index 00334ab..c4b39ce 100644
+--- a/job.cpp
++++ b/job.cpp
+@@ -186,8 +186,10 @@ int Job::Execute()
+
+ #ifdef __WIN32__
+ wxString filename = dirname + wxT("\\") + jobid + wxT("_") + stepid + wxT(".bat");
++ wxString errorFile = dirname + wxT("\\") + jobid + wxT("_") + stepid + wxT("_error.txt");
+ #else
+ wxString filename = dirname + wxT("/") + jobid + wxT("_") + stepid + wxT(".scr");
++ wxString errorFile = dirname + wxT("/") + jobid + wxT("_") + stepid + wxT("_error.txt");
+ #endif
+
+ // Write the script
+@@ -233,6 +235,10 @@ int Job::Execute()
+ file->Close();
+ LogMessage(wxString::Format(_("Executing script file: %s"), filename.c_str()), LOG_DEBUG);
+
++ // freopen function is used to redirect output of stream (stderr in our case)
++ // into the specified file.
++ FILE *fpError = freopen(errorFile.mb_str(), "w", stderr);
++
+ // Execute the file and capture the output
+ #ifdef __WIN32__
+ // The Windows way
+@@ -304,6 +310,37 @@ int Job::Execute()
+ if (rc == 0)
+ succeeded = true;
+
++ // If output is empty then either script did not return any output
++ // or script threw some error into stderr.
++ // Check script threw some error into stderr
++ if (fpError)
++ {
++ //fclose(fpError);
++ FILE* fpErr = fopen(errorFile.mb_str(), "r");
++ if (fpErr)
++ {
++ char buffer[4098];
++ wxString errorMsg = wxEmptyString;
++ while (!feof(fpErr))
++ {
++ if (fgets(buffer, 4096, fpErr) != NULL)
++ errorMsg += wxString(buffer, wxConvLibc);
++ }
++
++ if (errorMsg != wxEmptyString) {
++ wxString errmsg =
++ wxString::Format(
++ _("Script Error: \n%s\n"),
++ errorMsg.c_str());
++ LogMessage(errmsg, LOG_WARNING);
++ output += wxT("\n") + errmsg;
++ }
++
++ fclose(fpErr);
++ }
++ wxRemoveFile(errorFile);
++ }
++
+ // Delete the file/directory. If we fail, don't overwrite the script output in the log, just throw warnings.
+ if (!wxRemoveFile(filename))
+ {
diff --git a/dev-db/pgagent/metadata.xml b/dev-db/pgagent/metadata.xml
new file mode 100644
index 000000000000..eb41154c968f
--- /dev/null
+++ b/dev-db/pgagent/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>pgsql-bugs@gentoo.org</email>
+ <name>PostgreSQL and Related Package Development</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-db/pgagent/pgagent-3.4.0-r3.ebuild b/dev-db/pgagent/pgagent-3.4.0-r3.ebuild
new file mode 100644
index 000000000000..81dd4cdf8aad
--- /dev/null
+++ b/dev-db/pgagent/pgagent-3.4.0-r3.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+CMAKE_IN_SOURCE_BUILD=1
+WX_GTK_VER="3.0"
+
+inherit cmake-utils user wxwidgets
+
+MY_PN=${PN/a/A}
+
+KEYWORDS="amd64 x86"
+
+DESCRIPTION="${MY_PN} is a job scheduler for PostgreSQL"
+HOMEPAGE="http://www.pgadmin.org/download/pgagent.php"
+SRC_URI="mirror://postgresql/pgadmin3/release/${PN}/${MY_PN}-${PV}-Source.tar.gz"
+LICENSE="POSTGRESQL GPL-2"
+SLOT="0"
+IUSE=""
+
+RDEPEND="dev-db/postgresql:*
+ x11-libs/wxGTK:${WX_GTK_VER}"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MY_PN}-${PV}-Source"
+
+PATCHES=(
+ "${FILESDIR}/fix-dbconn-getlasterror-crash.patch"
+ "${FILESDIR}/save-stderr-jobstep-output.patch"
+ "${FILESDIR}/add-log-timestamps.patch"
+ "${FILESDIR}/fix-job-success-test.patch"
+ "${FILESDIR}/postgres-10-build-fix.patch"
+)
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ sed -e "s:share):share/${P}):" \
+ -i CMakeLists.txt || die "failed to patch CMakeLists.txt"
+ sed -i -e '/SET(WX_VERSION "2.8")/d' CMakeLists.txt || die
+}
+
+src_configure() {
+ if has_version "x11-libs/wxGTK[X]"; then
+ need-wxwidgets unicode
+ else
+ need-wxwidgets base-unicode
+ fi
+ mycmakeargs=( "-DSTATIC_BUILD:BOOLEAN=FALSE"
+ "-DWX_VERSION=${WX_GTK_VER}" )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ newinitd "${FILESDIR}/pgagent.initd-r1" "${PN}"
+ newconfd "${FILESDIR}/pgagent.confd" "${PN}"
+
+ rm "${ED}"/usr/{LICENSE,README} || die "failed to remove useless docs"
+}
+
+pkg_preinst() {
+ # This user needs a real shell, and the daemon will use the
+ # ~/.pgpass file from its home directory.
+ enewuser pgagent -1 /bin/bash /home/pgagent
+}
+
+pkg_postinst() {
+ if [[ -n "${REPLACING_VERSIONS}" ]]; then
+ # This warning can be removed around a year after this version
+ # goes stable.
+ ewarn 'pgAgent now runs as a dedicated "pgagent" user (as'
+ ewarn 'opposed to root). You may need to move your /root/.pgpass'
+ ewarn 'file to /home/pgagent/.pgpass, and the new user will'
+ ewarn 'need permissions on any paths that it will access.'
+ fi
+}
diff --git a/dev-db/pgbadger-9.2 b/dev-db/pgbadger-9.2
deleted file mode 100644
index ae6631bc33f5..000000000000
--- a/dev-db/pgbadger-9.2
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-perl/JSON-XS dev-perl/Text-CSV_XS dev-lang/perl:=
-DESCRIPTION=pgBadger is a PostgreSQL log analyzer.
-EAPI=6
-HOMEPAGE=http://dalibo.github.io/pgbadger/
-KEYWORDS=amd64
-LICENSE=BSD
-RDEPEND=dev-perl/JSON-XS dev-perl/Text-CSV_XS dev-lang/perl:=
-SLOT=0
-SRC_URI=https://github.com/dalibo/pgbadger/archive/v9.2.tar.gz -> pgbadger-9.2.tar.gz
-_eclasses_=multiprocessing cac3169468f893670dac3e7cb940e045 perl-functions 01e8c68d5a528bbcda4d3c60205983df perl-module 863b35d127db98823d439f8d73c2d011
-_md5_=36a00f224179a16b06a7836fd47b0f9d
diff --git a/dev-db/pgbadger/Manifest b/dev-db/pgbadger/Manifest
new file mode 100644
index 000000000000..d62038e81674
--- /dev/null
+++ b/dev-db/pgbadger/Manifest
@@ -0,0 +1,3 @@
+DIST pgbadger-9.2.tar.gz 745128 BLAKE2B 63e7d60992e903a136d4f91422a378a6adc5c0477e69ae1cae3d4c1940dc02517f0b6f16d0fa7c5fe0ea365851807dc800bfaef0e95c546d6c4eb4afe0e2d09d SHA512 c99636fc03e3e1c1cf4c8c034e58e2152ec1118954d4fd9bdfa782d7781eee308cdd7450c0bcca6f5936c173b3780c9362fccc8cf79f5b0fffc895f73a322c9e
+EBUILD pgbadger-9.2.ebuild 437 BLAKE2B 51ec9c61888f6e01e9d1b4222166268162d8b8b9a6d57a9ed5e9054244a9c34edde5f0edc913a00fe164f57501c525253867df4f8c1b5cea7539f7070a231539 SHA512 9fd59dc534af5fa16a90f26b0953c5e1c606a873c800a9105dfa403e8372f11bd97840730488229a1f1d6e67ff7e27d58b247972480e15486151e988c3ca5078
+MISC metadata.xml 413 BLAKE2B 9b4f24620b42d2cf5befbaed7d52ed2e03d4619ebb547d36e207a900fe481a825a5be0a6fac073d7b278076ced053ae9a3c4b5d05597e5fb4d7ea66c1bff7988 SHA512 6bf32dc50ecd2d51d450413500b00773177109ab3ad26d74b458ec902973fa38542dbc65e65fbbe103b4be63589f61c2b9a6ab6ea5492b1954142afc5c2f8f93
diff --git a/dev-db/pgbadger/metadata.xml b/dev-db/pgbadger/metadata.xml
new file mode 100644
index 000000000000..5010c08906f3
--- /dev/null
+++ b/dev-db/pgbadger/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>pgsql-bugs@gentoo.org</email>
+ <name>PostgreSQL and Related Package Development</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">pgbadger</remote-id>
+ <remote-id type="github">dalibo/pgbadger</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/pgbadger/pgbadger-9.2.ebuild b/dev-db/pgbadger/pgbadger-9.2.ebuild
new file mode 100644
index 000000000000..16ecc3a80b96
--- /dev/null
+++ b/dev-db/pgbadger/pgbadger-9.2.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit perl-module
+
+DESCRIPTION="pgBadger is a PostgreSQL log analyzer."
+HOMEPAGE="http://dalibo.github.io/pgbadger/"
+SRC_URI="https://github.com/dalibo/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64"
+IUSE=""
+
+DEPEND="
+ dev-perl/JSON-XS
+ dev-perl/Text-CSV_XS
+"
+RDEPEND="${DEPEND}"
diff --git a/dev-db/pgbouncer-1.8.1 b/dev-db/pgbouncer-1.8.1
deleted file mode 100644
index 259b39e5f4ce..000000000000
--- a/dev-db/pgbouncer-1.8.1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=configure install postinst prepare setup test
-DEPEND=>=dev-libs/libevent-2.0 >=sys-libs/glibc-2.10 c-ares? ( >=net-dns/c-ares-1.10 ) ssl? ( >=dev-libs/openssl-1.0.1:=[-bindist] ) udns? ( >=net-libs/udns-0.1 )
-DESCRIPTION=Lightweight connection pooler for PostgreSQL
-EAPI=6
-HOMEPAGE=https://pgbouncer.github.io
-IUSE=+c-ares debug doc pam ssl -udns
-KEYWORDS=amd64 x86
-LICENSE=BSD
-RDEPEND=>=dev-libs/libevent-2.0 >=sys-libs/glibc-2.10 c-ares? ( >=net-dns/c-ares-1.10 ) ssl? ( >=dev-libs/openssl-1.0.1:=[-bindist] ) udns? ( >=net-libs/udns-0.1 )
-REQUIRED_USE=?? ( c-ares udns )
-SLOT=0
-SRC_URI=https://pgbouncer.github.io/downloads/files/1.8.1/pgbouncer-1.8.1.tar.gz
-_eclasses_=user 8bc2845510e2109af75e3eeac607ec81
-_md5_=82f64d37ddc8e13652b3089389c84c85
diff --git a/dev-db/pgbouncer/Manifest b/dev-db/pgbouncer/Manifest
new file mode 100644
index 000000000000..5495f91cc78c
--- /dev/null
+++ b/dev-db/pgbouncer/Manifest
@@ -0,0 +1,7 @@
+AUX logrotate 119 BLAKE2B 7ed90c0272410e5a37411f78aaa446d1688ceb5a5a0cfa652f8ea3d043f693af2b963aaf18bb230ec4cd5ae34f09219f02b9ee0ca5b43fe61489f46aa7a8d505 SHA512 5aa4226ab2d168a88a3b64deb114d3901431d2afb2571cf8ae411c989549bc465ee05104a6863cc8fce6d769d809b4ab536973280f50cb4415c6698c34e1a5b8
+AUX pgbouncer-1.8-dirs.patch 984 BLAKE2B 0e9a3550efad0669e4598513197c50460326f701dae628ae8c9fb201e08ae3f0c5826515c6a884a00f2b0afd048490b16d87f9b3b9cf836ca4c77284cd705334 SHA512 2c9ddd2ae193b032435f97d41e789283ae69d99fefeb3829e80a90be296ccd2a754a9d00e6930985408758dfa3349d65f3c2ddf1f74053424bc8d8d09b2fa0e2
+AUX pgbouncer.confd 425 BLAKE2B f9b7065c043474f2208b44eecefb9cd1d6544295a47c3aee51f340f522eb4ba87bb270c99e18183541aca144eb16487a622ff5f2b5d5b87b2d1c7dd950262afd SHA512 9f997cbfb18f5bb1623aea2a9af706359a973fd2167be91ee6ffb37a22a6dc453280c66b6d2c11ab0174dbf159a195f0a1612be198466633d728a5317a878035
+AUX pgbouncer.initd-r1 2216 BLAKE2B cfc489a5db03b6e4c56c79036d070152a6f78ce6c300fdc52049aaf91c41db1e2a41af409e701ab8dc2a24a5ca4e8b89b38cc61c52885a1330a04ef727d7585e SHA512 c2af62daf4e7c8e5a25acd17237de2134f1e496a51bd054abecc020a65b39c309c85572c17105431fd598a80ada187fb32fa8f2b1db229d2207c59607748220a
+DIST pgbouncer-1.8.1.tar.gz 465930 BLAKE2B 692c551cb7bfb56bfe1b354791b06bdf61866197150a78a7fa9688891a2e4cd3c015abc5fbe33bf66dc85ab0ae83745f2db852eae91ae99596c97be0154e8bd5 SHA512 595a94db98866cec211f2b8c1ad13d209dba00e5fd41f2e9025aabdcb660194f0f772810270a1d9f067c3039c9fee630e8ff2d56f231935add17207aecc10bee
+EBUILD pgbouncer-1.8.1.ebuild 1892 BLAKE2B 7fab90d3eb06d905c21a42773532c21fb978d7040915d14262f5203eb54db0fb7a6747b88fcf0183b6980f29a81774d79b809c50193bfdc07def521b9df42f2c SHA512 723a646c3694518d5a0e40b8dc6dd6ea2d393b6dbebccfafb324a1d6f160415166c3ac1fbda068aadee277c2ac549fca92109d432a6ec49f20f687ffd06fe931
+MISC metadata.xml 472 BLAKE2B b06a5dca1ee52c85fa1f948c4c8cf6e83c0aba3e0b0bd77672f1585c01d0a2f8ef4d7502e30e9cb658ec3dd3e53560671b69210166c36b4ce888e329f531585b SHA512 b098e87be6194706f462bb93c4bf5425023f7bd90a0ed421a51ea42db98c85ebd77f23eb413f4e271e126ad4404cd0bdf0694f675662c421f7afd8ec0f036b4d
diff --git a/dev-db/pgbouncer/files/logrotate b/dev-db/pgbouncer/files/logrotate
new file mode 100644
index 000000000000..9617eafa66b0
--- /dev/null
+++ b/dev-db/pgbouncer/files/logrotate
@@ -0,0 +1,7 @@
+/var/log/pgbouncer/pgbouncer.log {
+ missingok
+ sharedscripts
+ postrotate
+ /etc/init.d/pgbouncer -q reload
+ endscript
+} \ No newline at end of file
diff --git a/dev-db/pgbouncer/files/pgbouncer-1.8-dirs.patch b/dev-db/pgbouncer/files/pgbouncer-1.8-dirs.patch
new file mode 100644
index 000000000000..cc4d0634b6b3
--- /dev/null
+++ b/dev-db/pgbouncer/files/pgbouncer-1.8-dirs.patch
@@ -0,0 +1,32 @@
+diff -Naruw pgbouncer-1.8.orig/etc/pgbouncer.ini pgbouncer-1.8/etc/pgbouncer.ini
+--- pgbouncer-1.8.orig/etc/pgbouncer.ini 2017-12-18 11:03:18.000000000 -0500
++++ pgbouncer-1.8/etc/pgbouncer.ini 2017-12-20 06:48:25.935839539 -0500
+@@ -34,7 +34,9 @@
+ ;;;
+
+ logfile = /var/log/pgbouncer/pgbouncer.log
+-pidfile = /var/run/pgbouncer/pgbouncer.pid
++
++; Leave unset. This is handled in the initscript.
++;pidfile =
+
+ ;;;
+ ;;; Where to wait for clients
+@@ -44,11 +46,12 @@
+ listen_addr = 127.0.0.1
+ listen_port = 6432
+
+-; Unix socket is also used for -R.
+-; On Debian it should be /var/run/postgresql
+-;unix_socket_dir = /tmp
+-;unix_socket_mode = 0777
+-;unix_socket_group =
++; Unix socket is also used for -R (online restart), but the
++; initscripts can't do that. Generally, you'll want to leave these
++; alone. System-wide default is: /run/postgresql
++unix_socket_dir = /run/postgresql
++unix_socket_mode = 0777
++unix_socket_group = postgres
+
+ ;;;
+ ;;; TLS settings for accepting clients
diff --git a/dev-db/pgbouncer/files/pgbouncer.confd b/dev-db/pgbouncer/files/pgbouncer.confd
new file mode 100644
index 000000000000..e2c584011884
--- /dev/null
+++ b/dev-db/pgbouncer/files/pgbouncer.confd
@@ -0,0 +1,12 @@
+# Location of configuration file for PgBouncer.
+INIFILE="/etc/pgbouncer.ini"
+
+# How long to wait in seconds for a safe shutdown. Equivalent to
+# issuing 'PAUSE;' and 'SHUTDOWN;' on psql console. (See 'man 1 pgbouncer'.)
+NICE_TIMEOUT=60
+
+# Set to 'YES' to perform an immediate shutdown if the nice shutdown
+# doesn't work. Same as issuing 'SHUTDOWN;' on console. (See 'man 1
+# pgbouncer'.)
+FORCE_QUIT="no"
+FORCE_QUIT_TIMEOUT=2 \ No newline at end of file
diff --git a/dev-db/pgbouncer/files/pgbouncer.initd-r1 b/dev-db/pgbouncer/files/pgbouncer.initd-r1
new file mode 100755
index 000000000000..7392918593bb
--- /dev/null
+++ b/dev-db/pgbouncer/files/pgbouncer.initd-r1
@@ -0,0 +1,83 @@
+#!/sbin/openrc-run
+
+extra_started_commands="reload"
+
+PIDFILE="/run/pgbouncer.pid"
+
+depend() {
+ use net
+ after postgresql
+}
+
+get_config() {
+ [ -f "${INIFILE}" ] || eend 1 "'${INIFILE}' not found"
+
+ eval echo $(sed -e 's:;.*::' "${INIFILE}" | \
+ awk '$1 == "'$1'" { print ($2 == "=" ? $3 : $2) }')
+}
+
+start_pre() {
+ local s="$(get_config unix_socket_dir)"
+
+ if [ -n "${s}" ] ; then
+ checkpath -o root:postgres -m 1775 -d "${s}" || return 1
+
+ local listen_port="$(get_config listen_port)"
+
+ if [ -e "${s%/}/.s.PGSQL.${listen_port}" ] ; then
+ eerror "Socket conflict."
+ eerror "A server is already listening on:"
+ eerror " ${s%/}/.s.PGSQL.${listen_port}"
+ eerror "HINT: Change listen_port in pgbouncer.ini to listen on a"
+ eerror "different socket."
+ return 1
+ fi
+ fi
+
+ checkpath -o pgbouncer:postgres -m 0755 \
+ -d "$(dirname $(get_config logfile))" || return 1
+ checkpath -o pgbouncer:postgres -m 0640 \
+ -f "$(get_config logfile)" || return 1
+
+ return 0
+}
+
+start() {
+ ebegin "Starting PgBouncer"
+ [ -f ${PIDFILE} ] && rm ${PIDFILE}
+
+ start-stop-daemon --start \
+ --pidfile ${PIDFILE} \
+ --background \
+ --make-pidfile \
+ --user pgbouncer \
+ --exec /usr/bin/pgbouncer \
+ -- -q "${INIFILE}"
+ eend $?
+}
+
+stop() {
+ local seconds=$(( ${NICE_TIMEOUT} + ${FORCE_QUIT_TIMEOUT} ))
+ ebegin "Stopping PgBouncer (this can take up to ${seconds} seconds)"
+
+ local retries=SIGINT/${NICE_TIMEOUT}
+
+ if [ "${FORCE_QUIT}" = "YES" ] ; then
+ einfo "FORCE_QUIT enabled."
+ retries="${retries}/SIGTERM/${FORCE_QUIT_TIMEOUT}"
+ fi
+
+ # Loops through nice and force quit in one go.
+ start-stop-daemon --stop \
+ --user pgbouncer \
+ --pidfile ${PIDFILE} \
+ --retry ${retries}
+
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading PgBouncer configuration from '${INIFILE}'"
+ start-stop-daemon --signal HUP --pidfile ${PIDFILE}
+ eend $?
+}
diff --git a/dev-db/pgbouncer/metadata.xml b/dev-db/pgbouncer/metadata.xml
new file mode 100644
index 000000000000..ee74448388b1
--- /dev/null
+++ b/dev-db/pgbouncer/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>pgsql-bugs@gentoo.org</email>
+ <name>PostgreSQL</name>
+ </maintainer>
+ <use>
+ <flag name="c-ares">
+ Use c-ares as the DNS backend instead of evdns (libevent).
+ </flag>
+ <flag name="udns">
+ Use udns as the DNS backend instead of evdns (libevent). Supports
+ IPv4 only.
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-db/pgbouncer/pgbouncer-1.8.1.ebuild b/dev-db/pgbouncer/pgbouncer-1.8.1.ebuild
new file mode 100644
index 000000000000..f590a731732e
--- /dev/null
+++ b/dev-db/pgbouncer/pgbouncer-1.8.1.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit user
+
+DESCRIPTION="Lightweight connection pooler for PostgreSQL"
+HOMEPAGE="https://pgbouncer.github.io"
+SRC_URI="https://pgbouncer.github.io/downloads/files/${PV}/${P}.tar.gz"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="+c-ares debug doc pam ssl -udns"
+
+# At-most-one-of, one can be enabled but not both
+REQUIRED_USE="?? ( c-ares udns )"
+
+RDEPEND="
+ >=dev-libs/libevent-2.0
+ >=sys-libs/glibc-2.10
+ c-ares? ( >=net-dns/c-ares-1.10 )
+ ssl? ( >=dev-libs/openssl-1.0.1:=[-bindist] )
+ udns? ( >=net-libs/udns-0.1 )
+"
+
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+ enewgroup postgres 70
+ enewuser postgres 70 /bin/bash /var/lib/postgresql postgres
+
+ enewuser pgbouncer -1 -1 -1 postgres
+}
+
+src_prepare() {
+ eapply "${FILESDIR}/pgbouncer-1.8-dirs.patch"
+
+ default
+}
+
+src_configure() {
+ # --enable-debug is only used to disable stripping
+ econf \
+ --docdir=/usr/share/doc/${PF} \
+ --enable-debug \
+ $(use_with c-ares cares) \
+ $(use_enable debug cassert) \
+ $(use_with pam) \
+ $(use_with ssl openssl) \
+ $(use_with udns)
+}
+
+src_test() {
+ cd "${S}/test"
+ emake
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc AUTHORS
+ use doc && dodoc doc/*.rst
+
+ newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+ newinitd "${FILESDIR}/${PN}.initd-r1" "${PN}"
+
+ insinto /etc
+ doins etc/pgbouncer.ini
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/logrotate" pgbouncer
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then
+ einfo "Please read the config.txt for Configuration Directives"
+ einfo
+ einfo "For Administration Commands, see:"
+ einfo " man pgbouncer"
+ einfo
+ einfo "By default, PgBouncer does not have access to any database."
+ einfo "GRANT the permissions needed for your application and make sure that it"
+ einfo "exists in PgBouncer's auth_file."
+ fi
+}
diff --git a/dev-db/pgmemcache-2.1.2 b/dev-db/pgmemcache-2.1.2
deleted file mode 100644
index 1e38e5536689..000000000000
--- a/dev-db/pgmemcache-2.1.2
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=-
-DEPEND=dev-db/postgresql dev-libs/cyrus-sasl >=dev-libs/libmemcached-1.0.18[sasl]
-DESCRIPTION=A PostgreSQL API based on libmemcached to interface with memcached
-EAPI=5
-HOMEPAGE=http://pgfoundry.org/projects/pgmemcache https://github.com/ohmu/pgmemcache
-KEYWORDS=~amd64 ~x86
-LICENSE=MIT
-RDEPEND=dev-db/postgresql dev-libs/cyrus-sasl >=dev-libs/libmemcached-1.0.18[sasl]
-SLOT=0
-SRC_URI=https://github.com/ohmu/pgmemcache/archive/2.1.2.tar.gz -> pgmemcache-2.1.2.tar.gz
-_md5_=a690988bff73fc2e7b6aa02d63a7fd94
diff --git a/dev-db/pgmemcache-2.2.0 b/dev-db/pgmemcache-2.2.0
deleted file mode 100644
index 6a9d9026b341..000000000000
--- a/dev-db/pgmemcache-2.2.0
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=install
-DEPEND=dev-db/postgresql dev-libs/cyrus-sasl >=dev-libs/libmemcached-1.0.18[sasl]
-DESCRIPTION=A PostgreSQL API based on libmemcached to interface with memcached
-EAPI=5
-HOMEPAGE=http://pgfoundry.org/projects/pgmemcache https://github.com/ohmu/pgmemcache
-KEYWORDS=~amd64 ~x86
-LICENSE=MIT
-RDEPEND=dev-db/postgresql dev-libs/cyrus-sasl >=dev-libs/libmemcached-1.0.18[sasl]
-SLOT=0
-SRC_URI=https://github.com/ohmu/pgmemcache/archive/2.2.0.tar.gz -> pgmemcache-2.2.0.tar.gz
-_md5_=80917920576e1c309bec2702eeab8025
diff --git a/dev-db/pgmemcache-2.3.0 b/dev-db/pgmemcache-2.3.0
deleted file mode 100644
index 5043503cfda9..000000000000
--- a/dev-db/pgmemcache-2.3.0
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=install
-DEPEND=dev-db/postgresql dev-libs/cyrus-sasl >=dev-libs/libmemcached-1.0.18[sasl]
-DESCRIPTION=A PostgreSQL API based on libmemcached to interface with memcached
-EAPI=5
-HOMEPAGE=http://pgfoundry.org/projects/pgmemcache https://github.com/ohmu/pgmemcache
-KEYWORDS=~amd64 ~x86
-LICENSE=MIT
-RDEPEND=dev-db/postgresql dev-libs/cyrus-sasl >=dev-libs/libmemcached-1.0.18[sasl]
-SLOT=0
-SRC_URI=https://github.com/ohmu/pgmemcache/archive/2.3.0.tar.gz -> pgmemcache-2.3.0.tar.gz
-_md5_=1d5cdcd9ffa3c977dcebd6a031f2efda
diff --git a/dev-db/pgmemcache/Manifest b/dev-db/pgmemcache/Manifest
new file mode 100644
index 000000000000..cefafee86336
--- /dev/null
+++ b/dev-db/pgmemcache/Manifest
@@ -0,0 +1,7 @@
+DIST pgmemcache-2.1.2.tar.gz 16685 BLAKE2B d447cda1cc164063e2f76bec87547dd0de9d7e38cce210bec7ca2a0c48afb85d34a7882d6711027e74fcd973bb2bd3b94112359eb482b6be2d5ea01f098a7a9b SHA512 2be9aeef214f569473efcb849611e10c4fdb179e5cb8b1105f63fe0ab7bd829648a7891fd4e21109afc1b6375aeae0c2449a977a67631ee4d505e3faf83bc3f3
+DIST pgmemcache-2.2.0.tar.gz 17742 BLAKE2B 3620cfec0b712fa570fed77cae1b2dc65e5a36679e37c1531a94c80190725ee4af13b1912e58c8fb2fe5d181338190ca9df04f2bbf5868ed3107920b2fe39ca0 SHA512 8d63aa25fec9c5f1895cf5107bbb261be2b35d5e05ac03e8fa59597ed18cf123c45aa0690eafeca4a26bdfabf61088bd1e2518c3fa13b683333b1ca0b5d8446f
+DIST pgmemcache-2.3.0.tar.gz 21135 BLAKE2B 527043018fd6af9d4c00788518daeac28c89450e3bc43dee2df205d2eea7eac42fb4a73633f9b54dcd9ce5f35b01ea0ce7f6e2f26b3d9ab75e57c25e47b69933 SHA512 75ae3b7c9087078b2276ebadf66f9d419323927f6b8c8f61f8681fe939d086dbfe6aa935f20afa3acc11171e00329e5758a8a6a952cfbcf3aef45c8cc3f50a3b
+EBUILD pgmemcache-2.1.2.ebuild 548 BLAKE2B 536e5bf39cd7cb8a6635e7093a73682c179c604ec333e924abadb2a74281953f68731042db8b2ed9f1f6f5bee0228234ffdfa45e9117cc86346dfbd92c75e68f SHA512 64e9c790166d299a83b345bf85cc16dda6d79eab33d1aac70864f64248a18d6b6b4eee23ec2ce845bc6dc1f7688d5687b0e08381d5a9d3cfc0a11bb230cd7021
+EBUILD pgmemcache-2.2.0.ebuild 601 BLAKE2B 405c77a21ccc9300a1950aadc9e993bc525987c86ede0851a48f4954a8677098f16d1a2a77f103b533141e0bf25aa332c87b032886f07936f122af3c3990954e SHA512 c980e61b09d6b66acce579e13cdd09a3ff560378c3e8248a995d62dc2a74f47e52c3514561ef8e4c37b49b557d82896d7037a4d3cf9257b5cc0307648ad63177
+EBUILD pgmemcache-2.3.0.ebuild 601 BLAKE2B a94fac459711211f648c63c2c76ce81dbe4463fb8964de18327f2af78d3dcae0db655fc45f4509bdd68d57aca74493fab697b67b70b13ea4bb9915fe0cedc393 SHA512 e9a9a4be1416c3026a6240642b132c51a2416f80d14939fac93aff167bf92531114feba50c0530fecbec3da257a63a8cf799373e57ec969cb84853e8260529a4
+MISC metadata.xml 337 BLAKE2B 49c3772f9dc4488d0572b4676288c3f6b5ad7e0b0c27e7bff4a937d49ae2dbd14582b2bd0a0c2de025eccdd0be0d1b76e7b95b9c5079d96e9fbc4bb673273eaf SHA512 60efb420b03d8d9ae99fd4d5aa64312407fb56ffc473394538067546d6e482bc52df7fef3b864dc3f73b8ee54bdd71003eaa8c1a0e11828c529f25710fbe75a3
diff --git a/dev-db/pgmemcache/metadata.xml b/dev-db/pgmemcache/metadata.xml
new file mode 100644
index 000000000000..c5e7917d4c05
--- /dev/null
+++ b/dev-db/pgmemcache/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">ohmu/pgmemcache</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/pgmemcache/pgmemcache-2.1.2.ebuild b/dev-db/pgmemcache/pgmemcache-2.1.2.ebuild
new file mode 100644
index 000000000000..d3137046d2b0
--- /dev/null
+++ b/dev-db/pgmemcache/pgmemcache-2.1.2.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DESCRIPTION="A PostgreSQL API based on libmemcached to interface with memcached"
+HOMEPAGE="http://pgfoundry.org/projects/pgmemcache https://github.com/ohmu/pgmemcache"
+SRC_URI="https://github.com/ohmu/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-db/postgresql
+ dev-libs/cyrus-sasl
+ >=dev-libs/libmemcached-1.0.18[sasl]"
+RDEPEND="${DEPEND}"
+
+DOCS=( NEWS README TODO )
diff --git a/dev-db/pgmemcache/pgmemcache-2.2.0.ebuild b/dev-db/pgmemcache/pgmemcache-2.2.0.ebuild
new file mode 100644
index 000000000000..7d0ec99a8032
--- /dev/null
+++ b/dev-db/pgmemcache/pgmemcache-2.2.0.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DESCRIPTION="A PostgreSQL API based on libmemcached to interface with memcached"
+HOMEPAGE="http://pgfoundry.org/projects/pgmemcache https://github.com/ohmu/pgmemcache"
+SRC_URI="https://github.com/ohmu/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-db/postgresql
+ dev-libs/cyrus-sasl
+ >=dev-libs/libmemcached-1.0.18[sasl]"
+RDEPEND="${DEPEND}"
+
+DOCS=( NEWS README TODO )
+
+src_install() {
+ emake -j1 DESTDIR="${D}" install
+}
diff --git a/dev-db/pgmemcache/pgmemcache-2.3.0.ebuild b/dev-db/pgmemcache/pgmemcache-2.3.0.ebuild
new file mode 100644
index 000000000000..1e794204e9ae
--- /dev/null
+++ b/dev-db/pgmemcache/pgmemcache-2.3.0.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DESCRIPTION="A PostgreSQL API based on libmemcached to interface with memcached"
+HOMEPAGE="http://pgfoundry.org/projects/pgmemcache https://github.com/ohmu/pgmemcache"
+SRC_URI="https://github.com/ohmu/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-db/postgresql
+ dev-libs/cyrus-sasl
+ >=dev-libs/libmemcached-1.0.18[sasl]"
+RDEPEND="${DEPEND}"
+
+DOCS=( NEWS README TODO )
+
+src_install() {
+ emake -j1 DESTDIR="${D}" install
+}
diff --git a/dev-db/pgmodeler-0.9.1 b/dev-db/pgmodeler-0.9.1
deleted file mode 100644
index 99edeb4b8841..000000000000
--- a/dev-db/pgmodeler-0.9.1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=configure install setup test
-DEPEND=postgres_targets_postgres10? ( dev-db/postgresql:10= ) postgres_targets_postgres9_6? ( dev-db/postgresql:9.6= ) postgres_targets_postgres9_5? ( dev-db/postgresql:9.5= ) postgres_targets_postgres9_4? ( dev-db/postgresql:9.4= ) postgres_targets_postgres9_3? ( dev-db/postgresql:9.3= ) dev-libs/icu:= dev-libs/libxml2:= dev-qt/qtcore:5 dev-qt/qtnetwork:5 dev-qt/qtprintsupport:5 dev-qt/qtsvg:5 dev-qt/qtwidgets:5
-DESCRIPTION=PostgreSQL Database Modeler
-EAPI=6
-HOMEPAGE=https://pgmodeler.io
-IUSE=postgres_targets_postgres10 postgres_targets_postgres9_6 postgres_targets_postgres9_5 postgres_targets_postgres9_4 postgres_targets_postgres9_3
-KEYWORDS=~amd64
-LICENSE=GPL-3
-RDEPEND=postgres_targets_postgres10? ( dev-db/postgresql:10= ) postgres_targets_postgres9_6? ( dev-db/postgresql:9.6= ) postgres_targets_postgres9_5? ( dev-db/postgresql:9.5= ) postgres_targets_postgres9_4? ( dev-db/postgresql:9.4= ) postgres_targets_postgres9_3? ( dev-db/postgresql:9.3= ) dev-libs/icu:= dev-libs/libxml2:= dev-qt/qtcore:5 dev-qt/qtnetwork:5 dev-qt/qtprintsupport:5 dev-qt/qtsvg:5 dev-qt/qtwidgets:5
-SLOT=0
-SRC_URI=https://github.com/pgmodeler/pgmodeler/archive/v0.9.1.tar.gz -> pgmodeler-0.9.1.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 estack 43ddf5aaffa7a8d0482df54d25a66a1f multilib 97f470f374f2e94ccab04a2fb21d811e postgres a3ad839d319097167f1802b25f50d9c0 qmake-utils bdf97e69a34b864d6d545f4ec3143ff7 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81
-_md5_=b4859e718a6bf19f1c385d7af2bbd6c6
diff --git a/dev-db/pgmodeler/Manifest b/dev-db/pgmodeler/Manifest
new file mode 100644
index 000000000000..c011395021be
--- /dev/null
+++ b/dev-db/pgmodeler/Manifest
@@ -0,0 +1,3 @@
+DIST pgmodeler-0.9.1.tar.gz 3569027 BLAKE2B 4d91d430554f739b585ed155aa2d87dc648ea5d2d6a1c22ddd9ae829afb63654fe052091de5dea51b0fee20ef2ccaf5b77587f036c4072bbc623bffba9a67b27 SHA512 bb6f093e00f0e41a9dd2a9b7e3723459af759e79835b73ab67b01c23ae6b29f1453b5cf61e987c6f1a2a3908e700d048f0a7dcbed3ac1636493d6b6e657917ba
+EBUILD pgmodeler-0.9.1.ebuild 1252 BLAKE2B 8282a250196054296a0015f170112269f96bb70ad6c805f0c2b9c56076943b61da365e08590dc59e437e960b1274437f40db9382f1adaa2ca2d9883361462bac SHA512 dc52bf24883ae9894a3b7e3490fd53fbaa3ec20650136d88aea51738467dfd80317f5cea8ed1e971970a4b9652c333ca11111aaa3c5ea1aa42f96033cfa7fe26
+MISC metadata.xml 266 BLAKE2B 9d5988ab45f9939f9be5ee7f4b7a9950a3d62252aa0d3e6c953265467428c59fb8c05b2bb72085431b7aa9fc18d31f2b3273e8fdb33443d786b2237db697b7e2 SHA512 9f85990c7ce6a1de5c1067e4781af18bede2d3bd02963a7b2927766b70dbe98d3fb63bb01e19b1cf6e2b77038d9788bf38155b3cc33f9e5ff8430b10a4006325
diff --git a/dev-db/pgmodeler/metadata.xml b/dev-db/pgmodeler/metadata.xml
new file mode 100644
index 000000000000..f1828406d76b
--- /dev/null
+++ b/dev-db/pgmodeler/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>pgsql-bugs@gentoo.org</email>
+ <name>PostgreSQL</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-db/pgmodeler/pgmodeler-0.9.1.ebuild b/dev-db/pgmodeler/pgmodeler-0.9.1.ebuild
new file mode 100644
index 000000000000..9d9b077aa76c
--- /dev/null
+++ b/dev-db/pgmodeler/pgmodeler-0.9.1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+POSTGRES_COMPAT=( 9.{3..6} 10 )
+
+inherit desktop postgres qmake-utils
+
+MY_PV=${PV/_/-}
+
+DESCRIPTION="PostgreSQL Database Modeler"
+HOMEPAGE="https://pgmodeler.io"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+
+DEPEND="${POSTGRES_DEP}
+ dev-libs/icu:=
+ dev-libs/libxml2:=
+ dev-qt/qtcore:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtprintsupport:5
+ dev-qt/qtsvg:5
+ dev-qt/qtwidgets:5
+"
+RDEPEND="${DEPEND}"
+
+DOCS=( CHANGELOG.md README.md RELEASENOTES.md )
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+src_configure() {
+ eqmake5 \
+ PREFIX="${EPREFIX%/}/usr" \
+ PLUGINSDIR="${EPREFIX%/}/usr/$(get_libdir)/${PN}/plugins" \
+ PRIVATEBINDIR="${EPREFIX%/}/usr/$(get_libdir)/${PN}/bin" \
+ PRIVATELIBDIR="${EPREFIX%/}/usr/$(get_libdir)/${PN}" \
+ NO_UPDATE_CHECK=1 \
+ -r ${PN}.pro
+}
+
+src_test() {
+ cd "${S}/tests" || die
+ eqmake5 tests.pro
+ emake
+ emake check
+}
+
+src_install() {
+ emake INSTALL_ROOT="${D}" install
+
+ rm "${D}"/usr/share/${PN}/{CHANGELOG.md,LICENSE,README.md,RELEASENOTES.md}
+
+ einstalldocs
+
+ doicon conf/${PN}_logo.png
+ make_desktop_entry ${PN} ${PN} ${PN}_logo Development
+}
diff --git a/dev-db/pgpool2-3.7.0 b/dev-db/pgpool2-3.7.0
deleted file mode 100644
index 34519bbfb9c2..000000000000
--- a/dev-db/pgpool2-3.7.0
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup test
-DEPEND=postgres_targets_postgres10? ( dev-db/postgresql:10= ) postgres_targets_postgres9_6? ( dev-db/postgresql:9.6= ) postgres_targets_postgres9_5? ( dev-db/postgresql:9.5= ) postgres_targets_postgres9_4? ( dev-db/postgresql:9.4= ) postgres_targets_postgres9_3? ( dev-db/postgresql:9.3= ) net-libs/libnsl:0= memcached? ( dev-libs/libmemcached ) pam? ( sys-auth/pambase ) ssl? ( dev-libs/openssl:* ) sys-devel/bison !!dev-db/pgpool
-DESCRIPTION=Connection pool server for PostgreSQL
-EAPI=6
-HOMEPAGE=http://www.pgpool.net/
-IUSE=doc memcached pam ssl static-libs postgres_targets_postgres10 postgres_targets_postgres9_6 postgres_targets_postgres9_5 postgres_targets_postgres9_4 postgres_targets_postgres9_3
-KEYWORDS=amd64 x86
-LICENSE=BSD
-RDEPEND=postgres_targets_postgres10? ( dev-db/postgresql:10= ) postgres_targets_postgres9_6? ( dev-db/postgresql:9.6= ) postgres_targets_postgres9_5? ( dev-db/postgresql:9.5= ) postgres_targets_postgres9_4? ( dev-db/postgresql:9.4= ) postgres_targets_postgres9_3? ( dev-db/postgresql:9.3= ) net-libs/libnsl:0= memcached? ( dev-libs/libmemcached ) pam? ( sys-auth/pambase ) ssl? ( dev-libs/openssl:* )
-SLOT=0
-SRC_URI=http://www.pgpool.net/download.php?f=pgpool-II-3.7.0.tar.gz -> pgpool-II-3.7.0.tar.gz
-_eclasses_=multibuild 35719a9cd25ec71ee49c966f6868454c postgres a3ad839d319097167f1802b25f50d9c0 postgres-multi 4ad3669c874bed68b375f87035e46db8 user 8bc2845510e2109af75e3eeac607ec81
-_md5_=e930f8bb95586b89de26fdb227ae2654
diff --git a/dev-db/pgpool2-3.7.1 b/dev-db/pgpool2-3.7.1
deleted file mode 100644
index cce7cb27781b..000000000000
--- a/dev-db/pgpool2-3.7.1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup test
-DEPEND=postgres_targets_postgres10? ( dev-db/postgresql:10= ) postgres_targets_postgres9_6? ( dev-db/postgresql:9.6= ) postgres_targets_postgres9_5? ( dev-db/postgresql:9.5= ) postgres_targets_postgres9_4? ( dev-db/postgresql:9.4= ) postgres_targets_postgres9_3? ( dev-db/postgresql:9.3= ) net-libs/libnsl:0= memcached? ( dev-libs/libmemcached ) pam? ( sys-auth/pambase ) ssl? ( dev-libs/openssl:* ) sys-devel/bison !!dev-db/pgpool
-DESCRIPTION=Connection pool server for PostgreSQL
-EAPI=6
-HOMEPAGE=http://www.pgpool.net/
-IUSE=doc memcached pam ssl static-libs postgres_targets_postgres10 postgres_targets_postgres9_6 postgres_targets_postgres9_5 postgres_targets_postgres9_4 postgres_targets_postgres9_3
-KEYWORDS=~amd64 ~x86
-LICENSE=BSD
-RDEPEND=postgres_targets_postgres10? ( dev-db/postgresql:10= ) postgres_targets_postgres9_6? ( dev-db/postgresql:9.6= ) postgres_targets_postgres9_5? ( dev-db/postgresql:9.5= ) postgres_targets_postgres9_4? ( dev-db/postgresql:9.4= ) postgres_targets_postgres9_3? ( dev-db/postgresql:9.3= ) net-libs/libnsl:0= memcached? ( dev-libs/libmemcached ) pam? ( sys-auth/pambase ) ssl? ( dev-libs/openssl:* )
-SLOT=0
-SRC_URI=http://www.pgpool.net/download.php?f=pgpool-II-3.7.1.tar.gz -> pgpool-II-3.7.1.tar.gz
-_eclasses_=multibuild 35719a9cd25ec71ee49c966f6868454c postgres a3ad839d319097167f1802b25f50d9c0 postgres-multi 4ad3669c874bed68b375f87035e46db8 user 8bc2845510e2109af75e3eeac607ec81
-_md5_=c8f5cbf3d2dd52cfebcc9ffe98a04ccd
diff --git a/dev-db/pgpool2-3.7.3 b/dev-db/pgpool2-3.7.3
deleted file mode 100644
index 9c6f695f7cec..000000000000
--- a/dev-db/pgpool2-3.7.3
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup test
-DEPEND=postgres_targets_postgres10? ( dev-db/postgresql:10= ) postgres_targets_postgres9_6? ( dev-db/postgresql:9.6= ) postgres_targets_postgres9_5? ( dev-db/postgresql:9.5= ) postgres_targets_postgres9_4? ( dev-db/postgresql:9.4= ) postgres_targets_postgres9_3? ( dev-db/postgresql:9.3= ) net-libs/libnsl:0= memcached? ( dev-libs/libmemcached ) pam? ( sys-auth/pambase ) ssl? ( dev-libs/openssl:* ) sys-devel/bison !!dev-db/pgpool
-DESCRIPTION=Connection pool server for PostgreSQL
-EAPI=6
-HOMEPAGE=http://www.pgpool.net/
-IUSE=doc memcached pam ssl static-libs postgres_targets_postgres10 postgres_targets_postgres9_6 postgres_targets_postgres9_5 postgres_targets_postgres9_4 postgres_targets_postgres9_3
-KEYWORDS=~amd64 ~x86
-LICENSE=BSD
-RDEPEND=postgres_targets_postgres10? ( dev-db/postgresql:10= ) postgres_targets_postgres9_6? ( dev-db/postgresql:9.6= ) postgres_targets_postgres9_5? ( dev-db/postgresql:9.5= ) postgres_targets_postgres9_4? ( dev-db/postgresql:9.4= ) postgres_targets_postgres9_3? ( dev-db/postgresql:9.3= ) net-libs/libnsl:0= memcached? ( dev-libs/libmemcached ) pam? ( sys-auth/pambase ) ssl? ( dev-libs/openssl:* )
-SLOT=0
-SRC_URI=http://www.pgpool.net/download.php?f=pgpool-II-3.7.3.tar.gz -> pgpool-II-3.7.3.tar.gz
-_eclasses_=multibuild 35719a9cd25ec71ee49c966f6868454c postgres a3ad839d319097167f1802b25f50d9c0 postgres-multi 4ad3669c874bed68b375f87035e46db8 user 8bc2845510e2109af75e3eeac607ec81
-_md5_=c8f5cbf3d2dd52cfebcc9ffe98a04ccd
diff --git a/dev-db/pgpool2-9999 b/dev-db/pgpool2-9999
deleted file mode 100644
index 3cfdf0d6c39a..000000000000
--- a/dev-db/pgpool2-9999
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup test unpack
-DEPEND=postgres_targets_postgres10? ( dev-db/postgresql:10= ) postgres_targets_postgres9_6? ( dev-db/postgresql:9.6= ) postgres_targets_postgres9_5? ( dev-db/postgresql:9.5= ) postgres_targets_postgres9_4? ( dev-db/postgresql:9.4= ) postgres_targets_postgres9_3? ( dev-db/postgresql:9.3= ) net-libs/libnsl:0= memcached? ( dev-libs/libmemcached ) pam? ( sys-auth/pambase ) ssl? ( dev-libs/openssl:* ) sys-devel/bison !!dev-db/pgpool >=dev-vcs/git-1.8.2.1[curl]
-DESCRIPTION=Connection pool server for PostgreSQL
-EAPI=6
-HOMEPAGE=http://www.pgpool.net/
-IUSE=doc memcached pam ssl static-libs postgres_targets_postgres10 postgres_targets_postgres9_6 postgres_targets_postgres9_5 postgres_targets_postgres9_4 postgres_targets_postgres9_3
-LICENSE=BSD
-RDEPEND=postgres_targets_postgres10? ( dev-db/postgresql:10= ) postgres_targets_postgres9_6? ( dev-db/postgresql:9.6= ) postgres_targets_postgres9_5? ( dev-db/postgresql:9.5= ) postgres_targets_postgres9_4? ( dev-db/postgresql:9.4= ) postgres_targets_postgres9_3? ( dev-db/postgresql:9.3= ) net-libs/libnsl:0= memcached? ( dev-libs/libmemcached ) pam? ( sys-auth/pambase ) ssl? ( dev-libs/openssl:* )
-SLOT=0
-_eclasses_=git-r3 8f6de46b0aa318aea0e8cac62ece098b multibuild 35719a9cd25ec71ee49c966f6868454c postgres a3ad839d319097167f1802b25f50d9c0 postgres-multi 4ad3669c874bed68b375f87035e46db8 user 8bc2845510e2109af75e3eeac607ec81
-_md5_=2ead6d4345a7d1fd0707736bb4a63881
diff --git a/dev-db/pgpool2/Manifest b/dev-db/pgpool2/Manifest
new file mode 100644
index 000000000000..c5b930da7a98
--- /dev/null
+++ b/dev-db/pgpool2/Manifest
@@ -0,0 +1,12 @@
+AUX pgpool2.confd 649 BLAKE2B 1c520c4fa954c7411c1b700c03bf4e39196c599eb239cf86412fcf491759ca6f46b1264e7647a8d278ac45da3e20702f6f077dfbcccf83cb3f45575dd3571308 SHA512 5f9a4fa1e68161049ad767d64c764fbf70e84a4239e58119455a45a7e45d86ea2d19b617147cf891053e0dad4420c84704d67015334c7d41bad05b260d70e910
+AUX pgpool2.initd 2174 BLAKE2B 153fa1d756067fd381e599447fb71d780b90bc4c187d0146b1e2806fcc1c19a85d215b59b1931373a3a95fa7e719b9cebd93756276fbeeab087f2a5ba5a1f27b SHA512 3123d2c5e7178fc4b970592fe6908df2860ca3cd5ec54d4609c28145ffc934edf6ddb11f9d2208d89d43bc4252e326b3bc0eed36a28fd2fadbaeb2d635935e40
+AUX pgpool_run_paths-3.6.5.patch 11626 BLAKE2B 5d0b7a49b3c8bf2f2d69d369894e9976037025b289b0ec0f2cf11ed9862347dc4cb166af2cbd65637de40fdae09809a9232b0638cf69339901d6f3f67e9ddcd5 SHA512 ea718378d0ea14fa48975a899df26bc8aafa1e61b0d3f264ead81031a21d68284f4af5ce065c5534d113faf36724c880ce280665e148ec623e9fea9c8f91c77c
+AUX pgpool_run_paths-9999.patch 11759 BLAKE2B 35df553f704846cc4ff8d67e5e6b54ca8ed0a5817a148c359b47cae7ff388fe2bb57600113d7f8ac9afe760ea75e3ddd410d111c2ef87aea3c3fb38671d59260 SHA512 109be0f3bcda49db14ebb86d6e9347aa0a47d582ac1a1438b07719f9fa503045cc5b65a27964c3c0b1690ef489f752a497e3b050b816569d0ce01193dc007259
+DIST pgpool-II-3.7.0.tar.gz 3269076 BLAKE2B f7a396e82022a35e5f46fb644ca4a9007db3abaf97f8249d88bca00abf5d33abe7d47f705e959f7fb910885bf49f68bd5f965aae3085d12076d3100cca2f25f8 SHA512 cf8eef3a2ec761b51f9e6a72b5211810de57ad9b40b1738067616478b6486a813782588bfc92f6f351334d9514b1394551230c486fa0ac2f6c18a0490f22bbe2
+DIST pgpool-II-3.7.1.tar.gz 3237755 BLAKE2B ec196e384c9c4c03a28081fbb74b820c7480e2a98427441572142bd80bff6d2adbbda9bc19df1c70f4699af28fcac5f09161a5938df633bb9eba52c0d9dc24ac SHA512 2a83f573ca2a720ee7beb75d8d1380747e29b2bb3c809f51bd0f8e4423d67f882ce2acb7d9ea118c55313e969aba3bf94a0d5b190eb905123d43c09df25e00ef
+DIST pgpool-II-3.7.3.tar.gz 3259752 BLAKE2B 398257b2a647039a634d52b0e23ab1584aaa67f58d6f234f03bf2e99380b346b4ff51647f876d0789c484e88fc149a2af5a5b1b8fd3aa48323aada064ea3421d SHA512 c7fea570f11dfc348b0099fde074f61a15e6979b6f16526d24d73b26d723edfdbadbcf10e90c2111aeb72599970718d3cda4abed3e99e8a711cf03b715c29624
+EBUILD pgpool2-3.7.0.ebuild 2489 BLAKE2B 79706764ecb54cd2e682bb200640f6635f9a2f6ff8d26f9129a290ea68cb43adef5ba6f6622c591bd9cd5e996456f396d2f936ed8d4d303367fef0032bf2cd56 SHA512 7f74ded58782b8657b3c3f1de92a7a268a806019978e73ed3f4ed93c160d75d9e251acc2bbc39ee266dbc23f662fad8678b98f31b9a476d1b9f0c6b6719377c6
+EBUILD pgpool2-3.7.1.ebuild 2491 BLAKE2B f31a347236dacc779b0c019663205b5472a994da5be4136919a4fc3c86cf730a48abbb2741224855a3fd284a937ad97b1b1a7f0b8e6741ea6570974841d5d6e6 SHA512 42026cf2f0d76578b8324b14af12b0fb53c21a75b33d04ef997589878943fb29887488219f175d4481833854dfdf3f6d91c804b54f73157b72d6f786173d6950
+EBUILD pgpool2-3.7.3.ebuild 2491 BLAKE2B f31a347236dacc779b0c019663205b5472a994da5be4136919a4fc3c86cf730a48abbb2741224855a3fd284a937ad97b1b1a7f0b8e6741ea6570974841d5d6e6 SHA512 42026cf2f0d76578b8324b14af12b0fb53c21a75b33d04ef997589878943fb29887488219f175d4481833854dfdf3f6d91c804b54f73157b72d6f786173d6950
+EBUILD pgpool2-9999.ebuild 2443 BLAKE2B f6c59d5334c199bff687e8dfa494d26593ebe5b60fb86b5b052a9e9003393ec1116ee39f8a66bf45c01bf986064390ed675320e818c66e8058c0f117cac4d325 SHA512 cc484a69fa7b25330b9bf5a64017bf2df6cc0b11e44c6f0f347ddbfca7ec6046cc5115a678ab691951734e4c6c463ac4307e8efc7908b1d0646d5ce6c839226e
+MISC metadata.xml 390 BLAKE2B d6a0560051449e95bb43e81589eee966a477a75d7ec8211ae96b15f2d51ce9555181b8640d9d830f2b42f8159989e9126423c6ccbbc2bf2dd8121f4920a87a16 SHA512 ce26ee116c3c7ff77a771294ed07f38d8f940dc380915c339eb4c543d86fa5bde025ba83e70af2b7bf4a1bef1e51957f151131836855e0dae2e1daed73ffae8d
diff --git a/dev-db/pgpool2/files/pgpool2.confd b/dev-db/pgpool2/files/pgpool2.confd
new file mode 100644
index 000000000000..b2dd2a69e02e
--- /dev/null
+++ b/dev-db/pgpool2/files/pgpool2.confd
@@ -0,0 +1,17 @@
+# NICE_QUIT ignores new connections and wait for clients to disconnect from
+# server before shutting down. NICE_TIMEOUT in seconds determines how long to
+# wait for this to succeed.
+NICE_TIMEOUT=60
+
+# Forecfully disconnect clients from server and shut down. This is performed
+# after NICE_QUIT. Terminated client connections have their open transactions
+# rolled back.
+# Set RUDE_QUIT to "NO" to disable. RUDE_TIMEOUT in seconds.
+RUDE_QUIT="YES"
+RUDE_TIMEOUT=30
+
+# If the server still fails to shutdown, you can force it to quit by setting
+# this to YES.
+# Set FORCE_QUIT to "YES" to enable. FORCE_TIMEOUT in seconds.
+FORCE_QUIT="NO"
+FORCE_TIMEOUT=2 \ No newline at end of file
diff --git a/dev-db/pgpool2/files/pgpool2.initd b/dev-db/pgpool2/files/pgpool2.initd
new file mode 100644
index 000000000000..c9ffb0cf1611
--- /dev/null
+++ b/dev-db/pgpool2/files/pgpool2.initd
@@ -0,0 +1,82 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_started_commands="reload"
+
+CONFIGFILE="/etc/pgpool2/pgpool.conf"
+LOGFILE="/var/log/pgpool2.log"
+
+depend() {
+ use net
+ use postgresql
+ after logger
+}
+
+get_config() {
+ [ -f ${CONFIGFILE} ] || return 1
+
+ eval echo $(sed -e 's:#.*::' ${CONFIGFILE} | \
+ awk '$1 == "'$1'" { print ($2 == "=" ? $3 : $2) }')
+}
+
+PIDFILE="$(get_config pid_file_name)"
+: ${PIDFILE:='/run/pgpool/pgpool.pid'}
+
+prep() {
+ # $logdir contains status file(s), not log files.
+ local logdir=$(get_config logdir)
+ local socket_dir=$(get_config socket_dir)
+ local pcp_socket_dir=$(get_config pcp_socket_dir)
+
+ checkpath -o pgpool:postgres -m 0770 -d $(dirname ${PIDFILE}) || return 1
+ checkpath -o pgpool:postgres -m 0770 -d ${logdir:-'/run/pgpool'} || return 1
+ checkpath -o pgpool:postgres -m 0660 -f ${LOGFILE} || return 1
+ checkpath -o postgres:postgres -m 0770 \
+ -d ${socket_dir:-'/run/postgresql'} || return 1
+ checkpath -o postgres:postgres -m 0770 \
+ -d ${pcp_socket_dir:-'/run/postgresql'} || return 1
+}
+
+start() {
+ prep || return 1
+
+ ebegin "Starting pgpool2"
+
+ start-stop-daemon --start \
+ --user pgpool:postgres \
+ --pidfile ${PIDFILE} \
+ --exec /usr/bin/pgpool
+
+ eend
+}
+
+stop() {
+ local seconds=$(( ${NICE_TIMEOUT} + ${RUDE_TIMEOUT} + ${FORCE_TIMEOUT} ))
+ ebegin "Stopping pgpool (this can take up to ${seconds} seconds)"
+
+ local retval
+ local retries=SIGTERM/${NICE_TIMEOUT}
+
+ if [ "${RUDE_QUIT}" != "NO" ] ; then
+ einfo "RUDE_QUIT enabled."
+ retries="${retries}/SIGINT/${RUDE_TIMEOUT}"
+ fi
+ if [ "${FORCE_QUIT}" = "YES" ] ; then
+ einfo "FORCE_QUIT enabled."
+ ewarn "A recover-run might be executed on next startup."
+ retries="${retries}/SIGQUIT/${FORCE_TIMEOUT}"
+ fi
+
+ # Loops through nice, rude, and force quit in one go.
+ start-stop-daemon --stop \
+ --pidfile ${PIDFILE} \
+ --retry ${retries}
+
+ eend
+}
+
+reload() {
+ start-stop-daemon --signal HUP \
+ --pidfile ${PIDFILE}
+}
diff --git a/dev-db/pgpool2/files/pgpool_run_paths-3.6.5.patch b/dev-db/pgpool2/files/pgpool_run_paths-3.6.5.patch
new file mode 100644
index 000000000000..06c1b3711bd4
--- /dev/null
+++ b/dev-db/pgpool2/files/pgpool_run_paths-3.6.5.patch
@@ -0,0 +1,268 @@
+diff -ur a/src/include/parser/pg_config_manual.h b/src/include/parser/pg_config_manual.h
+--- a/src/include/parser/pg_config_manual.h 2017-07-10 04:56:18.000000000 -0400
++++ b/src/include/parser/pg_config_manual.h 2017-07-11 09:38:46.612907898 -0400
+@@ -193,7 +193,7 @@
+ * here's where to twiddle it. You can also override this at runtime
+ * with the postmaster's -k switch.
+ */
+-#define DEFAULT_PGSOCKET_DIR "/tmp"
++#define DEFAULT_PGSOCKET_DIR "/run/postgresql"
+
+ /*
+ * This is the default event source for Windows event log.
+Only in b/src/include/parser: pg_config_manual.h.orig
+diff -ur a/src/include/pcp/pcp_stream.h b/src/include/pcp/pcp_stream.h
+--- a/src/include/pcp/pcp_stream.h 2017-07-10 04:39:14.000000000 -0400
++++ b/src/include/pcp/pcp_stream.h 2017-07-11 09:38:46.612907898 -0400
+@@ -48,6 +48,6 @@
+ extern int pcp_write(PCP_CONNECTION *pc, void *buf, int len);
+ extern int pcp_flush(PCP_CONNECTION *pc);
+
+-#define UNIX_DOMAIN_PATH "/tmp"
++#define UNIX_DOMAIN_PATH "/run/pgpool"
+
+ #endif /* PCP_STREAM_H */
+diff -ur a/src/include/pool.h b/src/include/pool.h
+--- a/src/include/pool.h 2017-07-10 04:56:18.000000000 -0400
++++ b/src/include/pool.h 2017-07-11 09:38:46.612907898 -0400
+@@ -73,16 +73,16 @@
+ #define HBA_CONF_FILE_NAME "pool_hba.conf"
+
+ /* pid file directory */
+-#define DEFAULT_LOGDIR "/tmp"
++#define DEFAULT_LOGDIR "/run/pgpool"
+
+ /* Unix domain socket directory */
+-#define DEFAULT_SOCKET_DIR "/tmp"
++#define DEFAULT_SOCKET_DIR "/run/postgresql"
+
+ /* Unix domain socket directory for watchdog IPC */
+-#define DEFAULT_WD_IPC_SOCKET_DIR "/tmp"
++#define DEFAULT_WD_IPC_SOCKET_DIR "/run/pgpool"
+
+ /* pid file name */
+-#define DEFAULT_PID_FILE_NAME "/var/run/pgpool/pgpool.pid"
++#define DEFAULT_PID_FILE_NAME "/run/pgpool/pgpool.pid"
+
+ /* status file name */
+ #define STATUS_FILE_NAME "pgpool_status"
+diff -ur a/src/sample/pgpool.conf.sample b/src/sample/pgpool.conf.sample
+--- a/src/sample/pgpool.conf.sample 2017-07-10 04:56:18.000000000 -0400
++++ b/src/sample/pgpool.conf.sample 2017-07-11 11:05:00.174030914 -0400
+@@ -31,10 +31,8 @@
+ port = 9999
+ # Port number
+ # (change requires restart)
+-socket_dir = '/tmp'
++socket_dir = '/run/postgresql'
+ # Unix domain socket path
+- # The Debian package defaults to
+- # /var/run/postgresql
+ # (change requires restart)
+ listen_backlog_multiplier = 2
+ # Set the backlog parameter of listen(2) to
+@@ -53,10 +51,8 @@
+ pcp_port = 9898
+ # Port number for pcp
+ # (change requires restart)
+-pcp_socket_dir = '/tmp'
++pcp_socket_dir = '/run/pgpool'
+ # Unix domain socket path for pcp
+- # The Debian package defaults to
+- # /var/run/postgresql
+ # (change requires restart)
+
+ # - Backend Connection Settings -
+@@ -210,13 +206,13 @@
+ # FILE LOCATIONS
+ #------------------------------------------------------------------------------
+
+-pid_file_name = '/var/run/pgpool/pgpool.pid'
++pid_file_name = '/run/pgpool/pgpool.pid'
+ # PID file name
+ # Can be specified as relative to the"
+ # location of pgpool.conf file or
+ # as an absolute path
+ # (change requires restart)
+-logdir = '/var/log/pgpool'
++logdir = '/run/pgpool'
+ # Directory of pgPool status file
+ # (change requires restart)
+
+@@ -493,10 +489,8 @@
+ # Authentication key for watchdog communication
+ # (change requires restart)
+
+-wd_ipc_socket_dir = '/tmp'
++wd_ipc_socket_dir = '/run/pgpool'
+ # Unix domain socket path for watchdog IPC socket
+- # The Debian package defaults to
+- # /var/run/postgresql
+ # (change requires restart)
+
+
+diff -ur a/src/sample/pgpool.conf.sample-master-slave b/src/sample/pgpool.conf.sample-master-slave
+--- a/src/sample/pgpool.conf.sample-master-slave 2017-07-10 04:56:18.000000000 -0400
++++ b/src/sample/pgpool.conf.sample-master-slave 2017-07-11 11:13:57.700698647 -0400
+@@ -31,10 +31,8 @@
+ port = 9999
+ # Port number
+ # (change requires restart)
+-socket_dir = '/tmp'
++socket_dir = '/run/postgresql'
+ # Unix domain socket path
+- # The Debian package defaults to
+- # /var/run/postgresql
+ # (change requires restart)
+ listen_backlog_multiplier = 2
+ # Set the backlog parameter of listen(2) to
+@@ -53,10 +51,8 @@
+ pcp_port = 9898
+ # Port number for pcp
+ # (change requires restart)
+-pcp_socket_dir = '/tmp'
++pcp_socket_dir = '/run/pgpool'
+ # Unix domain socket path for pcp
+- # The Debian package defaults to
+- # /var/run/postgresql
+ # (change requires restart)
+
+ # - Backend Connection Settings -
+@@ -210,13 +206,13 @@
+ # FILE LOCATIONS
+ #------------------------------------------------------------------------------
+
+-pid_file_name = '/var/run/pgpool/pgpool.pid'
++pid_file_name = '/run/pgpool/pgpool.pid'
+ # PID file name
+ # Can be specified as relative to the"
+ # location of pgpool.conf file or
+ # as an absolute path
+ # (change requires restart)
+-logdir = '/tmp'
++logdir = '/run/pgpool'
+ # Directory of pgPool status file
+ # (change requires restart)
+
+@@ -492,10 +488,8 @@
+ # Authentication key for watchdog communication
+ # (change requires restart)
+
+-wd_ipc_socket_dir = '/tmp'
++wd_ipc_socket_dir = '/run/pgpool'
+ # Unix domain socket path for watchdog IPC socket
+- # The Debian package defaults to
+- # /var/run/postgresql
+ # (change requires restart)
+
+ # - Virtual IP control Setting -
+diff -ur a/src/sample/pgpool.conf.sample-replication b/src/sample/pgpool.conf.sample-replication
+--- a/src/sample/pgpool.conf.sample-replication 2017-07-10 04:56:18.000000000 -0400
++++ b/src/sample/pgpool.conf.sample-replication 2017-07-11 11:15:10.613588243 -0400
+@@ -31,10 +31,8 @@
+ port = 9999
+ # Port number
+ # (change requires restart)
+-socket_dir = '/tmp'
++socket_dir = '/run/postgresql'
+ # Unix domain socket path
+- # The Debian package defaults to
+- # /var/run/postgresql
+ # (change requires restart)
+ listen_backlog_multiplier = 2
+ # Set the backlog parameter of listen(2) to
+@@ -53,10 +51,8 @@
+ pcp_port = 9898
+ # Port number for pcp
+ # (change requires restart)
+-pcp_socket_dir = '/tmp'
++pcp_socket_dir = '/run/pgpool'
+ # Unix domain socket path for pcp
+- # The Debian package defaults to
+- # /var/run/postgresql
+ # (change requires restart)
+
+ # - Backend Connection Settings -
+@@ -210,13 +206,13 @@
+ # FILE LOCATIONS
+ #------------------------------------------------------------------------------
+
+-pid_file_name = '/var/run/pgpool/pgpool.pid'
++pid_file_name = '/run/pgpool/pgpool.pid'
+ # PID file name
+ # Can be specified as relative to the"
+ # location of pgpool.conf file or
+ # as an absolute path
+ # (change requires restart)
+-logdir = '/tmp'
++logdir = '/run/pgpool'
+ # Directory of pgPool status file
+ # (change requires restart)
+
+@@ -492,10 +488,8 @@
+ # Authentication key for watchdog communication
+ # (change requires restart)
+
+-wd_ipc_socket_dir = '/tmp'
++wd_ipc_socket_dir = '/run/pgpool'
+ # Unix domain socket path for watchdog IPC socket
+- # The Debian package defaults to
+- # /var/run/postgresql
+ # (change requires restart)
+
+
+diff -ur a/src/sample/pgpool.conf.sample-stream b/src/sample/pgpool.conf.sample-stream
+--- a/src/sample/pgpool.conf.sample-stream 2017-07-10 04:56:18.000000000 -0400
++++ b/src/sample/pgpool.conf.sample-stream 2017-07-11 11:15:50.996675811 -0400
+@@ -31,10 +31,8 @@
+ port = 9999
+ # Port number
+ # (change requires restart)
+-socket_dir = '/tmp'
++socket_dir = '/run/postgresql'
+ # Unix domain socket path
+- # The Debian package defaults to
+- # /var/run/postgresql
+ # (change requires restart)
+
+
+@@ -47,10 +45,8 @@
+ pcp_port = 9898
+ # Port number for pcp
+ # (change requires restart)
+-pcp_socket_dir = '/tmp'
++pcp_socket_dir = '/run/pgpool'
+ # Unix domain socket path for pcp
+- # The Debian package defaults to
+- # /var/run/postgresql
+ # (change requires restart)
+ listen_backlog_multiplier = 2
+ # Set the backlog parameter of listen(2) to
+@@ -211,13 +207,13 @@
+ # FILE LOCATIONS
+ #------------------------------------------------------------------------------
+
+-pid_file_name = '/var/run/pgpool/pgpool.pid'
++pid_file_name = '/run/pgpool/pgpool.pid'
+ # PID file name
+ # Can be specified as relative to the"
+ # location of pgpool.conf file or
+ # as an absolute path
+ # (change requires restart)
+-logdir = '/tmp'
++logdir = '/run/pgpool'
+ # Directory of pgPool status file
+ # (change requires restart)
+
+@@ -492,10 +488,8 @@
+ # Authentication key for watchdog communication
+ # (change requires restart)
+
+-wd_ipc_socket_dir = '/tmp'
++wd_ipc_socket_dir = '/run/pgpool'
+ # Unix domain socket path for watchdog IPC socket
+- # The Debian package defaults to
+- # /var/run/postgresql
+ # (change requires restart)
+
+
diff --git a/dev-db/pgpool2/files/pgpool_run_paths-9999.patch b/dev-db/pgpool2/files/pgpool_run_paths-9999.patch
new file mode 100644
index 000000000000..691d6e867ef5
--- /dev/null
+++ b/dev-db/pgpool2/files/pgpool_run_paths-9999.patch
@@ -0,0 +1,274 @@
+diff --git a/src/include/parser/pg_config_manual.h b/src/include/parser/pg_config_manual.h
+index d7e153b2..a4c9e87a 100644
+--- a/src/include/parser/pg_config_manual.h
++++ b/src/include/parser/pg_config_manual.h
+@@ -193,7 +193,7 @@
+ * here's where to twiddle it. You can also override this at runtime
+ * with the postmaster's -k switch.
+ */
+-#define DEFAULT_PGSOCKET_DIR "/tmp"
++#define DEFAULT_PGSOCKET_DIR "/run/postgresql"
+
+ /*
+ * This is the default event source for Windows event log.
+diff --git a/src/include/pcp/pcp_stream.h b/src/include/pcp/pcp_stream.h
+index 254b98cb..5883ad31 100644
+--- a/src/include/pcp/pcp_stream.h
++++ b/src/include/pcp/pcp_stream.h
+@@ -48,6 +48,6 @@ extern int pcp_read(PCP_CONNECTION *pc, void *buf, int len);
+ extern int pcp_write(PCP_CONNECTION *pc, void *buf, int len);
+ extern int pcp_flush(PCP_CONNECTION *pc);
+
+-#define UNIX_DOMAIN_PATH "/tmp"
++#define UNIX_DOMAIN_PATH "/run/pgpool"
+
+ #endif /* PCP_STREAM_H */
+diff --git a/src/include/pool.h b/src/include/pool.h
+index d5dd63aa..a3ae197f 100644
+--- a/src/include/pool.h
++++ b/src/include/pool.h
+@@ -73,16 +73,16 @@
+ #define HBA_CONF_FILE_NAME "pool_hba.conf"
+
+ /* pid file directory */
+-#define DEFAULT_LOGDIR "/tmp"
++#define DEFAULT_LOGDIR "/run/pgpool"
+
+ /* Unix domain socket directory */
+-#define DEFAULT_SOCKET_DIR "/tmp"
++#define DEFAULT_SOCKET_DIR "/run/postgresql"
+
+ /* Unix domain socket directory for watchdog IPC */
+-#define DEFAULT_WD_IPC_SOCKET_DIR "/tmp"
++#define DEFAULT_WD_IPC_SOCKET_DIR "/run/pgpool"
+
+ /* pid file name */
+-#define DEFAULT_PID_FILE_NAME "/var/run/pgpool/pgpool.pid"
++#define DEFAULT_PID_FILE_NAME "/run/pgpool/pgpool.pid"
+
+ /* status file name */
+ #define STATUS_FILE_NAME "pgpool_status"
+diff --git a/src/sample/pgpool.conf.sample b/src/sample/pgpool.conf.sample
+index d73c9bca..e95815ba 100644
+--- a/src/sample/pgpool.conf.sample
++++ b/src/sample/pgpool.conf.sample
+@@ -31,10 +31,8 @@ listen_addresses = 'localhost'
+ port = 9999
+ # Port number
+ # (change requires restart)
+-socket_dir = '/tmp'
++socket_dir = '/run/postgresql'
+ # Unix domain socket path
+- # The Debian package defaults to
+- # /var/run/postgresql
+ # (change requires restart)
+ listen_backlog_multiplier = 2
+ # Set the backlog parameter of listen(2) to
+@@ -53,10 +51,8 @@ pcp_listen_addresses = '*'
+ pcp_port = 9898
+ # Port number for pcp
+ # (change requires restart)
+-pcp_socket_dir = '/tmp'
++pcp_socket_dir = '/run/pgpool'
+ # Unix domain socket path for pcp
+- # The Debian package defaults to
+- # /var/run/postgresql
+ # (change requires restart)
+
+ # - Backend Connection Settings -
+@@ -210,13 +206,13 @@ syslog_ident = 'pgpool'
+ # FILE LOCATIONS
+ #------------------------------------------------------------------------------
+
+-pid_file_name = '/var/run/pgpool/pgpool.pid'
++pid_file_name = '/run/pgpool/pgpool.pid'
+ # PID file name
+ # Can be specified as relative to the"
+ # location of pgpool.conf file or
+ # as an absolute path
+ # (change requires restart)
+-logdir = '/var/log/pgpool'
++logdir = '/run/pgpool'
+ # Directory of pgPool status file
+ # (change requires restart)
+
+@@ -505,10 +501,8 @@ wd_authkey = ''
+ # Authentication key for watchdog communication
+ # (change requires restart)
+
+-wd_ipc_socket_dir = '/tmp'
++wd_ipc_socket_dir = '/run/pgpool'
+ # Unix domain socket path for watchdog IPC socket
+- # The Debian package defaults to
+- # /var/run/postgresql
+ # (change requires restart)
+
+
+diff --git a/src/sample/pgpool.conf.sample-master-slave b/src/sample/pgpool.conf.sample-master-slave
+index 612c10a7..ad385ba6 100644
+--- a/src/sample/pgpool.conf.sample-master-slave
++++ b/src/sample/pgpool.conf.sample-master-slave
+@@ -31,10 +31,8 @@ listen_addresses = 'localhost'
+ port = 9999
+ # Port number
+ # (change requires restart)
+-socket_dir = '/tmp'
++socket_dir = '/run/postgresql'
+ # Unix domain socket path
+- # The Debian package defaults to
+- # /var/run/postgresql
+ # (change requires restart)
+ listen_backlog_multiplier = 2
+ # Set the backlog parameter of listen(2) to
+@@ -53,10 +51,8 @@ pcp_listen_addresses = '*'
+ pcp_port = 9898
+ # Port number for pcp
+ # (change requires restart)
+-pcp_socket_dir = '/tmp'
++pcp_socket_dir = '/run/pgpool'
+ # Unix domain socket path for pcp
+- # The Debian package defaults to
+- # /var/run/postgresql
+ # (change requires restart)
+
+ # - Backend Connection Settings -
+@@ -210,13 +206,13 @@ syslog_ident = 'pgpool'
+ # FILE LOCATIONS
+ #------------------------------------------------------------------------------
+
+-pid_file_name = '/var/run/pgpool/pgpool.pid'
++pid_file_name = '/run/pgpool/pgpool.pid'
+ # PID file name
+ # Can be specified as relative to the"
+ # location of pgpool.conf file or
+ # as an absolute path
+ # (change requires restart)
+-logdir = '/tmp'
++logdir = '/run/pgpool'
+ # Directory of pgPool status file
+ # (change requires restart)
+
+@@ -504,10 +500,8 @@ wd_authkey = ''
+ # Authentication key for watchdog communication
+ # (change requires restart)
+
+-wd_ipc_socket_dir = '/tmp'
++wd_ipc_socket_dir = '/run/pgpool'
+ # Unix domain socket path for watchdog IPC socket
+- # The Debian package defaults to
+- # /var/run/postgresql
+ # (change requires restart)
+
+ # - Virtual IP control Setting -
+diff --git a/src/sample/pgpool.conf.sample-replication b/src/sample/pgpool.conf.sample-replication
+index f47a7957..bd7ce73e 100644
+--- a/src/sample/pgpool.conf.sample-replication
++++ b/src/sample/pgpool.conf.sample-replication
+@@ -31,10 +31,8 @@ listen_addresses = 'localhost'
+ port = 9999
+ # Port number
+ # (change requires restart)
+-socket_dir = '/tmp'
++socket_dir = '/run/postgresql'
+ # Unix domain socket path
+- # The Debian package defaults to
+- # /var/run/postgresql
+ # (change requires restart)
+ listen_backlog_multiplier = 2
+ # Set the backlog parameter of listen(2) to
+@@ -53,10 +51,8 @@ pcp_listen_addresses = '*'
+ pcp_port = 9898
+ # Port number for pcp
+ # (change requires restart)
+-pcp_socket_dir = '/tmp'
++pcp_socket_dir = '/run/pgpool'
+ # Unix domain socket path for pcp
+- # The Debian package defaults to
+- # /var/run/postgresql
+ # (change requires restart)
+
+ # - Backend Connection Settings -
+@@ -210,13 +206,13 @@ syslog_ident = 'pgpool'
+ # FILE LOCATIONS
+ #------------------------------------------------------------------------------
+
+-pid_file_name = '/var/run/pgpool/pgpool.pid'
++pid_file_name = '/run/pgpool/pgpool.pid'
+ # PID file name
+ # Can be specified as relative to the"
+ # location of pgpool.conf file or
+ # as an absolute path
+ # (change requires restart)
+-logdir = '/tmp'
++logdir = '/run/pgpool'
+ # Directory of pgPool status file
+ # (change requires restart)
+
+@@ -504,10 +500,8 @@ wd_authkey = ''
+ # Authentication key for watchdog communication
+ # (change requires restart)
+
+-wd_ipc_socket_dir = '/tmp'
++wd_ipc_socket_dir = '/run/pgpool'
+ # Unix domain socket path for watchdog IPC socket
+- # The Debian package defaults to
+- # /var/run/postgresql
+ # (change requires restart)
+
+
+diff --git a/src/sample/pgpool.conf.sample-stream b/src/sample/pgpool.conf.sample-stream
+index d57226b0..669a31d4 100644
+--- a/src/sample/pgpool.conf.sample-stream
++++ b/src/sample/pgpool.conf.sample-stream
+@@ -31,10 +31,8 @@ listen_addresses = 'localhost'
+ port = 9999
+ # Port number
+ # (change requires restart)
+-socket_dir = '/tmp'
++socket_dir = '/run/postgresql'
+ # Unix domain socket path
+- # The Debian package defaults to
+- # /var/run/postgresql
+ # (change requires restart)
+
+
+@@ -47,10 +45,8 @@ pcp_listen_addresses = '*'
+ pcp_port = 9898
+ # Port number for pcp
+ # (change requires restart)
+-pcp_socket_dir = '/tmp'
++pcp_socket_dir = '/run/pgpool'
+ # Unix domain socket path for pcp
+- # The Debian package defaults to
+- # /var/run/postgresql
+ # (change requires restart)
+ listen_backlog_multiplier = 2
+ # Set the backlog parameter of listen(2) to
+@@ -211,13 +207,13 @@ syslog_ident = 'pgpool'
+ # FILE LOCATIONS
+ #------------------------------------------------------------------------------
+
+-pid_file_name = '/var/run/pgpool/pgpool.pid'
++pid_file_name = '/run/pgpool/pgpool.pid'
+ # PID file name
+ # Can be specified as relative to the"
+ # location of pgpool.conf file or
+ # as an absolute path
+ # (change requires restart)
+-logdir = '/tmp'
++logdir = '/run/pgpool'
+ # Directory of pgPool status file
+ # (change requires restart)
+
+@@ -504,10 +500,8 @@ wd_authkey = ''
+ # Authentication key for watchdog communication
+ # (change requires restart)
+
+-wd_ipc_socket_dir = '/tmp'
++wd_ipc_socket_dir = '/run/pgpool'
+ # Unix domain socket path for watchdog IPC socket
+- # The Debian package defaults to
+- # /var/run/postgresql
+ # (change requires restart)
+
+
diff --git a/dev-db/pgpool2/metadata.xml b/dev-db/pgpool2/metadata.xml
new file mode 100644
index 000000000000..7414c47471c7
--- /dev/null
+++ b/dev-db/pgpool2/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>pgsql-bugs@gentoo.org</email>
+ <name>PostgreSQL and Related Package Development</name>
+ </maintainer>
+ <use>
+ <flag name="memcached">Use memcached for query caching.</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-db/pgpool2/pgpool2-3.7.0.ebuild b/dev-db/pgpool2/pgpool2-3.7.0.ebuild
new file mode 100644
index 000000000000..9ffbb68c699e
--- /dev/null
+++ b/dev-db/pgpool2/pgpool2-3.7.0.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+POSTGRES_COMPAT=( 9.{3..6} 10 )
+
+inherit postgres-multi
+
+MY_P="${PN/2/-II}-${PV}"
+
+DESCRIPTION="Connection pool server for PostgreSQL"
+HOMEPAGE="http://www.pgpool.net/"
+SRC_URI="http://www.pgpool.net/download.php?f=${MY_P}.tar.gz -> ${MY_P}.tar.gz"
+LICENSE="BSD"
+SLOT="0"
+
+KEYWORDS="amd64 x86"
+
+IUSE="doc memcached pam ssl static-libs"
+
+RDEPEND="
+ ${POSTGRES_DEP}
+ net-libs/libnsl:0=
+ memcached? ( dev-libs/libmemcached )
+ pam? ( sys-auth/pambase )
+ ssl? ( dev-libs/openssl:* )
+"
+DEPEND="${RDEPEND}
+ sys-devel/bison
+ !!dev-db/pgpool
+"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ postgres_new_user pgpool
+
+ postgres-multi_pkg_setup
+}
+
+src_prepare() {
+ eapply "${FILESDIR}/pgpool_run_paths-3.6.5.patch"
+
+ postgres-multi_src_prepare
+}
+
+src_configure() {
+ local myconf
+ use memcached && \
+ myconf="--with-memcached=\"${EROOT%/}/usr/include/libmemcached\""
+ use pam && myconf+=' --with-pam'
+
+ postgres-multi_foreach econf \
+ --disable-rpath \
+ --sysconfdir="${EROOT%/}/etc/${PN}" \
+ --with-pgsql-includedir='/usr/include/postgresql-@PG_SLOT@' \
+ --with-pgsql-libdir="/usr/$(get_libdir)/postgresql-@PG_SLOT@/$(get_libdir)" \
+ $(use_with ssl openssl) \
+ $(use_enable static-libs static) \
+ ${myconf}
+}
+
+src_compile() {
+ # Even though we're only going to do an install for the best slot
+ # available, the extension bits in src/sql need some things outside
+ # of that directory built, too.
+ postgres-multi_foreach emake
+ postgres-multi_foreach emake -C src/sql
+}
+
+src_install() {
+ # We only need the best stuff installed
+ postgres-multi_forbest emake DESTDIR="${D}" install
+
+ # Except for the extension and .so files that each PostgreSQL slot needs
+ postgres-multi_foreach emake DESTDIR="${D}" -C src/sql install
+
+ newinitd "${FILESDIR}/${PN}.initd" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+
+ # Documentation!
+ dodoc NEWS TODO
+ doman doc/src/sgml/man{1,8}/*
+ use doc && dodoc -r doc/src/sgml/html
+
+ # Examples and extras
+ # mv some files that get installed to /usr/share/pgpool-II so that
+ # they all wind up in the same place
+ mv "${ED%/}/usr/share/${PN/2/-II}" "${ED%/}/usr/share/${PN}" || die
+ into "/usr/share/${PN}"
+ dobin src/sample/{pgpool_recovery,pgpool_recovery_pitr,pgpool_remote_start}
+ insinto "/usr/share/${PN}"
+ doins src/sample/{{pcp,pgpool,pool_hba}.conf.sample*,pgpool.pam}
+
+ # One more thing: Evil la files!
+ find "${ED}" -name '*.la' -exec rm -f {} +
+}
diff --git a/dev-db/pgpool2/pgpool2-3.7.1.ebuild b/dev-db/pgpool2/pgpool2-3.7.1.ebuild
new file mode 100644
index 000000000000..fe57ae924343
--- /dev/null
+++ b/dev-db/pgpool2/pgpool2-3.7.1.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+POSTGRES_COMPAT=( 9.{3..6} 10 )
+
+inherit postgres-multi
+
+MY_P="${PN/2/-II}-${PV}"
+
+DESCRIPTION="Connection pool server for PostgreSQL"
+HOMEPAGE="http://www.pgpool.net/"
+SRC_URI="http://www.pgpool.net/download.php?f=${MY_P}.tar.gz -> ${MY_P}.tar.gz"
+LICENSE="BSD"
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86"
+
+IUSE="doc memcached pam ssl static-libs"
+
+RDEPEND="
+ ${POSTGRES_DEP}
+ net-libs/libnsl:0=
+ memcached? ( dev-libs/libmemcached )
+ pam? ( sys-auth/pambase )
+ ssl? ( dev-libs/openssl:* )
+"
+DEPEND="${RDEPEND}
+ sys-devel/bison
+ !!dev-db/pgpool
+"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ postgres_new_user pgpool
+
+ postgres-multi_pkg_setup
+}
+
+src_prepare() {
+ eapply "${FILESDIR}/pgpool_run_paths-3.6.5.patch"
+
+ postgres-multi_src_prepare
+}
+
+src_configure() {
+ local myconf
+ use memcached && \
+ myconf="--with-memcached=\"${EROOT%/}/usr/include/libmemcached\""
+ use pam && myconf+=' --with-pam'
+
+ postgres-multi_foreach econf \
+ --disable-rpath \
+ --sysconfdir="${EROOT%/}/etc/${PN}" \
+ --with-pgsql-includedir='/usr/include/postgresql-@PG_SLOT@' \
+ --with-pgsql-libdir="/usr/$(get_libdir)/postgresql-@PG_SLOT@/$(get_libdir)" \
+ $(use_with ssl openssl) \
+ $(use_enable static-libs static) \
+ ${myconf}
+}
+
+src_compile() {
+ # Even though we're only going to do an install for the best slot
+ # available, the extension bits in src/sql need some things outside
+ # of that directory built, too.
+ postgres-multi_foreach emake
+ postgres-multi_foreach emake -C src/sql
+}
+
+src_install() {
+ # We only need the best stuff installed
+ postgres-multi_forbest emake DESTDIR="${D}" install
+
+ # Except for the extension and .so files that each PostgreSQL slot needs
+ postgres-multi_foreach emake DESTDIR="${D}" -C src/sql install
+
+ newinitd "${FILESDIR}/${PN}.initd" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+
+ # Documentation!
+ dodoc NEWS TODO
+ doman doc/src/sgml/man{1,8}/*
+ use doc && dodoc -r doc/src/sgml/html
+
+ # Examples and extras
+ # mv some files that get installed to /usr/share/pgpool-II so that
+ # they all wind up in the same place
+ mv "${ED%/}/usr/share/${PN/2/-II}" "${ED%/}/usr/share/${PN}" || die
+ into "/usr/share/${PN}"
+ dobin src/sample/{pgpool_recovery,pgpool_recovery_pitr,pgpool_remote_start}
+ insinto "/usr/share/${PN}"
+ doins src/sample/{{pcp,pgpool,pool_hba}.conf.sample*,pgpool.pam}
+
+ # One more thing: Evil la files!
+ find "${ED}" -name '*.la' -exec rm -f {} +
+}
diff --git a/dev-db/pgpool2/pgpool2-3.7.3.ebuild b/dev-db/pgpool2/pgpool2-3.7.3.ebuild
new file mode 100644
index 000000000000..fe57ae924343
--- /dev/null
+++ b/dev-db/pgpool2/pgpool2-3.7.3.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+POSTGRES_COMPAT=( 9.{3..6} 10 )
+
+inherit postgres-multi
+
+MY_P="${PN/2/-II}-${PV}"
+
+DESCRIPTION="Connection pool server for PostgreSQL"
+HOMEPAGE="http://www.pgpool.net/"
+SRC_URI="http://www.pgpool.net/download.php?f=${MY_P}.tar.gz -> ${MY_P}.tar.gz"
+LICENSE="BSD"
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86"
+
+IUSE="doc memcached pam ssl static-libs"
+
+RDEPEND="
+ ${POSTGRES_DEP}
+ net-libs/libnsl:0=
+ memcached? ( dev-libs/libmemcached )
+ pam? ( sys-auth/pambase )
+ ssl? ( dev-libs/openssl:* )
+"
+DEPEND="${RDEPEND}
+ sys-devel/bison
+ !!dev-db/pgpool
+"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ postgres_new_user pgpool
+
+ postgres-multi_pkg_setup
+}
+
+src_prepare() {
+ eapply "${FILESDIR}/pgpool_run_paths-3.6.5.patch"
+
+ postgres-multi_src_prepare
+}
+
+src_configure() {
+ local myconf
+ use memcached && \
+ myconf="--with-memcached=\"${EROOT%/}/usr/include/libmemcached\""
+ use pam && myconf+=' --with-pam'
+
+ postgres-multi_foreach econf \
+ --disable-rpath \
+ --sysconfdir="${EROOT%/}/etc/${PN}" \
+ --with-pgsql-includedir='/usr/include/postgresql-@PG_SLOT@' \
+ --with-pgsql-libdir="/usr/$(get_libdir)/postgresql-@PG_SLOT@/$(get_libdir)" \
+ $(use_with ssl openssl) \
+ $(use_enable static-libs static) \
+ ${myconf}
+}
+
+src_compile() {
+ # Even though we're only going to do an install for the best slot
+ # available, the extension bits in src/sql need some things outside
+ # of that directory built, too.
+ postgres-multi_foreach emake
+ postgres-multi_foreach emake -C src/sql
+}
+
+src_install() {
+ # We only need the best stuff installed
+ postgres-multi_forbest emake DESTDIR="${D}" install
+
+ # Except for the extension and .so files that each PostgreSQL slot needs
+ postgres-multi_foreach emake DESTDIR="${D}" -C src/sql install
+
+ newinitd "${FILESDIR}/${PN}.initd" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+
+ # Documentation!
+ dodoc NEWS TODO
+ doman doc/src/sgml/man{1,8}/*
+ use doc && dodoc -r doc/src/sgml/html
+
+ # Examples and extras
+ # mv some files that get installed to /usr/share/pgpool-II so that
+ # they all wind up in the same place
+ mv "${ED%/}/usr/share/${PN/2/-II}" "${ED%/}/usr/share/${PN}" || die
+ into "/usr/share/${PN}"
+ dobin src/sample/{pgpool_recovery,pgpool_recovery_pitr,pgpool_remote_start}
+ insinto "/usr/share/${PN}"
+ doins src/sample/{{pcp,pgpool,pool_hba}.conf.sample*,pgpool.pam}
+
+ # One more thing: Evil la files!
+ find "${ED}" -name '*.la' -exec rm -f {} +
+}
diff --git a/dev-db/pgpool2/pgpool2-9999.ebuild b/dev-db/pgpool2/pgpool2-9999.ebuild
new file mode 100644
index 000000000000..b0b43a07e37c
--- /dev/null
+++ b/dev-db/pgpool2/pgpool2-9999.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGIT_REPO_URI="https://git.postgresql.org/git/pgpool2.git"
+
+POSTGRES_COMPAT=( 9.{3..6} 10 )
+
+inherit git-r3 postgres-multi
+
+DESCRIPTION="Connection pool server for PostgreSQL"
+HOMEPAGE="http://www.pgpool.net/"
+SRC_URI=""
+LICENSE="BSD"
+SLOT="0"
+
+KEYWORDS=""
+
+IUSE="doc memcached pam ssl static-libs"
+
+RDEPEND="
+ ${POSTGRES_DEP}
+ net-libs/libnsl:0=
+ memcached? ( dev-libs/libmemcached )
+ pam? ( sys-auth/pambase )
+ ssl? ( dev-libs/openssl:* )
+"
+DEPEND="${RDEPEND}
+ sys-devel/bison
+ !!dev-db/pgpool
+"
+
+pkg_setup() {
+ postgres_new_user pgpool
+
+ postgres-multi_pkg_setup
+}
+
+src_prepare() {
+ eapply "${FILESDIR}/pgpool_run_paths-9999.patch"
+
+ postgres-multi_src_prepare
+}
+
+src_configure() {
+ local myconf
+ use memcached && \
+ myconf="--with-memcached=\"${EROOT%/}/usr/include/libmemcached\""
+ use pam && myconf+=' --with-pam'
+
+ postgres-multi_foreach econf \
+ --disable-rpath \
+ --sysconfdir="${EROOT%/}/etc/${PN}" \
+ --with-pgsql-includedir='/usr/include/postgresql-@PG_SLOT@' \
+ --with-pgsql-libdir="/usr/$(get_libdir)/postgresql-@PG_SLOT@/$(get_libdir)" \
+ $(use_with ssl openssl) \
+ $(use_enable static-libs static) \
+ ${myconf}
+}
+
+src_compile() {
+ # Even though we're only going to do an install for the best slot
+ # available, the extension bits in src/sql need some things outside
+ # of that directory built, too.
+ postgres-multi_foreach emake
+ postgres-multi_foreach emake -C src/sql
+}
+
+src_install() {
+ # We only need the best stuff installed
+ postgres-multi_forbest emake DESTDIR="${D}" install
+
+ # Except for the extension and .so files that each PostgreSQL slot needs
+ postgres-multi_foreach emake DESTDIR="${D}" -C src/sql install
+
+ newinitd "${FILESDIR}/${PN}.initd" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+
+ # Documentation!
+ dodoc NEWS TODO
+ if use doc ; then
+ postgres-multi_forbest emake DESTDIR="${D}" -C doc install
+ fi
+
+ # Examples and extras
+ # mv some files that get installed to /usr/share/pgpool-II so that
+ # they all wind up in the same place
+ mv "${ED%/}/usr/share/${PN/2/-II}" "${ED%/}/usr/share/${PN}" || die
+ into "/usr/share/${PN}"
+ dobin src/sample/{pgpool_recovery,pgpool_recovery_pitr,pgpool_remote_start}
+ insinto "/usr/share/${PN}"
+ doins src/sample/{{pcp,pgpool,pool_hba}.conf.sample*,pgpool.pam}
+
+ # One more thing: Evil la files!
+ find "${ED}" -name '*.la' -exec rm -f {} +
+}
diff --git a/dev-db/pgrouting-2.5.2 b/dev-db/pgrouting-2.5.2
deleted file mode 100644
index 58b74f44ae1a..000000000000
--- a/dev-db/pgrouting-2.5.2
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup test
-DEPEND=doc? ( >=dev-python/sphinx-1.1 ) pdf? ( >=dev-python/sphinx-1.1[latex] ) sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=pgRouting extends PostGIS and PostgreSQL with geospatial routing functionality.
-EAPI=6
-HOMEPAGE=https://pgrouting.org/
-IUSE=+drivingdistance doc pdf html postgres_targets_postgres10 postgres_targets_postgres9_6 postgres_targets_postgres9_5 postgres_targets_postgres9_4
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2 MIT Boost-1.0
-RDEPEND=postgres_targets_postgres10? ( dev-db/postgresql:10=[server] ) postgres_targets_postgres9_6? ( dev-db/postgresql:9.6=[server] ) postgres_targets_postgres9_5? ( dev-db/postgresql:9.5=[server] ) postgres_targets_postgres9_4? ( dev-db/postgresql:9.4=[server] ) >=dev-db/postgis-2.0 dev-libs/boost drivingdistance? ( sci-mathematics/cgal )
-REQUIRED_USE=html? ( doc ) pdf? ( doc )
-RESTRICT=test
-SLOT=0
-SRC_URI=https://github.com/pgRouting/pgrouting/archive/v2.5.2.tar.gz -> pgrouting-2.5.2.tar.gz
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 postgres a3ad839d319097167f1802b25f50d9c0 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=54f52629a1a1414f0b260eefed9af87d
diff --git a/dev-db/pgrouting/Manifest b/dev-db/pgrouting/Manifest
new file mode 100644
index 000000000000..d9d363d2ed42
--- /dev/null
+++ b/dev-db/pgrouting/Manifest
@@ -0,0 +1,3 @@
+DIST pgrouting-2.5.2.tar.gz 7221479 BLAKE2B afbf29b7cbd52df526203198fb76d9e9e37e88a4b92d2139975238a14fe5a30c8102449d157e391913e690129a1ca8ac718763d9242193cac4080bc7347e1553 SHA512 9d9d9ebbcbc003f62bf1f0d548363e756012cdce55a9c3ef56ae9a5a510f25337898becf42f3e04bf10e8d3672ebf698def03833bba33410b65e0d2bdd42aecd
+EBUILD pgrouting-2.5.2.ebuild 1388 BLAKE2B 5b87b2a0af8aa23f1ba34980b3bfa5520aed9f6a35d21c05334bc8bdc43c233efeb3c396e7f7179babf7eb8083c84510d6a6b7f389aabe45b399badad54f2134 SHA512 4c9aa0761df88209b8d3b0c5cc8bbede6dba141f502463778102d0ee6b3d1112ae4de2da1202f4656dedbdcf2b47a96317426195abaa623c94ee5bc0bf57f189
+MISC metadata.xml 534 BLAKE2B 3bc33ee8118ea199f4261665ffd62fd7cde78928ed64556ed0ea84346da4405b6f5b4765b9a11c02a9f3e719eac3ff9d8392accd11361372437eea26ac0b6e3c SHA512 2892a64cf6e8e34e1ede87ddbcbaabd7e66bc5a45c5a8e21b33103af83e1a6a92c665fbfc02af6ae8fa6aec9df6ba340a40d3332d2da557789c95a312439a55f
diff --git a/dev-db/pgrouting/metadata.xml b/dev-db/pgrouting/metadata.xml
new file mode 100644
index 000000000000..01cf346d26bd
--- /dev/null
+++ b/dev-db/pgrouting/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>pgsql-bugs@gentoo.org</email>
+ <name>PostgreSQL and Related Package Development</name>
+ </maintainer>
+ <use>
+ <flag name="html">Install HTML formatted documentation</flag>
+ <flag name="drivingdistance">Enable to calculate driving distance</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">pgRouting/pgrouting</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/pgrouting/pgrouting-2.5.2.ebuild b/dev-db/pgrouting/pgrouting-2.5.2.ebuild
new file mode 100644
index 000000000000..7a0afdc63eac
--- /dev/null
+++ b/dev-db/pgrouting/pgrouting-2.5.2.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+POSTGRES_COMPAT=( 9.{4,5,6} 10 )
+POSTGRES_USEDEP="server"
+
+inherit postgres cmake-utils
+
+DESCRIPTION="pgRouting extends PostGIS and PostgreSQL with geospatial routing functionality."
+HOMEPAGE="https://pgrouting.org/"
+LICENSE="GPL-2 MIT Boost-1.0"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+SRC_URI="https://github.com/pgRouting/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+IUSE="+drivingdistance doc pdf html"
+
+REQUIRED_USE="html? ( doc ) pdf? ( doc )"
+
+RDEPEND="${POSTGRES_DEP}
+ >=dev-db/postgis-2.0
+ dev-libs/boost
+ drivingdistance? ( sci-mathematics/cgal )
+"
+
+DEPEND="
+ doc? ( >=dev-python/sphinx-1.1 )
+ pdf? ( >=dev-python/sphinx-1.1[latex] )
+"
+
+# Needs a running psql instance, doesn't work out of the box
+RESTRICT="test"
+
+pkg_setup() {
+ postgres_pkg_setup
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_HTML=$(usex html)
+ -DBUILD_LATEX=$(usex pdf)
+ -DBUILD_MAN=$(usex doc)
+ -DWITH_DD=$(usex drivingdistance)
+ -DWITH_DOC=$(usex doc)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ local make_opts
+ use doc && make_opts="all doc"
+ cmake-utils_src_make ${make_opts}
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ use doc && doman "${BUILD_DIR}"/doc/man/en/pgrouting.7
+ use html && dodoc -r "${BUILD_DIR}"/doc/html
+ use pdf && dodoc "${BUILD_DIR}"/doc/latex/en/*.pdf
+}
diff --git a/dev-db/pgtap-0.98.0 b/dev-db/pgtap-0.98.0
deleted file mode 100644
index fba3c0506d2f..000000000000
--- a/dev-db/pgtap-0.98.0
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup test
-DEPEND=postgres_targets_postgres10? ( dev-db/postgresql:10= ) postgres_targets_postgres9_6? ( dev-db/postgresql:9.6= ) postgres_targets_postgres9_5? ( dev-db/postgresql:9.5= ) postgres_targets_postgres9_4? ( dev-db/postgresql:9.4= ) postgres_targets_postgres9_3? ( dev-db/postgresql:9.3= ) dev-perl/TAP-Parser-SourceHandler-pgTAP
-DESCRIPTION=Unit testing for PostgreSQL
-EAPI=6
-HOMEPAGE=https://pgtap.org/
-IUSE=postgres_targets_postgres10 postgres_targets_postgres9_6 postgres_targets_postgres9_5 postgres_targets_postgres9_4 postgres_targets_postgres9_3
-KEYWORDS=amd64
-LICENSE=POSTGRESQL
-RDEPEND=postgres_targets_postgres10? ( dev-db/postgresql:10= ) postgres_targets_postgres9_6? ( dev-db/postgresql:9.6= ) postgres_targets_postgres9_5? ( dev-db/postgresql:9.5= ) postgres_targets_postgres9_4? ( dev-db/postgresql:9.4= ) postgres_targets_postgres9_3? ( dev-db/postgresql:9.3= ) dev-perl/TAP-Parser-SourceHandler-pgTAP
-SLOT=0
-SRC_URI=https://api.pgxn.org/dist/pgtap/0.98.0/pgtap-0.98.0.zip
-_eclasses_=multibuild 35719a9cd25ec71ee49c966f6868454c postgres a3ad839d319097167f1802b25f50d9c0 postgres-multi 4ad3669c874bed68b375f87035e46db8 user 8bc2845510e2109af75e3eeac607ec81
-_md5_=b05803cfaaee6ec4df30020f43aa1dec
diff --git a/dev-db/pgtap/Manifest b/dev-db/pgtap/Manifest
new file mode 100644
index 000000000000..d850f2262d85
--- /dev/null
+++ b/dev-db/pgtap/Manifest
@@ -0,0 +1,3 @@
+DIST pgtap-0.98.0.zip 270583 BLAKE2B 25d409f5fc63bc7059e8a4ffd3cb460885648f8569cd10ca05d4c5fbe09af323ecc719d663f81389d45f4a4910ca77beef968e264a0d3f4fabf63fa30b8b98ac SHA512 478841aa9cf378120713b90f33dc16d40fdd030ee1856edd4bfa288a7803cabad09661cf5219925335d9220e12b6202a1fcd8cc0fc55d1974d1e98dc0f6ddac0
+EBUILD pgtap-0.98.0.ebuild 471 BLAKE2B 9814d061fa70ee6635834202f36698bf99c263ecf39fd5a2c90cc8b4e46f1950905a5d3acf64f11244af0a3b700cb8155d430f60aca9dc266ebeee2741c9c921 SHA512 9de14401971029d2ff8e0ed123eca7f0539aa8d46fd86b90a8c82cff1dbcb21d29baaaf42ee915640b49c3586dd5512e876e0850227630e2760817a4e6bc5aee
+MISC metadata.xml 628 BLAKE2B 8a671273bb0de6f11d5ea56a3bf38e9eee05c0a70ff8cefe183f0eb798afbead29e96d5a45f764e2afc437cc97d91590e648c6716a8dd8fa7a6cc9f072332e0c SHA512 1c06c14ea5af9248950e6c10ab877b0725c4885082211db94b8a195fdf0dd115dc584a325655b7155895ec4382008e03511aa238d43179310fbe3dc835f5270a
diff --git a/dev-db/pgtap/metadata.xml b/dev-db/pgtap/metadata.xml
new file mode 100644
index 000000000000..06a2adf57216
--- /dev/null
+++ b/dev-db/pgtap/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>titanofold@gentoo.org</email>
+ <name>Aaron W. Swenson</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>pgsql-bugs@gentoo.org</email>
+ <name>PostgreSQL and Related Package Development</name>
+ </maintainer>
+ <longdescription>
+ pgTAP is a suite of database functions that make it easy to write
+ TAP-emitting unit tests in psql scripts or xUnit-style test functions.
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-db/pgtap/pgtap-0.98.0.ebuild b/dev-db/pgtap/pgtap-0.98.0.ebuild
new file mode 100644
index 000000000000..c741599fa92e
--- /dev/null
+++ b/dev-db/pgtap/pgtap-0.98.0.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+POSTGRES_COMPAT=( 9.{3..6} 10 )
+
+inherit postgres-multi
+
+DESCRIPTION="Unit testing for PostgreSQL"
+HOMEPAGE="https://pgtap.org/"
+SRC_URI="https://api.pgxn.org/dist/${PN}/${PV}/${P}.zip"
+
+LICENSE="POSTGRESQL"
+SLOT="0"
+KEYWORDS="amd64"
+IUSE=""
+
+DEPEND="${POSTGRES_DEP}
+ dev-perl/TAP-Parser-SourceHandler-pgTAP
+"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ :
+}
diff --git a/dev-db/pgxnclient-1.2-r1 b/dev-db/pgxnclient-1.2-r1
deleted file mode 100644
index 3fbb5a6693fc..000000000000
--- a/dev-db/pgxnclient-1.2-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-python/setuptools[python_targets_python2_7(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-)] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_targets_python3_4? ( dev-lang/python:3.4 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-)]
-DESCRIPTION=PostgreSQL Extension Network Client
-EAPI=5
-HOMEPAGE=http://pgxnclient.projects.postgresql.org/ https://pypi.org/project/pgxnclient
-IUSE=test python_targets_python2_7 python_targets_python3_4
-KEYWORDS=~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86
-LICENSE=BSD
-RDEPEND=>=dev-db/postgresql-9.1[server] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_targets_python3_4? ( dev-lang/python:3.4 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-)]
-REQUIRED_USE=|| ( python_targets_python2_7 python_targets_python3_4 )
-SLOT=0
-SRC_URI=mirror://pypi/p/pgxnclient/pgxnclient-1.2.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 distutils-r1 63fea93ca1cc4fdc5fa2247afc4e3a15 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 preserve-libs ef207dc62baddfddfd39a164d9797648 python-r1 0b5829eb6369d7af3a834b6eed7b7107 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=b4c1f9a9d1c07b8f68e84789bfe8f53d
diff --git a/dev-db/pgxnclient-1.2.1 b/dev-db/pgxnclient-1.2.1
deleted file mode 100644
index 779589fc4208..000000000000
--- a/dev-db/pgxnclient-1.2.1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-python/setuptools[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_targets_python3_4? ( dev-lang/python:3.4 ) python_targets_python3_5? ( dev-lang/python:3.5 ) python_targets_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)]
-DESCRIPTION=PostgreSQL Extension Network Client
-EAPI=5
-HOMEPAGE=http://pgxnclient.projects.postgresql.org/ https://pypi.org/project/pgxnclient
-IUSE=test python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 python_targets_python3_6
-KEYWORDS=~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86
-LICENSE=BSD
-RDEPEND=>=dev-db/postgresql-9.1[server] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_targets_python3_4? ( dev-lang/python:3.4 ) python_targets_python3_5? ( dev-lang/python:3.5 ) python_targets_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)]
-REQUIRED_USE=|| ( python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 python_targets_python3_6 )
-SLOT=0
-SRC_URI=mirror://pypi/p/pgxnclient/pgxnclient-1.2.1.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 distutils-r1 63fea93ca1cc4fdc5fa2247afc4e3a15 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 preserve-libs ef207dc62baddfddfd39a164d9797648 python-r1 0b5829eb6369d7af3a834b6eed7b7107 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=7fd93003e0a26a4f44ccb1b088f3a5a2
diff --git a/dev-db/pgxnclient/Manifest b/dev-db/pgxnclient/Manifest
new file mode 100644
index 000000000000..4d26929296b1
--- /dev/null
+++ b/dev-db/pgxnclient/Manifest
@@ -0,0 +1,5 @@
+DIST pgxnclient-1.2.1.tar.gz 87275 BLAKE2B 794ee6201988ba523cdcb4ee5a6287625cb3dd8a30ad750266d7adb739792b7f8e852d5d01f746fb6b05b54c98d677854dceacc57e41b05efba094efabc6a129 SHA512 3fa864b1ebb5dedaf75515b5efe4c453f02acff558f7b82d2648da62e58c93e050049a7688171a69593784d9963bb62f4ad3674d526284554dbeb4f4a4ea1dbf
+DIST pgxnclient-1.2.tar.gz 86436 BLAKE2B 796191d31000ff75360e0990bb20ca88af0fb1b908aac9ca7a6b7309b5420c56d045a67c775e8d5dda166f37ad956314f65bd2032c114cac7414bef9ad1a0d8e SHA512 d677f8d5346caf4de5d7e0d4e4031b8bdd932e343af7fc33e8895ebe51b1e9e6a11d7300d9e98ddc10242854f7d39c0a4196f41938e42f0b0e5158454e386deb
+EBUILD pgxnclient-1.2-r1.ebuild 769 BLAKE2B fd45466cabf4edff7c4d2fee9479a773e75572b72d685ad1444a2c2bb5312d082963169ff92787aec64d21bacd8837c55b8646e42f5674170c4c93026e0205cf SHA512 e078345e208e80c9c67b8ea53669474c922aed6dc32dbe535b524dd869a96cd81c90ef7017bee434b892bcb8326ec5fcc7a943e68c27cfa3d61a7bf54c59a4b1
+EBUILD pgxnclient-1.2.1.ebuild 777 BLAKE2B fbb97e569c123bcd52372cd39a243330b9112bb8d913951c91e5d13b6e74e197b212c9e07156f22992785a7b48ce2d5bf7f6422d0f835d2fadba5b324507ba0e SHA512 ec180cf7b5a45cd92ea9d088cf6c236040e18f6a0bfe162d1bea860e4a7bb9f8e668a0162d3052efbed65a346bdd9d5d0bc26cc350c9b75b9a88a5a1e5b9d58b
+MISC metadata.xml 477 BLAKE2B 69bcece85da5b9490a5aec5f94264a420d5babb983d602188b4bcad58f35da663216bb52e694009562e518b716a12b05734a2ee81a1219d93641268630a68e3b SHA512 63a1019650d2bfec1f0dab904cabd0de847f5d7cb5ad62dd04ca93a6cf7c25ef2a727a8dc0700a00958b841f7ffaa2c99f608b4cb1872a31a1dc920d0834d22d
diff --git a/dev-db/pgxnclient/metadata.xml b/dev-db/pgxnclient/metadata.xml
new file mode 100644
index 000000000000..dc934da28afe
--- /dev/null
+++ b/dev-db/pgxnclient/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>pgsql-bugs@gentoo.org</email>
+ <name>PostgreSQL and Related Package Development</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="pypi">pgxnclient</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/pgxnclient/pgxnclient-1.2-r1.ebuild b/dev-db/pgxnclient/pgxnclient-1.2-r1.ebuild
new file mode 100644
index 000000000000..ada063bf2787
--- /dev/null
+++ b/dev-db/pgxnclient/pgxnclient-1.2-r1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+PYTHON_COMPAT=( python{2_7,3_4} )
+
+inherit distutils-r1
+
+DESCRIPTION="PostgreSQL Extension Network Client"
+HOMEPAGE="http://pgxnclient.projects.postgresql.org/ https://pypi.org/project/${PN}"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="test"
+
+RDEPEND=">=dev-db/postgresql-9.1[server]"
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+
+python_test() {
+ # suite written onlt for py2
+ pushd ${PN} > /dev/null
+ if ! python_is_python3; then
+ PYTHONPATH=../ "${PYTHON}" -m unittest discover || die "tests failed"
+ fi
+ popd > dev/null
+}
diff --git a/dev-db/pgxnclient/pgxnclient-1.2.1.ebuild b/dev-db/pgxnclient/pgxnclient-1.2.1.ebuild
new file mode 100644
index 000000000000..0d91a8d786c9
--- /dev/null
+++ b/dev-db/pgxnclient/pgxnclient-1.2.1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+
+inherit distutils-r1
+
+DESCRIPTION="PostgreSQL Extension Network Client"
+HOMEPAGE="http://pgxnclient.projects.postgresql.org/ https://pypi.org/project/${PN}"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="test"
+
+RDEPEND=">=dev-db/postgresql-9.1[server]"
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+
+python_test() {
+ # suite written onlt for py2
+ pushd ${PN} > /dev/null
+ if ! python_is_python3; then
+ PYTHONPATH=../ "${PYTHON}" -m unittest discover || die "tests failed"
+ fi
+ popd > dev/null
+}
diff --git a/dev-db/phpmyadmin-4.7.0 b/dev-db/phpmyadmin-4.7.0
deleted file mode 100644
index 22c553ac9b1e..000000000000
--- a/dev-db/phpmyadmin-4.7.0
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=install postinst prerm setup
-DEPEND=|| ( virtual/httpd-cgi virtual/httpd-fastcgi ) >=app-admin/webapp-config-1.50.15
-DESCRIPTION=Web-based administration for MySQL database in PHP
-EAPI=5
-HOMEPAGE=https://www.phpmyadmin.net/
-IUSE=setup vhosts
-KEYWORDS=alpha amd64 ~arm ~hppa ~ia64 ppc ppc64 sparc x86 ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos
-LICENSE=GPL-2
-RDEPEND=dev-lang/php[crypt,ctype,filter,json,session,unicode] || ( dev-lang/php[mysqli] dev-lang/php[mysql] ) virtual/httpd-php:* >=app-admin/webapp-config-1.50.15
-SLOT=4.7.0
-SRC_URI=https://files.phpmyadmin.net/phpMyAdmin/4.7.0/phpMyAdmin-4.7.0-all-languages.tar.xz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf webapp 6ae2395d7f341093c36057cb4f69101a
-_md5_=e62f9b9320c0900ed3f9ccd9c5168f09
diff --git a/dev-db/phpmyadmin-4.7.8 b/dev-db/phpmyadmin-4.7.8
deleted file mode 100644
index 3804d0ecfeeb..000000000000
--- a/dev-db/phpmyadmin-4.7.8
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=install postinst prerm setup
-DEPEND=|| ( virtual/httpd-cgi virtual/httpd-fastcgi ) >=app-admin/webapp-config-1.50.15
-DESCRIPTION=Web-based administration for MySQL database in PHP
-EAPI=5
-HOMEPAGE=https://www.phpmyadmin.net/
-IUSE=setup vhosts
-KEYWORDS=alpha amd64 ~arm ~hppa ~ia64 ~ppc ppc64 ~sparc x86 ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos
-LICENSE=GPL-2
-RDEPEND=dev-lang/php[ctype,filter,json,session,unicode] || ( dev-lang/php[mysqli] dev-lang/php[mysql] ) virtual/httpd-php:* >=app-admin/webapp-config-1.50.15
-SLOT=4.7.8
-SRC_URI=https://files.phpmyadmin.net/phpMyAdmin/4.7.8/phpMyAdmin-4.7.8-all-languages.tar.xz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf webapp 6ae2395d7f341093c36057cb4f69101a
-_md5_=2b63f3ec5940a72d250ac61050778b46
diff --git a/dev-db/phpmyadmin-4.8.2 b/dev-db/phpmyadmin-4.8.2
deleted file mode 100644
index 834f14abee07..000000000000
--- a/dev-db/phpmyadmin-4.8.2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=install postinst prerm setup
-DEPEND=|| ( virtual/httpd-cgi virtual/httpd-fastcgi ) >=app-admin/webapp-config-1.50.15
-DESCRIPTION=Web-based administration for MySQL database in PHP
-EAPI=5
-HOMEPAGE=https://www.phpmyadmin.net/
-IUSE=setup vhosts
-KEYWORDS=~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos
-LICENSE=GPL-2
-RDEPEND=dev-lang/php[ctype,filter,json,session,unicode] || ( dev-lang/php[mysqli] dev-lang/php[mysql] ) virtual/httpd-php:* >=app-admin/webapp-config-1.50.15
-SLOT=4.8.2
-SRC_URI=https://files.phpmyadmin.net/phpMyAdmin/4.8.2/phpMyAdmin-4.8.2-all-languages.tar.xz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf webapp 6ae2395d7f341093c36057cb4f69101a
-_md5_=cbb7141d8c95de096c713f7540ade3cc
diff --git a/dev-db/phpmyadmin/Manifest b/dev-db/phpmyadmin/Manifest
new file mode 100644
index 000000000000..a5fd5f81b976
--- /dev/null
+++ b/dev-db/phpmyadmin/Manifest
@@ -0,0 +1,8 @@
+AUX postinstall-en-3.1.txt 1160 BLAKE2B 0aa21601490830f93a784c1a3c09b90986d606d0086b128b37d6598c946e9ebe43f575f12ca5ee571db8520841a2c08624b567b721567d26ee02e1e3c4c9124e SHA512 7b50ab9f9e3a828bd9bff600550ea97712c28804467ab5900a52710d4adb0581fe33155a965dd3956fcd36cc153b1a18a1f001d88ac52d70c8288faf695f01ec
+DIST phpMyAdmin-4.7.0-all-languages.tar.xz 7600296 BLAKE2B 10e1168ab7a1d8dfccf5837c211a2e6455d767e27f11aec870a9c4a1a19e8a4a1df67b82a7a83ff3c184c8a111dc272da5c876150615a9fd9a32a643bba84007 SHA512 03f3b56d3fed846e8e27e38a1bf32175b267a3cc2784ee499b64a48b6a37f0352302a9c150e1db1c99f633aabd8a373a834ad7ab2b694146b0ac13dd05bd27e3
+DIST phpMyAdmin-4.7.8-all-languages.tar.xz 6218056 BLAKE2B 879ef6703711725781fcf3b4c9ab607741c4df0d2f1955f632087e33b599e54128c0811dbd125d9015a0ec597dd6d9af54e7136e91f8637badf698ad7a30b8ba SHA512 ae6edcfba72413a6e0af0b120a99809320a840ab332ae77263f21e14f3b34a38cca70591628ba5818d6732ff6d23551ea51cbf6a75012d2326d0fab1c2a1b9ae
+DIST phpMyAdmin-4.8.2-all-languages.tar.xz 5914400 BLAKE2B 3a2bbef5cba6583e5b8a2409647a6657fcc54041213ad26143e6ca6ab58a7550d94c65afc9dac8f5751c31072748b7183ba255b4aebe047c10b06dc6efdbed16 SHA512 32c5f048b31089ea6a6bc0212b32f01eb842eddc323a9729b98a693d96d38b0ef091b4521381dae432d2482bf0214ad65ffaa13c925b0dca5dcb645e2987eb33
+EBUILD phpmyadmin-4.7.0.ebuild 1569 BLAKE2B 8582b641380f4a9c47dc3ff62a32774b35f2c252774c91a8ddfa8e7470c8649a192984ccf4124d21af09a3843c1a8d0d520907eb51d50c368d166f1b570ffb1a SHA512 dbc88883d5605423c3ed17563736c1f7e862fcf60e9f162d057229dbd8e372b056072fca592063349361be2a2baeab0ca3ca3a36b4af7130758836a95f1988b7
+EBUILD phpmyadmin-4.7.8.ebuild 1565 BLAKE2B 59d5b4629506f6a55ec18f88c425c11f5b78c58cbac7b8135407d5f7dde604b98de08e5721733ead514cd600d6f2f4b45a3958faaf99689c8b6de5db27691270 SHA512 448aabfb29e2f7f52e5763e4c1e9c6e4d5e5872454a4fc930d36c6df2dc490b1401662454a65df7dafdb68fcd414b9583430a1f699bfc1d2995e5d6c1c16d76f
+EBUILD phpmyadmin-4.8.2.ebuild 1569 BLAKE2B 47a60e3d4c06cffc24717efcb8dd15040843407540afa833e3a1019c7bf45532e661a8ba770ec0e0dbdeb77b8274ec24eb44100a53920000805103ed6547259d SHA512 f55ba14d91a2b796e8a2e447458ae713242aede0c00b8a3863907d8a428e502abf5d3cd20cd05ca199185e51bd72b3ac303c1ce0db51e747ab9855d39f53607f
+MISC metadata.xml 701 BLAKE2B aef0a047bca31221714bf27203bd720863c5cef6b7b4dd72b441761a0638bca38c03610e65b3819ca0fba6577973908d7ca40ec8baa3aac1255d19b7cfa9f0a7 SHA512 6dcb099779cd0db4928ee812c81fee762612846044e6ee3df3b661a2dce6aed01420d0bc1301c8ff9d763fb8aeaeef3290a7889b32705fc48e8c392aa8b8ca82
diff --git a/dev-db/phpmyadmin/files/postinstall-en-3.1.txt b/dev-db/phpmyadmin/files/postinstall-en-3.1.txt
new file mode 100644
index 000000000000..4e72581eb82d
--- /dev/null
+++ b/dev-db/phpmyadmin/files/postinstall-en-3.1.txt
@@ -0,0 +1,36 @@
+If this is a new installation:
+
+1. Configure ${PN}:
+
+a) Create config.inc.php. You can use the web-based installer
+ (this requires the 'setup' USE flag to be enabled):
+
+ mkdir ${MY_INSTALLDIR}/config
+ chown ${VHOST_SERVER_UID}:${VHOST_SERVER_UID} ${MY_INSTALLDIR}/config
+
+ then go to http://${VHOST_HOSTNAME}/${VHOST_APPDIR}/setup/
+
+ once you've saved the configuration:
+
+ cp ${MY_INSTALLDIR}/config/config.inc.php ${MY_INSTALLDIR}/config.inc.php
+ rm -rf ${MY_INSTALLDIR}/config
+
+b) Alternatively, use an existing configuration:
+
+ cp <path to existing config.inc.php file> ${MY_INSTALLDIR}/
+
+c) Alternatively, use the sample config file:
+
+ cp ${MY_INSTALLDIR}/config.sample.inc.php ${MY_INSTALLDIR}/config.inc.php
+
+2. Be sure that the libraries/ directory is not visible. You can use the
+ provided .htaccess file.
+
+=================================================================
+
+If you are upgrading from an earlier version:
+
+1. If you are using ${PN}'s features for master/foreign tables, be sure to read
+ http://${VHOST_HOSTNAME}/${VHOST_APPDIR}/Documentation.html#col_com
+
+ You will need to perform the ALTER TABLE step yourself.
diff --git a/dev-db/phpmyadmin/metadata.xml b/dev-db/phpmyadmin/metadata.xml
new file mode 100644
index 000000000000..b75a0f9193e7
--- /dev/null
+++ b/dev-db/phpmyadmin/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>jmbsvicetto@gentoo.org</email>
+ <name>Jorge Manuel B. S. Vicetto</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>web-apps@gentoo.org</email>
+ <name>Gentoo Webapps</name>
+ </maintainer>
+ <use>
+ <flag name="setup">
+ Installs the phpMyAdmin setup utility.
+ Users who don't use the utility should disable this USE flag
+ for security reasons as the setup tool was the target of various
+ exploits in the past.
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">phpmyadmin</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/phpmyadmin/phpmyadmin-4.7.0.ebuild b/dev-db/phpmyadmin/phpmyadmin-4.7.0.ebuild
new file mode 100644
index 000000000000..4cfb0dc84d8f
--- /dev/null
+++ b/dev-db/phpmyadmin/phpmyadmin-4.7.0.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils 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 ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="setup"
+
+RDEPEND="
+ dev-lang/php[crypt,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 || die
+ 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/phpmyadmin/phpmyadmin-4.7.8.ebuild b/dev-db/phpmyadmin/phpmyadmin-4.7.8.ebuild
new file mode 100644
index 000000000000..388c0a19120a
--- /dev/null
+++ b/dev-db/phpmyadmin/phpmyadmin-4.7.8.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils 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 ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="setup"
+
+RDEPEND="
+ dev-lang/php[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 || die
+ 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/phpmyadmin/phpmyadmin-4.8.2.ebuild b/dev-db/phpmyadmin/phpmyadmin-4.8.2.ebuild
new file mode 100644
index 000000000000..f89f833a9205
--- /dev/null
+++ b/dev-db/phpmyadmin/phpmyadmin-4.8.2.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils 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 ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="setup"
+
+RDEPEND="
+ dev-lang/php[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 || die
+ 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/plr-8.3.0.17 b/dev-db/plr-8.3.0.17
deleted file mode 100644
index 1580f08420a0..000000000000
--- a/dev-db/plr-8.3.0.17
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile install postinst prepare setup test unpack
-DEPEND=dev-lang/R postgres_targets_postgres10? ( dev-db/postgresql:10=[server] ) postgres_targets_postgres9_6? ( dev-db/postgresql:9.6=[server] ) postgres_targets_postgres9_5? ( dev-db/postgresql:9.5=[server] ) postgres_targets_postgres9_4? ( dev-db/postgresql:9.4=[server] ) postgres_targets_postgres9_3? ( dev-db/postgresql:9.3=[server] ) virtual/pkgconfig
-DESCRIPTION=R language extension for postgresql database
-EAPI=6
-HOMEPAGE=http://www.joeconway.com/plr/
-IUSE=postgres_targets_postgres10 postgres_targets_postgres9_6 postgres_targets_postgres9_5 postgres_targets_postgres9_4 postgres_targets_postgres9_3
-KEYWORDS=~amd64
-LICENSE=GPL-2
-RDEPEND=dev-lang/R postgres_targets_postgres10? ( dev-db/postgresql:10=[server] ) postgres_targets_postgres9_6? ( dev-db/postgresql:9.6=[server] ) postgres_targets_postgres9_5? ( dev-db/postgresql:9.5=[server] ) postgres_targets_postgres9_4? ( dev-db/postgresql:9.4=[server] ) postgres_targets_postgres9_3? ( dev-db/postgresql:9.3=[server] )
-REQUIRED_USE=|| ( postgres_targets_postgres10 postgres_targets_postgres9_6 postgres_targets_postgres9_5 postgres_targets_postgres9_4 postgres_targets_postgres9_3 )
-SLOT=0
-SRC_URI=https://github.com/postgres-plr/plr/archive/REL8_3_0_17.tar.gz -> plr-8.3.0.17.tar.gz
-_eclasses_=multibuild 35719a9cd25ec71ee49c966f6868454c postgres a3ad839d319097167f1802b25f50d9c0 postgres-multi 4ad3669c874bed68b375f87035e46db8 user 8bc2845510e2109af75e3eeac607ec81
-_md5_=42c0644425c6bf490f2330ed7e1470ae
diff --git a/dev-db/plr/Manifest b/dev-db/plr/Manifest
new file mode 100644
index 000000000000..cb0d09a9ab4e
--- /dev/null
+++ b/dev-db/plr/Manifest
@@ -0,0 +1,3 @@
+DIST plr-8.3.0.17.tar.gz 74017 BLAKE2B 314b4cfa2c3ca8ed31e80a72233a6dc8cdb9f3811dad6e9f3eb5147c17cdf5a039436598b0fc2b30c6702b02dd3cb2da33543764aee3199c6864aae22be875ce SHA512 d7080c62349d1dcdd17008a7be3643b54678e0f66bf721068df73057394496d025c4fe01e52945c3acf9cc21eb90241512667772ef3fe519a3c9081efe92dd40
+EBUILD plr-8.3.0.17.ebuild 1703 BLAKE2B 9bd366ade594cc4a79cfa74a66c55cce8072dd6aed04ff28c68880d68c54ef5187c9221ad22c87c832e8eb75501bef68ae1c466418b1cb1606561c76603c8e79 SHA512 b7131973bcecc6c8dcf617b82d3b0da9e76ec014d6dc8fb577270016dfff6f9dbddd5e1b1bf3fda51c0447e12e44055d43f229a2d3daa752ee522a19177b9927
+MISC metadata.xml 800 BLAKE2B b12bbd609b12d63306bdc9af15f788d91847ae4a8960b26f92d1d8ca000291a047424f2632d22798855a1b61cad2a9d46095f214ba9f7c41616c5a90ee4dddbf SHA512 23728ed4ec8bd27a2ccf2081f4b0ddd2d8ecf47fd9c44f999406c8f3bd7c2f86545dbf837c99dc0e9ef9100b2028a9ae3f10a6d60a21bafbbc7231c445a9c85a
diff --git a/dev-db/plr/metadata.xml b/dev-db/plr/metadata.xml
new file mode 100644
index 000000000000..a604889e04b6
--- /dev/null
+++ b/dev-db/plr/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!--
+This is the example metadata file.
+The root element of this file is <pkgmetadata>. Within this element a
+number of subelements are allowed, the most common being maintainer.
+
+For a full description look at:
+https://devmanual.gentoo.org/ebuild-writing/misc-files/metadata/
+
+Before committing, please remove the comments from this file. They are
+not relevant for general metadata.xml files.
+-->
+<pkgmetadata>
+<maintainer type="person">
+ <email>axs@gentoo.org</email>
+ <name>Ian Stakenvicius</name>
+</maintainer>
+<longdescription>
+An extension for postgresql databases to allow direct usage of <pkg>dev-lang/R</pkg>
+in SQL queries and database functions
+</longdescription>
+</pkgmetadata>
diff --git a/dev-db/plr/plr-8.3.0.17.ebuild b/dev-db/plr/plr-8.3.0.17.ebuild
new file mode 100644
index 000000000000..355b915ed2db
--- /dev/null
+++ b/dev-db/plr/plr-8.3.0.17.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+POSTGRES_COMPAT=( 9.{3..6} 10 )
+POSTGRES_USEDEP="server"
+
+inherit postgres-multi
+
+DESCRIPTION="R language extension for postgresql database"
+HOMEPAGE="http://www.joeconway.com/plr/"
+SRC_URI="https://github.com/postgres-plr/plr/archive/REL${PV//./_}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="dev-lang/R
+ ${POSTGRES_DEP}"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+REQUIRED_USE="${POSTGRES_REQ_USE}"
+
+S=${WORKDIR}/contrib/${PN}
+
+src_unpack() {
+ unpack ${A}
+ # the build system wants 'contrib' to be part of the path
+ mkdir -p "${WORKDIR}/contrib"
+ mv "${WORKDIR}/${PN}-REL${PV//./_}" "${S}"
+}
+
+src_prepare() {
+ local BUILD_DIR="${S}"
+ postgres-multi_src_prepare
+}
+
+src_compile() {
+ pg_src_compile() {
+ cd "${BUILD_DIR}"
+ PG_CONFIG="${SYSROOT}${EPREFIX}/usr/$(get_libdir)/postgresql-${MULTIBUILD_ID}/bin/pg_config" \
+ USE_PGXS=1 \
+ emake -j1
+ }
+ postgres-multi_foreach pg_src_compile
+}
+
+src_install() {
+ pg_src_install() {
+ cd "${BUILD_DIR}"
+ PG_CONFIG="${SYSROOT}${EPREFIX}/usr/$(get_libdir)/postgresql-${MULTIBUILD_ID}/bin/pg_config" \
+ USE_PGXS=1 \
+ emake -j1 DESTDIR="${D}" install
+ }
+ postgres-multi_foreach pg_src_install
+}
+
+pkg_postinst() {
+ elog "The plr extension needs to be explicitly added (or 'created') on each database"
+ elog "you wish to use it with. As of postgresql-9.1 the easiest way to do this is"
+ elog "with the proprietary SQL statement:"
+ elog
+ elog "\tCREATE EXTENSION plr;"
+ elog
+ elog "For more info on how to add PL/R to your postgresql database(s), please visit"
+ elog "http://www.joeconway.com/doc/plr-install.html"
+}
diff --git a/dev-db/postgis-2.4.2 b/dev-db/postgis-2.4.2
deleted file mode 100644
index 795cc2585b9b..000000000000
--- a/dev-db/postgis-2.4.2
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install postinst prepare setup test
-DEPEND=postgres_targets_postgres10? ( dev-db/postgresql:10=[server] ) postgres_targets_postgres9_6? ( dev-db/postgresql:9.6=[server] ) postgres_targets_postgres9_5? ( dev-db/postgresql:9.5=[server] ) postgres_targets_postgres9_4? ( dev-db/postgresql:9.4=[server] ) postgres_targets_postgres9_3? ( dev-db/postgresql:9.3=[server] ) dev-libs/json-c:= dev-libs/libxml2:2 >=sci-libs/geos-3.5.0 >=sci-libs/proj-4.6.0 >=sci-libs/gdal-1.10.0 address-standardizer? ( dev-libs/libpcre ) gtk? ( x11-libs/gtk+:2 ) mapbox? ( dev-libs/protobuf ) doc? ( app-text/docbook-xsl-stylesheets app-text/docbook-xml-dtd:4.5 dev-libs/libxslt || ( media-gfx/imagemagick[png] media-gfx/graphicsmagick[imagemagick,png] ) ) virtual/pkgconfig test? ( dev-util/cunit ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=Geographic Objects for PostgreSQL
-EAPI=6
-HOMEPAGE=http://postgis.net
-IUSE=address-standardizer doc gtk static-libs mapbox test topology postgres_targets_postgres10 postgres_targets_postgres9_6 postgres_targets_postgres9_5 postgres_targets_postgres9_4 postgres_targets_postgres9_3
-KEYWORDS=amd64 x86 ~amd64-linux ~x86-linux
-LICENSE=GPL-2
-RDEPEND=postgres_targets_postgres10? ( dev-db/postgresql:10=[server] ) postgres_targets_postgres9_6? ( dev-db/postgresql:9.6=[server] ) postgres_targets_postgres9_5? ( dev-db/postgresql:9.5=[server] ) postgres_targets_postgres9_4? ( dev-db/postgresql:9.4=[server] ) postgres_targets_postgres9_3? ( dev-db/postgresql:9.3=[server] ) dev-libs/json-c:= dev-libs/libxml2:2 >=sci-libs/geos-3.5.0 >=sci-libs/proj-4.6.0 >=sci-libs/gdal-1.10.0 address-standardizer? ( dev-libs/libpcre ) gtk? ( x11-libs/gtk+:2 ) mapbox? ( dev-libs/protobuf )
-REQUIRED_USE=test? ( doc ) || ( postgres_targets_postgres10 postgres_targets_postgres9_6 postgres_targets_postgres9_5 postgres_targets_postgres9_4 postgres_targets_postgres9_3 )
-RESTRICT=test
-SLOT=0
-SRC_URI=http://download.osgeo.org/postgis/source/postgis-2.4.2.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e postgres a3ad839d319097167f1802b25f50d9c0 postgres-multi 4ad3669c874bed68b375f87035e46db8 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=9daaddabb54f47f358377ba82ebd77a9
diff --git a/dev-db/postgis-2.4.3 b/dev-db/postgis-2.4.3
deleted file mode 100644
index 399fc551a33d..000000000000
--- a/dev-db/postgis-2.4.3
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install postinst prepare setup test
-DEPEND=postgres_targets_postgres10? ( dev-db/postgresql:10=[server] ) postgres_targets_postgres9_6? ( dev-db/postgresql:9.6=[server] ) postgres_targets_postgres9_5? ( dev-db/postgresql:9.5=[server] ) postgres_targets_postgres9_4? ( dev-db/postgresql:9.4=[server] ) postgres_targets_postgres9_3? ( dev-db/postgresql:9.3=[server] ) dev-libs/json-c:= dev-libs/libxml2:2 >=sci-libs/geos-3.5.0 >=sci-libs/proj-4.6.0 >=sci-libs/gdal-1.10.0 address-standardizer? ( dev-libs/libpcre ) gtk? ( x11-libs/gtk+:2 ) mapbox? ( dev-libs/protobuf ) doc? ( app-text/docbook-xsl-stylesheets app-text/docbook-xml-dtd:4.5 dev-libs/libxslt || ( media-gfx/imagemagick[png] media-gfx/graphicsmagick[imagemagick,png] ) ) virtual/pkgconfig test? ( dev-util/cunit ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=Geographic Objects for PostgreSQL
-EAPI=6
-HOMEPAGE=http://postgis.net
-IUSE=address-standardizer doc gtk static-libs mapbox test topology postgres_targets_postgres10 postgres_targets_postgres9_6 postgres_targets_postgres9_5 postgres_targets_postgres9_4 postgres_targets_postgres9_3
-KEYWORDS=~amd64 ~x86 ~amd64-linux ~x86-linux
-LICENSE=GPL-2
-RDEPEND=postgres_targets_postgres10? ( dev-db/postgresql:10=[server] ) postgres_targets_postgres9_6? ( dev-db/postgresql:9.6=[server] ) postgres_targets_postgres9_5? ( dev-db/postgresql:9.5=[server] ) postgres_targets_postgres9_4? ( dev-db/postgresql:9.4=[server] ) postgres_targets_postgres9_3? ( dev-db/postgresql:9.3=[server] ) dev-libs/json-c:= dev-libs/libxml2:2 >=sci-libs/geos-3.5.0 >=sci-libs/proj-4.6.0 >=sci-libs/gdal-1.10.0 address-standardizer? ( dev-libs/libpcre ) gtk? ( x11-libs/gtk+:2 ) mapbox? ( dev-libs/protobuf )
-REQUIRED_USE=test? ( doc ) || ( postgres_targets_postgres10 postgres_targets_postgres9_6 postgres_targets_postgres9_5 postgres_targets_postgres9_4 postgres_targets_postgres9_3 )
-RESTRICT=test
-SLOT=0
-SRC_URI=http://download.osgeo.org/postgis/source/postgis-2.4.3.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e postgres a3ad839d319097167f1802b25f50d9c0 postgres-multi 4ad3669c874bed68b375f87035e46db8 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=b11b00ec1d5d6b551dd2dc7458add97a
diff --git a/dev-db/postgis-9999 b/dev-db/postgis-9999
deleted file mode 100644
index b65bedb7cdae..000000000000
--- a/dev-db/postgis-9999
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup test unpack
-DEPEND=postgres_targets_postgres10? ( dev-db/postgresql:10=[server] ) postgres_targets_postgres9_6? ( dev-db/postgresql:9.6=[server] ) postgres_targets_postgres9_5? ( dev-db/postgresql:9.5=[server] ) postgres_targets_postgres9_4? ( dev-db/postgresql:9.4=[server] ) postgres_targets_postgres9_3? ( dev-db/postgresql:9.3=[server] ) dev-libs/json-c:= dev-libs/libxml2:2 >=sci-libs/geos-3.4.2 >=sci-libs/proj-4.6.0 >=sci-libs/gdal-1.10.0:= gtk? ( x11-libs/gtk+:2 ) doc? ( app-text/docbook-xsl-stylesheets app-text/docbook-xml-dtd:4.5 dev-libs/libxslt virtual/imagemagick-tools[png] ) virtual/pkgconfig test? ( dev-util/cunit ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 || ( dev-vcs/subversion[http] dev-vcs/subversion[webdav-neon] dev-vcs/subversion[webdav-serf] ) net-misc/rsync
-DESCRIPTION=Geographic Objects for PostgreSQL
-EAPI=6
-HOMEPAGE=http://postgis.net
-IUSE=doc gtk static-libs test postgres_targets_postgres10 postgres_targets_postgres9_6 postgres_targets_postgres9_5 postgres_targets_postgres9_4 postgres_targets_postgres9_3
-LICENSE=GPL-2
-RDEPEND=postgres_targets_postgres10? ( dev-db/postgresql:10=[server] ) postgres_targets_postgres9_6? ( dev-db/postgresql:9.6=[server] ) postgres_targets_postgres9_5? ( dev-db/postgresql:9.5=[server] ) postgres_targets_postgres9_4? ( dev-db/postgresql:9.4=[server] ) postgres_targets_postgres9_3? ( dev-db/postgresql:9.3=[server] ) dev-libs/json-c:= dev-libs/libxml2:2 >=sci-libs/geos-3.4.2 >=sci-libs/proj-4.6.0 >=sci-libs/gdal-1.10.0:= gtk? ( x11-libs/gtk+:2 )
-REQUIRED_USE=test? ( doc )
-RESTRICT=test
-SLOT=0
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e postgres a3ad839d319097167f1802b25f50d9c0 postgres-multi 4ad3669c874bed68b375f87035e46db8 preserve-libs ef207dc62baddfddfd39a164d9797648 subversion a5d5826a85609611f098c0553eb24cc1 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=20488d2a48aea997aabb5b08b2180aa6
diff --git a/dev-db/postgis/Manifest b/dev-db/postgis/Manifest
new file mode 100644
index 000000000000..72f2e45d5c64
--- /dev/null
+++ b/dev-db/postgis/Manifest
@@ -0,0 +1,8 @@
+AUX postgis-2.2.0-arflags.patch 535 BLAKE2B 6420573e9623d4e2115ed3616bc3b8648ae7782bf4624ee60d3827a4d61cbdac1dc62b4937f36113ed6d0856af4728f5cc1b544d502512e88dd87a7b590135ab SHA512 7f8b92a582dd11b3040832278b75e65036315ca0e438cb9b19cc5b63a7b5c5bcae8ec274a487a29abadfbbc31cdfacf6c668e46f249d4bf88c09607501cacf66
+AUX postgis-2.4.2-jsonc_0.13.patch 786 BLAKE2B c55fd81f28b9a4db965ef3f4bb3ca6fcf2cd6ba44d4f7a93c35ade90ffdcb195325ce219348aa6dc3645f6822214b4bc75263c02fc316f3dd9b4369114eb5493 SHA512 9088304bb77db2d86dd077510f94ae8b3796474a02377f1f076476c739d9506f0b7c7c6dcf6e90ad51e84bc528302a6ecda4bedc6eac42dfeba3a71c0144a399
+DIST postgis-2.4.2.tar.gz 12470881 BLAKE2B 116bb5d1c8f6066d537cac950254923a681babac456d155139dbdd2853b80499f4f9445dad985b94bffffd1d1285a6c78fee0fccb24e301d18147f3cd9230416 SHA512 e268572d5cd009754ef05f5d2eedcac7e362fa47199459c637cd4d9050d2b648d4b2b3746cde0dce5a42be2606a432b64dc905f193e12cf0869e3dd6f820b425
+DIST postgis-2.4.3.tar.gz 12601055 BLAKE2B 662b2afe145bc23c77ebda7306d07a20e39c1a598316cee58e1591e65ce1b2d2a3f727f5463ba144711faa55f7c11e4a038b6ad2a76cab760b4fdd43647f09c3 SHA512 95b2c925cb10943e7136aa3b7b08a9ad3d6ff59a3994c653bba52e4c65193d519daa49684b924f68945dd596187aa17e0c713bf0b9e29f8c5973346b279dba1b
+EBUILD postgis-2.4.2.ebuild 3111 BLAKE2B 5e73b003ce160340df936ffc7571fa4873b1e3cc6519fae8f7f452d98c2c5786c2ecedb96a544bef39f566a28db8089b7f9dfd37e97b910cf33fa83fb0307bcf SHA512 0cd08ef2930688412f1ffe4846ac88a9037f68dda0cde535c810fbbb218f2c033fec74a2f7b1539f0ff42ea40f085ea290fcdd3892fcc27a38fad25085686152
+EBUILD postgis-2.4.3.ebuild 3113 BLAKE2B 4ea7488d7c87a8d946d074d36f306db9791bca9d0d63f7ad67622defd797052fad8d4b0652ef2a3445ee1da436450e2f30683870dcf54de3255db9b61095e2b3 SHA512 a7f5e10d00f67a6f6c322ed59937ccd103e3491b9ae9ffc516240c5185b10ed808b4044e44ab276576e07a5bc34e3f9464abf242623b85e9a718733713cbeb1b
+EBUILD postgis-9999.ebuild 2647 BLAKE2B b379c0ebfd30c407817139b72264bbb70c0cae3ba281b2f2ffda38c61c851bb363266e2675437e32dd3ffc80a6c1dca4608e34833d7a729cbd6997eb2501411d SHA512 4b654b604752b9e30ea0662e89429e0deb74e1ce6cfb8beef34f8bf33ea2aeb28e07398828fc5ddc3d27a520258313cb552b7ef24069ca5b9001a4db7aaa1cec
+MISC metadata.xml 779 BLAKE2B 9dfbc86514c5f6e0c859dc41a46890e4f518f23c572786bf340112eadf21b35f5f583a3835f6ba58bef8c99a7ef8483f3a98898d372d1c0e5cc537bb9ecc2b12 SHA512 33ad2ddabf49e97af2cf188f2c0f72e1a936c228b43d8d3637230c43be0df82ec2aa20b63cb5f2385e936c215263fcd009332afe504bc5f30746a387b9b37ada
diff --git a/dev-db/postgis/files/postgis-2.2.0-arflags.patch b/dev-db/postgis/files/postgis-2.2.0-arflags.patch
new file mode 100644
index 000000000000..97770042d8f6
--- /dev/null
+++ b/dev-db/postgis/files/postgis-2.2.0-arflags.patch
@@ -0,0 +1,18 @@
+diff -Naruw a/raster/rt_core/Makefile.in b/raster/rt_core/Makefile.in
+--- a/raster/rt_core/Makefile.in 2015-05-13 14:13:18.000000000 -0400
++++ b/raster/rt_core/Makefile.in 2015-12-14 16:49:49.166156232 -0500
+@@ -18,7 +18,7 @@
+ #
+ #############################################################################
+
+-AR = ar rs
++ARFLAGS = rs
+
+ CC = @CC@
+ LIBLWGEOM_LDFLAGS = ../../liblwgeom/.libs/liblwgeom.a
+@@ -64,4 +64,4 @@
+ rm -f Makefile
+
+ librtcore.a: $(RT_OBJS)
+- $(AR) $(RT_LIB) $(RT_OBJS)
++ $(AR) $(ARFLAGS) $(RT_LIB) $(RT_OBJS)
diff --git a/dev-db/postgis/files/postgis-2.4.2-jsonc_0.13.patch b/dev-db/postgis/files/postgis-2.4.2-jsonc_0.13.patch
new file mode 100644
index 000000000000..b980e77333d6
--- /dev/null
+++ b/dev-db/postgis/files/postgis-2.4.2-jsonc_0.13.patch
@@ -0,0 +1,23 @@
+diff -Naur postgis-2.4.2.old/liblwgeom/lwin_geojson.c postgis-2.4.2/liblwgeom/lwin_geojson.c
+--- postgis-2.4.2.old/liblwgeom/lwin_geojson.c 2017-12-21 22:52:40.422802160 +0100
++++ postgis-2.4.2/liblwgeom/lwin_geojson.c 2017-12-21 22:55:36.605430945 +0100
+@@ -31,13 +31,19 @@
+
+ #if defined(HAVE_LIBJSON) || defined(HAVE_LIBJSON_C) /* --{ */
+
++#define JSON_C_VERSION_013 (13 << 8)
++
+ #ifdef HAVE_LIBJSON_C
+ #include <json-c/json.h>
++#if !defined(JSON_C_VERSION_NUM) || JSON_C_VERSION_NUM < JSON_C_VERSION_013
+ #include <json-c/json_object_private.h>
++#endif
+ #else
+ #include <json/json.h>
++#if !defined(JSON_C_VERSION_NUM) || JSON_C_VERSION_NUM < JSON_C_VERSION_013
+ #include <json/json_object_private.h>
+ #endif
++#endif
+
+ #ifndef JSON_C_VERSION
+ /* Adds support for libjson < 0.10 */
diff --git a/dev-db/postgis/metadata.xml b/dev-db/postgis/metadata.xml
new file mode 100644
index 000000000000..079d84079f20
--- /dev/null
+++ b/dev-db/postgis/metadata.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>pgsql-bugs@gentoo.org</email>
+ <name>PostgreSQL and Related Package Development</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci-geosciences@gentoo.org</email>
+ <name>Gentoo Geosciences Project</name>
+ </maintainer>
+ <use>
+ <flag name="address-standardizer">
+ Normalize US and CA postal addresses
+ </flag>
+ <flag name="gtk">
+ Build graphical interface for shp2pgsql (shp2pgsql-gui)
+ </flag>
+ <flag name="mapbox">
+ Add capability to transform geometry into Mapbox Vector Tile
+ </flag>
+ <flag name="topology">
+ Build topology spatial types and functions
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-db/postgis/postgis-2.4.2.ebuild b/dev-db/postgis/postgis-2.4.2.ebuild
new file mode 100644
index 000000000000..2dd323bc6436
--- /dev/null
+++ b/dev-db/postgis/postgis-2.4.2.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+POSTGRES_COMPAT=( 9.{3..6} 10 )
+POSTGRES_USEDEP="server"
+
+inherit autotools eutils postgres-multi versionator
+
+MY_PV=$(replace_version_separator 3 '')
+MY_P="${PN}-${MY_PV}"
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="Geographic Objects for PostgreSQL"
+HOMEPAGE="http://postgis.net"
+SRC_URI="http://download.osgeo.org/postgis/source/${MY_P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+IUSE="address-standardizer doc gtk static-libs mapbox test topology"
+
+RDEPEND="
+ ${POSTGRES_DEP}
+ dev-libs/json-c:=
+ dev-libs/libxml2:2
+ >=sci-libs/geos-3.5.0
+ >=sci-libs/proj-4.6.0
+ >=sci-libs/gdal-1.10.0
+ address-standardizer? ( dev-libs/libpcre )
+ gtk? ( x11-libs/gtk+:2 )
+ mapbox? ( dev-libs/protobuf )
+"
+
+DEPEND="${RDEPEND}
+ doc? (
+ app-text/docbook-xsl-stylesheets
+ app-text/docbook-xml-dtd:4.5
+ dev-libs/libxslt
+ || (
+ media-gfx/imagemagick[png]
+ media-gfx/graphicsmagick[imagemagick,png]
+ )
+ )
+ virtual/pkgconfig
+ test? ( dev-util/cunit )
+"
+
+PGIS="$(get_version_component_range 1-2)"
+
+REQUIRED_USE="test? ( doc ) ${POSTGRES_REQ_USE}"
+
+# Needs a running psql instance, doesn't work out of the box
+RESTRICT="test"
+
+MAKEOPTS+=' -j1'
+
+# These modules are built using the same *FLAGS that were used to build
+# dev-db/postgresql. The right thing to do is to ignore the current
+# *FLAGS settings.
+QA_FLAGS_IGNORED="usr/lib(64)?/(rt)?postgis-${PGIS}\.so"
+
+src_prepare() {
+ eapply "${FILESDIR}/${PN}-2.2.0-arflags.patch" \
+ "${FILESDIR}/postgis-2.4.2-jsonc_0.13.patch"
+
+ local AT_M4DIR="macros"
+ eautoreconf
+
+ postgres-multi_src_prepare
+}
+
+src_configure() {
+ local myargs=""
+
+ use gtk && myargs+=" --with-gui"
+
+ use address-standardizer || myargs+=" --without-address-standardizer"
+ use mapbox || myargs+=" --without-protobuf"
+ use topology || myargs+=" --without-topology"
+
+ postgres-multi_foreach econf ${myargs}
+}
+
+src_compile() {
+ postgres-multi_foreach emake
+ postgres-multi_foreach emake -C topology
+
+ if use doc ; then
+ postgres-multi_foreach emake comments
+ postgres-multi_foreach emake cheatsheets
+ postgres-multi_forbest emake -C doc html
+ fi
+}
+
+src_install() {
+ postgres-multi_foreach emake DESTDIR="${D}" install
+ postgres-multi_foreach emake -C topology DESTDIR="${D}" install
+ postgres-multi_forbest dobin ./utils/postgis_restore.pl
+
+ dodoc CREDITS TODO loader/README.* doc/*txt
+
+ docinto topology
+ dodoc topology/{TODO,README}
+
+ if use doc ; then
+ postgres-multi_foreach emake DESTDIR="${D}" comments-install
+
+ docinto html
+ postgres-multi_forbest dodoc doc/html/{postgis.html,style.css}
+
+ docinto html/images
+ postgres-multi_forbest dodoc doc/html/images/*
+ fi
+
+ use static-libs || find "${ED}" -name '*.a' -delete
+}
+
+pkg_postinst() {
+ ebegin "Refreshing PostgreSQL symlinks"
+ postgresql-config update
+ eend $?
+
+ elog "To finish installing PostGIS, follow the directions detailed at:"
+ elog "http://postgis.net/docs/manual-${PGIS}/postgis_installation.html#create_new_db_extensions"
+}
diff --git a/dev-db/postgis/postgis-2.4.3.ebuild b/dev-db/postgis/postgis-2.4.3.ebuild
new file mode 100644
index 000000000000..a24f81220e5e
--- /dev/null
+++ b/dev-db/postgis/postgis-2.4.3.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+POSTGRES_COMPAT=( 9.{3..6} 10 )
+POSTGRES_USEDEP="server"
+
+inherit autotools eutils postgres-multi versionator
+
+MY_PV=$(replace_version_separator 3 '')
+MY_P="${PN}-${MY_PV}"
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="Geographic Objects for PostgreSQL"
+HOMEPAGE="http://postgis.net"
+SRC_URI="http://download.osgeo.org/postgis/source/${MY_P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="address-standardizer doc gtk static-libs mapbox test topology"
+
+RDEPEND="
+ ${POSTGRES_DEP}
+ dev-libs/json-c:=
+ dev-libs/libxml2:2
+ >=sci-libs/geos-3.5.0
+ >=sci-libs/proj-4.6.0
+ >=sci-libs/gdal-1.10.0
+ address-standardizer? ( dev-libs/libpcre )
+ gtk? ( x11-libs/gtk+:2 )
+ mapbox? ( dev-libs/protobuf )
+"
+
+DEPEND="${RDEPEND}
+ doc? (
+ app-text/docbook-xsl-stylesheets
+ app-text/docbook-xml-dtd:4.5
+ dev-libs/libxslt
+ || (
+ media-gfx/imagemagick[png]
+ media-gfx/graphicsmagick[imagemagick,png]
+ )
+ )
+ virtual/pkgconfig
+ test? ( dev-util/cunit )
+"
+
+PGIS="$(get_version_component_range 1-2)"
+
+REQUIRED_USE="test? ( doc ) ${POSTGRES_REQ_USE}"
+
+# Needs a running psql instance, doesn't work out of the box
+RESTRICT="test"
+
+MAKEOPTS+=' -j1'
+
+# These modules are built using the same *FLAGS that were used to build
+# dev-db/postgresql. The right thing to do is to ignore the current
+# *FLAGS settings.
+QA_FLAGS_IGNORED="usr/lib(64)?/(rt)?postgis-${PGIS}\.so"
+
+src_prepare() {
+ eapply "${FILESDIR}/${PN}-2.2.0-arflags.patch" \
+ "${FILESDIR}/postgis-2.4.2-jsonc_0.13.patch"
+
+ local AT_M4DIR="macros"
+ eautoreconf
+
+ postgres-multi_src_prepare
+}
+
+src_configure() {
+ local myargs=""
+
+ use gtk && myargs+=" --with-gui"
+
+ use address-standardizer || myargs+=" --without-address-standardizer"
+ use mapbox || myargs+=" --without-protobuf"
+ use topology || myargs+=" --without-topology"
+
+ postgres-multi_foreach econf ${myargs}
+}
+
+src_compile() {
+ postgres-multi_foreach emake
+ postgres-multi_foreach emake -C topology
+
+ if use doc ; then
+ postgres-multi_foreach emake comments
+ postgres-multi_foreach emake cheatsheets
+ postgres-multi_forbest emake -C doc html
+ fi
+}
+
+src_install() {
+ postgres-multi_foreach emake DESTDIR="${D}" install
+ postgres-multi_foreach emake -C topology DESTDIR="${D}" install
+ postgres-multi_forbest dobin ./utils/postgis_restore.pl
+
+ dodoc CREDITS TODO loader/README.* doc/*txt
+
+ docinto topology
+ dodoc topology/{TODO,README}
+
+ if use doc ; then
+ postgres-multi_foreach emake DESTDIR="${D}" comments-install
+
+ docinto html
+ postgres-multi_forbest dodoc doc/html/{postgis.html,style.css}
+
+ docinto html/images
+ postgres-multi_forbest dodoc doc/html/images/*
+ fi
+
+ use static-libs || find "${ED}" -name '*.a' -delete
+}
+
+pkg_postinst() {
+ ebegin "Refreshing PostgreSQL symlinks"
+ postgresql-config update
+ eend $?
+
+ elog "To finish installing PostGIS, follow the directions detailed at:"
+ elog "http://postgis.net/docs/manual-${PGIS}/postgis_installation.html#create_new_db_extensions"
+}
diff --git a/dev-db/postgis/postgis-9999.ebuild b/dev-db/postgis/postgis-9999.ebuild
new file mode 100644
index 000000000000..0010979ad4bf
--- /dev/null
+++ b/dev-db/postgis/postgis-9999.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+POSTGRES_COMPAT=( 9.{3..6} 10 )
+POSTGRES_USEDEP="server"
+
+inherit autotools eutils postgres-multi subversion versionator
+
+MY_PV=$(replace_version_separator 3 '')
+MY_P="${PN}-${MY_PV}"
+S="${WORKDIR}/${MY_P}"
+
+ESVN_REPO_URI="http://svn.osgeo.org/postgis/trunk/"
+
+DESCRIPTION="Geographic Objects for PostgreSQL"
+HOMEPAGE="http://postgis.net"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="doc gtk static-libs test"
+
+RDEPEND="
+ ${POSTGRES_DEP}
+ dev-libs/json-c:=
+ dev-libs/libxml2:2
+ >=sci-libs/geos-3.4.2
+ >=sci-libs/proj-4.6.0
+ >=sci-libs/gdal-1.10.0:=
+ gtk? ( x11-libs/gtk+:2 )
+"
+
+DEPEND="${RDEPEND}
+ doc? (
+ app-text/docbook-xsl-stylesheets
+ app-text/docbook-xml-dtd:4.5
+ dev-libs/libxslt
+ virtual/imagemagick-tools[png]
+ )
+ virtual/pkgconfig
+ test? ( dev-util/cunit )
+"
+
+REQUIRED_USE="test? ( doc )"
+
+# Needs a running psql instance, doesn't work out of the box
+RESTRICT="test"
+
+MAKEOPTS+=' -j1'
+
+src_prepare() {
+ source "${S}"/Version.config
+ export PGIS="${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}"
+
+ # These modules are built using the same *FLAGS that were used to build
+ # dev-db/postgresql. The right thing to do is to ignore the current
+ # *FLAGS settings.
+ export QA_FLAGS_IGNORED="usr/lib(64)?/(rt)?postgis-${PGIS}\.so"
+
+ eapply_user
+
+ local AT_M4DIR="macros"
+ eautoreconf
+ postgres-multi_src_prepare
+}
+
+src_configure() {
+ local myargs=""
+ use gtk && myargs+=" --with-gui"
+ postgres-multi_foreach econf ${myargs}
+}
+
+src_compile() {
+ postgres-multi_foreach emake
+ postgres-multi_foreach emake -C topology
+
+ if use doc ; then
+ postgres-multi_foreach emake comments
+ postgres-multi_foreach emake cheatsheets
+ postgres-multi_forbest emake -C doc html
+ fi
+}
+
+src_install() {
+ postgres-multi_foreach emake DESTDIR="${D}" install
+ postgres-multi_foreach emake -C topology DESTDIR="${D}" install
+ postgres-multi_forbest dobin ./utils/postgis_restore.pl
+
+ dodoc CREDITS TODO loader/README.* doc/*txt
+
+ docinto topology
+ dodoc topology/{TODO,README}
+
+ if use doc ; then
+ postgres-multi_foreach emake DESTDIR="${D}" comments-install
+
+ docinto html
+ postgres-multi_forbest dodoc doc/html/{postgis.html,style.css}
+
+ docinto html/images
+ postgres-multi_forbest dodoc doc/html/images/*
+ fi
+
+ use static-libs || find "${ED}" -name '*.a' -delete
+}
+
+pkg_postinst() {
+ ebegin "Refreshing PostgreSQL symlinks"
+ postgresql-config update
+ eend $?
+
+ elog "To finish installing PostGIS, follow the directions detailed at:"
+ elog "http://postgis.net/docs/manual-dev/postgis_installation.html#create_new_db_extensions"
+}
diff --git a/dev-db/postgresql-10.3 b/dev-db/postgresql-10.3
deleted file mode 100644
index 485cff390813..000000000000
--- a/dev-db/postgresql-10.3
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst postrm prepare prerm setup test
-DEPEND=>=app-eselect/eselect-postgresql-2.0 sys-apps/less virtual/libintl kerberos? ( virtual/krb5 ) ldap? ( net-nds/openldap ) pam? ( virtual/pam ) perl? ( >=dev-lang/perl-5.8:= ) python? ( python_single_target_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_single_target_python3_4? ( dev-lang/python:3.4 ) python_single_target_python3_5? ( dev-lang/python:3.5 ) python_single_target_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)?,python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] ) readline? ( sys-libs/readline:0= ) server? ( systemd? ( sys-apps/systemd ) ) ssl? ( !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) libressl? ( dev-libs/libressl:= ) ) tcl? ( >=dev-lang/tcl-8:0= ) xml? ( dev-libs/libxml2 dev-libs/libxslt ) zlib? ( sys-libs/zlib ) uuid? ( elibc_glibc? ( sys-apps/util-linux ) elibc_uclibc? ( sys-apps/util-linux ) elibc_musl? ( sys-apps/util-linux ) !elibc_glibc? ( !elibc_uclibc? ( !elibc_musl? ( !elibc_FreeBSD? ( !elibc_NetBSD? ( !elibc_OpenBSD? ( dev-libs/ossp-uuid ) ) ) ) ) ) ) !!<sys-apps/sandbox-2.0 sys-devel/bison sys-devel/flex nls? ( sys-devel/gettext ) xml? ( virtual/pkgconfig ) virtual/pkgconfig
-DESCRIPTION=PostgreSQL RDBMS
-EAPI=6
-HOMEPAGE=https://www.postgresql.org/
-IUSE=doc kerberos kernel_linux ldap libressl nls pam perl python +readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib elibc_glibc elibc_uclibc elibc_musl elibc_FreeBSD elibc_NetBSD elibc_OpenBSD kernel_linux python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 python_targets_python3_6 python_single_target_python2_7 python_single_target_python3_4 python_single_target_python3_5 python_single_target_python3_6
-KEYWORDS=alpha amd64 arm ~arm64 ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris
-LICENSE=POSTGRESQL GPL-2
-RDEPEND=>=app-eselect/eselect-postgresql-2.0 sys-apps/less virtual/libintl kerberos? ( virtual/krb5 ) ldap? ( net-nds/openldap ) pam? ( virtual/pam ) perl? ( >=dev-lang/perl-5.8:= ) python? ( python_single_target_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_single_target_python3_4? ( dev-lang/python:3.4 ) python_single_target_python3_5? ( dev-lang/python:3.5 ) python_single_target_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)?,python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] ) readline? ( sys-libs/readline:0= ) server? ( systemd? ( sys-apps/systemd ) ) ssl? ( !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) libressl? ( dev-libs/libressl:= ) ) tcl? ( >=dev-lang/tcl-8:0= ) xml? ( dev-libs/libxml2 dev-libs/libxslt ) zlib? ( sys-libs/zlib ) uuid? ( elibc_glibc? ( sys-apps/util-linux ) elibc_uclibc? ( sys-apps/util-linux ) elibc_musl? ( sys-apps/util-linux ) !elibc_glibc? ( !elibc_uclibc? ( !elibc_musl? ( !elibc_FreeBSD? ( !elibc_NetBSD? ( !elibc_OpenBSD? ( dev-libs/ossp-uuid ) ) ) ) ) ) ) !dev-db/postgresql-docs:10 !dev-db/postgresql-base:10 !dev-db/postgresql-server:10 selinux? ( sec-policy/selinux-postgresql )
-REQUIRED_USE=python? ( ^^ ( python_single_target_python2_7 python_single_target_python3_4 python_single_target_python3_5 python_single_target_python3_6 ) python_single_target_python2_7? ( python_targets_python2_7 ) python_single_target_python3_4? ( python_targets_python3_4 ) python_single_target_python3_5? ( python_targets_python3_5 ) python_single_target_python3_6? ( python_targets_python3_6 ) )
-SLOT=10
-SRC_URI=mirror://postgresql/source/v10.3/postgresql-10.3.tar.bz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 linux-info 8e77ea4def23d38cdf0e8ffa69187d34 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pam 3e788d86170dfcd5b06824d898315e18 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 python-single-r1 26fdbe5e685d53f67303a3a43d9e4848 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=91231ec0ab4ab405e334252839f94ec2
diff --git a/dev-db/postgresql-10.4 b/dev-db/postgresql-10.4
deleted file mode 100644
index 3aa33c542cc5..000000000000
--- a/dev-db/postgresql-10.4
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst postrm prepare prerm setup test
-DEPEND=>=app-eselect/eselect-postgresql-2.0 sys-apps/less virtual/libintl kerberos? ( virtual/krb5 ) ldap? ( net-nds/openldap ) pam? ( virtual/pam ) perl? ( >=dev-lang/perl-5.8:= ) python? ( python_single_target_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_single_target_python3_4? ( dev-lang/python:3.4 ) python_single_target_python3_5? ( dev-lang/python:3.5 ) python_single_target_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)?,python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] ) readline? ( sys-libs/readline:0= ) server? ( systemd? ( sys-apps/systemd ) ) ssl? ( !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) libressl? ( dev-libs/libressl:= ) ) tcl? ( >=dev-lang/tcl-8:0= ) xml? ( dev-libs/libxml2 dev-libs/libxslt ) zlib? ( sys-libs/zlib ) uuid? ( elibc_glibc? ( sys-apps/util-linux ) elibc_uclibc? ( sys-apps/util-linux ) elibc_musl? ( sys-apps/util-linux ) !elibc_glibc? ( !elibc_uclibc? ( !elibc_musl? ( !elibc_FreeBSD? ( !elibc_NetBSD? ( !elibc_OpenBSD? ( dev-libs/ossp-uuid ) ) ) ) ) ) ) !!<sys-apps/sandbox-2.0 sys-devel/bison sys-devel/flex nls? ( sys-devel/gettext ) xml? ( virtual/pkgconfig ) virtual/pkgconfig
-DESCRIPTION=PostgreSQL RDBMS
-EAPI=6
-HOMEPAGE=https://www.postgresql.org/
-IUSE=doc kerberos kernel_linux ldap libressl nls pam perl python +readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib elibc_glibc elibc_uclibc elibc_musl elibc_FreeBSD elibc_NetBSD elibc_OpenBSD kernel_linux python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 python_targets_python3_6 python_single_target_python2_7 python_single_target_python3_4 python_single_target_python3_5 python_single_target_python3_6
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris
-LICENSE=POSTGRESQL GPL-2
-RDEPEND=>=app-eselect/eselect-postgresql-2.0 sys-apps/less virtual/libintl kerberos? ( virtual/krb5 ) ldap? ( net-nds/openldap ) pam? ( virtual/pam ) perl? ( >=dev-lang/perl-5.8:= ) python? ( python_single_target_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_single_target_python3_4? ( dev-lang/python:3.4 ) python_single_target_python3_5? ( dev-lang/python:3.5 ) python_single_target_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)?,python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] ) readline? ( sys-libs/readline:0= ) server? ( systemd? ( sys-apps/systemd ) ) ssl? ( !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) libressl? ( dev-libs/libressl:= ) ) tcl? ( >=dev-lang/tcl-8:0= ) xml? ( dev-libs/libxml2 dev-libs/libxslt ) zlib? ( sys-libs/zlib ) uuid? ( elibc_glibc? ( sys-apps/util-linux ) elibc_uclibc? ( sys-apps/util-linux ) elibc_musl? ( sys-apps/util-linux ) !elibc_glibc? ( !elibc_uclibc? ( !elibc_musl? ( !elibc_FreeBSD? ( !elibc_NetBSD? ( !elibc_OpenBSD? ( dev-libs/ossp-uuid ) ) ) ) ) ) ) !dev-db/postgresql-docs:10 !dev-db/postgresql-base:10 !dev-db/postgresql-server:10 selinux? ( sec-policy/selinux-postgresql )
-REQUIRED_USE=python? ( ^^ ( python_single_target_python2_7 python_single_target_python3_4 python_single_target_python3_5 python_single_target_python3_6 ) python_single_target_python2_7? ( python_targets_python2_7 ) python_single_target_python3_4? ( python_targets_python3_4 ) python_single_target_python3_5? ( python_targets_python3_5 ) python_single_target_python3_6? ( python_targets_python3_6 ) )
-SLOT=10
-SRC_URI=mirror://postgresql/source/v10.4/postgresql-10.4.tar.bz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 linux-info 8e77ea4def23d38cdf0e8ffa69187d34 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pam 3e788d86170dfcd5b06824d898315e18 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 python-single-r1 26fdbe5e685d53f67303a3a43d9e4848 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=663236e1ab716bf73bc88f007f7393a6
diff --git a/dev-db/postgresql-11_beta1 b/dev-db/postgresql-11_beta1
deleted file mode 100644
index 6911d6df9be5..000000000000
--- a/dev-db/postgresql-11_beta1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst postrm prepare prerm setup test
-DEPEND=>=app-eselect/eselect-postgresql-2.0 sys-apps/less virtual/libintl kerberos? ( virtual/krb5 ) ldap? ( net-nds/openldap ) pam? ( virtual/pam ) perl? ( >=dev-lang/perl-5.8:= ) python? ( python_single_target_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_single_target_python3_4? ( dev-lang/python:3.4 ) python_single_target_python3_5? ( dev-lang/python:3.5 ) python_single_target_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)?,python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] ) readline? ( sys-libs/readline:0= ) server? ( systemd? ( sys-apps/systemd ) ) ssl? ( !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) libressl? ( dev-libs/libressl:= ) ) tcl? ( >=dev-lang/tcl-8:0= ) xml? ( dev-libs/libxml2 dev-libs/libxslt ) zlib? ( sys-libs/zlib ) uuid? ( elibc_glibc? ( sys-apps/util-linux ) elibc_uclibc? ( sys-apps/util-linux ) elibc_musl? ( sys-apps/util-linux ) !elibc_glibc? ( !elibc_uclibc? ( !elibc_musl? ( !elibc_FreeBSD? ( !elibc_NetBSD? ( !elibc_OpenBSD? ( dev-libs/ossp-uuid ) ) ) ) ) ) ) !!<sys-apps/sandbox-2.0 sys-devel/bison sys-devel/flex nls? ( sys-devel/gettext ) xml? ( virtual/pkgconfig ) virtual/pkgconfig
-DESCRIPTION=PostgreSQL RDBMS
-EAPI=6
-HOMEPAGE=http://www.postgresql.org/
-IUSE=doc kerberos kernel_linux ldap libressl nls pam perl python +readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib elibc_glibc elibc_uclibc elibc_musl elibc_FreeBSD elibc_NetBSD elibc_OpenBSD kernel_linux python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 python_targets_python3_6 python_single_target_python2_7 python_single_target_python3_4 python_single_target_python3_5 python_single_target_python3_6
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris
-LICENSE=POSTGRESQL GPL-2
-RDEPEND=>=app-eselect/eselect-postgresql-2.0 sys-apps/less virtual/libintl kerberos? ( virtual/krb5 ) ldap? ( net-nds/openldap ) pam? ( virtual/pam ) perl? ( >=dev-lang/perl-5.8:= ) python? ( python_single_target_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_single_target_python3_4? ( dev-lang/python:3.4 ) python_single_target_python3_5? ( dev-lang/python:3.5 ) python_single_target_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)?,python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] ) readline? ( sys-libs/readline:0= ) server? ( systemd? ( sys-apps/systemd ) ) ssl? ( !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) libressl? ( dev-libs/libressl:= ) ) tcl? ( >=dev-lang/tcl-8:0= ) xml? ( dev-libs/libxml2 dev-libs/libxslt ) zlib? ( sys-libs/zlib ) uuid? ( elibc_glibc? ( sys-apps/util-linux ) elibc_uclibc? ( sys-apps/util-linux ) elibc_musl? ( sys-apps/util-linux ) !elibc_glibc? ( !elibc_uclibc? ( !elibc_musl? ( !elibc_FreeBSD? ( !elibc_NetBSD? ( !elibc_OpenBSD? ( dev-libs/ossp-uuid ) ) ) ) ) ) ) !dev-db/postgresql-docs:11 !dev-db/postgresql-base:11 !dev-db/postgresql-server:11 selinux? ( sec-policy/selinux-postgresql )
-REQUIRED_USE=python? ( ^^ ( python_single_target_python2_7 python_single_target_python3_4 python_single_target_python3_5 python_single_target_python3_6 ) python_single_target_python2_7? ( python_targets_python2_7 ) python_single_target_python3_4? ( python_targets_python3_4 ) python_single_target_python3_5? ( python_targets_python3_5 ) python_single_target_python3_6? ( python_targets_python3_6 ) )
-SLOT=11
-SRC_URI=mirror://postgresql/source/v11beta1/postgresql-11beta1.tar.bz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 l10n 97f2753e3f1f3753d53d856c7c0bbb0b linux-info 8e77ea4def23d38cdf0e8ffa69187d34 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pam 3e788d86170dfcd5b06824d898315e18 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 python-single-r1 26fdbe5e685d53f67303a3a43d9e4848 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=5592cff382609afa066aa0e891a5a52f
diff --git a/dev-db/postgresql-9.3.22 b/dev-db/postgresql-9.3.22
deleted file mode 100644
index efb362512e5b..000000000000
--- a/dev-db/postgresql-9.3.22
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst postrm preinst prepare prerm setup test
-DEPEND=>=app-eselect/eselect-postgresql-2.0 sys-apps/less virtual/libintl kerberos? ( virtual/krb5 ) ldap? ( net-nds/openldap ) pam? ( virtual/pam ) perl? ( >=dev-lang/perl-5.8:= ) python? ( python_single_target_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_single_target_python3_4? ( dev-lang/python:3.4 ) python_single_target_python3_5? ( dev-lang/python:3.5 ) python_single_target_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)?,python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] ) readline? ( sys-libs/readline:0= ) ssl? ( !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) libressl? ( dev-libs/libressl:= ) ) tcl? ( >=dev-lang/tcl-8:0= ) uuid? ( dev-libs/ossp-uuid ) xml? ( dev-libs/libxml2 dev-libs/libxslt ) zlib? ( sys-libs/zlib ) !!<sys-apps/sandbox-2.0 sys-devel/bison sys-devel/flex nls? ( sys-devel/gettext ) xml? ( virtual/pkgconfig ) virtual/pkgconfig
-DESCRIPTION=PostgreSQL RDBMS
-EAPI=6
-HOMEPAGE=https://www.postgresql.org/
-IUSE=doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python +readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib kernel_linux python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 python_targets_python3_6 python_single_target_python2_7 python_single_target_python3_4 python_single_target_python3_5 python_single_target_python3_6
-KEYWORDS=alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris
-LICENSE=POSTGRESQL GPL-2
-RDEPEND=>=app-eselect/eselect-postgresql-2.0 sys-apps/less virtual/libintl kerberos? ( virtual/krb5 ) ldap? ( net-nds/openldap ) pam? ( virtual/pam ) perl? ( >=dev-lang/perl-5.8:= ) python? ( python_single_target_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_single_target_python3_4? ( dev-lang/python:3.4 ) python_single_target_python3_5? ( dev-lang/python:3.5 ) python_single_target_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)?,python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] ) readline? ( sys-libs/readline:0= ) ssl? ( !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) libressl? ( dev-libs/libressl:= ) ) tcl? ( >=dev-lang/tcl-8:0= ) uuid? ( dev-libs/ossp-uuid ) xml? ( dev-libs/libxml2 dev-libs/libxslt ) zlib? ( sys-libs/zlib ) !dev-db/postgresql-docs:9.3 !dev-db/postgresql-base:9.3 !dev-db/postgresql-server:9.3 selinux? ( sec-policy/selinux-postgresql )
-REQUIRED_USE=python? ( ^^ ( python_single_target_python2_7 python_single_target_python3_4 python_single_target_python3_5 python_single_target_python3_6 ) python_single_target_python2_7? ( python_targets_python2_7 ) python_single_target_python3_4? ( python_targets_python3_4 ) python_single_target_python3_5? ( python_targets_python3_5 ) python_single_target_python3_6? ( python_targets_python3_6 ) )
-SLOT=9.3
-SRC_URI=mirror://postgresql/source/v9.3.22/postgresql-9.3.22.tar.bz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 linux-info 8e77ea4def23d38cdf0e8ffa69187d34 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pam 3e788d86170dfcd5b06824d898315e18 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 python-single-r1 26fdbe5e685d53f67303a3a43d9e4848 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=4d6290a256d65d87f457006161579894
diff --git a/dev-db/postgresql-9.3.23 b/dev-db/postgresql-9.3.23
deleted file mode 100644
index 25f767abb7d8..000000000000
--- a/dev-db/postgresql-9.3.23
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst postrm preinst prepare prerm setup test
-DEPEND=>=app-eselect/eselect-postgresql-2.0 sys-apps/less virtual/libintl kerberos? ( virtual/krb5 ) ldap? ( net-nds/openldap ) pam? ( virtual/pam ) perl? ( >=dev-lang/perl-5.8:= ) python? ( python_single_target_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_single_target_python3_4? ( dev-lang/python:3.4 ) python_single_target_python3_5? ( dev-lang/python:3.5 ) python_single_target_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)?,python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] ) readline? ( sys-libs/readline:0= ) ssl? ( !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) libressl? ( dev-libs/libressl:= ) ) tcl? ( >=dev-lang/tcl-8:0= ) uuid? ( dev-libs/ossp-uuid ) xml? ( dev-libs/libxml2 dev-libs/libxslt ) zlib? ( sys-libs/zlib ) !!<sys-apps/sandbox-2.0 sys-devel/bison sys-devel/flex nls? ( sys-devel/gettext ) xml? ( virtual/pkgconfig ) virtual/pkgconfig
-DESCRIPTION=PostgreSQL RDBMS
-EAPI=6
-HOMEPAGE=https://www.postgresql.org/
-IUSE=doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python +readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib kernel_linux python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 python_targets_python3_6 python_single_target_python2_7 python_single_target_python3_4 python_single_target_python3_5 python_single_target_python3_6
-KEYWORDS=~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris
-LICENSE=POSTGRESQL GPL-2
-RDEPEND=>=app-eselect/eselect-postgresql-2.0 sys-apps/less virtual/libintl kerberos? ( virtual/krb5 ) ldap? ( net-nds/openldap ) pam? ( virtual/pam ) perl? ( >=dev-lang/perl-5.8:= ) python? ( python_single_target_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_single_target_python3_4? ( dev-lang/python:3.4 ) python_single_target_python3_5? ( dev-lang/python:3.5 ) python_single_target_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)?,python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] ) readline? ( sys-libs/readline:0= ) ssl? ( !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) libressl? ( dev-libs/libressl:= ) ) tcl? ( >=dev-lang/tcl-8:0= ) uuid? ( dev-libs/ossp-uuid ) xml? ( dev-libs/libxml2 dev-libs/libxslt ) zlib? ( sys-libs/zlib ) !dev-db/postgresql-docs:9.3 !dev-db/postgresql-base:9.3 !dev-db/postgresql-server:9.3 selinux? ( sec-policy/selinux-postgresql )
-REQUIRED_USE=python? ( ^^ ( python_single_target_python2_7 python_single_target_python3_4 python_single_target_python3_5 python_single_target_python3_6 ) python_single_target_python2_7? ( python_targets_python2_7 ) python_single_target_python3_4? ( python_targets_python3_4 ) python_single_target_python3_5? ( python_targets_python3_5 ) python_single_target_python3_6? ( python_targets_python3_6 ) )
-SLOT=9.3
-SRC_URI=mirror://postgresql/source/v9.3.23/postgresql-9.3.23.tar.bz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 linux-info 8e77ea4def23d38cdf0e8ffa69187d34 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pam 3e788d86170dfcd5b06824d898315e18 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 python-single-r1 26fdbe5e685d53f67303a3a43d9e4848 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=9fa2e52836a7d0a395a9631e7a9b0229
diff --git a/dev-db/postgresql-9.4.17 b/dev-db/postgresql-9.4.17
deleted file mode 100644
index 6e3a1756ca64..000000000000
--- a/dev-db/postgresql-9.4.17
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst postrm preinst prepare prerm setup test
-DEPEND=>=app-eselect/eselect-postgresql-2.0 sys-apps/less virtual/libintl kerberos? ( virtual/krb5 ) ldap? ( net-nds/openldap ) pam? ( virtual/pam ) perl? ( >=dev-lang/perl-5.8:= ) python? ( python_single_target_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_single_target_python3_4? ( dev-lang/python:3.4 ) python_single_target_python3_5? ( dev-lang/python:3.5 ) python_single_target_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)?,python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] ) readline? ( sys-libs/readline:0= ) ssl? ( !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) libressl? ( dev-libs/libressl:= ) ) tcl? ( >=dev-lang/tcl-8:0= ) xml? ( dev-libs/libxml2 dev-libs/libxslt ) zlib? ( sys-libs/zlib ) uuid? ( elibc_glibc? ( sys-apps/util-linux ) elibc_uclibc? ( sys-apps/util-linux ) elibc_musl? ( sys-apps/util-linux ) !elibc_glibc? ( !elibc_uclibc? ( !elibc_musl? ( !elibc_FreeBSD? ( !elibc_NetBSD? ( !elibc_OpenBSD? ( dev-libs/ossp-uuid ) ) ) ) ) ) ) !!<sys-apps/sandbox-2.0 sys-devel/bison sys-devel/flex nls? ( sys-devel/gettext ) xml? ( virtual/pkgconfig ) virtual/pkgconfig
-DESCRIPTION=PostgreSQL RDBMS
-EAPI=6
-HOMEPAGE=https://www.postgresql.org/
-IUSE=doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python +readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib elibc_glibc elibc_uclibc elibc_musl elibc_FreeBSD elibc_NetBSD elibc_OpenBSD kernel_linux python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 python_targets_python3_6 python_single_target_python2_7 python_single_target_python3_4 python_single_target_python3_5 python_single_target_python3_6
-KEYWORDS=alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris
-LICENSE=POSTGRESQL GPL-2
-RDEPEND=>=app-eselect/eselect-postgresql-2.0 sys-apps/less virtual/libintl kerberos? ( virtual/krb5 ) ldap? ( net-nds/openldap ) pam? ( virtual/pam ) perl? ( >=dev-lang/perl-5.8:= ) python? ( python_single_target_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_single_target_python3_4? ( dev-lang/python:3.4 ) python_single_target_python3_5? ( dev-lang/python:3.5 ) python_single_target_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)?,python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] ) readline? ( sys-libs/readline:0= ) ssl? ( !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) libressl? ( dev-libs/libressl:= ) ) tcl? ( >=dev-lang/tcl-8:0= ) xml? ( dev-libs/libxml2 dev-libs/libxslt ) zlib? ( sys-libs/zlib ) uuid? ( elibc_glibc? ( sys-apps/util-linux ) elibc_uclibc? ( sys-apps/util-linux ) elibc_musl? ( sys-apps/util-linux ) !elibc_glibc? ( !elibc_uclibc? ( !elibc_musl? ( !elibc_FreeBSD? ( !elibc_NetBSD? ( !elibc_OpenBSD? ( dev-libs/ossp-uuid ) ) ) ) ) ) ) !dev-db/postgresql-docs:9.4 !dev-db/postgresql-base:9.4 !dev-db/postgresql-server:9.4 selinux? ( sec-policy/selinux-postgresql )
-REQUIRED_USE=python? ( ^^ ( python_single_target_python2_7 python_single_target_python3_4 python_single_target_python3_5 python_single_target_python3_6 ) python_single_target_python2_7? ( python_targets_python2_7 ) python_single_target_python3_4? ( python_targets_python3_4 ) python_single_target_python3_5? ( python_targets_python3_5 ) python_single_target_python3_6? ( python_targets_python3_6 ) )
-SLOT=9.4
-SRC_URI=mirror://postgresql/source/v9.4.17/postgresql-9.4.17.tar.bz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 linux-info 8e77ea4def23d38cdf0e8ffa69187d34 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pam 3e788d86170dfcd5b06824d898315e18 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 python-single-r1 26fdbe5e685d53f67303a3a43d9e4848 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=b2407a41f3f00269f3897617372adbe2
diff --git a/dev-db/postgresql-9.4.18 b/dev-db/postgresql-9.4.18
deleted file mode 100644
index 93c64516c0ec..000000000000
--- a/dev-db/postgresql-9.4.18
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst postrm preinst prepare prerm setup test
-DEPEND=>=app-eselect/eselect-postgresql-2.0 sys-apps/less virtual/libintl kerberos? ( virtual/krb5 ) ldap? ( net-nds/openldap ) pam? ( virtual/pam ) perl? ( >=dev-lang/perl-5.8:= ) python? ( python_single_target_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_single_target_python3_4? ( dev-lang/python:3.4 ) python_single_target_python3_5? ( dev-lang/python:3.5 ) python_single_target_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)?,python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] ) readline? ( sys-libs/readline:0= ) ssl? ( !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) libressl? ( dev-libs/libressl:= ) ) tcl? ( >=dev-lang/tcl-8:0= ) xml? ( dev-libs/libxml2 dev-libs/libxslt ) zlib? ( sys-libs/zlib ) uuid? ( elibc_glibc? ( sys-apps/util-linux ) elibc_uclibc? ( sys-apps/util-linux ) elibc_musl? ( sys-apps/util-linux ) !elibc_glibc? ( !elibc_uclibc? ( !elibc_musl? ( !elibc_FreeBSD? ( !elibc_NetBSD? ( !elibc_OpenBSD? ( dev-libs/ossp-uuid ) ) ) ) ) ) ) !!<sys-apps/sandbox-2.0 sys-devel/bison sys-devel/flex nls? ( sys-devel/gettext ) xml? ( virtual/pkgconfig ) virtual/pkgconfig
-DESCRIPTION=PostgreSQL RDBMS
-EAPI=6
-HOMEPAGE=https://www.postgresql.org/
-IUSE=doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python +readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib elibc_glibc elibc_uclibc elibc_musl elibc_FreeBSD elibc_NetBSD elibc_OpenBSD kernel_linux python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 python_targets_python3_6 python_single_target_python2_7 python_single_target_python3_4 python_single_target_python3_5 python_single_target_python3_6
-KEYWORDS=~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris
-LICENSE=POSTGRESQL GPL-2
-RDEPEND=>=app-eselect/eselect-postgresql-2.0 sys-apps/less virtual/libintl kerberos? ( virtual/krb5 ) ldap? ( net-nds/openldap ) pam? ( virtual/pam ) perl? ( >=dev-lang/perl-5.8:= ) python? ( python_single_target_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_single_target_python3_4? ( dev-lang/python:3.4 ) python_single_target_python3_5? ( dev-lang/python:3.5 ) python_single_target_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)?,python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] ) readline? ( sys-libs/readline:0= ) ssl? ( !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) libressl? ( dev-libs/libressl:= ) ) tcl? ( >=dev-lang/tcl-8:0= ) xml? ( dev-libs/libxml2 dev-libs/libxslt ) zlib? ( sys-libs/zlib ) uuid? ( elibc_glibc? ( sys-apps/util-linux ) elibc_uclibc? ( sys-apps/util-linux ) elibc_musl? ( sys-apps/util-linux ) !elibc_glibc? ( !elibc_uclibc? ( !elibc_musl? ( !elibc_FreeBSD? ( !elibc_NetBSD? ( !elibc_OpenBSD? ( dev-libs/ossp-uuid ) ) ) ) ) ) ) !dev-db/postgresql-docs:9.4 !dev-db/postgresql-base:9.4 !dev-db/postgresql-server:9.4 selinux? ( sec-policy/selinux-postgresql )
-REQUIRED_USE=python? ( ^^ ( python_single_target_python2_7 python_single_target_python3_4 python_single_target_python3_5 python_single_target_python3_6 ) python_single_target_python2_7? ( python_targets_python2_7 ) python_single_target_python3_4? ( python_targets_python3_4 ) python_single_target_python3_5? ( python_targets_python3_5 ) python_single_target_python3_6? ( python_targets_python3_6 ) )
-SLOT=9.4
-SRC_URI=mirror://postgresql/source/v9.4.18/postgresql-9.4.18.tar.bz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 linux-info 8e77ea4def23d38cdf0e8ffa69187d34 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pam 3e788d86170dfcd5b06824d898315e18 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 python-single-r1 26fdbe5e685d53f67303a3a43d9e4848 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=d086d90eeb3a616a80164f4f8a7f0123
diff --git a/dev-db/postgresql-9.5.12 b/dev-db/postgresql-9.5.12
deleted file mode 100644
index 6c1577c9d7a3..000000000000
--- a/dev-db/postgresql-9.5.12
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst postrm preinst prepare prerm setup test
-DEPEND=>=app-eselect/eselect-postgresql-2.0 sys-apps/less virtual/libintl kerberos? ( virtual/krb5 ) ldap? ( net-nds/openldap ) pam? ( virtual/pam ) perl? ( >=dev-lang/perl-5.8:= ) python? ( python_single_target_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_single_target_python3_4? ( dev-lang/python:3.4 ) python_single_target_python3_5? ( dev-lang/python:3.5 ) python_single_target_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)?,python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] ) readline? ( sys-libs/readline:0= ) ssl? ( !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) libressl? ( dev-libs/libressl:= ) ) tcl? ( >=dev-lang/tcl-8:0= ) xml? ( dev-libs/libxml2 dev-libs/libxslt ) zlib? ( sys-libs/zlib ) uuid? ( elibc_glibc? ( sys-apps/util-linux ) elibc_uclibc? ( sys-apps/util-linux ) elibc_musl? ( sys-apps/util-linux ) !elibc_glibc? ( !elibc_uclibc? ( !elibc_musl? ( !elibc_FreeBSD? ( !elibc_NetBSD? ( !elibc_OpenBSD? ( dev-libs/ossp-uuid ) ) ) ) ) ) ) !!<sys-apps/sandbox-2.0 sys-devel/bison sys-devel/flex nls? ( sys-devel/gettext ) xml? ( virtual/pkgconfig ) virtual/pkgconfig
-DESCRIPTION=PostgreSQL RDBMS
-EAPI=6
-HOMEPAGE=https://www.postgresql.org/
-IUSE=doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python +readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib elibc_glibc elibc_uclibc elibc_musl elibc_FreeBSD elibc_NetBSD elibc_OpenBSD kernel_linux python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 python_targets_python3_6 python_single_target_python2_7 python_single_target_python3_4 python_single_target_python3_5 python_single_target_python3_6
-KEYWORDS=alpha amd64 arm ~arm64 ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris
-LICENSE=POSTGRESQL GPL-2
-RDEPEND=>=app-eselect/eselect-postgresql-2.0 sys-apps/less virtual/libintl kerberos? ( virtual/krb5 ) ldap? ( net-nds/openldap ) pam? ( virtual/pam ) perl? ( >=dev-lang/perl-5.8:= ) python? ( python_single_target_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_single_target_python3_4? ( dev-lang/python:3.4 ) python_single_target_python3_5? ( dev-lang/python:3.5 ) python_single_target_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)?,python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] ) readline? ( sys-libs/readline:0= ) ssl? ( !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) libressl? ( dev-libs/libressl:= ) ) tcl? ( >=dev-lang/tcl-8:0= ) xml? ( dev-libs/libxml2 dev-libs/libxslt ) zlib? ( sys-libs/zlib ) uuid? ( elibc_glibc? ( sys-apps/util-linux ) elibc_uclibc? ( sys-apps/util-linux ) elibc_musl? ( sys-apps/util-linux ) !elibc_glibc? ( !elibc_uclibc? ( !elibc_musl? ( !elibc_FreeBSD? ( !elibc_NetBSD? ( !elibc_OpenBSD? ( dev-libs/ossp-uuid ) ) ) ) ) ) ) !dev-db/postgresql-docs:9.5 !dev-db/postgresql-base:9.5 !dev-db/postgresql-server:9.5 selinux? ( sec-policy/selinux-postgresql )
-REQUIRED_USE=python? ( ^^ ( python_single_target_python2_7 python_single_target_python3_4 python_single_target_python3_5 python_single_target_python3_6 ) python_single_target_python2_7? ( python_targets_python2_7 ) python_single_target_python3_4? ( python_targets_python3_4 ) python_single_target_python3_5? ( python_targets_python3_5 ) python_single_target_python3_6? ( python_targets_python3_6 ) )
-SLOT=9.5
-SRC_URI=mirror://postgresql/source/v9.5.12/postgresql-9.5.12.tar.bz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 linux-info 8e77ea4def23d38cdf0e8ffa69187d34 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pam 3e788d86170dfcd5b06824d898315e18 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 python-single-r1 26fdbe5e685d53f67303a3a43d9e4848 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=43784dd583275cbce52f3f805283d605
diff --git a/dev-db/postgresql-9.5.13 b/dev-db/postgresql-9.5.13
deleted file mode 100644
index 4f6006d851d2..000000000000
--- a/dev-db/postgresql-9.5.13
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst postrm preinst prepare prerm setup test
-DEPEND=>=app-eselect/eselect-postgresql-2.0 sys-apps/less virtual/libintl kerberos? ( virtual/krb5 ) ldap? ( net-nds/openldap ) pam? ( virtual/pam ) perl? ( >=dev-lang/perl-5.8:= ) python? ( python_single_target_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_single_target_python3_4? ( dev-lang/python:3.4 ) python_single_target_python3_5? ( dev-lang/python:3.5 ) python_single_target_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)?,python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] ) readline? ( sys-libs/readline:0= ) ssl? ( !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) libressl? ( dev-libs/libressl:= ) ) tcl? ( >=dev-lang/tcl-8:0= ) xml? ( dev-libs/libxml2 dev-libs/libxslt ) zlib? ( sys-libs/zlib ) uuid? ( elibc_glibc? ( sys-apps/util-linux ) elibc_uclibc? ( sys-apps/util-linux ) elibc_musl? ( sys-apps/util-linux ) !elibc_glibc? ( !elibc_uclibc? ( !elibc_musl? ( !elibc_FreeBSD? ( !elibc_NetBSD? ( !elibc_OpenBSD? ( dev-libs/ossp-uuid ) ) ) ) ) ) ) !!<sys-apps/sandbox-2.0 sys-devel/bison sys-devel/flex nls? ( sys-devel/gettext ) xml? ( virtual/pkgconfig ) virtual/pkgconfig
-DESCRIPTION=PostgreSQL RDBMS
-EAPI=6
-HOMEPAGE=https://www.postgresql.org/
-IUSE=doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python +readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib elibc_glibc elibc_uclibc elibc_musl elibc_FreeBSD elibc_NetBSD elibc_OpenBSD kernel_linux python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 python_targets_python3_6 python_single_target_python2_7 python_single_target_python3_4 python_single_target_python3_5 python_single_target_python3_6
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris
-LICENSE=POSTGRESQL GPL-2
-RDEPEND=>=app-eselect/eselect-postgresql-2.0 sys-apps/less virtual/libintl kerberos? ( virtual/krb5 ) ldap? ( net-nds/openldap ) pam? ( virtual/pam ) perl? ( >=dev-lang/perl-5.8:= ) python? ( python_single_target_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_single_target_python3_4? ( dev-lang/python:3.4 ) python_single_target_python3_5? ( dev-lang/python:3.5 ) python_single_target_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)?,python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] ) readline? ( sys-libs/readline:0= ) ssl? ( !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) libressl? ( dev-libs/libressl:= ) ) tcl? ( >=dev-lang/tcl-8:0= ) xml? ( dev-libs/libxml2 dev-libs/libxslt ) zlib? ( sys-libs/zlib ) uuid? ( elibc_glibc? ( sys-apps/util-linux ) elibc_uclibc? ( sys-apps/util-linux ) elibc_musl? ( sys-apps/util-linux ) !elibc_glibc? ( !elibc_uclibc? ( !elibc_musl? ( !elibc_FreeBSD? ( !elibc_NetBSD? ( !elibc_OpenBSD? ( dev-libs/ossp-uuid ) ) ) ) ) ) ) !dev-db/postgresql-docs:9.5 !dev-db/postgresql-base:9.5 !dev-db/postgresql-server:9.5 selinux? ( sec-policy/selinux-postgresql )
-REQUIRED_USE=python? ( ^^ ( python_single_target_python2_7 python_single_target_python3_4 python_single_target_python3_5 python_single_target_python3_6 ) python_single_target_python2_7? ( python_targets_python2_7 ) python_single_target_python3_4? ( python_targets_python3_4 ) python_single_target_python3_5? ( python_targets_python3_5 ) python_single_target_python3_6? ( python_targets_python3_6 ) )
-SLOT=9.5
-SRC_URI=mirror://postgresql/source/v9.5.13/postgresql-9.5.13.tar.bz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 linux-info 8e77ea4def23d38cdf0e8ffa69187d34 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pam 3e788d86170dfcd5b06824d898315e18 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 python-single-r1 26fdbe5e685d53f67303a3a43d9e4848 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=26cd0c11f0f5d87db42e55e17df9ec3f
diff --git a/dev-db/postgresql-9.6.8 b/dev-db/postgresql-9.6.8
deleted file mode 100644
index 278e149cb805..000000000000
--- a/dev-db/postgresql-9.6.8
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst postrm preinst prepare prerm setup test
-DEPEND=>=app-eselect/eselect-postgresql-2.0 sys-apps/less virtual/libintl kerberos? ( virtual/krb5 ) ldap? ( net-nds/openldap ) pam? ( virtual/pam ) perl? ( >=dev-lang/perl-5.8:= ) python? ( python_single_target_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_single_target_python3_4? ( dev-lang/python:3.4 ) python_single_target_python3_5? ( dev-lang/python:3.5 ) python_single_target_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)?,python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] ) readline? ( sys-libs/readline:0= ) ssl? ( !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) libressl? ( dev-libs/libressl:= ) ) server? ( systemd? ( sys-apps/systemd ) ) tcl? ( >=dev-lang/tcl-8:0= ) xml? ( dev-libs/libxml2 dev-libs/libxslt ) zlib? ( sys-libs/zlib ) uuid? ( elibc_glibc? ( sys-apps/util-linux ) elibc_uclibc? ( sys-apps/util-linux ) elibc_musl? ( sys-apps/util-linux ) !elibc_glibc? ( !elibc_uclibc? ( !elibc_musl? ( !elibc_FreeBSD? ( !elibc_NetBSD? ( !elibc_OpenBSD? ( dev-libs/ossp-uuid ) ) ) ) ) ) ) !!<sys-apps/sandbox-2.0 sys-devel/bison sys-devel/flex nls? ( sys-devel/gettext ) xml? ( virtual/pkgconfig ) virtual/pkgconfig
-DESCRIPTION=PostgreSQL RDBMS
-EAPI=6
-HOMEPAGE=https://www.postgresql.org/
-IUSE=doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python +readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib elibc_glibc elibc_uclibc elibc_musl elibc_FreeBSD elibc_NetBSD elibc_OpenBSD kernel_linux python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 python_targets_python3_6 python_single_target_python2_7 python_single_target_python3_4 python_single_target_python3_5 python_single_target_python3_6
-KEYWORDS=alpha amd64 arm ~arm64 ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris
-LICENSE=POSTGRESQL GPL-2
-RDEPEND=>=app-eselect/eselect-postgresql-2.0 sys-apps/less virtual/libintl kerberos? ( virtual/krb5 ) ldap? ( net-nds/openldap ) pam? ( virtual/pam ) perl? ( >=dev-lang/perl-5.8:= ) python? ( python_single_target_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_single_target_python3_4? ( dev-lang/python:3.4 ) python_single_target_python3_5? ( dev-lang/python:3.5 ) python_single_target_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)?,python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] ) readline? ( sys-libs/readline:0= ) ssl? ( !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) libressl? ( dev-libs/libressl:= ) ) server? ( systemd? ( sys-apps/systemd ) ) tcl? ( >=dev-lang/tcl-8:0= ) xml? ( dev-libs/libxml2 dev-libs/libxslt ) zlib? ( sys-libs/zlib ) uuid? ( elibc_glibc? ( sys-apps/util-linux ) elibc_uclibc? ( sys-apps/util-linux ) elibc_musl? ( sys-apps/util-linux ) !elibc_glibc? ( !elibc_uclibc? ( !elibc_musl? ( !elibc_FreeBSD? ( !elibc_NetBSD? ( !elibc_OpenBSD? ( dev-libs/ossp-uuid ) ) ) ) ) ) ) !dev-db/postgresql-docs:9.6 !dev-db/postgresql-base:9.6 !dev-db/postgresql-server:9.6 selinux? ( sec-policy/selinux-postgresql )
-REQUIRED_USE=python? ( ^^ ( python_single_target_python2_7 python_single_target_python3_4 python_single_target_python3_5 python_single_target_python3_6 ) python_single_target_python2_7? ( python_targets_python2_7 ) python_single_target_python3_4? ( python_targets_python3_4 ) python_single_target_python3_5? ( python_targets_python3_5 ) python_single_target_python3_6? ( python_targets_python3_6 ) )
-SLOT=9.6
-SRC_URI=mirror://postgresql/source/v9.6.8/postgresql-9.6.8.tar.bz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 linux-info 8e77ea4def23d38cdf0e8ffa69187d34 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pam 3e788d86170dfcd5b06824d898315e18 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 python-single-r1 26fdbe5e685d53f67303a3a43d9e4848 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=e08a9acb34aa3bb90c8c28bda1d848bc
diff --git a/dev-db/postgresql-9.6.9 b/dev-db/postgresql-9.6.9
deleted file mode 100644
index 9733d6a76422..000000000000
--- a/dev-db/postgresql-9.6.9
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst postrm preinst prepare prerm setup test
-DEPEND=>=app-eselect/eselect-postgresql-2.0 sys-apps/less virtual/libintl kerberos? ( virtual/krb5 ) ldap? ( net-nds/openldap ) pam? ( virtual/pam ) perl? ( >=dev-lang/perl-5.8:= ) python? ( python_single_target_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_single_target_python3_4? ( dev-lang/python:3.4 ) python_single_target_python3_5? ( dev-lang/python:3.5 ) python_single_target_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)?,python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] ) readline? ( sys-libs/readline:0= ) ssl? ( !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) libressl? ( dev-libs/libressl:= ) ) server? ( systemd? ( sys-apps/systemd ) ) tcl? ( >=dev-lang/tcl-8:0= ) xml? ( dev-libs/libxml2 dev-libs/libxslt ) zlib? ( sys-libs/zlib ) uuid? ( elibc_glibc? ( sys-apps/util-linux ) elibc_uclibc? ( sys-apps/util-linux ) elibc_musl? ( sys-apps/util-linux ) !elibc_glibc? ( !elibc_uclibc? ( !elibc_musl? ( !elibc_FreeBSD? ( !elibc_NetBSD? ( !elibc_OpenBSD? ( dev-libs/ossp-uuid ) ) ) ) ) ) ) !!<sys-apps/sandbox-2.0 sys-devel/bison sys-devel/flex nls? ( sys-devel/gettext ) xml? ( virtual/pkgconfig ) virtual/pkgconfig
-DESCRIPTION=PostgreSQL RDBMS
-EAPI=6
-HOMEPAGE=https://www.postgresql.org/
-IUSE=doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python +readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib elibc_glibc elibc_uclibc elibc_musl elibc_FreeBSD elibc_NetBSD elibc_OpenBSD kernel_linux python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 python_targets_python3_6 python_single_target_python2_7 python_single_target_python3_4 python_single_target_python3_5 python_single_target_python3_6
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris
-LICENSE=POSTGRESQL GPL-2
-RDEPEND=>=app-eselect/eselect-postgresql-2.0 sys-apps/less virtual/libintl kerberos? ( virtual/krb5 ) ldap? ( net-nds/openldap ) pam? ( virtual/pam ) perl? ( >=dev-lang/perl-5.8:= ) python? ( python_single_target_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_single_target_python3_4? ( dev-lang/python:3.4 ) python_single_target_python3_5? ( dev-lang/python:3.5 ) python_single_target_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)?,python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] ) readline? ( sys-libs/readline:0= ) ssl? ( !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) libressl? ( dev-libs/libressl:= ) ) server? ( systemd? ( sys-apps/systemd ) ) tcl? ( >=dev-lang/tcl-8:0= ) xml? ( dev-libs/libxml2 dev-libs/libxslt ) zlib? ( sys-libs/zlib ) uuid? ( elibc_glibc? ( sys-apps/util-linux ) elibc_uclibc? ( sys-apps/util-linux ) elibc_musl? ( sys-apps/util-linux ) !elibc_glibc? ( !elibc_uclibc? ( !elibc_musl? ( !elibc_FreeBSD? ( !elibc_NetBSD? ( !elibc_OpenBSD? ( dev-libs/ossp-uuid ) ) ) ) ) ) ) !dev-db/postgresql-docs:9.6 !dev-db/postgresql-base:9.6 !dev-db/postgresql-server:9.6 selinux? ( sec-policy/selinux-postgresql )
-REQUIRED_USE=python? ( ^^ ( python_single_target_python2_7 python_single_target_python3_4 python_single_target_python3_5 python_single_target_python3_6 ) python_single_target_python2_7? ( python_targets_python2_7 ) python_single_target_python3_4? ( python_targets_python3_4 ) python_single_target_python3_5? ( python_targets_python3_5 ) python_single_target_python3_6? ( python_targets_python3_6 ) )
-SLOT=9.6
-SRC_URI=mirror://postgresql/source/v9.6.9/postgresql-9.6.9.tar.bz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 linux-info 8e77ea4def23d38cdf0e8ffa69187d34 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pam 3e788d86170dfcd5b06824d898315e18 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 python-single-r1 26fdbe5e685d53f67303a3a43d9e4848 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=3f2057c427eabae393ec320b2dd0774b
diff --git a/dev-db/postgresql-9999 b/dev-db/postgresql-9999
deleted file mode 100644
index 56f6885344bf..000000000000
--- a/dev-db/postgresql-9999
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile config configure install postinst postrm preinst prepare prerm pretend setup test unpack
-DEPEND=>=app-eselect/eselect-postgresql-2.0 sys-apps/less virtual/libintl kerberos? ( virtual/krb5 ) ldap? ( net-nds/openldap ) pam? ( virtual/pam ) perl? ( >=dev-lang/perl-5.8:= ) python? ( python_single_target_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_single_target_python3_4? ( dev-lang/python:3.4 ) python_single_target_python3_5? ( dev-lang/python:3.5 ) python_single_target_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)?,python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] ) readline? ( sys-libs/readline:0= ) ssl? ( !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) libressl? ( dev-libs/libressl:= ) ) server? ( systemd? ( sys-apps/systemd ) ) tcl? ( >=dev-lang/tcl-8:0= ) uuid? ( dev-libs/ossp-uuid ) xml? ( dev-libs/libxml2 dev-libs/libxslt ) zlib? ( sys-libs/zlib ) !!<sys-apps/sandbox-2.0 >=dev-lang/perl-5.8 app-text/docbook-dsssl-stylesheets app-text/docbook-sgml-dtd:4.2 app-text/docbook-xml-dtd:4.2 app-text/docbook-xsl-stylesheets app-text/openjade dev-libs/libxml2 dev-libs/libxslt sys-devel/bison sys-devel/flex nls? ( sys-devel/gettext ) xml? ( virtual/pkgconfig ) >=dev-vcs/git-1.8.2.1[curl] virtual/pkgconfig
-DESCRIPTION=PostgreSQL RDBMS
-EAPI=6
-HOMEPAGE=https://www.postgresql.org/
-IUSE=kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python +readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib kernel_linux python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 python_targets_python3_6 python_single_target_python2_7 python_single_target_python3_4 python_single_target_python3_5 python_single_target_python3_6
-LICENSE=POSTGRESQL GPL-2
-RDEPEND=>=app-eselect/eselect-postgresql-2.0 sys-apps/less virtual/libintl kerberos? ( virtual/krb5 ) ldap? ( net-nds/openldap ) pam? ( virtual/pam ) perl? ( >=dev-lang/perl-5.8:= ) python? ( python_single_target_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_single_target_python3_4? ( dev-lang/python:3.4 ) python_single_target_python3_5? ( dev-lang/python:3.5 ) python_single_target_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)?,python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?] ) readline? ( sys-libs/readline:0= ) ssl? ( !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) libressl? ( dev-libs/libressl:= ) ) server? ( systemd? ( sys-apps/systemd ) ) tcl? ( >=dev-lang/tcl-8:0= ) uuid? ( dev-libs/ossp-uuid ) xml? ( dev-libs/libxml2 dev-libs/libxslt ) zlib? ( sys-libs/zlib ) !dev-db/postgresql-docs:12 !dev-db/postgresql-base:12 !dev-db/postgresql-server:12 selinux? ( sec-policy/selinux-postgresql )
-REQUIRED_USE=python? ( ^^ ( python_single_target_python2_7 python_single_target_python3_4 python_single_target_python3_5 python_single_target_python3_6 ) python_single_target_python2_7? ( python_targets_python2_7 ) python_single_target_python3_4? ( python_targets_python3_4 ) python_single_target_python3_5? ( python_targets_python3_5 ) python_single_target_python3_6? ( python_targets_python3_6 ) )
-SLOT=12
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 git-r3 8f6de46b0aa318aea0e8cac62ece098b linux-info 8e77ea4def23d38cdf0e8ffa69187d34 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pam 3e788d86170dfcd5b06824d898315e18 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 python-single-r1 26fdbe5e685d53f67303a3a43d9e4848 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=c69ad22a24967641b10c9d589f6a69ec
diff --git a/dev-db/postgresql/Manifest b/dev-db/postgresql/Manifest
new file mode 100644
index 000000000000..adabbc5ee0ae
--- /dev/null
+++ b/dev-db/postgresql/Manifest
@@ -0,0 +1,36 @@
+AUX postgresql-10.2-no-server.patch 3317 BLAKE2B 133a9e80c4ad82f8b121d8f2e9907fbc5a94f791f0972e604b1c54aa2bfb71b18e246ac8e65f7b917cbdb19222c78273d3e5ed96a7569bfd796045c4dac9f610 SHA512 6a9f6dbbece2364cbae200cca5c468ae99b78815ee3af6e90d8f637cb75b5755971b0582cedfb6569c0dc79cb6701a29712e3c99feb814fe7575a31e194e9b7a
+AUX postgresql-11_beta1-no-server.patch 3280 BLAKE2B 4eef9ade71c7884ebd68758a70740bd1d56ea63f0c6e8c7702a4983f6d35f52f61ba3fef46224ec30617f96708887f697ccfd029a19c6ec55ff6c8ea799400d4 SHA512 cd0692a86343c72244b1a55404d1e578ad242cdef520f95364f1e0cce7b59b913c156c91b60c8ea8d9b4fbbde97c71b52ab97013355800aff3a3e1a32853073d
+AUX postgresql-9.3-no-server.patch 4293 BLAKE2B 3224f3a7a82529ba710ff31ed02418f91cd394cee50c8cad10dbe6aff3260c08bd5958f91812fe16ea4820238bdd1cc4898b36f1dde09a2e54b6e3e94f2c6bfb SHA512 20117afa5a6999c6ae7f2b9adbdcfd2394a56c61d9c5d8c7ab2554a8de869d3aeaa4230a7dc4322fe585591277eb6ae47a594a7e605b811ed2c089d91cad6d4c
+AUX postgresql-9.4.10-no-server.patch 4356 BLAKE2B 97ca2424a854ac0efd2b5947e0efe183dd2b0171db07be92e4389b639fac707c3cba2957469996481e5d4ad5cac4fa686a193efc774e14ec0ad8f897713a5a19 SHA512 1abfb624b01b925a834c1c4f292246fd676cb7f2241a4e26bf52ce9b8c4dc2e4beeb4eea326c44f758d45034d5f18370280a8b18114bffaba1841e9ddac45174
+AUX postgresql-9.5.5-no-server.patch 4498 BLAKE2B eb874ac58ddd3a9c0b6ed97cf6616c5a2480df4cf708fb77496ab5cc459da423eb77986cb99824cf24131918eb4844320cd9353a04d41f696471b4b3c2d59071 SHA512 c961c7f1935b064e402e6c73dc6b087cdbea23d8038ef5e5aa5e625f7f1e87bb8d5986b95bbf9ed7c1abc40eeb89cda3b7aa4571d4a75ad6dd6c6d847de77c7d
+AUX postgresql-9.6.3-no-server.patch 3555 BLAKE2B 905bdfe6b084d775755cc88f7f11262d6bd04df7b2eb9a8230aef0fbb079d0431c9335b5219f8867cf1ce3cf858c8c0e964208713876ebfe13ae6138f5d4f35a SHA512 c70a4df16d865ceff7474f1a1ccc72d4e82e73a09792edc787a7907aa419985495871d07830390982bc82c82723fe668fb42b0dd239973804532499f39696dfe
+AUX postgresql-check-db-dir 1013 BLAKE2B 2be45942d0442822113879708c11dfde267938b6e7118bd225f567ca9fdacb11082792eabcb40b8a39cd6017fdedb18100576fea0895dae2dcda83c2d51de34d SHA512 2f34ee0cb6a889500ccfca7621ada6ee1bb06dc146f3c556938152dd3d7c0312266bb4db5f4099838d93ade26e2b8866dfddb3576cb5a737431ea2befd0cec6f
+AUX postgresql.confd-9.3 2477 BLAKE2B dbe2fea6befdcdfe4a8a65cb68d040996986553be78615115070f14cd966d517b36a09366a431c774df119501fb933caf056abe0c5131e3327484ef557db3d14 SHA512 c928364b2b8a555443db8c1ac2a7336cd5e32ac860f3238a0a791cfcdfdce941837d72dfa44f3f08704d528590f9f3bb479e25b7db9f32cdde76f216819baa9d
+AUX postgresql.init-9.3-r1 4999 BLAKE2B 77e231e5ca62a8b845ee02b1f27f13e12ab2c7577d3385a533bf61f988e6209586b75d3ddbaef71f0141b3bdee458179dea77180008f751bd77d656adc2d44de SHA512 cd181bb6d3ed72f786cd21a5c0c012bac3847adcf9da2e0b78eb212c9515953b2f1a2006faf475bfaa9a8c91371bda34f558f83ae010daa7cd670923526e39a0
+AUX postgresql.service-9.2 1666 BLAKE2B d4b81415539db3d78e0f5908185f903b70966ce3a27feed9bdf80eb6a9065ca6bd4b49e4bb822c41548b7efa9de37656378c395a8bd00a7a3daaa52911a2f674 SHA512 8c64b59f1e80096382a7166e1e8f183a5b9cf14c75138c15a39de74b983bfbed2f41cf9b33b2c72c3b9c79130c10104836a3505c96cb18ac1be1297c0fce1af0
+AUX postgresql.service-9.6-r1 1477 BLAKE2B 2a652d5b2892f3a52f484fcc0b4f4dad09cf4b46c3739c3f805072040a26128cb2ad9a25d4a7c9f109a95696d739538d379af6bac53c656f5c41af45b6110de5 SHA512 9e2b04923f6ebec1424c0f276c58a6a0c4933f2de5e2a9776169227729afd06ce5284461be8b6ed70e5aaff2a68b9f96c6893d867d35761c9977f9847ccfe93d
+AUX postgresql.tmpfiles 39 BLAKE2B 25a5725af53c8e4e4009887e998172dd863ce218a5438351194548c4fc8ea15308dfba3602d5a922cf49b46015198268a4a4528119d8a74dcef4cc4c1767c052 SHA512 498060f2a597cf374f4fb31deaa2d6c5b00edef68efc0e71b82bfc20b717ae12518ba18fcb455a0c518ebba1a0868f38321470616151d02fa79b889a66dcb9f8
+DIST postgresql-10.3.tar.bz2 19959653 BLAKE2B ba3b05f53b0f879b18d6d0649bf819697c77a066b49d941a96d13a4741854b01aeb0c8b868d6550a08ad52572c9463c968660aa83c16cbaa5b4bf7a89387a524 SHA512 05cf82d3483bdf38734e6ff0fef6b80e7f8fd3cb5ea6792ffe222a599d97d1a29638970bf28ebf5bd1f877e8dcd9986d88f5c5e5379e74fe79ce83e20d2babba
+DIST postgresql-10.4.tar.bz2 20201838 BLAKE2B 6d1cdc44547740c8f9fbc2e989364640409c6d2a365568b75731277dd0fba473ce07e2ee27e8ebfad507a6ce0ab3d3a44156c0e3a069d96d320771d8a97ba82f SHA512 b7c0d2fdc724e2eb1cda9fc1eb01b47352bbe6ba6357b3e898b7f5990fd78499c8c68dcb3aa9bde7821d71b5882d8856131384e899f8055d89d51cdfdbc9e663
+DIST postgresql-11beta1.tar.bz2 20945387 BLAKE2B a99aff17a656da2250309f2652237c8df3a3aeed088250be6114964c103dec40d0c4cc60b048b2ffa1e9733aed8e9df2597d57cab58482512c42f25139dc3499 SHA512 fa4e9cf8293fecf384d98d3a5bbed208eda2e4dd8bf05a9922a74355daba74dde4dbe0cd42bea1de155f4fea3cdcd0d7621d7e315c1d5f49ce5ee794b01b9f6d
+DIST postgresql-9.3.22.tar.bz2 17022938 BLAKE2B 198705e438717d0d9e12c73e0c0e3eff0ba89ea50a1b183de70f065e13c153c164890fe56bc6ec13b0cb9617df4f66894c122eeddaf9303b9a02b8e08b19b085 SHA512 667ff496172626d2fe35c6795935fb07f4f7967a3b0631dd3b96278f8dc00b3d08794f091a5ab060a45d6f2a861e0f10f0e9660f9e343ab34eeabd693104c47f
+DIST postgresql-9.3.23.tar.bz2 17033683 BLAKE2B f02ad25f6b8755a9a57c3a6dcb63b78672e29473b061ad1616be2fb97fbfd83fe0dc9fc9fda66ac0231fb30fb13f9ef8975ba5a9701d83f33495bcf2c2651b4a SHA512 bb2d54312de728aa0379ea5bc6385036bbe69d3b7f85bbd78c210840eed19ace29840849caf38d0689e21130a0c94818a362b3927805d8eded53b68e240a52b0
+DIST postgresql-9.4.17.tar.bz2 17807762 BLAKE2B 7640c29a71c6aeff47d9b43dd1e4f52edac4295b646b34da3a0ed9c26a8a826061bfd892e9907b62f31b7f01ee3aaf437c88d79b84d1d786d608dcd088309ecf SHA512 9ac03d460e521dcd142ac463dd5bb0f3e3f47333367bf8d61499ec7e8d0129d338c6f111667d0006df0c8ced9ae8a337d4c1b40eb5f55e6bc8dd5a24dfd376f0
+DIST postgresql-9.4.18.tar.bz2 17828085 BLAKE2B 346584e7d74264a7d58b3793cfd6247ae3cad3bb946bedec8df8d97278ffe6f8e881d31ad50e9f5d622aa4ae9b9711b36258bb60d520bb9a1d458af63c343e9e SHA512 2e64c3130c3dfc5183a77d72f61714bea34bfe549f55720eee25046e00b913a7effec3d7e43a021766ac957c1fa3c8c5e6c26ccbd8be1b434ae618e1fe9daab6
+DIST postgresql-9.5.12.tar.bz2 18589538 BLAKE2B 4246eb2bf5fe2e3bb48bdc411ebd3c87015570f0be4d8b1ed2a0f2ed20a8374e3244fa0aa17f9145f4f951c88f5b0717a4dd2186bf1621ce3334789f5f8dd50f SHA512 ab81bc95fd587f76a1986db5616b63d861b84da0eb9e54478f5298248a81d7a608d1bb1a9e30662c8190d05630106ddb3bb6413c34b003de948417214d342654
+DIST postgresql-9.5.13.tar.bz2 18600185 BLAKE2B 7560f08648ec1417d304aa8c53c3220d7a4b2fdaf2cb4920a0196273466d1dbab4c12dbceb3dc9a136458c0089dd5f5dc595c95353584d49da0d2ab6e7903bba SHA512 807b22aabee38326934213de04b782a6b22cd8fe5c5bfd8b6cfa44281924527a715dcd78adbee276746446a7b05036b4714b00a16c650027543dcbafe1888082
+DIST postgresql-9.6.8.tar.bz2 19528927 BLAKE2B 6aab5dbe4b13e1624befc33c2fa5241804dff71879e2d60c166db19c2fe015cd19cfc35054e6aede82bfe6b83a7146b6d2eedaabb94111c163da732526ff1723 SHA512 6b7595c0046308c725d77360b156e979d6bc469b78ac6500f631112f19b2607ca2d816781f8c5fd3bd835c48e079e79ada7af687fbd306a8fec5e160f20dd211
+DIST postgresql-9.6.9.tar.bz2 19566222 BLAKE2B e92a5ffaa8f4400364a174fc21ab11bb18c96dce9be721e6073ff7ad21b828859c2ac5fe8da81cad6a3d2a63a62d8fcb067d4bb02a9d23903525ad1f78955470 SHA512 3ce2a8f3a017d9c0bd0f1b475a9ee02bcb6a4119b0d436757911f444f49f5024bb1a1be07ce16a79e71af77799de1bf952b32279b4566bae075f23a50b8545c6
+EBUILD postgresql-10.3.ebuild 13694 BLAKE2B cbc3b1250d2b50dd7a9c318a9c610506db4b2593b013b2d89a573276ab8604cff741a1a3ca03a97e3c9a6bd7392762f821caf90d642c9a05cc9ca0b411340bbf SHA512 4b6fb894e8d5196139a56b897d3a06169c35def0d7e472ac8332987445f7c7ce72568b3b7a45bd7e8dac651108731761c413296864b0c9be4a617217d49ef3ec
+EBUILD postgresql-10.4.ebuild 13702 BLAKE2B 3b49b819926f1270075bcfac90497ffec28133761f1bec0d1dbca1e8cb3474567948183bb47d4c17fff93dcb0d12815a288e1b40e0cf8df34455374118748969 SHA512 135b2f0a4e2c5302961d3dba64fb2072568204a0205de91d20b14a6a2fc8ad7a14d90e96bc82708c2d8b63148d6e3220ac6b1971279ec52da40da4bad88969e8
+EBUILD postgresql-11_beta1.ebuild 13373 BLAKE2B 96c2d9781eecc682323b5875cda00eaaa1e81729ffacf818c72078f2ba930d33ebcfc6a8dbba770a5857b85ed0633adfdf0a291ea6e34b50147338db99714278 SHA512 5f6d5f8579bed501e654ee6c7d0698f2367cfe855688750759470df96ed9cb1dd9070c66533bc7f771cd857cdba50d2d05c667a7968af1835047df7e29ade173
+EBUILD postgresql-9.3.22.ebuild 13747 BLAKE2B 12e74f2f7bc2b18507b5c4e07d093cebd96406c6d981fbcaa6c2851004183acfac3e3fb882e1eea662e8cf1d35c10a1bcd6ad2820a5770874f04ad9cf508c387 SHA512 c89150f9b09e18b196d267dbec2c6539d3eb1ed6326193681249770c5d1ad42e48cffcad160121497dc8dbdd692994bd2704f581d52d029ba4dff5178a773746
+EBUILD postgresql-9.3.23.ebuild 13755 BLAKE2B 32748b48a489b9a51a19365e1159638e6de06e487db1eda5932c13e469766664bbb4ae924188b4e054a1d00048c18e7944a114bb15a172be55474dd11deb5a62 SHA512 0971a967aee606d52778ed168217c7d28ddffca984fd7821db8b4271add46868ab1f1dab6ffb1d5801c1a661f4f3a1637e9c99afa487383089cee2df90565129
+EBUILD postgresql-9.4.17.ebuild 14557 BLAKE2B 57446276df8b11ebe12ef5a4b3e95dfc2892cdf93cb1a40117f0e7ae5774e0ba1a4a08b2306d971625636d4f0bddb4d0395bc6671397ef291c0251a31bc37256 SHA512 05b6604f17b63442a1eda4673a702eab7bb0ac4af87dce7c9f56085573768aec408aa441873317cf610e379972221f68d49c19f47f7be48b1e6a74809d13c407
+EBUILD postgresql-9.4.18.ebuild 14565 BLAKE2B 954d05aff7332bd53be29cb163b71deae09040a7ce602c28230e5dd4c9a4239e6fbc75245e10c8d4bd842db011e31303e0e924829c71a5cd5bee13ab62b03c47 SHA512 b95abd882026c4d66132d5c0ded7657f8275e22376122410962f70d382d128362480a65d9ae9e2dfa303df94bda884b919b599301395a68fd3b29ae7d71a1efe
+EBUILD postgresql-9.5.12.ebuild 14785 BLAKE2B bbd02c18eb7e6b6c9bb2f3e4b4010bc1aadc0aaabe158accac75b1f692c8905d565647bac95c46b69003f70ce6608017a877e74e37e915a2827f5a6f35a732a5 SHA512 2ae77b20602445192062ab5930cc518c3524aa8c57c4aaa4923ec15b924f3b166dcd51dca32a19618d3055214bfed7977c4630dd40b6967aaf491f1688aaf717
+EBUILD postgresql-9.5.13.ebuild 14793 BLAKE2B 5dac00696cdcdb3801ed7cfaeee54ec0a728938aecfe590ae82a86c70b3a5e476df6fcb247b0ccfd0b1f08409638caa473449b8600a346c089a70b27c24ce46f SHA512 778a3e5b71f06edbb92b9e46591a775136df671be23c8f4404a037e3757e45382202854d74a32223926f88f315f8af8902d8ff00a404858cedb6546649903338
+EBUILD postgresql-9.6.8.ebuild 14927 BLAKE2B 36ba33cfc700526cd716243a838a9b52a3823feabf53fe7045aca86e54c048a0c1e5c7c4950e33d131e29a96e7f00eebe2a366e46912a942c871b799c5df8a29 SHA512 0e547e8a39b0c96ff4d100d42ba1113aa87f537f14ccd242436270a6972db3c09690a9925d869c0256342e89687421b26e18fd210313dce3b23dd4062c1ad1c6
+EBUILD postgresql-9.6.9.ebuild 14935 BLAKE2B 72aae9d0851e921ebc3f4245cb145966db204ec7f2aa1ac6e7a5da64035d2582b5f9fbf25fa48a3de970c52afb16891f05e3ddbc40b7cb6dba1d423197446541 SHA512 336a96594bc5feb9fee37b8bde109013f48c5ac84d5cf0b17565ebe19e5418bf6069df52ceff87e9a586bef56fbfa186b898d9de64bd9d6633a6ecf510265aa0
+EBUILD postgresql-9999.ebuild 13408 BLAKE2B abc86c0f27c1b4699f6716e3a206ee552e08ac6d1df2456550b543ee17693b144e7dae3f138d1009e9b02c5563bed7a545e006f33903013c5946dcbf285edb51 SHA512 06adf94442e76c0e5b46d448d1c49c78bae83a9a0f347694fd181c3b413724bc6b6069b7d2a19bae5430818cfcc15dc98ad6ac0f3eeb1d7cb0b7f747da53704f
+MISC metadata.xml 751 BLAKE2B 4628a6d379a41b4646be34dfcfca2be58bc93b883ccd6f4d21a426aacb34dd7d5347c5f9d61f9211f4f91bff67d2d5935b203959ab0790c74031944a9ab799f6 SHA512 726f30ec991194427b2dbcdf650778dbe0f169cb305d569918404d403deef397aef7ec3f1a5269c15f7ec7fc5506dc534203323379f1d0acc475eeb8d75d0cf1
diff --git a/dev-db/postgresql/files/postgresql-10.2-no-server.patch b/dev-db/postgresql/files/postgresql-10.2-no-server.patch
new file mode 100644
index 000000000000..02ab4d712ffe
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql-10.2-no-server.patch
@@ -0,0 +1,147 @@
+diff -Naruw a/contrib/Makefile b/contrib/Makefile
+--- a/contrib/Makefile
++++ b/contrib/Makefile
+@@ -5,57 +5,9 @@
+ include $(top_builddir)/src/Makefile.global
+
+ SUBDIRS = \
+- adminpack \
+- amcheck \
+- auth_delay \
+- auto_explain \
+- bloom \
+- btree_gin \
+- btree_gist \
+- chkpass \
+- citext \
+- cube \
+- dblink \
+- dict_int \
+- dict_xsyn \
+- earthdistance \
+- file_fdw \
+- fuzzystrmatch \
+- hstore \
+- intagg \
+- intarray \
+- isn \
+- lo \
+- ltree \
+ oid2name \
+- pageinspect \
+- passwordcheck \
+- pg_buffercache \
+- pg_freespacemap \
+- pg_prewarm \
+- pg_standby \
+- pg_stat_statements \
+- pg_trgm \
+- pgcrypto \
+- pgrowlocks \
+- pgstattuple \
+- pg_visibility \
+- postgres_fdw \
+- seg \
+- spi \
+- tablefunc \
+- tcn \
+- test_decoding \
+- tsm_system_rows \
+- tsm_system_time \
+- unaccent \
+ vacuumlo
+
+-ifeq ($(with_openssl),yes)
+-SUBDIRS += sslinfo
+-else
+-ALWAYS_SUBDIRS += sslinfo
+-endif
+
+ ifneq ($(with_uuid),no)
+ SUBDIRS += uuid-ossp
+diff -Naruw a/src/backend/Makefile b/src/backend/Makefile
+--- a/src/backend/Makefile
++++ b/src/backend/Makefile
+@@ -51,7 +51,7 @@
+
+ ##########################################################################
+
+-all: submake-libpgport submake-schemapg postgres $(POSTGRES_IMP)
++all: generated-headers
+
+ ifneq ($(PORTNAME), cygwin)
+ ifneq ($(PORTNAME), win32)
+@@ -226,23 +226,7 @@
+
+ ##########################################################################
+
+-install: all installdirs install-bin
+-ifeq ($(PORTNAME), cygwin)
+-ifeq ($(MAKE_DLL), true)
+- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a'
+-endif
+-endif
+-ifeq ($(PORTNAME), win32)
+-ifeq ($(MAKE_DLL), true)
+- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a'
+-endif
+-endif
+- $(MAKE) -C catalog install-data
+- $(MAKE) -C tsearch install-data
+- $(INSTALL_DATA) $(srcdir)/libpq/pg_hba.conf.sample '$(DESTDIR)$(datadir)/pg_hba.conf.sample'
+- $(INSTALL_DATA) $(srcdir)/libpq/pg_ident.conf.sample '$(DESTDIR)$(datadir)/pg_ident.conf.sample'
+- $(INSTALL_DATA) $(srcdir)/utils/misc/postgresql.conf.sample '$(DESTDIR)$(datadir)/postgresql.conf.sample'
+- $(INSTALL_DATA) $(srcdir)/access/transam/recovery.conf.sample '$(DESTDIR)$(datadir)/recovery.conf.sample'
++install:
+
+ install-bin: postgres $(POSTGRES_IMP) installdirs
+ $(INSTALL_PROGRAM) postgres$(X) '$(DESTDIR)$(bindir)/postgres$(X)'
+diff -Naruw a/src/bin/Makefile b/src/bin/Makefile
+--- a/src/bin/Makefile
++++ b/src/bin/Makefile
+@@ -14,19 +14,8 @@
+ include $(top_builddir)/src/Makefile.global
+
+ SUBDIRS = \
+- initdb \
+- pg_archivecleanup \
+- pg_basebackup \
+ pg_config \
+- pg_controldata \
+- pg_ctl \
+ pg_dump \
+- pg_resetwal \
+- pg_rewind \
+- pg_test_fsync \
+- pg_test_timing \
+- pg_upgrade \
+- pg_waldump \
+ pgbench \
+ psql \
+ scripts
+diff -Naruw a/src/Makefile b/src/Makefile
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -15,21 +15,12 @@
+ SUBDIRS = \
+ common \
+ port \
+- timezone \
+ backend \
+- backend/utils/mb/conversion_procs \
+- backend/snowball \
+ include \
+ interfaces \
+- backend/replication/libpqwalreceiver \
+- backend/replication/pgoutput \
+ fe_utils \
+ bin \
+- pl \
+- makefiles \
+- test/regress \
+- test/isolation \
+- test/perl
++ makefiles
+
+ # There are too many interdependencies between the subdirectories, so
+ # don't attempt parallel make here.
diff --git a/dev-db/postgresql/files/postgresql-11_beta1-no-server.patch b/dev-db/postgresql/files/postgresql-11_beta1-no-server.patch
new file mode 100644
index 000000000000..005a550f3cd7
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql-11_beta1-no-server.patch
@@ -0,0 +1,148 @@
+diff -Naruw a/contrib/Makefile b/contrib/Makefile
+--- a/contrib/Makefile
++++ b/contrib/Makefile
+@@ -5,56 +5,9 @@
+ include $(top_builddir)/src/Makefile.global
+
+ SUBDIRS = \
+- adminpack \
+- amcheck \
+- auth_delay \
+- auto_explain \
+- bloom \
+- btree_gin \
+- btree_gist \
+- citext \
+- cube \
+- dblink \
+- dict_int \
+- dict_xsyn \
+- earthdistance \
+- file_fdw \
+- fuzzystrmatch \
+- hstore \
+- intagg \
+- intarray \
+- isn \
+- lo \
+- ltree \
+ oid2name \
+- pageinspect \
+- passwordcheck \
+- pg_buffercache \
+- pg_freespacemap \
+- pg_prewarm \
+- pg_standby \
+- pg_stat_statements \
+- pg_trgm \
+- pgcrypto \
+- pgrowlocks \
+- pgstattuple \
+- pg_visibility \
+- postgres_fdw \
+- seg \
+- spi \
+- tablefunc \
+- tcn \
+- test_decoding \
+- tsm_system_rows \
+- tsm_system_time \
+- unaccent \
+ vacuumlo
+
+-ifeq ($(with_openssl),yes)
+-SUBDIRS += sslinfo
+-else
+-ALWAYS_SUBDIRS += sslinfo
+-endif
+
+ ifneq ($(with_uuid),no)
+ SUBDIRS += uuid-ossp
+diff -Naruw a/src/backend/Makefile b/src/backend/Makefile
+--- a/src/backend/Makefile
++++ b/src/backend/Makefile
+@@ -53,7 +53,7 @@
+
+ ##########################################################################
+
+-all: submake-libpgport submake-catalog-headers submake-utils-headers postgres $(POSTGRES_IMP)
++all: generated-headers
+
+ ifneq ($(PORTNAME), cygwin)
+ ifneq ($(PORTNAME), win32)
+@@ -192,24 +192,7 @@
+
+ ##########################################################################
+
+-install: all installdirs install-bin
+-ifeq ($(PORTNAME), cygwin)
+-ifeq ($(MAKE_DLL), true)
+- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a'
+-endif
+-endif
+-ifeq ($(PORTNAME), win32)
+-ifeq ($(MAKE_DLL), true)
+- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a'
+-endif
+-endif
+- $(MAKE) -C catalog install-data
+- $(MAKE) -C tsearch install-data
+- $(MAKE) -C utils install-data
+- $(INSTALL_DATA) $(srcdir)/libpq/pg_hba.conf.sample '$(DESTDIR)$(datadir)/pg_hba.conf.sample'
+- $(INSTALL_DATA) $(srcdir)/libpq/pg_ident.conf.sample '$(DESTDIR)$(datadir)/pg_ident.conf.sample'
+- $(INSTALL_DATA) $(srcdir)/utils/misc/postgresql.conf.sample '$(DESTDIR)$(datadir)/postgresql.conf.sample'
+- $(INSTALL_DATA) $(srcdir)/access/transam/recovery.conf.sample '$(DESTDIR)$(datadir)/recovery.conf.sample'
++install:
+
+ ifeq ($(with_llvm), yes)
+ install-bin: install-postgres-bitcode
+diff -Naruw a/src/bin/Makefile b/src/bin/Makefile
+--- a/src/bin/Makefile
++++ b/src/bin/Makefile
+@@ -14,20 +14,8 @@
+ include $(top_builddir)/src/Makefile.global
+
+ SUBDIRS = \
+- initdb \
+- pg_archivecleanup \
+- pg_basebackup \
+ pg_config \
+- pg_controldata \
+- pg_ctl \
+ pg_dump \
+- pg_resetwal \
+- pg_rewind \
+- pg_test_fsync \
+- pg_test_timing \
+- pg_upgrade \
+- pg_verify_checksums \
+- pg_waldump \
+ pgbench \
+ psql \
+ scripts
+diff -Naruw a/src/Makefile b/src/Makefile
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -15,21 +15,12 @@
+ SUBDIRS = \
+ common \
+ port \
+- timezone \
+ backend \
+- backend/utils/mb/conversion_procs \
+- backend/snowball \
+ include \
+ interfaces \
+- backend/replication/libpqwalreceiver \
+- backend/replication/pgoutput \
+ fe_utils \
+ bin \
+- pl \
+- makefiles \
+- test/regress \
+- test/isolation \
+- test/perl
++ makefiles
+
+ ifeq ($(with_llvm), yes)
+ SUBDIRS += backend/jit/llvm
diff --git a/dev-db/postgresql/files/postgresql-9.3-no-server.patch b/dev-db/postgresql/files/postgresql-9.3-no-server.patch
new file mode 100644
index 000000000000..3ce90d60ae70
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql-9.3-no-server.patch
@@ -0,0 +1,148 @@
+diff -Naur a/contrib/Makefile b/contrib/Makefile
+--- a/contrib/Makefile 2013-05-06 20:57:06.000000000 +0000
++++ b/contrib/Makefile 2013-06-09 01:48:22.351874929 +0000
+@@ -5,61 +5,10 @@
+ include $(top_builddir)/src/Makefile.global
+
+ SUBDIRS = \
+- adminpack \
+- auth_delay \
+- auto_explain \
+- btree_gin \
+- btree_gist \
+- chkpass \
+- citext \
+- cube \
+- dblink \
+- dict_int \
+- dict_xsyn \
+- dummy_seclabel \
+- earthdistance \
+- file_fdw \
+- fuzzystrmatch \
+- hstore \
+- intagg \
+- intarray \
+- isn \
+- lo \
+- ltree \
+ oid2name \
+- pageinspect \
+- passwordcheck \
+- pg_archivecleanup \
+- pg_buffercache \
+- pg_freespacemap \
+- pg_standby \
+- pg_stat_statements \
+- pg_test_fsync \
+- pg_test_timing \
+- pg_trgm \
+- pg_upgrade \
+- pg_upgrade_support \
+ pgbench \
+- pgcrypto \
+- pgrowlocks \
+- pgstattuple \
+- pg_xlogdump \
+- postgres_fdw \
+- seg \
+- spi \
+- tablefunc \
+- tcn \
+- test_parser \
+- tsearch2 \
+- unaccent \
+- vacuumlo \
+- worker_spi
++ vacuumlo
+
+-ifeq ($(with_openssl),yes)
+-SUBDIRS += sslinfo
+-else
+-ALWAYS_SUBDIRS += sslinfo
+-endif
+
+ ifeq ($(with_ossp_uuid),yes)
+ SUBDIRS += uuid-ossp
+diff -Naur a/src/backend/Makefile b/src/backend/Makefile
+--- a/src/backend/Makefile 2013-05-06 20:57:06.000000000 +0000
++++ b/src/backend/Makefile 2013-06-09 01:50:19.655864258 +0000
+@@ -47,7 +47,7 @@
+
+ ##########################################################################
+
+-all: submake-libpgport submake-schemapg postgres $(POSTGRES_IMP)
++all: someheaders
+
+ ifneq ($(PORTNAME), cygwin)
+ ifneq ($(PORTNAME), win32)
+@@ -116,7 +116,7 @@
+ endif # aix
+
+ # Update the commonly used headers before building the subdirectories
+-$(SUBDIRS:%=%-recursive): $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/catalog/schemapg.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/errcodes.h $(top_builddir)/src/include/utils/probes.h
++someheaders $(SUBDIRS:%=%-recursive): $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/catalog/schemapg.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/errcodes.h $(top_builddir)/src/include/utils/probes.h
+
+ # run this unconditionally to avoid needing to know its dependencies here:
+ submake-schemapg:
+@@ -209,23 +209,8 @@
+
+ ##########################################################################
+
+-install: all installdirs install-bin
+-ifeq ($(PORTNAME), cygwin)
+-ifeq ($(MAKE_DLL), true)
+- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a'
+-endif
+-endif
+-ifeq ($(PORTNAME), win32)
+-ifeq ($(MAKE_DLL), true)
+- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a'
+-endif
+-endif
+- $(MAKE) -C catalog install-data
+- $(MAKE) -C tsearch install-data
+- $(INSTALL_DATA) $(srcdir)/libpq/pg_hba.conf.sample '$(DESTDIR)$(datadir)/pg_hba.conf.sample'
+- $(INSTALL_DATA) $(srcdir)/libpq/pg_ident.conf.sample '$(DESTDIR)$(datadir)/pg_ident.conf.sample'
+- $(INSTALL_DATA) $(srcdir)/utils/misc/postgresql.conf.sample '$(DESTDIR)$(datadir)/postgresql.conf.sample'
+- $(INSTALL_DATA) $(srcdir)/access/transam/recovery.conf.sample '$(DESTDIR)$(datadir)/recovery.conf.sample'
++install:
++
+
+ install-bin: postgres $(POSTGRES_IMP) installdirs
+ $(INSTALL_PROGRAM) postgres$(X) '$(DESTDIR)$(bindir)/postgres$(X)'
+diff -Naur a/src/bin/Makefile b/src/bin/Makefile
+--- a/src/bin/Makefile 2013-05-06 20:57:06.000000000 +0000
++++ b/src/bin/Makefile 2013-06-09 01:51:56.143824442 +0000
+@@ -13,8 +13,7 @@
+ top_builddir = ../..
+ include $(top_builddir)/src/Makefile.global
+
+-SUBDIRS = initdb pg_ctl pg_dump \
+- psql scripts pg_config pg_controldata pg_resetxlog pg_basebackup
++SUBDIRS = pg_dump psql scripts pg_config
+
+ ifeq ($(PORTNAME), win32)
+ SUBDIRS += pgevent
+diff -Naur a/src/Makefile b/src/Makefile
+--- a/src/Makefile 2013-05-06 20:57:06.000000000 +0000
++++ b/src/Makefile 2013-06-09 01:54:30.479704228 +0000
+@@ -15,17 +15,11 @@
+ SUBDIRS = \
+ common \
+ port \
+- timezone \
+ backend \
+- backend/utils/mb/conversion_procs \
+- backend/snowball \
+ include \
+ interfaces \
+- backend/replication/libpqwalreceiver \
+ bin \
+- pl \
+- makefiles \
+- test/regress
++ makefiles
+
+ # There are too many interdependencies between the subdirectories, so
+ # don't attempt parallel make here.
diff --git a/dev-db/postgresql/files/postgresql-9.4.10-no-server.patch b/dev-db/postgresql/files/postgresql-9.4.10-no-server.patch
new file mode 100644
index 000000000000..81fc3837bede
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql-9.4.10-no-server.patch
@@ -0,0 +1,151 @@
+diff -Naruw a/contrib/Makefile b/contrib/Makefile
+--- a/contrib/Makefile 2016-10-24 16:12:53.000000000 -0400
++++ b/contrib/Makefile 2016-10-27 13:38:23.361545396 -0400
+@@ -5,64 +5,10 @@
+ include $(top_builddir)/src/Makefile.global
+
+ SUBDIRS = \
+- adminpack \
+- auth_delay \
+- auto_explain \
+- btree_gin \
+- btree_gist \
+- chkpass \
+- citext \
+- cube \
+- dblink \
+- dict_int \
+- dict_xsyn \
+- dummy_seclabel \
+- earthdistance \
+- file_fdw \
+- fuzzystrmatch \
+- hstore \
+- intagg \
+- intarray \
+- isn \
+- lo \
+- ltree \
+ oid2name \
+- pageinspect \
+- passwordcheck \
+- pg_archivecleanup \
+- pg_buffercache \
+- pg_freespacemap \
+- pg_prewarm \
+- pg_standby \
+- pg_stat_statements \
+- pg_test_fsync \
+- pg_test_timing \
+- pg_trgm \
+- pg_upgrade \
+- pg_upgrade_support \
+ pgbench \
+- pgcrypto \
+- pgrowlocks \
+- pgstattuple \
+- pg_xlogdump \
+- postgres_fdw \
+- seg \
+- spi \
+- tablefunc \
+- tcn \
+- test_decoding \
+- test_parser \
+- test_shm_mq \
+- tsearch2 \
+- unaccent \
+- vacuumlo \
+- worker_spi
++ vacuumlo
+
+-ifeq ($(with_openssl),yes)
+-SUBDIRS += sslinfo
+-else
+-ALWAYS_SUBDIRS += sslinfo
+-endif
+
+ ifneq ($(with_uuid),no)
+ SUBDIRS += uuid-ossp
+diff -Naruw a/src/backend/Makefile b/src/backend/Makefile
+--- a/src/backend/Makefile 2016-10-24 16:12:53.000000000 -0400
++++ b/src/backend/Makefile 2016-10-27 14:04:47.617000374 -0400
+@@ -47,7 +47,7 @@
+
+ ##########################################################################
+
+-all: submake-libpgport submake-schemapg postgres $(POSTGRES_IMP)
++all: someheaders
+
+ ifneq ($(PORTNAME), cygwin)
+ ifneq ($(PORTNAME), win32)
+@@ -106,7 +106,7 @@
+ endif # aix
+
+ # Update the commonly used headers before building the subdirectories
+-$(SUBDIRS:%=%-recursive): $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/catalog/schemapg.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/errcodes.h $(top_builddir)/src/include/utils/probes.h
++someheaders $(SUBDIRS:%=%-recursive): $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/catalog/schemapg.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/errcodes.h $(top_builddir)/src/include/utils/probes.h
+
+ # run this unconditionally to avoid needing to know its dependencies here:
+ submake-schemapg:
+@@ -199,23 +199,7 @@
+
+ ##########################################################################
+
+-install: all installdirs install-bin
+-ifeq ($(PORTNAME), cygwin)
+-ifeq ($(MAKE_DLL), true)
+- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a'
+-endif
+-endif
+-ifeq ($(PORTNAME), win32)
+-ifeq ($(MAKE_DLL), true)
+- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a'
+-endif
+-endif
+- $(MAKE) -C catalog install-data
+- $(MAKE) -C tsearch install-data
+- $(INSTALL_DATA) $(srcdir)/libpq/pg_hba.conf.sample '$(DESTDIR)$(datadir)/pg_hba.conf.sample'
+- $(INSTALL_DATA) $(srcdir)/libpq/pg_ident.conf.sample '$(DESTDIR)$(datadir)/pg_ident.conf.sample'
+- $(INSTALL_DATA) $(srcdir)/utils/misc/postgresql.conf.sample '$(DESTDIR)$(datadir)/postgresql.conf.sample'
+- $(INSTALL_DATA) $(srcdir)/access/transam/recovery.conf.sample '$(DESTDIR)$(datadir)/recovery.conf.sample'
++install:
+
+ install-bin: postgres $(POSTGRES_IMP) installdirs
+ $(INSTALL_PROGRAM) postgres$(X) '$(DESTDIR)$(bindir)/postgres$(X)'
+diff -Naruw a/src/bin/Makefile b/src/bin/Makefile
+--- a/src/bin/Makefile 2016-10-24 16:12:53.000000000 -0400
++++ b/src/bin/Makefile 2016-10-27 13:41:34.443930143 -0400
+@@ -13,8 +13,7 @@
+ top_builddir = ../..
+ include $(top_builddir)/src/Makefile.global
+
+-SUBDIRS = initdb pg_ctl pg_dump \
+- psql scripts pg_config pg_controldata pg_resetxlog pg_basebackup
++SUBDIRS = pg_dump psql scripts pg_config
+
+ ifeq ($(PORTNAME), win32)
+ SUBDIRS += pgevent
+diff -Naruw a/src/Makefile b/src/Makefile
+--- a/src/Makefile 2016-10-24 16:12:53.000000000 -0400
++++ b/src/Makefile 2016-10-27 13:43:09.296792018 -0400
+@@ -15,18 +15,11 @@
+ SUBDIRS = \
+ common \
+ port \
+- timezone \
+ backend \
+- backend/utils/mb/conversion_procs \
+- backend/snowball \
+ include \
+ interfaces \
+- backend/replication/libpqwalreceiver \
+ bin \
+- pl \
+- makefiles \
+- test/regress \
+- test/perl
++ makefiles
+
+ # There are too many interdependencies between the subdirectories, so
+ # don't attempt parallel make here.
diff --git a/dev-db/postgresql/files/postgresql-9.5.5-no-server.patch b/dev-db/postgresql/files/postgresql-9.5.5-no-server.patch
new file mode 100644
index 000000000000..285667801a63
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql-9.5.5-no-server.patch
@@ -0,0 +1,151 @@
+diff -Naruw postgresql-9.5.5.orig/contrib/Makefile postgresql-9.5.5/contrib/Makefile
+--- postgresql-9.5.5.orig/contrib/Makefile 2016-10-24 16:10:50.000000000 -0400
++++ postgresql-9.5.5/contrib/Makefile 2016-10-27 13:49:19.418285694 -0400
+@@ -5,55 +5,9 @@
+ include $(top_builddir)/src/Makefile.global
+
+ SUBDIRS = \
+- adminpack \
+- auth_delay \
+- auto_explain \
+- btree_gin \
+- btree_gist \
+- chkpass \
+- citext \
+- cube \
+- dblink \
+- dict_int \
+- dict_xsyn \
+- earthdistance \
+- file_fdw \
+- fuzzystrmatch \
+- hstore \
+- intagg \
+- intarray \
+- isn \
+- lo \
+- ltree \
+ oid2name \
+- pageinspect \
+- passwordcheck \
+- pg_buffercache \
+- pg_freespacemap \
+- pg_prewarm \
+- pg_standby \
+- pg_stat_statements \
+- pg_trgm \
+- pgcrypto \
+- pgrowlocks \
+- pgstattuple \
+- postgres_fdw \
+- seg \
+- spi \
+- tablefunc \
+- tcn \
+- test_decoding \
+- tsm_system_rows \
+- tsm_system_time \
+- tsearch2 \
+- unaccent \
+ vacuumlo
+
+-ifeq ($(with_openssl),yes)
+-SUBDIRS += sslinfo
+-else
+-ALWAYS_SUBDIRS += sslinfo
+-endif
+
+ ifneq ($(with_uuid),no)
+ SUBDIRS += uuid-ossp
+diff -Naruw postgresql-9.5.5.orig/src/backend/Makefile postgresql-9.5.5/src/backend/Makefile
+--- postgresql-9.5.5.orig/src/backend/Makefile 2016-10-24 16:10:50.000000000 -0400
++++ postgresql-9.5.5/src/backend/Makefile 2016-10-27 13:51:16.027706097 -0400
+@@ -47,7 +47,7 @@
+
+ ##########################################################################
+
+-all: submake-libpgport submake-schemapg postgres $(POSTGRES_IMP)
++all: someheaders
+
+ ifneq ($(PORTNAME), cygwin)
+ ifneq ($(PORTNAME), win32)
+@@ -106,7 +106,7 @@
+ endif # aix
+
+ # Update the commonly used headers before building the subdirectories
+-$(SUBDIRS:%=%-recursive): $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/catalog/schemapg.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/errcodes.h $(top_builddir)/src/include/utils/probes.h
++someheaders $(SUBDIRS:%=%-recursive): $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/catalog/schemapg.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/errcodes.h $(top_builddir)/src/include/utils/probes.h
+
+ # run this unconditionally to avoid needing to know its dependencies here:
+ submake-schemapg:
+@@ -199,23 +199,7 @@
+
+ ##########################################################################
+
+-install: all installdirs install-bin
+-ifeq ($(PORTNAME), cygwin)
+-ifeq ($(MAKE_DLL), true)
+- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a'
+-endif
+-endif
+-ifeq ($(PORTNAME), win32)
+-ifeq ($(MAKE_DLL), true)
+- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a'
+-endif
+-endif
+- $(MAKE) -C catalog install-data
+- $(MAKE) -C tsearch install-data
+- $(INSTALL_DATA) $(srcdir)/libpq/pg_hba.conf.sample '$(DESTDIR)$(datadir)/pg_hba.conf.sample'
+- $(INSTALL_DATA) $(srcdir)/libpq/pg_ident.conf.sample '$(DESTDIR)$(datadir)/pg_ident.conf.sample'
+- $(INSTALL_DATA) $(srcdir)/utils/misc/postgresql.conf.sample '$(DESTDIR)$(datadir)/postgresql.conf.sample'
+- $(INSTALL_DATA) $(srcdir)/access/transam/recovery.conf.sample '$(DESTDIR)$(datadir)/recovery.conf.sample'
++install:
+
+ install-bin: postgres $(POSTGRES_IMP) installdirs
+ $(INSTALL_PROGRAM) postgres$(X) '$(DESTDIR)$(bindir)/postgres$(X)'
+diff -Naruw postgresql-9.5.5.orig/src/bin/Makefile postgresql-9.5.5/src/bin/Makefile
+--- postgresql-9.5.5.orig/src/bin/Makefile 2016-10-24 16:10:50.000000000 -0400
++++ postgresql-9.5.5/src/bin/Makefile 2016-10-27 14:26:26.397161219 -0400
+@@ -14,19 +14,8 @@
+ include $(top_builddir)/src/Makefile.global
+
+ SUBDIRS = \
+- initdb \
+- pg_archivecleanup \
+- pg_basebackup \
+ pg_config \
+- pg_controldata \
+- pg_ctl \
+ pg_dump \
+- pg_resetxlog \
+- pg_rewind \
+- pg_test_fsync \
+- pg_test_timing \
+- pg_upgrade \
+- pg_xlogdump \
+ pgbench \
+ psql \
+ scripts
+diff -Naruw postgresql-9.5.5.orig/src/Makefile postgresql-9.5.5/src/Makefile
+--- postgresql-9.5.5.orig/src/Makefile 2016-10-24 16:10:50.000000000 -0400
++++ postgresql-9.5.5/src/Makefile 2016-10-27 14:03:49.513956432 -0400
+@@ -15,18 +15,11 @@
+ SUBDIRS = \
+ common \
+ port \
+- timezone \
+ backend \
+- backend/utils/mb/conversion_procs \
+- backend/snowball \
+ include \
+ interfaces \
+- backend/replication/libpqwalreceiver \
+ bin \
+- pl \
+- makefiles \
+- test/regress \
+- test/perl
++ makefiles
+
+ # There are too many interdependencies between the subdirectories, so
+ # don't attempt parallel make here.
diff --git a/dev-db/postgresql/files/postgresql-9.6.3-no-server.patch b/dev-db/postgresql/files/postgresql-9.6.3-no-server.patch
new file mode 100644
index 000000000000..db662d4630e3
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql-9.6.3-no-server.patch
@@ -0,0 +1,145 @@
+diff -Naruw a/contrib/Makefile b/contrib/Makefile
+--- a/contrib/Makefile 2017-05-08 17:15:12.000000000 -0400
++++ b/contrib/Makefile 2017-07-13 20:20:26.926646151 -0400
+@@ -5,57 +5,9 @@
+ include $(top_builddir)/src/Makefile.global
+
+ SUBDIRS = \
+- adminpack \
+- auth_delay \
+- auto_explain \
+- bloom \
+- btree_gin \
+- btree_gist \
+- chkpass \
+- citext \
+- cube \
+- dblink \
+- dict_int \
+- dict_xsyn \
+- earthdistance \
+- file_fdw \
+- fuzzystrmatch \
+- hstore \
+- intagg \
+- intarray \
+- isn \
+- lo \
+- ltree \
+ oid2name \
+- pageinspect \
+- passwordcheck \
+- pg_buffercache \
+- pg_freespacemap \
+- pg_prewarm \
+- pg_standby \
+- pg_stat_statements \
+- pg_trgm \
+- pgcrypto \
+- pgrowlocks \
+- pgstattuple \
+- pg_visibility \
+- postgres_fdw \
+- seg \
+- spi \
+- tablefunc \
+- tcn \
+- test_decoding \
+- tsm_system_rows \
+- tsm_system_time \
+- tsearch2 \
+- unaccent \
+ vacuumlo
+
+-ifeq ($(with_openssl),yes)
+-SUBDIRS += sslinfo
+-else
+-ALWAYS_SUBDIRS += sslinfo
+-endif
+
+ ifneq ($(with_uuid),no)
+ SUBDIRS += uuid-ossp
+diff -Naruw a/src/backend/Makefile b/src/backend/Makefile
+--- a/src/backend/Makefile 2017-05-08 17:15:12.000000000 -0400
++++ b/src/backend/Makefile 2017-07-13 20:18:08.590323095 -0400
+@@ -51,7 +51,7 @@
+
+ ##########################################################################
+
+-all: submake-libpgport submake-schemapg postgres $(POSTGRES_IMP)
++all: generated-headers
+
+ ifneq ($(PORTNAME), cygwin)
+ ifneq ($(PORTNAME), win32)
+@@ -218,23 +218,7 @@
+
+ ##########################################################################
+
+-install: all installdirs install-bin
+-ifeq ($(PORTNAME), cygwin)
+-ifeq ($(MAKE_DLL), true)
+- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a'
+-endif
+-endif
+-ifeq ($(PORTNAME), win32)
+-ifeq ($(MAKE_DLL), true)
+- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a'
+-endif
+-endif
+- $(MAKE) -C catalog install-data
+- $(MAKE) -C tsearch install-data
+- $(INSTALL_DATA) $(srcdir)/libpq/pg_hba.conf.sample '$(DESTDIR)$(datadir)/pg_hba.conf.sample'
+- $(INSTALL_DATA) $(srcdir)/libpq/pg_ident.conf.sample '$(DESTDIR)$(datadir)/pg_ident.conf.sample'
+- $(INSTALL_DATA) $(srcdir)/utils/misc/postgresql.conf.sample '$(DESTDIR)$(datadir)/postgresql.conf.sample'
+- $(INSTALL_DATA) $(srcdir)/access/transam/recovery.conf.sample '$(DESTDIR)$(datadir)/recovery.conf.sample'
++install:
+
+ install-bin: postgres $(POSTGRES_IMP) installdirs
+ $(INSTALL_PROGRAM) postgres$(X) '$(DESTDIR)$(bindir)/postgres$(X)'
+diff -Naruw a/src/bin/Makefile b/src/bin/Makefile
+--- a/src/bin/Makefile 2017-05-08 17:15:12.000000000 -0400
++++ b/src/bin/Makefile 2017-07-13 20:23:51.419471550 -0400
+@@ -14,19 +14,8 @@
+ include $(top_builddir)/src/Makefile.global
+
+ SUBDIRS = \
+- initdb \
+- pg_archivecleanup \
+- pg_basebackup \
+ pg_config \
+- pg_controldata \
+- pg_ctl \
+ pg_dump \
+- pg_resetxlog \
+- pg_rewind \
+- pg_test_fsync \
+- pg_test_timing \
+- pg_upgrade \
+- pg_xlogdump \
+ pgbench \
+ psql \
+ scripts
+diff -Naruw a/src/Makefile b/src/Makefile
+--- a/src/Makefile 2017-05-08 17:15:12.000000000 -0400
++++ b/src/Makefile 2017-07-13 20:25:57.539158282 -0400
+@@ -15,19 +15,12 @@
+ SUBDIRS = \
+ common \
+ port \
+- timezone \
+ backend \
+- backend/utils/mb/conversion_procs \
+- backend/snowball \
+ include \
+ interfaces \
+- backend/replication/libpqwalreceiver \
+ fe_utils \
+ bin \
+- pl \
+- makefiles \
+- test/regress \
+- test/perl
++ makefiles
+
+ # There are too many interdependencies between the subdirectories, so
+ # don't attempt parallel make here.
diff --git a/dev-db/postgresql/files/postgresql-check-db-dir b/dev-db/postgresql/files/postgresql-check-db-dir
new file mode 100644
index 000000000000..7f89919a1f68
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql-check-db-dir
@@ -0,0 +1,35 @@
+#!/bin/sh
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+eerror() {
+ echo "$@" >&2
+}
+
+# Check that DATA_DIR has been set
+if [ -z ${DATA_DIR} ] ; then
+ eerror "DATA_DIR not set"
+ exit 1
+fi
+
+# Check that DATA_DIR exists
+if [ ! -d ${DATA_DIR} ] ; then
+ eerror "Directory not found: ${DATA_DIR}"
+ eerror "HINT: Ensure that DATA_DIR points to the right path."
+ eerror "HINT: Or perhaps you need to create the database cluster:"
+ eerror " emerge --config dev-db/postgresql:@SLOT@"
+ exit 1
+fi
+
+# Check for the existence of PostgreSQL's config files, and set the
+# proper mode and ownership.
+# Only three files should be checked as potentially other files
+# may be in PGDATA that should not be touched.
+for file in postgresql pg_hba pg_ident ; do
+ file="${PGDATA%/}/${file}.conf"
+ if [ ! -f ${file} ] ; then
+ eerror "${file} not found"
+ eerror "HINT: mv ${DATA_DIR%/}/*.conf ${PGDATA}"
+ exit 1
+ fi
+done
diff --git a/dev-db/postgresql/files/postgresql.confd-9.3 b/dev-db/postgresql/files/postgresql.confd-9.3
new file mode 100644
index 000000000000..8b6d2a097285
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql.confd-9.3
@@ -0,0 +1,65 @@
+# Comma-separated list of directories that contain a unix
+# socket. Created and controlled by the related initscript. The
+# directories created will be owned root:postgres with mode 1775.
+#
+# /run/postgresql is the default directory.
+PG_SOCKET_DIRECTORIES="/run/postgresql"
+
+# Which port and socket to bind PostgreSQL
+PGPORT="5432"
+
+# How long to wait for server to start in seconds
+START_TIMEOUT=10
+
+# NICE_QUIT ignores new connections and wait for clients to disconnect from
+# server before shutting down. NICE_TIMEOUT in seconds determines how long to
+# wait for this to succeed.
+NICE_TIMEOUT=60
+
+# Forecfully disconnect clients from server and shut down. This is performed
+# after NICE_QUIT. Terminated client connections have their open transactions
+# rolled back.
+# Set RUDE_QUIT to "NO" to disable. RUDE_TIMEOUT in seconds.
+RUDE_QUIT="YES"
+RUDE_TIMEOUT=30
+
+# If the server still fails to shutdown, you can force it to quit by setting
+# this to YES and a recover-run will execute on the next startup.
+# Set FORCE_QUIT to "YES" to enable. FORCE_TIMEOUT in seconds.
+FORCE_QUIT="NO"
+FORCE_TIMEOUT=2
+
+# Extra options to run postmaster with, e.g.:
+# -N is the maximal number of client connections
+# -B is the number of shared buffers and has to be at least 2x the value for -N
+# Please read the man-page to postmaster for more options. Many of these
+# options can be set directly in the configuration file.
+#PGOPTS="-N 512 -B 1024"
+
+# Pass extra environment variables. If you have to export environment variables
+# for the database process, this can be done here.
+# Don't forget to escape quotes.
+#PG_EXTRA_ENV="PGPASSFILE=\"/path/to/.pgpass\""
+
+##############################################################################
+#
+# The following values should not be arbitrarily changed.
+#
+# `emerge --config dev-db/postgresql:@SLOT@' uses these values to
+# determine where to create the data directory, where to place the
+# configuration files, and any additional options to pass to initdb.
+#
+# The initscript also uses these variables to inform PostgreSQL where to find
+# its data directory and configuration files.
+#
+##############################################################################
+
+# Location of configuration files
+PGDATA="/etc/postgresql-@SLOT@/"
+
+# Where the data directory is located/to be created
+DATA_DIR="/var/lib/postgresql/@SLOT@/data"
+
+# Additional options to pass to initdb.
+# See `man initdb' for available options.
+PG_INITDB_OPTS="--encoding=UTF8"
diff --git a/dev-db/postgresql/files/postgresql.init-9.3-r1 b/dev-db/postgresql/files/postgresql.init-9.3-r1
new file mode 100755
index 000000000000..256ee7e6fd35
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql.init-9.3-r1
@@ -0,0 +1,157 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_started_commands="reload promote"
+
+PG_CTL="/usr/@LIBDIR@/postgresql-@SLOT@/bin/pg_ctl"
+
+description="PostgreSQL @SLOT@ -- the world's most advanced open source database --
+${RC_SERVICE} is a wrapper around pg_ctl with additional administrative checks
+and convenience"
+
+get_config() {
+ [ -f "${PGDATA%/}/postgresql.conf" ] || return 1
+
+ eval echo $(sed -e 's:#.*::' "${PGDATA%/}/postgresql.conf" \
+ | awk '$1 == "'$1'" { print ($2 == "=" ? $3 : $2) }')
+}
+
+depend() {
+ use net
+ provide postgresql
+
+ if [ "$(get_config log_destination)" = "syslog" ]; then
+ use logger
+ fi
+}
+
+configured_port=$(get_config port)
+: ${configured_port:=${PGPORT}}
+
+checkconfig() {
+ # Check that DATA_DIR has been set
+ if [ -z "${DATA_DIR}" ] ; then
+ eerror "DATA_DIR not set"
+ eerror "HINT: Perhaps you need to update /etc/conf.d/postgresql-@SLOT@"
+ return 1
+ fi
+
+ # Check that DATA_DIR exists
+ if [ ! -d "${DATA_DIR}" ] ; then
+ eerror "Directory not found: ${DATA_DIR}"
+ eerror "HINT: Ensure that DATA_DIR points to the right path."
+ eerror "HINT: Or perhaps you need to create the database cluster:"
+ eerror " emerge --config dev-db/postgresql:@SLOT@"
+ return 1
+ fi
+
+ # Check for the existence of PostgreSQL's config files, and set the
+ # proper mode and ownership.
+ # Only three files should be checked as potentially other files
+ # may be in PGDATA that should not be touched.
+ local file
+ for file in postgresql pg_hba pg_ident ; do
+ file="${PGDATA%/}/${file}.conf"
+ if [ -f "${file}" ] ; then
+ checkpath -f -m 0600 -o postgres:postgres "${file}"
+ else
+ eerror "${file} not found"
+ eerror "HINT: mv ${DATA_DIR%/}/*.conf ${PGDATA}"
+ return 1
+ fi
+ done
+
+ # Set the proper permission for the socket paths and create it if
+ # it doesn't exist.
+ set -f; IFS=','
+ local s
+ for s in ${PG_SOCKET_DIRECTORIES}; do
+ checkpath -d -m 1775 -o root:postgres "${s}"
+ if [ -e "${s%/}/.s.PGSQL.${configured_port}" ] ; then
+ eerror "Socket conflict."
+ eerror "A server is already listening on:"
+ eerror " ${s%/}/.s.PGSQL.${configured_port}"
+ eerror "HINT: Change PGPORT to listen on a different socket."
+ return 1
+ fi
+ done
+ set +f; unset IFS
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting PostgreSQL @SLOT@"
+
+ rm -f "${DATA_DIR%/}/postmaster.pid"
+
+ su - postgres -c \
+ "PGPORT=${configured_port} ${PG_EXTRA_ENV} ${PG_CTL} start \
+ -s -w -t ${START_TIMEOUT} -l ${DATA_DIR%/}/postmaster.log \
+ -D ${PGDATA} \
+ -o '--data-directory=${DATA_DIR} \
+ --unix-socket-directories=${PG_SOCKET_DIRECTORIES} \
+ ${PGOPTS}'"
+
+ local retval=$?
+
+ if [ $retval -ne 0 ] ; then
+ eerror "Check the log for a possible explanation of the above error."
+ eerror "The log may be located at:"
+ eerror " ${DATA_DIR%/}/postmaster.log"
+ eerror "Or wherever you configured PostgreSQL @SLOT@ to log."
+ fi
+
+ eend $retval
+}
+
+stop() {
+ local seconds=$(( ${NICE_TIMEOUT} + ${RUDE_TIMEOUT} + ${FORCE_TIMEOUT} ))
+ ebegin "Stopping PostgreSQL @SLOT@ (this can take up to ${seconds} seconds)"
+
+ su - postgres -c \
+ "${PG_CTL} stop -t ${NICE_TIMEOUT} -s -D ${DATA_DIR} -m smart"
+ local retval=$?
+
+ if [ "${RUDE_QUIT}" != "NO" -a ${retval} -ne 0 ] ; then
+ einfo "Previous attempt failed. Trying RUDE_QUIT."
+ su - postgres -c \
+ "${PG_CTL} stop -t ${RUDE_TIMEOUT} -s -D ${DATA_DIR} -m fast"
+ retval=$?
+ fi
+
+ if [ "${FORCE_QUIT}" = "YES" -a ${retval} -ne 0 ] ; then
+ einfo "Previous step failed. Trying FORCE_QUIT."
+ ewarn "A recover-run might be executed on next startup."
+ su - postgres -c \
+ "${PG_CTL} stop -t ${FORCE_TIMEOUT} -s -D ${DATA_DIR} -m immediate"
+ retval=$?
+ fi
+
+ eend ${retval}
+}
+
+status() {
+ ebegin "Checking PostgreSQL @SLOT@ status"
+ su - postgres -c "${PG_CTL} status -D ${DATA_DIR}"
+ eend $?
+}
+
+description_reload="Simply sends the postgres process a SIGHUP signal, causing
+ it to reread its configuration files (postgresql.conf, pg_hba.conf,
+ etc.). This allows changing of configuration-file options that do not
+ require a complete restart to take effect."
+reload() {
+ ebegin "Reloading PostgreSQL @SLOT@ configuration"
+ su - postgres -c "${PG_CTL} reload -s -D ${DATA_DIR}"
+ eend $?
+}
+
+description_promote="If the server is in standby, it is commanded to exit
+ recovery and begin read-write operations."
+promote() {
+ ebegin "Promoting PostgreSQL @SLOT@"
+ su - postgres -c "${PG_CTL} promote -s -D ${DATA_DIR}"
+ eend $?
+}
diff --git a/dev-db/postgresql/files/postgresql.service-9.2 b/dev-db/postgresql/files/postgresql.service-9.2
new file mode 100644
index 000000000000..20ed27a10f29
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql.service-9.2
@@ -0,0 +1,51 @@
+# It's not recommended to modify this file in-place, because it will be
+# overwritten during package upgrades. If you want to customize, the
+# best way is to create file
+# "/etc/systemd/system/postgresql-@SLOT@.service.d/*.conf"
+# containing your changes
+
+# For example, if you want to change the server's port number to 5433,
+# create a file named
+# "/etc/systemd/system/postgresql-@SLOT@.service.d/port.conf"
+# containing:
+# [Service]
+# Environment=PGPORT=5433
+# This will override the setting appearing below.
+
+[Unit]
+Description=PostgreSQL database server
+After=network.target
+
+[Service]
+Type=forking
+
+User=postgres
+Group=postgres
+
+# Port number for server to listen on
+Environment=PGPORT=5432
+
+# Location of configuration files
+Environment=PGDATA=/etc/postgresql-@SLOT@
+
+# Where the data directory is located
+Environment=DATA_DIR=/var/lib/postgresql/@SLOT@/data
+
+# Where to send early-startup messages from the server (before the logging
+# options of postgresql.conf take effect)
+# This is normally controlled by the global default set by systemd
+# StandardOutput=syslog
+
+ExecStartPre=/usr/bin/postgresql-@SLOT@-check-db-dir
+ExecStart=/usr/@LIBDIR@/postgresql-@SLOT@/bin/pg_ctl start -D ${DATA_DIR} -s -l ${DATA_DIR}/postmaster.log -o "-p ${PGPORT} -D ${PGDATA} --data-directory=${DATA_DIR}" -w -t 300
+ExecStop=/usr/@LIBDIR@/postgresql-@SLOT@/bin/pg_ctl stop -D ${DATA_DIR} -s -m fast
+ExecReload=/usr/@LIBDIR@/postgresql-@SLOT@/bin/pg_ctl reload -D ${DATA_DIR} -s
+
+# Give a reasonable amount of time for the server to start up/shut down
+TimeoutSec=300
+
+# Disable OOM kill on the postmaster
+OOMScoreAdjust=-1000
+
+[Install]
+WantedBy=multi-user.target
diff --git a/dev-db/postgresql/files/postgresql.service-9.6-r1 b/dev-db/postgresql/files/postgresql.service-9.6-r1
new file mode 100644
index 000000000000..3b92e851f299
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql.service-9.6-r1
@@ -0,0 +1,52 @@
+# It's not recommended to modify this file in-place, because it will be
+# overwritten during package upgrades. If you want to customize, the
+# best way is to create file
+# "/etc/systemd/system/postgresql-@SLOT@.service.d/*.conf"
+# containing your changes
+
+# For example, if you want to change the server's port number to 5433,
+# create a file named
+# "/etc/systemd/system/postgresql-@SLOT@.service.d/port.conf"
+# containing:
+# [Service]
+# Environment=PGPORT=5433
+# This will override the setting appearing below.
+
+[Unit]
+Description=PostgreSQL database server
+After=network.target
+
+[Service]
+Type=notify
+
+User=postgres
+Group=postgres
+
+# Port number for server to listen on
+Environment=PGPORT=5432
+
+# Location of configuration files
+Environment=PGDATA=/etc/postgresql-@SLOT@
+
+# Where the data directory is located
+Environment=DATA_DIR=/var/lib/postgresql/@SLOT@/data
+
+# Where to send early-startup messages from the server (before the logging
+# options of postgresql.conf take effect)
+# This is normally controlled by the global default set by systemd
+# StandardOutput=syslog
+
+ExecStartPre=/usr/bin/postgresql-@SLOT@-check-db-dir
+ExecStart=/usr/@LIBDIR@/postgresql-@SLOT@/bin/postgres -p ${PGPORT} -D ${DATA_DIR}
+ExecReload=/bin/kill -HUP $MAINPID
+KillMode=mixed
+KillSignal=SIGINT
+
+# Give a reasonable amount of time for the server to start up/shut down
+TimeoutSec=300
+
+# Disable OOM kill on the postmaster
+OOMScoreAdjust=-1000
+
+[Install]
+WantedBy=multi-user.target
diff --git a/dev-db/postgresql/files/postgresql.tmpfiles b/dev-db/postgresql/files/postgresql.tmpfiles
new file mode 100644
index 000000000000..650ae22b7c1b
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql.tmpfiles
@@ -0,0 +1 @@
+d /run/postgresql 1775 root postgres -
diff --git a/dev-db/postgresql/metadata.xml b/dev-db/postgresql/metadata.xml
new file mode 100644
index 000000000000..c02f7774e30a
--- /dev/null
+++ b/dev-db/postgresql/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>pgsql-bugs@gentoo.org</email>
+ <name>PostgreSQL and Related Package Development</name>
+ </maintainer>
+ <use>
+ <flag name="pg_legacytimestamp">
+ Use double precision floating-point numbers instead of 64-bit
+ integers for timestamp storage.
+ </flag>
+ <flag name="server">
+ Disable to build and install the clients and libraries only.
+ </flag>
+ <flag name="uuid">
+ Enable server side UUID generation (via
+ <pkg>dev-libs/ossp-uuid</pkg>).
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-db/postgresql/postgresql-10.3.ebuild b/dev-db/postgresql/postgresql-10.3.ebuild
new file mode 100644
index 000000000000..7170883aee52
--- /dev/null
+++ b/dev-db/postgresql/postgresql-10.3.ebuild
@@ -0,0 +1,460 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
+ systemd user versionator
+
+KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
+
+SLOT=$(get_major_version)
+
+MY_PV=${PV/_/}
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+SRC_URI="mirror://postgresql/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
+
+LICENSE="POSTGRESQL GPL-2"
+DESCRIPTION="PostgreSQL RDBMS"
+HOMEPAGE="https://www.postgresql.org/"
+
+IUSE="doc kerberos kernel_linux ldap libressl nls pam perl python +readline
+ selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+wanted_languages() {
+ local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
+ sk sl sv tr zh_CN zh_TW"
+ local enable_langs lingua
+
+ for lingua in ${linguas} ; do
+ has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
+ done
+
+ echo -n ${enable_langs}
+}
+
+CDEPEND="
+>=app-eselect/eselect-postgresql-2.0
+sys-apps/less
+virtual/libintl
+kerberos? ( virtual/krb5 )
+ldap? ( net-nds/openldap )
+pam? ( virtual/pam )
+perl? ( >=dev-lang/perl-5.8:= )
+python? ( ${PYTHON_DEPS} )
+readline? ( sys-libs/readline:0= )
+server? ( systemd? ( sys-apps/systemd ) )
+ssl? (
+ !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
+ libressl? ( dev-libs/libressl:= )
+)
+tcl? ( >=dev-lang/tcl-8:0= )
+xml? ( dev-libs/libxml2 dev-libs/libxslt )
+zlib? ( sys-libs/zlib )
+"
+
+# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
+# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
+# the libc includes UUID functions.
+UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
+BSD_LIBC=( elibc_{Free,Net,Open}BSD )
+
+nest_usedep() {
+ local front back
+ while [[ ${#} -gt 1 ]]; do
+ front+="${1}? ( "
+ back+=" )"
+ shift
+ done
+ echo "${front}${1}${back}"
+}
+
+IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
+CDEPEND+="
+uuid? (
+ ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
+ $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
+)"
+
+DEPEND="${CDEPEND}
+!!<sys-apps/sandbox-2.0
+sys-devel/bison
+sys-devel/flex
+nls? ( sys-devel/gettext )
+xml? ( virtual/pkgconfig )
+"
+
+RDEPEND="${CDEPEND}
+!dev-db/postgresql-docs:${SLOT}
+!dev-db/postgresql-base:${SLOT}
+!dev-db/postgresql-server:${SLOT}
+selinux? ( sec-policy/selinux-postgresql )
+"
+
+pkg_setup() {
+ use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
+
+ enewgroup postgres 70
+ enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
+
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # Work around PPC{,64} compilation bug where bool is already defined
+ sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
+
+ # Set proper run directory
+ sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
+ -i src/include/pg_config_manual.h || die
+
+ # Rely on $PATH being in the proper order so that the correct
+ # install program is used for modules utilizing PGXS in both
+ # hardened and non-hardened environments. (Bug #528786)
+ sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
+
+ use server || eapply "${FILESDIR}/${PN}-10.2-no-server.patch"
+
+ if use pam ; then
+ sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
+ -i src/backend/libpq/auth.c || \
+ die 'PGSQL_PAM_SERVICE rename failed.'
+ fi
+
+ eapply_user
+}
+
+src_configure() {
+ case ${CHOST} in
+ *-darwin*|*-solaris*)
+ use nls && append-libs intl
+ ;;
+ esac
+
+ export LDFLAGS_SL="${LDFLAGS}"
+ export LDFLAGS_EX="${LDFLAGS}"
+
+ local PO="${EPREFIX%/}"
+
+ local i uuid_config=""
+ if use uuid; then
+ for i in ${UTIL_LINUX_LIBC[@]}; do
+ use ${i} && uuid_config="--with-uuid=e2fs"
+ done
+ for i in ${BSD_LIBC[@]}; do
+ use ${i} && uuid_config="--with-uuid=bsd"
+ done
+ [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
+ fi
+
+ econf \
+ --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
+ --datadir="${PO}/usr/share/postgresql-${SLOT}" \
+ --docdir="${PO}/usr/share/doc/${PF}" \
+ --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 threads thread-safety) \
+ $(use_with kerberos gssapi) \
+ $(use_with ldap) \
+ $(use_with pam) \
+ $(use_with perl) \
+ $(use_with python) \
+ $(use_with readline) \
+ $(use_with ssl openssl) \
+ $(usex server "$(use_with systemd)" '--without-systemd') \
+ $(use_with tcl) \
+ ${uuid_config} \
+ $(use_with xml libxml) \
+ $(use_with xml libxslt) \
+ $(use_with zlib) \
+ "$(use_enable nls nls "$(wanted_languages)")"
+}
+
+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
+
+ use static-libs || find "${ED}" -name '*.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/.}"
+ done
+
+ if use doc ; then
+ docinto html
+ dodoc doc/src/sgml/html/*
+ fi
+
+ if use server; then
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
+
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
+
+ if use systemd; then
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.service-9.6-r1" | \
+ systemd_newunit - ${PN}-${SLOT}.service
+ newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
+ fi
+
+ use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
+
+ if use prefix ; then
+ keepdir /run/postgresql
+ fperms 1775 /run/postgresql
+ fi
+ fi
+}
+
+pkg_postinst() {
+ use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
+ postgresql-config update
+
+ elog "If you need a global psqlrc-file, you can place it in:"
+ elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
+
+ if use server ; then
+ elog
+ elog "Gentoo specific documentation:"
+ elog "https://wiki.gentoo.org/wiki/PostgreSQL"
+ elog
+ elog "Official documentation:"
+ elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
+ elog
+ elog "The default location of the Unix-domain socket is:"
+ elog " ${EROOT%/}/run/postgresql/"
+ elog
+ elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
+ elog "so that it contains your preferred locale in:"
+ elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+ elog
+ elog "Then, execute the following command to setup the initial database"
+ elog "environment:"
+ elog " emerge --config =${CATEGORY}/${PF}"
+ fi
+}
+
+pkg_prerm() {
+ if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
+ ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
+ ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
+
+ ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
+ sleep 10
+ eend 0
+ fi
+}
+
+pkg_postrm() {
+ postgresql-config update
+}
+
+pkg_config() {
+ use server || die "USE flag 'server' not enabled. Nothing to configure."
+
+ [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
+ && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+ [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
+ [[ -z "${DATA_DIR}" ]] \
+ && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
+
+ # environment.bz2 may not contain the same locale as the current system
+ # locale. Unset and source from the current system locale.
+ if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
+ unset LANG
+ unset LC_CTYPE
+ unset LC_NUMERIC
+ unset LC_TIME
+ unset LC_COLLATE
+ unset LC_MONETARY
+ unset LC_MESSAGES
+ unset LC_ALL
+ source "${EROOT%/}/etc/env.d/02locale"
+ [ -n "${LANG}" ] && export LANG
+ [ -n "${LC_CTYPE}" ] && export LC_CTYPE
+ [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
+ [ -n "${LC_TIME}" ] && export LC_TIME
+ [ -n "${LC_COLLATE}" ] && export LC_COLLATE
+ [ -n "${LC_MONETARY}" ] && export LC_MONETARY
+ [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
+ [ -n "${LC_ALL}" ] && export LC_ALL
+ fi
+
+ einfo "You can modify the paths and options passed to initdb by editing:"
+ einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+ einfo
+ einfo "Information on options that can be passed to initdb are found at:"
+ einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
+ einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
+ einfo
+ einfo "PG_INITDB_OPTS is currently set to:"
+ if [[ -z "${PG_INITDB_OPTS}" ]] ; then
+ einfo " (none)"
+ else
+ einfo " ${PG_INITDB_OPTS}"
+ fi
+ einfo
+ einfo "Configuration files will be installed to:"
+ einfo " ${PGDATA}"
+ einfo
+ einfo "The database cluster will be created in:"
+ einfo " ${DATA_DIR}"
+ einfo
+
+ ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
+ sleep 5
+ eend 0
+
+ if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
+ eerror "The given directory, '${DATA_DIR}', is not empty."
+ eerror "Modify DATA_DIR to point to an empty directory."
+ die "${DATA_DIR} is not empty."
+ fi
+
+ einfo "Creating the data directory ..."
+ if [[ ${EUID} == 0 ]] ; then
+ mkdir -p "${DATA_DIR}"
+ chown -Rf postgres:postgres "${DATA_DIR}"
+ chmod 0700 "${DATA_DIR}"
+ fi
+
+ einfo "Initializing the database ..."
+
+ if [[ ${EUID} == 0 ]] ; then
+ su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
+ else
+ "${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
+ fi
+
+ if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
+ mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
+ ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
+ fi
+
+ # unix_socket_directory has no effect in postgresql.conf as it's
+ # overridden in the initscript
+ sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
+
+ cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
+ # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
+ # On the off-chance that you might need to work with UTF-8 encoded
+ # characters in PL/Perl
+ plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
+ EOF
+
+ einfo "The autovacuum function, which was in contrib, has been moved to the main"
+ einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
+ einfo "by default. You can disable it in the cluster's:"
+ einfo " ${PGDATA%/}/postgresql.conf"
+ einfo
+ if ! use systemd; then
+ einfo "The PostgreSQL server, by default, will log events to:"
+ einfo " ${DATA_DIR%/}/postmaster.log"
+ einfo
+ fi
+ if use prefix ; then
+ einfo "The location of the configuration files have moved to:"
+ einfo " ${PGDATA}"
+ einfo "To start the server:"
+ einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
+ einfo "To stop:"
+ einfo " pg_ctl stop -D ${DATA_DIR}"
+ einfo
+ einfo "Or move the configuration files back:"
+ einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
+ elif use systemd; then
+ einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
+ einfo "instead of 'pg_ctl'."
+ else
+ einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
+ einfo "instead of 'pg_ctl'."
+ fi
+}
+
+src_test() {
+ if use server && [[ ${UID} -ne 0 ]] ; then
+ emake check
+
+ einfo "If you think other tests besides the regression tests are necessary, please"
+ einfo "submit a bug including a patch for this ebuild to enable them."
+ else
+ use server || \
+ ewarn 'Tests cannot be run without the "server" use flag enabled.'
+ [[ ${UID} -eq 0 ]] || \
+ ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
+
+ ewarn 'Skipping.'
+ fi
+}
diff --git a/dev-db/postgresql/postgresql-10.4.ebuild b/dev-db/postgresql/postgresql-10.4.ebuild
new file mode 100644
index 000000000000..50f0472a5668
--- /dev/null
+++ b/dev-db/postgresql/postgresql-10.4.ebuild
@@ -0,0 +1,460 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
+ systemd user versionator
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
+
+SLOT=$(get_major_version)
+
+MY_PV=${PV/_/}
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+SRC_URI="mirror://postgresql/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
+
+LICENSE="POSTGRESQL GPL-2"
+DESCRIPTION="PostgreSQL RDBMS"
+HOMEPAGE="https://www.postgresql.org/"
+
+IUSE="doc kerberos kernel_linux ldap libressl nls pam perl python +readline
+ selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+wanted_languages() {
+ local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
+ sk sl sv tr zh_CN zh_TW"
+ local enable_langs lingua
+
+ for lingua in ${linguas} ; do
+ has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
+ done
+
+ echo -n ${enable_langs}
+}
+
+CDEPEND="
+>=app-eselect/eselect-postgresql-2.0
+sys-apps/less
+virtual/libintl
+kerberos? ( virtual/krb5 )
+ldap? ( net-nds/openldap )
+pam? ( virtual/pam )
+perl? ( >=dev-lang/perl-5.8:= )
+python? ( ${PYTHON_DEPS} )
+readline? ( sys-libs/readline:0= )
+server? ( systemd? ( sys-apps/systemd ) )
+ssl? (
+ !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
+ libressl? ( dev-libs/libressl:= )
+)
+tcl? ( >=dev-lang/tcl-8:0= )
+xml? ( dev-libs/libxml2 dev-libs/libxslt )
+zlib? ( sys-libs/zlib )
+"
+
+# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
+# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
+# the libc includes UUID functions.
+UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
+BSD_LIBC=( elibc_{Free,Net,Open}BSD )
+
+nest_usedep() {
+ local front back
+ while [[ ${#} -gt 1 ]]; do
+ front+="${1}? ( "
+ back+=" )"
+ shift
+ done
+ echo "${front}${1}${back}"
+}
+
+IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
+CDEPEND+="
+uuid? (
+ ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
+ $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
+)"
+
+DEPEND="${CDEPEND}
+!!<sys-apps/sandbox-2.0
+sys-devel/bison
+sys-devel/flex
+nls? ( sys-devel/gettext )
+xml? ( virtual/pkgconfig )
+"
+
+RDEPEND="${CDEPEND}
+!dev-db/postgresql-docs:${SLOT}
+!dev-db/postgresql-base:${SLOT}
+!dev-db/postgresql-server:${SLOT}
+selinux? ( sec-policy/selinux-postgresql )
+"
+
+pkg_setup() {
+ use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
+
+ enewgroup postgres 70
+ enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
+
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # Work around PPC{,64} compilation bug where bool is already defined
+ sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
+
+ # Set proper run directory
+ sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
+ -i src/include/pg_config_manual.h || die
+
+ # Rely on $PATH being in the proper order so that the correct
+ # install program is used for modules utilizing PGXS in both
+ # hardened and non-hardened environments. (Bug #528786)
+ sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
+
+ use server || eapply "${FILESDIR}/${PN}-10.2-no-server.patch"
+
+ if use pam ; then
+ sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
+ -i src/backend/libpq/auth.c || \
+ die 'PGSQL_PAM_SERVICE rename failed.'
+ fi
+
+ eapply_user
+}
+
+src_configure() {
+ case ${CHOST} in
+ *-darwin*|*-solaris*)
+ use nls && append-libs intl
+ ;;
+ esac
+
+ export LDFLAGS_SL="${LDFLAGS}"
+ export LDFLAGS_EX="${LDFLAGS}"
+
+ local PO="${EPREFIX%/}"
+
+ local i uuid_config=""
+ if use uuid; then
+ for i in ${UTIL_LINUX_LIBC[@]}; do
+ use ${i} && uuid_config="--with-uuid=e2fs"
+ done
+ for i in ${BSD_LIBC[@]}; do
+ use ${i} && uuid_config="--with-uuid=bsd"
+ done
+ [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
+ fi
+
+ econf \
+ --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
+ --datadir="${PO}/usr/share/postgresql-${SLOT}" \
+ --docdir="${PO}/usr/share/doc/${PF}" \
+ --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 threads thread-safety) \
+ $(use_with kerberos gssapi) \
+ $(use_with ldap) \
+ $(use_with pam) \
+ $(use_with perl) \
+ $(use_with python) \
+ $(use_with readline) \
+ $(use_with ssl openssl) \
+ $(usex server "$(use_with systemd)" '--without-systemd') \
+ $(use_with tcl) \
+ ${uuid_config} \
+ $(use_with xml libxml) \
+ $(use_with xml libxslt) \
+ $(use_with zlib) \
+ "$(use_enable nls nls "$(wanted_languages)")"
+}
+
+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
+
+ use static-libs || find "${ED}" -name '*.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/.}"
+ done
+
+ if use doc ; then
+ docinto html
+ dodoc doc/src/sgml/html/*
+ fi
+
+ if use server; then
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
+
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
+
+ if use systemd; then
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.service-9.6-r1" | \
+ systemd_newunit - ${PN}-${SLOT}.service
+ newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
+ fi
+
+ use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
+
+ if use prefix ; then
+ keepdir /run/postgresql
+ fperms 1775 /run/postgresql
+ fi
+ fi
+}
+
+pkg_postinst() {
+ use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
+ postgresql-config update
+
+ elog "If you need a global psqlrc-file, you can place it in:"
+ elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
+
+ if use server ; then
+ elog
+ elog "Gentoo specific documentation:"
+ elog "https://wiki.gentoo.org/wiki/PostgreSQL"
+ elog
+ elog "Official documentation:"
+ elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
+ elog
+ elog "The default location of the Unix-domain socket is:"
+ elog " ${EROOT%/}/run/postgresql/"
+ elog
+ elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
+ elog "so that it contains your preferred locale in:"
+ elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+ elog
+ elog "Then, execute the following command to setup the initial database"
+ elog "environment:"
+ elog " emerge --config =${CATEGORY}/${PF}"
+ 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_beta1.ebuild b/dev-db/postgresql/postgresql-11_beta1.ebuild
new file mode 100644
index 000000000000..8c9760a046d5
--- /dev/null
+++ b/dev-db/postgresql/postgresql-11_beta1.ebuild
@@ -0,0 +1,449 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN
+ zh_TW"
+
+inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \
+ systemd user versionator
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
+
+SLOT=$(get_major_version)
+
+MY_PV=${PV/_/}
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+SRC_URI="mirror://postgresql/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
+
+LICENSE="POSTGRESQL GPL-2"
+DESCRIPTION="PostgreSQL RDBMS"
+HOMEPAGE="http://www.postgresql.org/"
+
+IUSE="doc kerberos kernel_linux ldap libressl nls pam perl python +readline
+ selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+CDEPEND="
+>=app-eselect/eselect-postgresql-2.0
+sys-apps/less
+virtual/libintl
+kerberos? ( virtual/krb5 )
+ldap? ( net-nds/openldap )
+pam? ( virtual/pam )
+perl? ( >=dev-lang/perl-5.8:= )
+python? ( ${PYTHON_DEPS} )
+readline? ( sys-libs/readline:0= )
+server? ( systemd? ( sys-apps/systemd ) )
+ssl? (
+ !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
+ libressl? ( dev-libs/libressl:= )
+)
+tcl? ( >=dev-lang/tcl-8:0= )
+xml? ( dev-libs/libxml2 dev-libs/libxslt )
+zlib? ( sys-libs/zlib )
+"
+
+# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
+# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
+# the libc includes UUID functions.
+UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
+BSD_LIBC=( elibc_{Free,Net,Open}BSD )
+
+nest_usedep() {
+ local front back
+ while [[ ${#} -gt 1 ]]; do
+ front+="${1}? ( "
+ back+=" )"
+ shift
+ done
+ echo "${front}${1}${back}"
+}
+
+IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
+CDEPEND+="
+uuid? (
+ ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
+ $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
+)"
+
+DEPEND="${CDEPEND}
+!!<sys-apps/sandbox-2.0
+sys-devel/bison
+sys-devel/flex
+nls? ( sys-devel/gettext )
+xml? ( virtual/pkgconfig )
+"
+
+RDEPEND="${CDEPEND}
+!dev-db/postgresql-docs:${SLOT}
+!dev-db/postgresql-base:${SLOT}
+!dev-db/postgresql-server:${SLOT}
+selinux? ( sec-policy/selinux-postgresql )
+"
+
+pkg_setup() {
+ use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
+
+ enewgroup postgres 70
+ enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
+
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # Set proper run directory
+ sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
+ -i src/include/pg_config_manual.h || die
+
+ # Rely on $PATH being in the proper order so that the correct
+ # install program is used for modules utilizing PGXS in both
+ # hardened and non-hardened environments. (Bug #528786)
+ sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
+
+ use server || eapply "${FILESDIR}/${PN}-11_beta1-no-server.patch"
+
+ if use pam ; then
+ sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
+ -i src/backend/libpq/auth.c || \
+ die 'PGSQL_PAM_SERVICE rename failed.'
+ fi
+
+ eapply_user
+}
+
+src_configure() {
+ case ${CHOST} in
+ *-darwin*|*-solaris*)
+ use nls && append-libs intl
+ ;;
+ esac
+
+ export LDFLAGS_SL="${LDFLAGS}"
+ export LDFLAGS_EX="${LDFLAGS}"
+
+ local PO="${EPREFIX%/}"
+
+ local i uuid_config=""
+ if use uuid; then
+ for i in ${UTIL_LINUX_LIBC[@]}; do
+ use ${i} && uuid_config="--with-uuid=e2fs"
+ done
+ for i in ${BSD_LIBC[@]}; do
+ use ${i} && uuid_config="--with-uuid=bsd"
+ done
+ [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
+ fi
+
+ econf \
+ --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
+ --datadir="${PO}/usr/share/postgresql-${SLOT}" \
+ --docdir="${PO}/usr/share/doc/${PF}" \
+ --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 threads thread-safety) \
+ $(use_with kerberos gssapi) \
+ $(use_with ldap) \
+ $(use_with pam) \
+ $(use_with perl) \
+ $(use_with python) \
+ $(use_with readline) \
+ $(use_with ssl openssl) \
+ $(usex server "$(use_with systemd)" '--without-systemd') \
+ $(use_with tcl) \
+ ${uuid_config} \
+ $(use_with xml libxml) \
+ $(use_with xml libxslt) \
+ $(use_with zlib) \
+ $(use_enable nls nls "'$(l10n_get_locales)'")
+}
+
+src_compile() {
+ emake
+ emake -C contrib
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ emake DESTDIR="${D}" install -C contrib
+
+ dodoc README HISTORY doc/{TODO,bug.template}
+
+ # man pages are already built, but if we have the target make them,
+ # they'll be generated from source before being installed so we
+ # manually install man pages.
+ # We use ${SLOT} instead of doman for postgresql.eselect
+ insinto /usr/share/postgresql-${SLOT}/man/
+ doins -r doc/src/sgml/man{1,3,7}
+ if ! use server; then
+ # Remove man pages for non-existent binaries
+ 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
+
+ use static-libs || find "${ED}" -name '*.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/.}"
+ done
+
+ if use doc ; then
+ docinto html
+ dodoc doc/src/sgml/html/*
+ fi
+
+ if use server; then
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
+
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
+
+ if use systemd; then
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.service-9.6-r1" | \
+ systemd_newunit - ${PN}-${SLOT}.service
+ newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
+ fi
+
+ use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
+
+ if use prefix ; then
+ keepdir /run/postgresql
+ fperms 1775 /run/postgresql
+ fi
+ fi
+}
+
+pkg_postinst() {
+ use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
+ postgresql-config update
+
+ elog "If you need a global psqlrc-file, you can place it in:"
+ elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
+
+ if use server ; then
+ elog
+ elog "Gentoo specific documentation:"
+ elog "https://wiki.gentoo.org/wiki/PostgreSQL"
+ elog
+ elog "Official documentation:"
+ elog "http://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 " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
+ einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
+ einfo
+ einfo "PG_INITDB_OPTS is currently set to:"
+ if [[ -z "${PG_INITDB_OPTS}" ]] ; then
+ einfo " (none)"
+ else
+ einfo " ${PG_INITDB_OPTS}"
+ fi
+ einfo
+ einfo "Configuration files will be installed to:"
+ einfo " ${PGDATA}"
+ einfo
+ einfo "The database cluster will be created in:"
+ einfo " ${DATA_DIR}"
+ einfo
+
+ ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
+ sleep 5
+ eend 0
+
+ if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
+ eerror "The given directory, '${DATA_DIR}', is not empty."
+ eerror "Modify DATA_DIR to point to an empty directory."
+ die "${DATA_DIR} is not empty."
+ fi
+
+ einfo "Creating the data directory ..."
+ if [[ ${EUID} == 0 ]] ; then
+ mkdir -p "${DATA_DIR}"
+ chown -Rf postgres:postgres "${DATA_DIR}"
+ chmod 0700 "${DATA_DIR}"
+ fi
+
+ einfo "Initializing the database ..."
+
+ if [[ ${EUID} == 0 ]] ; then
+ su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
+ else
+ "${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
+ fi
+
+ if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
+ mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
+ ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
+ fi
+
+ # unix_socket_directory has no effect in postgresql.conf as it's
+ # overridden in the initscript
+ sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
+
+ cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
+ # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
+ # On the off-chance that you might need to work with UTF-8 encoded
+ # characters in PL/Perl
+ plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
+ EOF
+
+ einfo "The autovacuum function, which was in contrib, has been moved to the main"
+ einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
+ einfo "by default. You can disable it in the cluster's:"
+ einfo " ${PGDATA%/}/postgresql.conf"
+ einfo
+ if ! use systemd; then
+ einfo "The PostgreSQL server, by default, will log events to:"
+ einfo " ${DATA_DIR%/}/postmaster.log"
+ einfo
+ fi
+ if use prefix ; then
+ einfo "The location of the configuration files have moved to:"
+ einfo " ${PGDATA}"
+ einfo "To start the server:"
+ einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
+ einfo "To stop:"
+ einfo " pg_ctl stop -D ${DATA_DIR}"
+ einfo
+ einfo "Or move the configuration files back:"
+ einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
+ elif use systemd; then
+ einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
+ einfo "instead of 'pg_ctl'."
+ else
+ einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
+ einfo "instead of 'pg_ctl'."
+ fi
+}
+
+src_test() {
+ if use server && [[ ${UID} -ne 0 ]] ; then
+ emake check
+
+ einfo "If you think other tests besides the regression tests are necessary, please"
+ einfo "submit a bug including a patch for this ebuild to enable them."
+ else
+ use server || \
+ ewarn 'Tests cannot be run without the "server" use flag enabled.'
+ [[ ${UID} -eq 0 ]] || \
+ ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
+
+ ewarn 'Skipping.'
+ fi
+}
diff --git a/dev-db/postgresql/postgresql-9.3.22.ebuild b/dev-db/postgresql/postgresql-9.3.22.ebuild
new file mode 100644
index 000000000000..e1ed1641a5fc
--- /dev/null
+++ b/dev-db/postgresql/postgresql-9.3.22.ebuild
@@ -0,0 +1,450 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
+ systemd user versionator
+
+KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
+
+SLOT="$(get_version_component_range 1-2)"
+
+SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
+
+LICENSE="POSTGRESQL GPL-2"
+DESCRIPTION="PostgreSQL RDBMS"
+HOMEPAGE="https://www.postgresql.org/"
+
+IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
+ +readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+wanted_languages() {
+ local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
+ sk sl sv tr zh_CN zh_TW"
+ local enable_langs lingua
+
+ for lingua in ${linguas} ; do
+ has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
+ done
+
+ echo -n ${enable_langs}
+}
+
+CDEPEND="
+>=app-eselect/eselect-postgresql-2.0
+sys-apps/less
+virtual/libintl
+kerberos? ( virtual/krb5 )
+ldap? ( net-nds/openldap )
+pam? ( virtual/pam )
+perl? ( >=dev-lang/perl-5.8:= )
+python? ( ${PYTHON_DEPS} )
+readline? ( sys-libs/readline:0= )
+ssl? (
+ !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
+ libressl? ( dev-libs/libressl:= )
+)
+tcl? ( >=dev-lang/tcl-8:0= )
+uuid? ( dev-libs/ossp-uuid )
+xml? ( dev-libs/libxml2 dev-libs/libxslt )
+zlib? ( sys-libs/zlib )
+"
+
+DEPEND="${CDEPEND}
+!!<sys-apps/sandbox-2.0
+sys-devel/bison
+sys-devel/flex
+nls? ( sys-devel/gettext )
+xml? ( virtual/pkgconfig )
+"
+
+RDEPEND="${CDEPEND}
+!dev-db/postgresql-docs:${SLOT}
+!dev-db/postgresql-base:${SLOT}
+!dev-db/postgresql-server:${SLOT}
+selinux? ( sec-policy/selinux-postgresql )
+"
+
+pkg_setup() {
+ use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
+
+ enewgroup postgres 70
+ enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
+
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # Work around PPC{,64} compilation bug where bool is already defined
+ sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
+
+ # Set proper run directory
+ sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
+ -i src/include/pg_config_manual.h || die
+
+ # Rely on $PATH being in the proper order so that the correct
+ # install program is used for modules utilizing PGXS in both
+ # hardened and non-hardened environments. (Bug #528786)
+ sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
+
+ use server || eapply "${FILESDIR}/${PN}-${SLOT}-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%/}"
+
+ econf \
+ --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
+ --datadir="${PO}/usr/share/postgresql-${SLOT}" \
+ --docdir="${PO}/usr/share/doc/${PF}" \
+ --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 !pg_legacytimestamp integer-datetimes) \
+ $(use_enable threads thread-safety) \
+ $(use_with kerberos gssapi) \
+ $(use_with kerberos krb5) \
+ $(use_with ldap) \
+ $(use_with pam) \
+ $(use_with perl) \
+ $(use_with python) \
+ $(use_with readline) \
+ $(use_with ssl openssl) \
+ $(use_with tcl) \
+ $(use_with uuid ossp-uuid) \
+ $(use_with xml libxml) \
+ $(use_with xml libxslt) \
+ $(use_with zlib) \
+ "$(use_enable nls nls "$(wanted_languages)")"
+}
+
+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
+
+ use static-libs || find "${ED}" -name '*.a' -delete
+
+ local f bn
+ for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
+ -mindepth 1 -maxdepth 1)
+ do
+ bn=$(basename "${f}")
+ # Temporarily tack on tmp to workaround a file collision
+ # issue. This is only necessary for 9.7 and earlier. 10 never
+ # had this issue.
+ dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
+ "/usr/bin/${bn}${SLOT/.}tmp"
+ done
+
+ if use doc ; then
+ docinto html
+ dodoc doc/src/sgml/html/*
+
+ docinto sgml
+ dodoc doc/src/sgml/*.{sgml,dsl}
+ fi
+
+ if use server; then
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
+
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
+
+ if use systemd; then
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.service-9.2" | \
+ systemd_newunit - ${PN}-${SLOT}.service
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
+ fi
+
+ newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
+
+ use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
+
+ if use prefix ; then
+ keepdir /run/postgresql
+ fperms 1775 /run/postgresql
+ fi
+ fi
+}
+
+pkg_preinst() {
+ # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
+ # /usr/bin/psql96). They may have been created by the
+ # postgresql.eselect module, but they're handled within this ebuild
+ # now. It's alright if we momentarily delete /usr/bin/psql as it
+ # will be recreated by the eselect module in pkg_ppostinst(). This
+ # is only necessary for 9.7 and earlier. 10 and later were never
+ # handled in this manner.
+ local canonicalise
+ if type -p realpath > /dev/null; then
+ canonicalise=realpath
+ elif type -p readlink > /dev/null; then
+ canonicalise='readlink -f'
+ else
+ # can't die, subshell
+ die "No readlink nor realpath found, cannot canonicalise"
+ fi
+
+ local l
+ # First remove any symlinks in /usr/bin that may have been created
+ # by the old eselect
+ for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
+ if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
+ rm "${l}" || ewarn "Couldn't remove ${l}"
+ fi
+ done
+
+ # Then move the symlinks created by the ebuild to their proper place.
+ for l in "${ED}"/usr/bin/*tmp ; do
+ mv "${l}" "${l%tmp}" \
+ || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
+ done
+}
+
+pkg_postinst() {
+ use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
+ postgresql-config update
+
+ elog "If you need a global psqlrc-file, you can place it in:"
+ elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
+
+ if use server ; then
+ elog
+ elog "Gentoo specific documentation:"
+ elog "https://wiki.gentoo.org/wiki/PostgreSQL"
+ elog
+ elog "Official documentation:"
+ elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
+ elog
+ elog "The default location of the Unix-domain socket is:"
+ elog " ${EROOT%/}/run/postgresql/"
+ elog
+ elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
+ elog "so that it contains your preferred locale in:"
+ elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+ elog
+ elog "Then, execute the following command to setup the initial database"
+ elog "environment:"
+ elog " emerge --config =${CATEGORY}/${PF}"
+ fi
+}
+
+pkg_prerm() {
+ if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
+ ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
+ ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
+
+ ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
+ sleep 10
+ eend 0
+ fi
+}
+
+pkg_postrm() {
+ postgresql-config update
+}
+
+pkg_config() {
+ use server || die "USE flag 'server' not enabled. Nothing to configure."
+
+ [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
+ && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+ [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
+ [[ -z "${DATA_DIR}" ]] \
+ && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
+
+ # environment.bz2 may not contain the same locale as the current system
+ # locale. Unset and source from the current system locale.
+ if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
+ unset LANG
+ unset LC_CTYPE
+ unset LC_NUMERIC
+ unset LC_TIME
+ unset LC_COLLATE
+ unset LC_MONETARY
+ unset LC_MESSAGES
+ unset LC_ALL
+ source "${EROOT%/}/etc/env.d/02locale"
+ [ -n "${LANG}" ] && export LANG
+ [ -n "${LC_CTYPE}" ] && export LC_CTYPE
+ [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
+ [ -n "${LC_TIME}" ] && export LC_TIME
+ [ -n "${LC_COLLATE}" ] && export LC_COLLATE
+ [ -n "${LC_MONETARY}" ] && export LC_MONETARY
+ [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
+ [ -n "${LC_ALL}" ] && export LC_ALL
+ fi
+
+ einfo "You can modify the paths and options passed to initdb by editing:"
+ einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+ einfo
+ einfo "Information on options that can be passed to initdb are found at:"
+ einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
+ einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
+ einfo
+ einfo "PG_INITDB_OPTS is currently set to:"
+ if [[ -z "${PG_INITDB_OPTS}" ]] ; then
+ einfo " (none)"
+ else
+ einfo " ${PG_INITDB_OPTS}"
+ fi
+ einfo
+ einfo "Configuration files will be installed to:"
+ einfo " ${PGDATA}"
+ einfo
+ einfo "The database cluster will be created in:"
+ einfo " ${DATA_DIR}"
+ einfo
+
+ ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
+ sleep 5
+ eend 0
+
+ if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
+ eerror "The given directory, '${DATA_DIR}', is not empty."
+ eerror "Modify DATA_DIR to point to an empty directory."
+ die "${DATA_DIR} is not empty."
+ fi
+
+ einfo "Creating the data directory ..."
+ if [[ ${EUID} == 0 ]] ; then
+ mkdir -p "${DATA_DIR}"
+ chown -Rf postgres:postgres "${DATA_DIR}"
+ chmod 0700 "${DATA_DIR}"
+ fi
+
+ einfo "Initializing the database ..."
+
+ if [[ ${EUID} == 0 ]] ; then
+ su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
+ else
+ "${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
+ fi
+
+ if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
+ mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
+ ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
+ fi
+
+ # unix_socket_directory has no effect in postgresql.conf as it's
+ # overridden in the initscript
+ sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
+
+ cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
+ # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
+ # On the off-chance that you might need to work with UTF-8 encoded
+ # characters in PL/Perl
+ plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
+ EOF
+
+ einfo "The autovacuum function, which was in contrib, has been moved to the main"
+ einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
+ einfo "by default. You can disable it in the cluster's:"
+ einfo " ${PGDATA%/}/postgresql.conf"
+ einfo
+ einfo "The PostgreSQL server, by default, will log events to:"
+ einfo " ${DATA_DIR%/}/postmaster.log"
+ einfo
+ if use prefix ; then
+ einfo "The location of the configuration files have moved to:"
+ einfo " ${PGDATA}"
+ einfo "To start the server:"
+ einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
+ einfo "To stop:"
+ einfo " pg_ctl stop -D ${DATA_DIR}"
+ einfo
+ einfo "Or move the configuration files back:"
+ einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
+ else
+ einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
+ einfo "instead of 'pg_ctl'."
+ fi
+}
+
+src_test() {
+ if use server && [[ ${UID} -ne 0 ]] ; then
+ emake check
+
+ einfo "If you think other tests besides the regression tests are necessary, please"
+ einfo "submit a bug including a patch for this ebuild to enable them."
+ else
+ use server || \
+ ewarn 'Tests cannot be run without the "server" use flag enabled.'
+ [[ ${UID} -eq 0 ]] || \
+ ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
+
+ ewarn 'Skipping.'
+ fi
+}
diff --git a/dev-db/postgresql/postgresql-9.3.23.ebuild b/dev-db/postgresql/postgresql-9.3.23.ebuild
new file mode 100644
index 000000000000..b102a6c5fabb
--- /dev/null
+++ b/dev-db/postgresql/postgresql-9.3.23.ebuild
@@ -0,0 +1,450 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
+ systemd user versionator
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
+
+SLOT="$(get_version_component_range 1-2)"
+
+SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
+
+LICENSE="POSTGRESQL GPL-2"
+DESCRIPTION="PostgreSQL RDBMS"
+HOMEPAGE="https://www.postgresql.org/"
+
+IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
+ +readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+wanted_languages() {
+ local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
+ sk sl sv tr zh_CN zh_TW"
+ local enable_langs lingua
+
+ for lingua in ${linguas} ; do
+ has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
+ done
+
+ echo -n ${enable_langs}
+}
+
+CDEPEND="
+>=app-eselect/eselect-postgresql-2.0
+sys-apps/less
+virtual/libintl
+kerberos? ( virtual/krb5 )
+ldap? ( net-nds/openldap )
+pam? ( virtual/pam )
+perl? ( >=dev-lang/perl-5.8:= )
+python? ( ${PYTHON_DEPS} )
+readline? ( sys-libs/readline:0= )
+ssl? (
+ !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
+ libressl? ( dev-libs/libressl:= )
+)
+tcl? ( >=dev-lang/tcl-8:0= )
+uuid? ( dev-libs/ossp-uuid )
+xml? ( dev-libs/libxml2 dev-libs/libxslt )
+zlib? ( sys-libs/zlib )
+"
+
+DEPEND="${CDEPEND}
+!!<sys-apps/sandbox-2.0
+sys-devel/bison
+sys-devel/flex
+nls? ( sys-devel/gettext )
+xml? ( virtual/pkgconfig )
+"
+
+RDEPEND="${CDEPEND}
+!dev-db/postgresql-docs:${SLOT}
+!dev-db/postgresql-base:${SLOT}
+!dev-db/postgresql-server:${SLOT}
+selinux? ( sec-policy/selinux-postgresql )
+"
+
+pkg_setup() {
+ use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
+
+ enewgroup postgres 70
+ enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
+
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # Work around PPC{,64} compilation bug where bool is already defined
+ sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
+
+ # Set proper run directory
+ sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
+ -i src/include/pg_config_manual.h || die
+
+ # Rely on $PATH being in the proper order so that the correct
+ # install program is used for modules utilizing PGXS in both
+ # hardened and non-hardened environments. (Bug #528786)
+ sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
+
+ use server || eapply "${FILESDIR}/${PN}-${SLOT}-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%/}"
+
+ econf \
+ --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
+ --datadir="${PO}/usr/share/postgresql-${SLOT}" \
+ --docdir="${PO}/usr/share/doc/${PF}" \
+ --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 !pg_legacytimestamp integer-datetimes) \
+ $(use_enable threads thread-safety) \
+ $(use_with kerberos gssapi) \
+ $(use_with kerberos krb5) \
+ $(use_with ldap) \
+ $(use_with pam) \
+ $(use_with perl) \
+ $(use_with python) \
+ $(use_with readline) \
+ $(use_with ssl openssl) \
+ $(use_with tcl) \
+ $(use_with uuid ossp-uuid) \
+ $(use_with xml libxml) \
+ $(use_with xml libxslt) \
+ $(use_with zlib) \
+ "$(use_enable nls nls "$(wanted_languages)")"
+}
+
+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
+
+ use static-libs || find "${ED}" -name '*.a' -delete
+
+ local f bn
+ for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
+ -mindepth 1 -maxdepth 1)
+ do
+ bn=$(basename "${f}")
+ # Temporarily tack on tmp to workaround a file collision
+ # issue. This is only necessary for 9.7 and earlier. 10 never
+ # had this issue.
+ dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
+ "/usr/bin/${bn}${SLOT/.}tmp"
+ done
+
+ if use doc ; then
+ docinto html
+ dodoc doc/src/sgml/html/*
+
+ docinto sgml
+ dodoc doc/src/sgml/*.{sgml,dsl}
+ fi
+
+ if use server; then
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
+
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
+
+ if use systemd; then
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.service-9.2" | \
+ systemd_newunit - ${PN}-${SLOT}.service
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
+ fi
+
+ newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
+
+ use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
+
+ if use prefix ; then
+ keepdir /run/postgresql
+ fperms 1775 /run/postgresql
+ fi
+ fi
+}
+
+pkg_preinst() {
+ # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
+ # /usr/bin/psql96). They may have been created by the
+ # postgresql.eselect module, but they're handled within this ebuild
+ # now. It's alright if we momentarily delete /usr/bin/psql as it
+ # will be recreated by the eselect module in pkg_ppostinst(). This
+ # is only necessary for 9.7 and earlier. 10 and later were never
+ # handled in this manner.
+ local canonicalise
+ if type -p realpath > /dev/null; then
+ canonicalise=realpath
+ elif type -p readlink > /dev/null; then
+ canonicalise='readlink -f'
+ else
+ # can't die, subshell
+ die "No readlink nor realpath found, cannot canonicalise"
+ fi
+
+ local l
+ # First remove any symlinks in /usr/bin that may have been created
+ # by the old eselect
+ for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
+ if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
+ rm "${l}" || ewarn "Couldn't remove ${l}"
+ fi
+ done
+
+ # Then move the symlinks created by the ebuild to their proper place.
+ for l in "${ED}"/usr/bin/*tmp ; do
+ mv "${l}" "${l%tmp}" \
+ || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
+ done
+}
+
+pkg_postinst() {
+ use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
+ postgresql-config update
+
+ elog "If you need a global psqlrc-file, you can place it in:"
+ elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
+
+ if use server ; then
+ elog
+ elog "Gentoo specific documentation:"
+ elog "https://wiki.gentoo.org/wiki/PostgreSQL"
+ elog
+ elog "Official documentation:"
+ elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
+ elog
+ elog "The default location of the Unix-domain socket is:"
+ elog " ${EROOT%/}/run/postgresql/"
+ elog
+ elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
+ elog "so that it contains your preferred locale in:"
+ elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+ elog
+ elog "Then, execute the following command to setup the initial database"
+ elog "environment:"
+ elog " emerge --config =${CATEGORY}/${PF}"
+ fi
+}
+
+pkg_prerm() {
+ if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
+ ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
+ ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
+
+ ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
+ sleep 10
+ eend 0
+ fi
+}
+
+pkg_postrm() {
+ postgresql-config update
+}
+
+pkg_config() {
+ use server || die "USE flag 'server' not enabled. Nothing to configure."
+
+ [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
+ && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+ [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
+ [[ -z "${DATA_DIR}" ]] \
+ && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
+
+ # environment.bz2 may not contain the same locale as the current system
+ # locale. Unset and source from the current system locale.
+ if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
+ unset LANG
+ unset LC_CTYPE
+ unset LC_NUMERIC
+ unset LC_TIME
+ unset LC_COLLATE
+ unset LC_MONETARY
+ unset LC_MESSAGES
+ unset LC_ALL
+ source "${EROOT%/}/etc/env.d/02locale"
+ [ -n "${LANG}" ] && export LANG
+ [ -n "${LC_CTYPE}" ] && export LC_CTYPE
+ [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
+ [ -n "${LC_TIME}" ] && export LC_TIME
+ [ -n "${LC_COLLATE}" ] && export LC_COLLATE
+ [ -n "${LC_MONETARY}" ] && export LC_MONETARY
+ [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
+ [ -n "${LC_ALL}" ] && export LC_ALL
+ fi
+
+ einfo "You can modify the paths and options passed to initdb by editing:"
+ einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+ einfo
+ einfo "Information on options that can be passed to initdb are found at:"
+ einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
+ einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
+ einfo
+ einfo "PG_INITDB_OPTS is currently set to:"
+ if [[ -z "${PG_INITDB_OPTS}" ]] ; then
+ einfo " (none)"
+ else
+ einfo " ${PG_INITDB_OPTS}"
+ fi
+ einfo
+ einfo "Configuration files will be installed to:"
+ einfo " ${PGDATA}"
+ einfo
+ einfo "The database cluster will be created in:"
+ einfo " ${DATA_DIR}"
+ einfo
+
+ ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
+ sleep 5
+ eend 0
+
+ if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
+ eerror "The given directory, '${DATA_DIR}', is not empty."
+ eerror "Modify DATA_DIR to point to an empty directory."
+ die "${DATA_DIR} is not empty."
+ fi
+
+ einfo "Creating the data directory ..."
+ if [[ ${EUID} == 0 ]] ; then
+ mkdir -p "${DATA_DIR}"
+ chown -Rf postgres:postgres "${DATA_DIR}"
+ chmod 0700 "${DATA_DIR}"
+ fi
+
+ einfo "Initializing the database ..."
+
+ if [[ ${EUID} == 0 ]] ; then
+ su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
+ else
+ "${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
+ fi
+
+ if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
+ mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
+ ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
+ fi
+
+ # unix_socket_directory has no effect in postgresql.conf as it's
+ # overridden in the initscript
+ sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
+
+ cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
+ # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
+ # On the off-chance that you might need to work with UTF-8 encoded
+ # characters in PL/Perl
+ plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
+ EOF
+
+ einfo "The autovacuum function, which was in contrib, has been moved to the main"
+ einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
+ einfo "by default. You can disable it in the cluster's:"
+ einfo " ${PGDATA%/}/postgresql.conf"
+ einfo
+ einfo "The PostgreSQL server, by default, will log events to:"
+ einfo " ${DATA_DIR%/}/postmaster.log"
+ einfo
+ if use prefix ; then
+ einfo "The location of the configuration files have moved to:"
+ einfo " ${PGDATA}"
+ einfo "To start the server:"
+ einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
+ einfo "To stop:"
+ einfo " pg_ctl stop -D ${DATA_DIR}"
+ einfo
+ einfo "Or move the configuration files back:"
+ einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
+ else
+ einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
+ einfo "instead of 'pg_ctl'."
+ fi
+}
+
+src_test() {
+ if use server && [[ ${UID} -ne 0 ]] ; then
+ emake check
+
+ einfo "If you think other tests besides the regression tests are necessary, please"
+ einfo "submit a bug including a patch for this ebuild to enable them."
+ else
+ use server || \
+ ewarn 'Tests cannot be run without the "server" use flag enabled.'
+ [[ ${UID} -eq 0 ]] || \
+ ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
+
+ ewarn 'Skipping.'
+ fi
+}
diff --git a/dev-db/postgresql/postgresql-9.4.17.ebuild b/dev-db/postgresql/postgresql-9.4.17.ebuild
new file mode 100644
index 000000000000..6e9dd5d11fe6
--- /dev/null
+++ b/dev-db/postgresql/postgresql-9.4.17.ebuild
@@ -0,0 +1,482 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
+ systemd user versionator
+
+KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
+
+SLOT="$(get_version_component_range 1-2)"
+
+SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
+
+LICENSE="POSTGRESQL GPL-2"
+DESCRIPTION="PostgreSQL RDBMS"
+HOMEPAGE="https://www.postgresql.org/"
+
+IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
+ +readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+wanted_languages() {
+ local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
+ sk sl sv tr zh_CN zh_TW"
+ local enable_langs lingua
+
+ for lingua in ${linguas} ; do
+ has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
+ done
+
+ echo -n ${enable_langs}
+}
+
+CDEPEND="
+>=app-eselect/eselect-postgresql-2.0
+sys-apps/less
+virtual/libintl
+kerberos? ( virtual/krb5 )
+ldap? ( net-nds/openldap )
+pam? ( virtual/pam )
+perl? ( >=dev-lang/perl-5.8:= )
+python? ( ${PYTHON_DEPS} )
+readline? ( sys-libs/readline:0= )
+ssl? (
+ !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
+ libressl? ( dev-libs/libressl:= )
+)
+tcl? ( >=dev-lang/tcl-8:0= )
+xml? ( dev-libs/libxml2 dev-libs/libxslt )
+zlib? ( sys-libs/zlib )
+"
+
+# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
+# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
+# the libc includes UUID functions.
+UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
+BSD_LIBC=( elibc_{Free,Net,Open}BSD )
+
+nest_usedep() {
+ local front back
+ while [[ ${#} -gt 1 ]]; do
+ front+="${1}? ( "
+ back+=" )"
+ shift
+ done
+ echo "${front}${1}${back}"
+}
+
+IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
+CDEPEND+="
+uuid? (
+ ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
+ $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
+)"
+
+DEPEND="${CDEPEND}
+!!<sys-apps/sandbox-2.0
+sys-devel/bison
+sys-devel/flex
+nls? ( sys-devel/gettext )
+xml? ( virtual/pkgconfig )
+"
+
+RDEPEND="${CDEPEND}
+!dev-db/postgresql-docs:${SLOT}
+!dev-db/postgresql-base:${SLOT}
+!dev-db/postgresql-server:${SLOT}
+selinux? ( sec-policy/selinux-postgresql )
+"
+
+pkg_setup() {
+ use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
+
+ enewgroup postgres 70
+ enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
+
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # Work around PPC{,64} compilation bug where bool is already defined
+ sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
+
+ # Set proper run directory
+ sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
+ -i src/include/pg_config_manual.h || die
+
+ # Rely on $PATH being in the proper order so that the correct
+ # install program is used for modules utilizing PGXS in both
+ # hardened and non-hardened environments. (Bug #528786)
+ sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
+
+ use server || eapply "${FILESDIR}/${PN}-9.4.10-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}" \
+ --docdir="${PO}/usr/share/doc/${PF}" \
+ --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 !pg_legacytimestamp integer-datetimes) \
+ $(use_enable threads thread-safety) \
+ $(use_with kerberos gssapi) \
+ $(use_with ldap) \
+ $(use_with pam) \
+ $(use_with perl) \
+ $(use_with python) \
+ $(use_with readline) \
+ $(use_with ssl openssl) \
+ $(use_with tcl) \
+ ${uuid_config} \
+ $(use_with xml libxml) \
+ $(use_with xml libxslt) \
+ $(use_with zlib) \
+ "$(use_enable nls nls "$(wanted_languages)")"
+}
+
+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
+
+ use static-libs || find "${ED}" -name '*.a' -delete
+
+ local f bn
+ for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
+ -mindepth 1 -maxdepth 1)
+ do
+ bn=$(basename "${f}")
+ # Temporarily tack on tmp to workaround a file collision
+ # issue. This is only necessary for 9.7 and earlier. 10 never
+ # had this issue.
+ dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
+ "/usr/bin/${bn}${SLOT/.}tmp"
+ done
+
+ if use doc ; then
+ docinto html
+ dodoc doc/src/sgml/html/*
+
+ docinto sgml
+ dodoc doc/src/sgml/*.{sgml,dsl}
+ fi
+
+ if use server; then
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
+
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
+
+ if use systemd; then
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.service-9.2" | \
+ systemd_newunit - ${PN}-${SLOT}.service
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
+ fi
+
+ newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
+
+ use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
+
+ if use prefix ; then
+ keepdir /run/postgresql
+ fperms 1775 /run/postgresql
+ fi
+ fi
+}
+
+pkg_preinst() {
+ # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
+ # /usr/bin/psql96). They may have been created by the
+ # postgresql.eselect module, but they're handled within this ebuild
+ # now. It's alright if we momentarily delete /usr/bin/psql as it
+ # will be recreated by the eselect module in pkg_ppostinst(). This
+ # is only necessary for 9.7 and earlier. 10 and later were never
+ # handled in this manner.
+ local canonicalise
+ if type -p realpath > /dev/null; then
+ canonicalise=realpath
+ elif type -p readlink > /dev/null; then
+ canonicalise='readlink -f'
+ else
+ # can't die, subshell
+ die "No readlink nor realpath found, cannot canonicalise"
+ fi
+
+ local l
+ # First remove any symlinks in /usr/bin that may have been created
+ # by the old eselect
+ for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
+ if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
+ rm "${l}" || ewarn "Couldn't remove ${l}"
+ fi
+ done
+
+ # Then move the symlinks created by the ebuild to their proper place.
+ for l in "${ED}"/usr/bin/*tmp ; do
+ mv "${l}" "${l%tmp}" \
+ || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
+ done
+}
+
+pkg_postinst() {
+ use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
+ postgresql-config update
+
+ elog "If you need a global psqlrc-file, you can place it in:"
+ elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
+
+ if use server ; then
+ elog
+ elog "Gentoo specific documentation:"
+ elog "https://wiki.gentoo.org/wiki/PostgreSQL"
+ elog
+ elog "Official documentation:"
+ elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
+ elog
+ elog "The default location of the Unix-domain socket is:"
+ elog " ${EROOT%/}/run/postgresql/"
+ elog
+ elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
+ elog "so that it contains your preferred locale in:"
+ elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+ elog
+ elog "Then, execute the following command to setup the initial database"
+ elog "environment:"
+ elog " emerge --config =${CATEGORY}/${PF}"
+ fi
+}
+
+pkg_prerm() {
+ if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
+ ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
+ ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
+
+ ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
+ sleep 10
+ eend 0
+ fi
+}
+
+pkg_postrm() {
+ postgresql-config update
+}
+
+pkg_config() {
+ use server || die "USE flag 'server' not enabled. Nothing to configure."
+
+ [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
+ && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+ [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
+ [[ -z "${DATA_DIR}" ]] \
+ && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
+
+ # environment.bz2 may not contain the same locale as the current system
+ # locale. Unset and source from the current system locale.
+ if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
+ unset LANG
+ unset LC_CTYPE
+ unset LC_NUMERIC
+ unset LC_TIME
+ unset LC_COLLATE
+ unset LC_MONETARY
+ unset LC_MESSAGES
+ unset LC_ALL
+ source "${EROOT%/}/etc/env.d/02locale"
+ [ -n "${LANG}" ] && export LANG
+ [ -n "${LC_CTYPE}" ] && export LC_CTYPE
+ [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
+ [ -n "${LC_TIME}" ] && export LC_TIME
+ [ -n "${LC_COLLATE}" ] && export LC_COLLATE
+ [ -n "${LC_MONETARY}" ] && export LC_MONETARY
+ [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
+ [ -n "${LC_ALL}" ] && export LC_ALL
+ fi
+
+ einfo "You can modify the paths and options passed to initdb by editing:"
+ einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+ einfo
+ einfo "Information on options that can be passed to initdb are found at:"
+ einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
+ einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
+ einfo
+ einfo "PG_INITDB_OPTS is currently set to:"
+ if [[ -z "${PG_INITDB_OPTS}" ]] ; then
+ einfo " (none)"
+ else
+ einfo " ${PG_INITDB_OPTS}"
+ fi
+ einfo
+ einfo "Configuration files will be installed to:"
+ einfo " ${PGDATA}"
+ einfo
+ einfo "The database cluster will be created in:"
+ einfo " ${DATA_DIR}"
+ einfo
+
+ ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
+ sleep 5
+ eend 0
+
+ if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
+ eerror "The given directory, '${DATA_DIR}', is not empty."
+ eerror "Modify DATA_DIR to point to an empty directory."
+ die "${DATA_DIR} is not empty."
+ fi
+
+ einfo "Creating the data directory ..."
+ if [[ ${EUID} == 0 ]] ; then
+ mkdir -p "${DATA_DIR}"
+ chown -Rf postgres:postgres "${DATA_DIR}"
+ chmod 0700 "${DATA_DIR}"
+ fi
+
+ einfo "Initializing the database ..."
+
+ if [[ ${EUID} == 0 ]] ; then
+ su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
+ else
+ "${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
+ fi
+
+ if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
+ mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
+ ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
+ fi
+
+ # unix_socket_directory has no effect in postgresql.conf as it's
+ # overridden in the initscript
+ sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
+
+ cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
+ # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
+ # On the off-chance that you might need to work with UTF-8 encoded
+ # characters in PL/Perl
+ plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
+ EOF
+
+ einfo "The autovacuum function, which was in contrib, has been moved to the main"
+ einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
+ einfo "by default. You can disable it in the cluster's:"
+ einfo " ${PGDATA%/}/postgresql.conf"
+ einfo
+ einfo "The PostgreSQL server, by default, will log events to:"
+ einfo " ${DATA_DIR%/}/postmaster.log"
+ einfo
+ if use prefix ; then
+ einfo "The location of the configuration files have moved to:"
+ einfo " ${PGDATA}"
+ einfo "To start the server:"
+ einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
+ einfo "To stop:"
+ einfo " pg_ctl stop -D ${DATA_DIR}"
+ einfo
+ einfo "Or move the configuration files back:"
+ einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
+ else
+ einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
+ einfo "instead of 'pg_ctl'."
+ fi
+}
+
+src_test() {
+ if use server && [[ ${UID} -ne 0 ]] ; then
+ emake check
+
+ einfo "If you think other tests besides the regression tests are necessary, please"
+ einfo "submit a bug including a patch for this ebuild to enable them."
+ else
+ use server || \
+ ewarn 'Tests cannot be run without the "server" use flag enabled.'
+ [[ ${UID} -eq 0 ]] || \
+ ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
+
+ ewarn 'Skipping.'
+ fi
+}
diff --git a/dev-db/postgresql/postgresql-9.4.18.ebuild b/dev-db/postgresql/postgresql-9.4.18.ebuild
new file mode 100644
index 000000000000..7243cdb0dd49
--- /dev/null
+++ b/dev-db/postgresql/postgresql-9.4.18.ebuild
@@ -0,0 +1,482 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
+ systemd user versionator
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
+
+SLOT="$(get_version_component_range 1-2)"
+
+SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
+
+LICENSE="POSTGRESQL GPL-2"
+DESCRIPTION="PostgreSQL RDBMS"
+HOMEPAGE="https://www.postgresql.org/"
+
+IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
+ +readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+wanted_languages() {
+ local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
+ sk sl sv tr zh_CN zh_TW"
+ local enable_langs lingua
+
+ for lingua in ${linguas} ; do
+ has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
+ done
+
+ echo -n ${enable_langs}
+}
+
+CDEPEND="
+>=app-eselect/eselect-postgresql-2.0
+sys-apps/less
+virtual/libintl
+kerberos? ( virtual/krb5 )
+ldap? ( net-nds/openldap )
+pam? ( virtual/pam )
+perl? ( >=dev-lang/perl-5.8:= )
+python? ( ${PYTHON_DEPS} )
+readline? ( sys-libs/readline:0= )
+ssl? (
+ !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
+ libressl? ( dev-libs/libressl:= )
+)
+tcl? ( >=dev-lang/tcl-8:0= )
+xml? ( dev-libs/libxml2 dev-libs/libxslt )
+zlib? ( sys-libs/zlib )
+"
+
+# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
+# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
+# the libc includes UUID functions.
+UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
+BSD_LIBC=( elibc_{Free,Net,Open}BSD )
+
+nest_usedep() {
+ local front back
+ while [[ ${#} -gt 1 ]]; do
+ front+="${1}? ( "
+ back+=" )"
+ shift
+ done
+ echo "${front}${1}${back}"
+}
+
+IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
+CDEPEND+="
+uuid? (
+ ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
+ $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
+)"
+
+DEPEND="${CDEPEND}
+!!<sys-apps/sandbox-2.0
+sys-devel/bison
+sys-devel/flex
+nls? ( sys-devel/gettext )
+xml? ( virtual/pkgconfig )
+"
+
+RDEPEND="${CDEPEND}
+!dev-db/postgresql-docs:${SLOT}
+!dev-db/postgresql-base:${SLOT}
+!dev-db/postgresql-server:${SLOT}
+selinux? ( sec-policy/selinux-postgresql )
+"
+
+pkg_setup() {
+ use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
+
+ enewgroup postgres 70
+ enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
+
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # Work around PPC{,64} compilation bug where bool is already defined
+ sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
+
+ # Set proper run directory
+ sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
+ -i src/include/pg_config_manual.h || die
+
+ # Rely on $PATH being in the proper order so that the correct
+ # install program is used for modules utilizing PGXS in both
+ # hardened and non-hardened environments. (Bug #528786)
+ sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
+
+ use server || eapply "${FILESDIR}/${PN}-9.4.10-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}" \
+ --docdir="${PO}/usr/share/doc/${PF}" \
+ --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 !pg_legacytimestamp integer-datetimes) \
+ $(use_enable threads thread-safety) \
+ $(use_with kerberos gssapi) \
+ $(use_with ldap) \
+ $(use_with pam) \
+ $(use_with perl) \
+ $(use_with python) \
+ $(use_with readline) \
+ $(use_with ssl openssl) \
+ $(use_with tcl) \
+ ${uuid_config} \
+ $(use_with xml libxml) \
+ $(use_with xml libxslt) \
+ $(use_with zlib) \
+ "$(use_enable nls nls "$(wanted_languages)")"
+}
+
+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
+
+ use static-libs || find "${ED}" -name '*.a' -delete
+
+ local f bn
+ for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
+ -mindepth 1 -maxdepth 1)
+ do
+ bn=$(basename "${f}")
+ # Temporarily tack on tmp to workaround a file collision
+ # issue. This is only necessary for 9.7 and earlier. 10 never
+ # had this issue.
+ dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
+ "/usr/bin/${bn}${SLOT/.}tmp"
+ done
+
+ if use doc ; then
+ docinto html
+ dodoc doc/src/sgml/html/*
+
+ docinto sgml
+ dodoc doc/src/sgml/*.{sgml,dsl}
+ fi
+
+ if use server; then
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
+
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
+
+ if use systemd; then
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.service-9.2" | \
+ systemd_newunit - ${PN}-${SLOT}.service
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
+ fi
+
+ newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
+
+ use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
+
+ if use prefix ; then
+ keepdir /run/postgresql
+ fperms 1775 /run/postgresql
+ fi
+ fi
+}
+
+pkg_preinst() {
+ # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
+ # /usr/bin/psql96). They may have been created by the
+ # postgresql.eselect module, but they're handled within this ebuild
+ # now. It's alright if we momentarily delete /usr/bin/psql as it
+ # will be recreated by the eselect module in pkg_ppostinst(). This
+ # is only necessary for 9.7 and earlier. 10 and later were never
+ # handled in this manner.
+ local canonicalise
+ if type -p realpath > /dev/null; then
+ canonicalise=realpath
+ elif type -p readlink > /dev/null; then
+ canonicalise='readlink -f'
+ else
+ # can't die, subshell
+ die "No readlink nor realpath found, cannot canonicalise"
+ fi
+
+ local l
+ # First remove any symlinks in /usr/bin that may have been created
+ # by the old eselect
+ for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
+ if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
+ rm "${l}" || ewarn "Couldn't remove ${l}"
+ fi
+ done
+
+ # Then move the symlinks created by the ebuild to their proper place.
+ for l in "${ED}"/usr/bin/*tmp ; do
+ mv "${l}" "${l%tmp}" \
+ || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
+ done
+}
+
+pkg_postinst() {
+ use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
+ postgresql-config update
+
+ elog "If you need a global psqlrc-file, you can place it in:"
+ elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
+
+ if use server ; then
+ elog
+ elog "Gentoo specific documentation:"
+ elog "https://wiki.gentoo.org/wiki/PostgreSQL"
+ elog
+ elog "Official documentation:"
+ elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
+ elog
+ elog "The default location of the Unix-domain socket is:"
+ elog " ${EROOT%/}/run/postgresql/"
+ elog
+ elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
+ elog "so that it contains your preferred locale in:"
+ elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+ elog
+ elog "Then, execute the following command to setup the initial database"
+ elog "environment:"
+ elog " emerge --config =${CATEGORY}/${PF}"
+ fi
+}
+
+pkg_prerm() {
+ if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
+ ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
+ ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
+
+ ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
+ sleep 10
+ eend 0
+ fi
+}
+
+pkg_postrm() {
+ postgresql-config update
+}
+
+pkg_config() {
+ use server || die "USE flag 'server' not enabled. Nothing to configure."
+
+ [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
+ && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+ [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
+ [[ -z "${DATA_DIR}" ]] \
+ && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
+
+ # environment.bz2 may not contain the same locale as the current system
+ # locale. Unset and source from the current system locale.
+ if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
+ unset LANG
+ unset LC_CTYPE
+ unset LC_NUMERIC
+ unset LC_TIME
+ unset LC_COLLATE
+ unset LC_MONETARY
+ unset LC_MESSAGES
+ unset LC_ALL
+ source "${EROOT%/}/etc/env.d/02locale"
+ [ -n "${LANG}" ] && export LANG
+ [ -n "${LC_CTYPE}" ] && export LC_CTYPE
+ [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
+ [ -n "${LC_TIME}" ] && export LC_TIME
+ [ -n "${LC_COLLATE}" ] && export LC_COLLATE
+ [ -n "${LC_MONETARY}" ] && export LC_MONETARY
+ [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
+ [ -n "${LC_ALL}" ] && export LC_ALL
+ fi
+
+ einfo "You can modify the paths and options passed to initdb by editing:"
+ einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+ einfo
+ einfo "Information on options that can be passed to initdb are found at:"
+ einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
+ einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
+ einfo
+ einfo "PG_INITDB_OPTS is currently set to:"
+ if [[ -z "${PG_INITDB_OPTS}" ]] ; then
+ einfo " (none)"
+ else
+ einfo " ${PG_INITDB_OPTS}"
+ fi
+ einfo
+ einfo "Configuration files will be installed to:"
+ einfo " ${PGDATA}"
+ einfo
+ einfo "The database cluster will be created in:"
+ einfo " ${DATA_DIR}"
+ einfo
+
+ ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
+ sleep 5
+ eend 0
+
+ if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
+ eerror "The given directory, '${DATA_DIR}', is not empty."
+ eerror "Modify DATA_DIR to point to an empty directory."
+ die "${DATA_DIR} is not empty."
+ fi
+
+ einfo "Creating the data directory ..."
+ if [[ ${EUID} == 0 ]] ; then
+ mkdir -p "${DATA_DIR}"
+ chown -Rf postgres:postgres "${DATA_DIR}"
+ chmod 0700 "${DATA_DIR}"
+ fi
+
+ einfo "Initializing the database ..."
+
+ if [[ ${EUID} == 0 ]] ; then
+ su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
+ else
+ "${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
+ fi
+
+ if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
+ mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
+ ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
+ fi
+
+ # unix_socket_directory has no effect in postgresql.conf as it's
+ # overridden in the initscript
+ sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
+
+ cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
+ # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
+ # On the off-chance that you might need to work with UTF-8 encoded
+ # characters in PL/Perl
+ plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
+ EOF
+
+ einfo "The autovacuum function, which was in contrib, has been moved to the main"
+ einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
+ einfo "by default. You can disable it in the cluster's:"
+ einfo " ${PGDATA%/}/postgresql.conf"
+ einfo
+ einfo "The PostgreSQL server, by default, will log events to:"
+ einfo " ${DATA_DIR%/}/postmaster.log"
+ einfo
+ if use prefix ; then
+ einfo "The location of the configuration files have moved to:"
+ einfo " ${PGDATA}"
+ einfo "To start the server:"
+ einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
+ einfo "To stop:"
+ einfo " pg_ctl stop -D ${DATA_DIR}"
+ einfo
+ einfo "Or move the configuration files back:"
+ einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
+ else
+ einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
+ einfo "instead of 'pg_ctl'."
+ fi
+}
+
+src_test() {
+ if use server && [[ ${UID} -ne 0 ]] ; then
+ emake check
+
+ einfo "If you think other tests besides the regression tests are necessary, please"
+ einfo "submit a bug including a patch for this ebuild to enable them."
+ else
+ use server || \
+ ewarn 'Tests cannot be run without the "server" use flag enabled.'
+ [[ ${UID} -eq 0 ]] || \
+ ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
+
+ ewarn 'Skipping.'
+ fi
+}
diff --git a/dev-db/postgresql/postgresql-9.5.12.ebuild b/dev-db/postgresql/postgresql-9.5.12.ebuild
new file mode 100644
index 000000000000..003f5398f4ef
--- /dev/null
+++ b/dev-db/postgresql/postgresql-9.5.12.ebuild
@@ -0,0 +1,488 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
+ systemd user versionator
+
+KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
+
+SLOT="$(get_version_component_range 1-2)"
+
+SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
+
+LICENSE="POSTGRESQL GPL-2"
+DESCRIPTION="PostgreSQL RDBMS"
+HOMEPAGE="https://www.postgresql.org/"
+
+IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
+ +readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+wanted_languages() {
+ local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
+ sk sl sv tr zh_CN zh_TW"
+ local enable_langs lingua
+
+ for lingua in ${linguas} ; do
+ has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
+ done
+
+ echo -n ${enable_langs}
+}
+
+CDEPEND="
+>=app-eselect/eselect-postgresql-2.0
+sys-apps/less
+virtual/libintl
+kerberos? ( virtual/krb5 )
+ldap? ( net-nds/openldap )
+pam? ( virtual/pam )
+perl? ( >=dev-lang/perl-5.8:= )
+python? ( ${PYTHON_DEPS} )
+readline? ( sys-libs/readline:0= )
+ssl? (
+ !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
+ libressl? ( dev-libs/libressl:= )
+)
+tcl? ( >=dev-lang/tcl-8:0= )
+xml? ( dev-libs/libxml2 dev-libs/libxslt )
+zlib? ( sys-libs/zlib )
+"
+
+# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
+# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
+# the libc includes UUID functions.
+UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
+BSD_LIBC=( elibc_{Free,Net,Open}BSD )
+
+nest_usedep() {
+ local front back
+ while [[ ${#} -gt 1 ]]; do
+ front+="${1}? ( "
+ back+=" )"
+ shift
+ done
+ echo "${front}${1}${back}"
+}
+
+IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
+CDEPEND+="
+uuid? (
+ ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
+ $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
+)"
+
+DEPEND="${CDEPEND}
+!!<sys-apps/sandbox-2.0
+sys-devel/bison
+sys-devel/flex
+nls? ( sys-devel/gettext )
+xml? ( virtual/pkgconfig )
+"
+
+RDEPEND="${CDEPEND}
+!dev-db/postgresql-docs:${SLOT}
+!dev-db/postgresql-base:${SLOT}
+!dev-db/postgresql-server:${SLOT}
+selinux? ( sec-policy/selinux-postgresql )
+"
+
+pkg_setup() {
+ use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
+
+ enewgroup postgres 70
+ enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
+
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # Work around PPC{,64} compilation bug where bool is already defined
+ sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
+
+ # Set proper run directory
+ sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
+ -i src/include/pg_config_manual.h || die
+
+ # Rely on $PATH being in the proper order so that the correct
+ # install program is used for modules utilizing PGXS in both
+ # hardened and non-hardened environments. (Bug #528786)
+ sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
+
+ use server || eapply "${FILESDIR}/${PN}-9.5.5-no-server.patch"
+
+ if use pam ; then
+ sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
+ -i src/backend/libpq/auth.c || \
+ die 'PGSQL_PAM_SERVICE rename failed.'
+ fi
+
+ eapply_user
+}
+
+src_configure() {
+ case ${CHOST} in
+ *-darwin*|*-solaris*)
+ use nls && append-libs intl
+ ;;
+ esac
+
+ export LDFLAGS_SL="${LDFLAGS}"
+ export LDFLAGS_EX="${LDFLAGS}"
+
+ local PO="${EPREFIX%/}"
+
+ local i uuid_config=""
+ if use uuid; then
+ for i in ${UTIL_LINUX_LIBC[@]}; do
+ use ${i} && uuid_config="--with-uuid=e2fs"
+ done
+ for i in ${BSD_LIBC[@]}; do
+ use ${i} && uuid_config="--with-uuid=bsd"
+ done
+ [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
+ fi
+
+ econf \
+ --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
+ --datadir="${PO}/usr/share/postgresql-${SLOT}" \
+ --docdir="${PO}/usr/share/doc/${PF}" \
+ --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 threads thread-safety) \
+ $(use_with kerberos gssapi) \
+ $(use_with ldap) \
+ $(use_with pam) \
+ $(use_with perl) \
+ $(use_with python) \
+ $(use_with readline) \
+ $(use_with ssl openssl) \
+ $(use_with tcl) \
+ ${uuid_config} \
+ $(use_with xml libxml) \
+ $(use_with xml libxslt) \
+ $(use_with zlib) \
+ "$(use_enable nls nls "$(wanted_languages)")"
+}
+
+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
+
+ use static-libs || find "${ED}" -name '*.a' -delete
+
+ local f bn
+ for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
+ -mindepth 1 -maxdepth 1)
+ do
+ bn=$(basename "${f}")
+ # Temporarily tack on tmp to workaround a file collision
+ # issue. This is only necessary for 9.7 and earlier. 10 never
+ # had this issue.
+ dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
+ "/usr/bin/${bn}${SLOT/.}tmp"
+ done
+
+ if use doc ; then
+ docinto html
+ dodoc doc/src/sgml/html/*
+
+ docinto sgml
+ dodoc doc/src/sgml/*.{sgml,dsl}
+ fi
+
+ if use server; then
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
+
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
+
+ if use systemd; then
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.service-9.2" | \
+ systemd_newunit - ${PN}-${SLOT}.service
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
+ fi
+
+ newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
+
+ use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
+
+ if use prefix ; then
+ keepdir /run/postgresql
+ fperms 1775 /run/postgresql
+ fi
+ fi
+}
+
+pkg_preinst() {
+ # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
+ # /usr/bin/psql96). They may have been created by the
+ # postgresql.eselect module, but they're handled within this ebuild
+ # now. It's alright if we momentarily delete /usr/bin/psql as it
+ # will be recreated by the eselect module in pkg_ppostinst(). This
+ # is only necessary for 9.7 and earlier. 10 and later were never
+ # handled in this manner.
+ local canonicalise
+ if type -p realpath > /dev/null; then
+ canonicalise=realpath
+ elif type -p readlink > /dev/null; then
+ canonicalise='readlink -f'
+ else
+ # can't die, subshell
+ die "No readlink nor realpath found, cannot canonicalise"
+ fi
+
+ local l
+ # First remove any symlinks in /usr/bin that may have been created
+ # by the old eselect
+ for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
+ if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
+ rm "${l}" || ewarn "Couldn't remove ${l}"
+ fi
+ done
+
+ # Then move the symlinks created by the ebuild to their proper place.
+ for l in "${ED}"/usr/bin/*tmp ; do
+ mv "${l}" "${l%tmp}" \
+ || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
+ done
+}
+
+pkg_postinst() {
+ use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
+ postgresql-config update
+
+ if use alpha && use server ; then
+ ewarn "PostgreSQL 9.5+ no longer has native spinlock support on Alpha platforms."
+ ewarn "As a result, performance will be extremely degraded."
+ fi
+
+ elog "If you need a global psqlrc-file, you can place it in:"
+ elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
+
+ if use server ; then
+ elog
+ elog "Gentoo specific documentation:"
+ elog "https://wiki.gentoo.org/wiki/PostgreSQL"
+ elog
+ elog "Official documentation:"
+ elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
+ elog
+ elog "The default location of the Unix-domain socket is:"
+ elog " ${EROOT%/}/run/postgresql/"
+ elog
+ elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
+ elog "so that it contains your preferred locale in:"
+ elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+ elog
+ elog "Then, execute the following command to setup the initial database"
+ elog "environment:"
+ elog " emerge --config =${CATEGORY}/${PF}"
+ fi
+}
+
+pkg_prerm() {
+ if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
+ ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
+ ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
+
+ ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
+ sleep 10
+ eend 0
+ fi
+}
+
+pkg_postrm() {
+ postgresql-config update
+}
+
+pkg_config() {
+ use server || die "USE flag 'server' not enabled. Nothing to configure."
+
+ [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
+ && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+ [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
+ [[ -z "${DATA_DIR}" ]] \
+ && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
+
+ # environment.bz2 may not contain the same locale as the current system
+ # locale. Unset and source from the current system locale.
+ if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
+ unset LANG
+ unset LC_CTYPE
+ unset LC_NUMERIC
+ unset LC_TIME
+ unset LC_COLLATE
+ unset LC_MONETARY
+ unset LC_MESSAGES
+ unset LC_ALL
+ source "${EROOT%/}/etc/env.d/02locale"
+ [ -n "${LANG}" ] && export LANG
+ [ -n "${LC_CTYPE}" ] && export LC_CTYPE
+ [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
+ [ -n "${LC_TIME}" ] && export LC_TIME
+ [ -n "${LC_COLLATE}" ] && export LC_COLLATE
+ [ -n "${LC_MONETARY}" ] && export LC_MONETARY
+ [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
+ [ -n "${LC_ALL}" ] && export LC_ALL
+ fi
+
+ einfo "You can modify the paths and options passed to initdb by editing:"
+ einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+ einfo
+ einfo "Information on options that can be passed to initdb are found at:"
+ einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
+ einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
+ einfo
+ einfo "PG_INITDB_OPTS is currently set to:"
+ if [[ -z "${PG_INITDB_OPTS}" ]] ; then
+ einfo " (none)"
+ else
+ einfo " ${PG_INITDB_OPTS}"
+ fi
+ einfo
+ einfo "Configuration files will be installed to:"
+ einfo " ${PGDATA}"
+ einfo
+ einfo "The database cluster will be created in:"
+ einfo " ${DATA_DIR}"
+ einfo
+
+ ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
+ sleep 5
+ eend 0
+
+ if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
+ eerror "The given directory, '${DATA_DIR}', is not empty."
+ eerror "Modify DATA_DIR to point to an empty directory."
+ die "${DATA_DIR} is not empty."
+ fi
+
+ einfo "Creating the data directory ..."
+ if [[ ${EUID} == 0 ]] ; then
+ mkdir -p "${DATA_DIR}"
+ chown -Rf postgres:postgres "${DATA_DIR}"
+ chmod 0700 "${DATA_DIR}"
+ fi
+
+ einfo "Initializing the database ..."
+
+ if [[ ${EUID} == 0 ]] ; then
+ su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
+ else
+ "${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
+ fi
+
+ if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
+ mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
+ ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
+ fi
+
+ # unix_socket_directory has no effect in postgresql.conf as it's
+ # overridden in the initscript
+ sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
+
+ cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
+ # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
+ # On the off-chance that you might need to work with UTF-8 encoded
+ # characters in PL/Perl
+ plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
+ EOF
+
+ einfo "The autovacuum function, which was in contrib, has been moved to the main"
+ einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
+ einfo "by default. You can disable it in the cluster's:"
+ einfo " ${PGDATA%/}/postgresql.conf"
+ einfo
+ einfo "The PostgreSQL server, by default, will log events to:"
+ einfo " ${DATA_DIR%/}/postmaster.log"
+ einfo
+ if use prefix ; then
+ einfo "The location of the configuration files have moved to:"
+ einfo " ${PGDATA}"
+ einfo "To start the server:"
+ einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
+ einfo "To stop:"
+ einfo " pg_ctl stop -D ${DATA_DIR}"
+ einfo
+ einfo "Or move the configuration files back:"
+ einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
+ else
+ einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
+ einfo "instead of 'pg_ctl'."
+ fi
+}
+
+src_test() {
+ if use server && [[ ${UID} -ne 0 ]] ; then
+ emake check
+
+ einfo "If you think other tests besides the regression tests are necessary, please"
+ einfo "submit a bug including a patch for this ebuild to enable them."
+ else
+ use server || \
+ ewarn 'Tests cannot be run without the "server" use flag enabled.'
+ [[ ${UID} -eq 0 ]] || \
+ ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
+
+ ewarn 'Skipping.'
+ fi
+}
diff --git a/dev-db/postgresql/postgresql-9.5.13.ebuild b/dev-db/postgresql/postgresql-9.5.13.ebuild
new file mode 100644
index 000000000000..fd41b7ff3302
--- /dev/null
+++ b/dev-db/postgresql/postgresql-9.5.13.ebuild
@@ -0,0 +1,488 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
+ systemd user versionator
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
+
+SLOT="$(get_version_component_range 1-2)"
+
+SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
+
+LICENSE="POSTGRESQL GPL-2"
+DESCRIPTION="PostgreSQL RDBMS"
+HOMEPAGE="https://www.postgresql.org/"
+
+IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
+ +readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+wanted_languages() {
+ local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
+ sk sl sv tr zh_CN zh_TW"
+ local enable_langs lingua
+
+ for lingua in ${linguas} ; do
+ has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
+ done
+
+ echo -n ${enable_langs}
+}
+
+CDEPEND="
+>=app-eselect/eselect-postgresql-2.0
+sys-apps/less
+virtual/libintl
+kerberos? ( virtual/krb5 )
+ldap? ( net-nds/openldap )
+pam? ( virtual/pam )
+perl? ( >=dev-lang/perl-5.8:= )
+python? ( ${PYTHON_DEPS} )
+readline? ( sys-libs/readline:0= )
+ssl? (
+ !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
+ libressl? ( dev-libs/libressl:= )
+)
+tcl? ( >=dev-lang/tcl-8:0= )
+xml? ( dev-libs/libxml2 dev-libs/libxslt )
+zlib? ( sys-libs/zlib )
+"
+
+# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
+# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
+# the libc includes UUID functions.
+UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
+BSD_LIBC=( elibc_{Free,Net,Open}BSD )
+
+nest_usedep() {
+ local front back
+ while [[ ${#} -gt 1 ]]; do
+ front+="${1}? ( "
+ back+=" )"
+ shift
+ done
+ echo "${front}${1}${back}"
+}
+
+IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
+CDEPEND+="
+uuid? (
+ ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
+ $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
+)"
+
+DEPEND="${CDEPEND}
+!!<sys-apps/sandbox-2.0
+sys-devel/bison
+sys-devel/flex
+nls? ( sys-devel/gettext )
+xml? ( virtual/pkgconfig )
+"
+
+RDEPEND="${CDEPEND}
+!dev-db/postgresql-docs:${SLOT}
+!dev-db/postgresql-base:${SLOT}
+!dev-db/postgresql-server:${SLOT}
+selinux? ( sec-policy/selinux-postgresql )
+"
+
+pkg_setup() {
+ use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
+
+ enewgroup postgres 70
+ enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
+
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # Work around PPC{,64} compilation bug where bool is already defined
+ sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
+
+ # Set proper run directory
+ sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
+ -i src/include/pg_config_manual.h || die
+
+ # Rely on $PATH being in the proper order so that the correct
+ # install program is used for modules utilizing PGXS in both
+ # hardened and non-hardened environments. (Bug #528786)
+ sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
+
+ use server || eapply "${FILESDIR}/${PN}-9.5.5-no-server.patch"
+
+ if use pam ; then
+ sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
+ -i src/backend/libpq/auth.c || \
+ die 'PGSQL_PAM_SERVICE rename failed.'
+ fi
+
+ eapply_user
+}
+
+src_configure() {
+ case ${CHOST} in
+ *-darwin*|*-solaris*)
+ use nls && append-libs intl
+ ;;
+ esac
+
+ export LDFLAGS_SL="${LDFLAGS}"
+ export LDFLAGS_EX="${LDFLAGS}"
+
+ local PO="${EPREFIX%/}"
+
+ local i uuid_config=""
+ if use uuid; then
+ for i in ${UTIL_LINUX_LIBC[@]}; do
+ use ${i} && uuid_config="--with-uuid=e2fs"
+ done
+ for i in ${BSD_LIBC[@]}; do
+ use ${i} && uuid_config="--with-uuid=bsd"
+ done
+ [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
+ fi
+
+ econf \
+ --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
+ --datadir="${PO}/usr/share/postgresql-${SLOT}" \
+ --docdir="${PO}/usr/share/doc/${PF}" \
+ --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 threads thread-safety) \
+ $(use_with kerberos gssapi) \
+ $(use_with ldap) \
+ $(use_with pam) \
+ $(use_with perl) \
+ $(use_with python) \
+ $(use_with readline) \
+ $(use_with ssl openssl) \
+ $(use_with tcl) \
+ ${uuid_config} \
+ $(use_with xml libxml) \
+ $(use_with xml libxslt) \
+ $(use_with zlib) \
+ "$(use_enable nls nls "$(wanted_languages)")"
+}
+
+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
+
+ use static-libs || find "${ED}" -name '*.a' -delete
+
+ local f bn
+ for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
+ -mindepth 1 -maxdepth 1)
+ do
+ bn=$(basename "${f}")
+ # Temporarily tack on tmp to workaround a file collision
+ # issue. This is only necessary for 9.7 and earlier. 10 never
+ # had this issue.
+ dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
+ "/usr/bin/${bn}${SLOT/.}tmp"
+ done
+
+ if use doc ; then
+ docinto html
+ dodoc doc/src/sgml/html/*
+
+ docinto sgml
+ dodoc doc/src/sgml/*.{sgml,dsl}
+ fi
+
+ if use server; then
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
+
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
+
+ if use systemd; then
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.service-9.2" | \
+ systemd_newunit - ${PN}-${SLOT}.service
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
+ fi
+
+ newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
+
+ use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
+
+ if use prefix ; then
+ keepdir /run/postgresql
+ fperms 1775 /run/postgresql
+ fi
+ fi
+}
+
+pkg_preinst() {
+ # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
+ # /usr/bin/psql96). They may have been created by the
+ # postgresql.eselect module, but they're handled within this ebuild
+ # now. It's alright if we momentarily delete /usr/bin/psql as it
+ # will be recreated by the eselect module in pkg_ppostinst(). This
+ # is only necessary for 9.7 and earlier. 10 and later were never
+ # handled in this manner.
+ local canonicalise
+ if type -p realpath > /dev/null; then
+ canonicalise=realpath
+ elif type -p readlink > /dev/null; then
+ canonicalise='readlink -f'
+ else
+ # can't die, subshell
+ die "No readlink nor realpath found, cannot canonicalise"
+ fi
+
+ local l
+ # First remove any symlinks in /usr/bin that may have been created
+ # by the old eselect
+ for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
+ if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
+ rm "${l}" || ewarn "Couldn't remove ${l}"
+ fi
+ done
+
+ # Then move the symlinks created by the ebuild to their proper place.
+ for l in "${ED}"/usr/bin/*tmp ; do
+ mv "${l}" "${l%tmp}" \
+ || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
+ done
+}
+
+pkg_postinst() {
+ use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
+ postgresql-config update
+
+ if use alpha && use server ; then
+ ewarn "PostgreSQL 9.5+ no longer has native spinlock support on Alpha platforms."
+ ewarn "As a result, performance will be extremely degraded."
+ fi
+
+ elog "If you need a global psqlrc-file, you can place it in:"
+ elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
+
+ if use server ; then
+ elog
+ elog "Gentoo specific documentation:"
+ elog "https://wiki.gentoo.org/wiki/PostgreSQL"
+ elog
+ elog "Official documentation:"
+ elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
+ elog
+ elog "The default location of the Unix-domain socket is:"
+ elog " ${EROOT%/}/run/postgresql/"
+ elog
+ elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
+ elog "so that it contains your preferred locale in:"
+ elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+ elog
+ elog "Then, execute the following command to setup the initial database"
+ elog "environment:"
+ elog " emerge --config =${CATEGORY}/${PF}"
+ fi
+}
+
+pkg_prerm() {
+ if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
+ ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
+ ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
+
+ ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
+ sleep 10
+ eend 0
+ fi
+}
+
+pkg_postrm() {
+ postgresql-config update
+}
+
+pkg_config() {
+ use server || die "USE flag 'server' not enabled. Nothing to configure."
+
+ [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
+ && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+ [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
+ [[ -z "${DATA_DIR}" ]] \
+ && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
+
+ # environment.bz2 may not contain the same locale as the current system
+ # locale. Unset and source from the current system locale.
+ if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
+ unset LANG
+ unset LC_CTYPE
+ unset LC_NUMERIC
+ unset LC_TIME
+ unset LC_COLLATE
+ unset LC_MONETARY
+ unset LC_MESSAGES
+ unset LC_ALL
+ source "${EROOT%/}/etc/env.d/02locale"
+ [ -n "${LANG}" ] && export LANG
+ [ -n "${LC_CTYPE}" ] && export LC_CTYPE
+ [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
+ [ -n "${LC_TIME}" ] && export LC_TIME
+ [ -n "${LC_COLLATE}" ] && export LC_COLLATE
+ [ -n "${LC_MONETARY}" ] && export LC_MONETARY
+ [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
+ [ -n "${LC_ALL}" ] && export LC_ALL
+ fi
+
+ einfo "You can modify the paths and options passed to initdb by editing:"
+ einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+ einfo
+ einfo "Information on options that can be passed to initdb are found at:"
+ einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
+ einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
+ einfo
+ einfo "PG_INITDB_OPTS is currently set to:"
+ if [[ -z "${PG_INITDB_OPTS}" ]] ; then
+ einfo " (none)"
+ else
+ einfo " ${PG_INITDB_OPTS}"
+ fi
+ einfo
+ einfo "Configuration files will be installed to:"
+ einfo " ${PGDATA}"
+ einfo
+ einfo "The database cluster will be created in:"
+ einfo " ${DATA_DIR}"
+ einfo
+
+ ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
+ sleep 5
+ eend 0
+
+ if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
+ eerror "The given directory, '${DATA_DIR}', is not empty."
+ eerror "Modify DATA_DIR to point to an empty directory."
+ die "${DATA_DIR} is not empty."
+ fi
+
+ einfo "Creating the data directory ..."
+ if [[ ${EUID} == 0 ]] ; then
+ mkdir -p "${DATA_DIR}"
+ chown -Rf postgres:postgres "${DATA_DIR}"
+ chmod 0700 "${DATA_DIR}"
+ fi
+
+ einfo "Initializing the database ..."
+
+ if [[ ${EUID} == 0 ]] ; then
+ su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
+ else
+ "${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
+ fi
+
+ if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
+ mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
+ ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
+ fi
+
+ # unix_socket_directory has no effect in postgresql.conf as it's
+ # overridden in the initscript
+ sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
+
+ cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
+ # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
+ # On the off-chance that you might need to work with UTF-8 encoded
+ # characters in PL/Perl
+ plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
+ EOF
+
+ einfo "The autovacuum function, which was in contrib, has been moved to the main"
+ einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
+ einfo "by default. You can disable it in the cluster's:"
+ einfo " ${PGDATA%/}/postgresql.conf"
+ einfo
+ einfo "The PostgreSQL server, by default, will log events to:"
+ einfo " ${DATA_DIR%/}/postmaster.log"
+ einfo
+ if use prefix ; then
+ einfo "The location of the configuration files have moved to:"
+ einfo " ${PGDATA}"
+ einfo "To start the server:"
+ einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
+ einfo "To stop:"
+ einfo " pg_ctl stop -D ${DATA_DIR}"
+ einfo
+ einfo "Or move the configuration files back:"
+ einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
+ else
+ einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
+ einfo "instead of 'pg_ctl'."
+ fi
+}
+
+src_test() {
+ if use server && [[ ${UID} -ne 0 ]] ; then
+ emake check
+
+ einfo "If you think other tests besides the regression tests are necessary, please"
+ einfo "submit a bug including a patch for this ebuild to enable them."
+ else
+ use server || \
+ ewarn 'Tests cannot be run without the "server" use flag enabled.'
+ [[ ${UID} -eq 0 ]] || \
+ ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
+
+ ewarn 'Skipping.'
+ fi
+}
diff --git a/dev-db/postgresql/postgresql-9.6.8.ebuild b/dev-db/postgresql/postgresql-9.6.8.ebuild
new file mode 100644
index 000000000000..c5669d4179fc
--- /dev/null
+++ b/dev-db/postgresql/postgresql-9.6.8.ebuild
@@ -0,0 +1,493 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
+ systemd user versionator
+
+KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
+
+SLOT="$(get_version_component_range 1-2)"
+
+MY_PV=${PV/_/}
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+SRC_URI="mirror://postgresql/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
+
+LICENSE="POSTGRESQL GPL-2"
+DESCRIPTION="PostgreSQL RDBMS"
+HOMEPAGE="https://www.postgresql.org/"
+
+IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
+ +readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+wanted_languages() {
+ local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
+ sk sl sv tr zh_CN zh_TW"
+ local enable_langs lingua
+
+ for lingua in ${linguas} ; do
+ has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
+ done
+
+ echo -n ${enable_langs}
+}
+
+CDEPEND="
+>=app-eselect/eselect-postgresql-2.0
+sys-apps/less
+virtual/libintl
+kerberos? ( virtual/krb5 )
+ldap? ( net-nds/openldap )
+pam? ( virtual/pam )
+perl? ( >=dev-lang/perl-5.8:= )
+python? ( ${PYTHON_DEPS} )
+readline? ( sys-libs/readline:0= )
+ssl? (
+ !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
+ libressl? ( dev-libs/libressl:= )
+)
+server? ( systemd? ( sys-apps/systemd ) )
+tcl? ( >=dev-lang/tcl-8:0= )
+xml? ( dev-libs/libxml2 dev-libs/libxslt )
+zlib? ( sys-libs/zlib )
+"
+
+# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
+# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
+# the libc includes UUID functions.
+UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
+BSD_LIBC=( elibc_{Free,Net,Open}BSD )
+
+nest_usedep() {
+ local front back
+ while [[ ${#} -gt 1 ]]; do
+ front+="${1}? ( "
+ back+=" )"
+ shift
+ done
+ echo "${front}${1}${back}"
+}
+
+IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
+CDEPEND+="
+uuid? (
+ ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
+ $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
+)"
+
+DEPEND="${CDEPEND}
+!!<sys-apps/sandbox-2.0
+sys-devel/bison
+sys-devel/flex
+nls? ( sys-devel/gettext )
+xml? ( virtual/pkgconfig )
+"
+
+RDEPEND="${CDEPEND}
+!dev-db/postgresql-docs:${SLOT}
+!dev-db/postgresql-base:${SLOT}
+!dev-db/postgresql-server:${SLOT}
+selinux? ( sec-policy/selinux-postgresql )
+"
+
+pkg_setup() {
+ use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
+
+ enewgroup postgres 70
+ enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
+
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # Work around PPC{,64} compilation bug where bool is already defined
+ sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
+
+ # Set proper run directory
+ sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
+ -i src/include/pg_config_manual.h || die
+
+ # Rely on $PATH being in the proper order so that the correct
+ # install program is used for modules utilizing PGXS in both
+ # hardened and non-hardened environments. (Bug #528786)
+ sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
+
+ use server || eapply "${FILESDIR}/${PN}-${SLOT}.3-no-server.patch"
+
+ if use pam ; then
+ sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
+ -i src/backend/libpq/auth.c || \
+ die 'PGSQL_PAM_SERVICE rename failed.'
+ fi
+
+ eapply_user
+}
+
+src_configure() {
+ case ${CHOST} in
+ *-darwin*|*-solaris*)
+ use nls && append-libs intl
+ ;;
+ esac
+
+ export LDFLAGS_SL="${LDFLAGS}"
+ export LDFLAGS_EX="${LDFLAGS}"
+
+ local PO="${EPREFIX%/}"
+
+ local i uuid_config=""
+ if use uuid; then
+ for i in ${UTIL_LINUX_LIBC[@]}; do
+ use ${i} && uuid_config="--with-uuid=e2fs"
+ done
+ for i in ${BSD_LIBC[@]}; do
+ use ${i} && uuid_config="--with-uuid=bsd"
+ done
+ [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
+ fi
+
+ econf \
+ --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
+ --datadir="${PO}/usr/share/postgresql-${SLOT}" \
+ --docdir="${PO}/usr/share/doc/${PF}" \
+ --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 threads thread-safety) \
+ $(use_with kerberos gssapi) \
+ $(use_with ldap) \
+ $(use_with pam) \
+ $(use_with perl) \
+ $(use_with python) \
+ $(use_with readline) \
+ $(use_with ssl openssl) \
+ $(usex server "$(use_with systemd)" '--without-systemd') \
+ $(use_with tcl) \
+ ${uuid_config} \
+ $(use_with xml libxml) \
+ $(use_with xml libxslt) \
+ $(use_with zlib) \
+ "$(use_enable nls nls "$(wanted_languages)")"
+}
+
+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
+
+ use static-libs || find "${ED}" -name '*.a' -delete
+
+ local f bn
+ for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
+ -mindepth 1 -maxdepth 1)
+ do
+ bn=$(basename "${f}")
+ # Temporarily tack on tmp to workaround a file collision
+ # issue. This is only necessary for 9.7 and earlier. 10 never
+ # had this issue.
+ dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
+ "/usr/bin/${bn}${SLOT/.}tmp"
+ done
+
+ if use doc ; then
+ docinto html
+ dodoc doc/src/sgml/html/*
+
+ docinto sgml
+ dodoc doc/src/sgml/*.{sgml,dsl}
+ fi
+
+ if use server; then
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
+
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
+
+ if use systemd; then
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.service-9.6-r1" | \
+ systemd_newunit - ${PN}-${SLOT}.service
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
+ fi
+
+ newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
+
+ use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
+
+ if use prefix ; then
+ keepdir /run/postgresql
+ fperms 1775 /run/postgresql
+ fi
+ fi
+}
+
+pkg_preinst() {
+ # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
+ # /usr/bin/psql96). They may have been created by the
+ # postgresql.eselect module, but they're handled within this ebuild
+ # now. It's alright if we momentarily delete /usr/bin/psql as it
+ # will be recreated by the eselect module in pkg_ppostinst(). This
+ # is only necessary for 9.7 and earlier. 10 and later were never
+ # handled in this manner.
+ local canonicalise
+ if type -p realpath > /dev/null; then
+ canonicalise=realpath
+ elif type -p readlink > /dev/null; then
+ canonicalise='readlink -f'
+ else
+ # can't die, subshell
+ die "No readlink nor realpath found, cannot canonicalise"
+ fi
+
+ local l
+ # First remove any symlinks in /usr/bin that may have been created
+ # by the old eselect
+ for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
+ if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
+ rm "${l}" || ewarn "Couldn't remove ${l}"
+ fi
+ done
+
+ # Then move the symlinks created by the ebuild to their proper place.
+ for l in "${ED}"/usr/bin/*tmp ; do
+ mv "${l}" "${l%tmp}" \
+ || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
+ done
+}
+
+pkg_postinst() {
+ use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
+ postgresql-config update
+
+ elog "If you need a global psqlrc-file, you can place it in:"
+ elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
+
+ if use server ; then
+ elog
+ elog "Gentoo specific documentation:"
+ elog "https://wiki.gentoo.org/wiki/PostgreSQL"
+ elog
+ elog "Official documentation:"
+ elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
+ elog
+ elog "The default location of the Unix-domain socket is:"
+ elog " ${EROOT%/}/run/postgresql/"
+ elog
+ elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
+ elog "so that it contains your preferred locale in:"
+ elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+ elog
+ elog "Then, execute the following command to setup the initial database"
+ elog "environment:"
+ elog " emerge --config =${CATEGORY}/${PF}"
+ fi
+}
+
+pkg_prerm() {
+ if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
+ ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
+ ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
+
+ ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
+ sleep 10
+ eend 0
+ fi
+}
+
+pkg_postrm() {
+ postgresql-config update
+}
+
+pkg_config() {
+ use server || die "USE flag 'server' not enabled. Nothing to configure."
+
+ [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
+ && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+ [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
+ [[ -z "${DATA_DIR}" ]] \
+ && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
+
+ # environment.bz2 may not contain the same locale as the current system
+ # locale. Unset and source from the current system locale.
+ if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
+ unset LANG
+ unset LC_CTYPE
+ unset LC_NUMERIC
+ unset LC_TIME
+ unset LC_COLLATE
+ unset LC_MONETARY
+ unset LC_MESSAGES
+ unset LC_ALL
+ source "${EROOT%/}/etc/env.d/02locale"
+ [ -n "${LANG}" ] && export LANG
+ [ -n "${LC_CTYPE}" ] && export LC_CTYPE
+ [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
+ [ -n "${LC_TIME}" ] && export LC_TIME
+ [ -n "${LC_COLLATE}" ] && export LC_COLLATE
+ [ -n "${LC_MONETARY}" ] && export LC_MONETARY
+ [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
+ [ -n "${LC_ALL}" ] && export LC_ALL
+ fi
+
+ einfo "You can modify the paths and options passed to initdb by editing:"
+ einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+ einfo
+ einfo "Information on options that can be passed to initdb are found at:"
+ einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
+ einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
+ einfo
+ einfo "PG_INITDB_OPTS is currently set to:"
+ if [[ -z "${PG_INITDB_OPTS}" ]] ; then
+ einfo " (none)"
+ else
+ einfo " ${PG_INITDB_OPTS}"
+ fi
+ einfo
+ einfo "Configuration files will be installed to:"
+ einfo " ${PGDATA}"
+ einfo
+ einfo "The database cluster will be created in:"
+ einfo " ${DATA_DIR}"
+ einfo
+
+ ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
+ sleep 5
+ eend 0
+
+ if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
+ eerror "The given directory, '${DATA_DIR}', is not empty."
+ eerror "Modify DATA_DIR to point to an empty directory."
+ die "${DATA_DIR} is not empty."
+ fi
+
+ einfo "Creating the data directory ..."
+ if [[ ${EUID} == 0 ]] ; then
+ mkdir -p "${DATA_DIR}"
+ chown -Rf postgres:postgres "${DATA_DIR}"
+ chmod 0700 "${DATA_DIR}"
+ fi
+
+ einfo "Initializing the database ..."
+
+ if [[ ${EUID} == 0 ]] ; then
+ su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
+ else
+ "${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
+ fi
+
+ if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
+ mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
+ ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
+ fi
+
+ # unix_socket_directory has no effect in postgresql.conf as it's
+ # overridden in the initscript
+ sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
+
+ cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
+ # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
+ # On the off-chance that you might need to work with UTF-8 encoded
+ # characters in PL/Perl
+ plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
+ EOF
+
+ einfo "The autovacuum function, which was in contrib, has been moved to the main"
+ einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
+ einfo "by default. You can disable it in the cluster's:"
+ einfo " ${PGDATA%/}/postgresql.conf"
+ einfo
+ if ! use systemd; then
+ einfo "The PostgreSQL server, by default, will log events to:"
+ einfo " ${DATA_DIR%/}/postmaster.log"
+ einfo
+ fi
+ if use prefix ; then
+ einfo "The location of the configuration files have moved to:"
+ einfo " ${PGDATA}"
+ einfo "To start the server:"
+ einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
+ einfo "To stop:"
+ einfo " pg_ctl stop -D ${DATA_DIR}"
+ einfo
+ einfo "Or move the configuration files back:"
+ einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
+ elif use systemd; then
+ einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
+ einfo "instead of 'pg_ctl'."
+ else
+ einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
+ einfo "instead of 'pg_ctl'."
+ fi
+}
+
+src_test() {
+ if use server && [[ ${UID} -ne 0 ]] ; then
+ emake check
+
+ einfo "If you think other tests besides the regression tests are necessary, please"
+ einfo "submit a bug including a patch for this ebuild to enable them."
+ else
+ use server || \
+ ewarn 'Tests cannot be run without the "server" use flag enabled.'
+ [[ ${UID} -eq 0 ]] || \
+ ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
+
+ ewarn 'Skipping.'
+ fi
+}
diff --git a/dev-db/postgresql/postgresql-9.6.9.ebuild b/dev-db/postgresql/postgresql-9.6.9.ebuild
new file mode 100644
index 000000000000..1297819d3de9
--- /dev/null
+++ b/dev-db/postgresql/postgresql-9.6.9.ebuild
@@ -0,0 +1,493 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
+ systemd user versionator
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
+
+SLOT="$(get_version_component_range 1-2)"
+
+MY_PV=${PV/_/}
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+SRC_URI="mirror://postgresql/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
+
+LICENSE="POSTGRESQL GPL-2"
+DESCRIPTION="PostgreSQL RDBMS"
+HOMEPAGE="https://www.postgresql.org/"
+
+IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
+ +readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+wanted_languages() {
+ local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
+ sk sl sv tr zh_CN zh_TW"
+ local enable_langs lingua
+
+ for lingua in ${linguas} ; do
+ has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
+ done
+
+ echo -n ${enable_langs}
+}
+
+CDEPEND="
+>=app-eselect/eselect-postgresql-2.0
+sys-apps/less
+virtual/libintl
+kerberos? ( virtual/krb5 )
+ldap? ( net-nds/openldap )
+pam? ( virtual/pam )
+perl? ( >=dev-lang/perl-5.8:= )
+python? ( ${PYTHON_DEPS} )
+readline? ( sys-libs/readline:0= )
+ssl? (
+ !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
+ libressl? ( dev-libs/libressl:= )
+)
+server? ( systemd? ( sys-apps/systemd ) )
+tcl? ( >=dev-lang/tcl-8:0= )
+xml? ( dev-libs/libxml2 dev-libs/libxslt )
+zlib? ( sys-libs/zlib )
+"
+
+# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
+# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
+# the libc includes UUID functions.
+UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
+BSD_LIBC=( elibc_{Free,Net,Open}BSD )
+
+nest_usedep() {
+ local front back
+ while [[ ${#} -gt 1 ]]; do
+ front+="${1}? ( "
+ back+=" )"
+ shift
+ done
+ echo "${front}${1}${back}"
+}
+
+IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
+CDEPEND+="
+uuid? (
+ ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
+ $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
+)"
+
+DEPEND="${CDEPEND}
+!!<sys-apps/sandbox-2.0
+sys-devel/bison
+sys-devel/flex
+nls? ( sys-devel/gettext )
+xml? ( virtual/pkgconfig )
+"
+
+RDEPEND="${CDEPEND}
+!dev-db/postgresql-docs:${SLOT}
+!dev-db/postgresql-base:${SLOT}
+!dev-db/postgresql-server:${SLOT}
+selinux? ( sec-policy/selinux-postgresql )
+"
+
+pkg_setup() {
+ use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
+
+ enewgroup postgres 70
+ enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
+
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # Work around PPC{,64} compilation bug where bool is already defined
+ sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
+
+ # Set proper run directory
+ sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
+ -i src/include/pg_config_manual.h || die
+
+ # Rely on $PATH being in the proper order so that the correct
+ # install program is used for modules utilizing PGXS in both
+ # hardened and non-hardened environments. (Bug #528786)
+ sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
+
+ use server || eapply "${FILESDIR}/${PN}-${SLOT}.3-no-server.patch"
+
+ if use pam ; then
+ sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
+ -i src/backend/libpq/auth.c || \
+ die 'PGSQL_PAM_SERVICE rename failed.'
+ fi
+
+ eapply_user
+}
+
+src_configure() {
+ case ${CHOST} in
+ *-darwin*|*-solaris*)
+ use nls && append-libs intl
+ ;;
+ esac
+
+ export LDFLAGS_SL="${LDFLAGS}"
+ export LDFLAGS_EX="${LDFLAGS}"
+
+ local PO="${EPREFIX%/}"
+
+ local i uuid_config=""
+ if use uuid; then
+ for i in ${UTIL_LINUX_LIBC[@]}; do
+ use ${i} && uuid_config="--with-uuid=e2fs"
+ done
+ for i in ${BSD_LIBC[@]}; do
+ use ${i} && uuid_config="--with-uuid=bsd"
+ done
+ [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
+ fi
+
+ econf \
+ --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
+ --datadir="${PO}/usr/share/postgresql-${SLOT}" \
+ --docdir="${PO}/usr/share/doc/${PF}" \
+ --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 threads thread-safety) \
+ $(use_with kerberos gssapi) \
+ $(use_with ldap) \
+ $(use_with pam) \
+ $(use_with perl) \
+ $(use_with python) \
+ $(use_with readline) \
+ $(use_with ssl openssl) \
+ $(usex server "$(use_with systemd)" '--without-systemd') \
+ $(use_with tcl) \
+ ${uuid_config} \
+ $(use_with xml libxml) \
+ $(use_with xml libxslt) \
+ $(use_with zlib) \
+ "$(use_enable nls nls "$(wanted_languages)")"
+}
+
+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
+
+ use static-libs || find "${ED}" -name '*.a' -delete
+
+ local f bn
+ for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
+ -mindepth 1 -maxdepth 1)
+ do
+ bn=$(basename "${f}")
+ # Temporarily tack on tmp to workaround a file collision
+ # issue. This is only necessary for 9.7 and earlier. 10 never
+ # had this issue.
+ dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
+ "/usr/bin/${bn}${SLOT/.}tmp"
+ done
+
+ if use doc ; then
+ docinto html
+ dodoc doc/src/sgml/html/*
+
+ docinto sgml
+ dodoc doc/src/sgml/*.{sgml,dsl}
+ fi
+
+ if use server; then
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
+
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
+
+ if use systemd; then
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.service-9.6-r1" | \
+ systemd_newunit - ${PN}-${SLOT}.service
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
+ fi
+
+ newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
+
+ use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
+
+ if use prefix ; then
+ keepdir /run/postgresql
+ fperms 1775 /run/postgresql
+ fi
+ fi
+}
+
+pkg_preinst() {
+ # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
+ # /usr/bin/psql96). They may have been created by the
+ # postgresql.eselect module, but they're handled within this ebuild
+ # now. It's alright if we momentarily delete /usr/bin/psql as it
+ # will be recreated by the eselect module in pkg_ppostinst(). This
+ # is only necessary for 9.7 and earlier. 10 and later were never
+ # handled in this manner.
+ local canonicalise
+ if type -p realpath > /dev/null; then
+ canonicalise=realpath
+ elif type -p readlink > /dev/null; then
+ canonicalise='readlink -f'
+ else
+ # can't die, subshell
+ die "No readlink nor realpath found, cannot canonicalise"
+ fi
+
+ local l
+ # First remove any symlinks in /usr/bin that may have been created
+ # by the old eselect
+ for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
+ if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
+ rm "${l}" || ewarn "Couldn't remove ${l}"
+ fi
+ done
+
+ # Then move the symlinks created by the ebuild to their proper place.
+ for l in "${ED}"/usr/bin/*tmp ; do
+ mv "${l}" "${l%tmp}" \
+ || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
+ done
+}
+
+pkg_postinst() {
+ use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
+ postgresql-config update
+
+ elog "If you need a global psqlrc-file, you can place it in:"
+ elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
+
+ if use server ; then
+ elog
+ elog "Gentoo specific documentation:"
+ elog "https://wiki.gentoo.org/wiki/PostgreSQL"
+ elog
+ elog "Official documentation:"
+ elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
+ elog
+ elog "The default location of the Unix-domain socket is:"
+ elog " ${EROOT%/}/run/postgresql/"
+ elog
+ elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
+ elog "so that it contains your preferred locale in:"
+ elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+ elog
+ elog "Then, execute the following command to setup the initial database"
+ elog "environment:"
+ elog " emerge --config =${CATEGORY}/${PF}"
+ fi
+}
+
+pkg_prerm() {
+ if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
+ ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
+ ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
+
+ ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
+ sleep 10
+ eend 0
+ fi
+}
+
+pkg_postrm() {
+ postgresql-config update
+}
+
+pkg_config() {
+ use server || die "USE flag 'server' not enabled. Nothing to configure."
+
+ [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
+ && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+ [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
+ [[ -z "${DATA_DIR}" ]] \
+ && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
+
+ # environment.bz2 may not contain the same locale as the current system
+ # locale. Unset and source from the current system locale.
+ if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
+ unset LANG
+ unset LC_CTYPE
+ unset LC_NUMERIC
+ unset LC_TIME
+ unset LC_COLLATE
+ unset LC_MONETARY
+ unset LC_MESSAGES
+ unset LC_ALL
+ source "${EROOT%/}/etc/env.d/02locale"
+ [ -n "${LANG}" ] && export LANG
+ [ -n "${LC_CTYPE}" ] && export LC_CTYPE
+ [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
+ [ -n "${LC_TIME}" ] && export LC_TIME
+ [ -n "${LC_COLLATE}" ] && export LC_COLLATE
+ [ -n "${LC_MONETARY}" ] && export LC_MONETARY
+ [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
+ [ -n "${LC_ALL}" ] && export LC_ALL
+ fi
+
+ einfo "You can modify the paths and options passed to initdb by editing:"
+ einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
+ einfo
+ einfo "Information on options that can be passed to initdb are found at:"
+ einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
+ einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
+ einfo
+ einfo "PG_INITDB_OPTS is currently set to:"
+ if [[ -z "${PG_INITDB_OPTS}" ]] ; then
+ einfo " (none)"
+ else
+ einfo " ${PG_INITDB_OPTS}"
+ fi
+ einfo
+ einfo "Configuration files will be installed to:"
+ einfo " ${PGDATA}"
+ einfo
+ einfo "The database cluster will be created in:"
+ einfo " ${DATA_DIR}"
+ einfo
+
+ ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
+ sleep 5
+ eend 0
+
+ if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
+ eerror "The given directory, '${DATA_DIR}', is not empty."
+ eerror "Modify DATA_DIR to point to an empty directory."
+ die "${DATA_DIR} is not empty."
+ fi
+
+ einfo "Creating the data directory ..."
+ if [[ ${EUID} == 0 ]] ; then
+ mkdir -p "${DATA_DIR}"
+ chown -Rf postgres:postgres "${DATA_DIR}"
+ chmod 0700 "${DATA_DIR}"
+ fi
+
+ einfo "Initializing the database ..."
+
+ if [[ ${EUID} == 0 ]] ; then
+ su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
+ else
+ "${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
+ fi
+
+ if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
+ mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
+ ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
+ fi
+
+ # unix_socket_directory has no effect in postgresql.conf as it's
+ # overridden in the initscript
+ sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
+
+ cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
+ # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
+ # On the off-chance that you might need to work with UTF-8 encoded
+ # characters in PL/Perl
+ plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
+ EOF
+
+ einfo "The autovacuum function, which was in contrib, has been moved to the main"
+ einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
+ einfo "by default. You can disable it in the cluster's:"
+ einfo " ${PGDATA%/}/postgresql.conf"
+ einfo
+ if ! use systemd; then
+ einfo "The PostgreSQL server, by default, will log events to:"
+ einfo " ${DATA_DIR%/}/postmaster.log"
+ einfo
+ fi
+ if use prefix ; then
+ einfo "The location of the configuration files have moved to:"
+ einfo " ${PGDATA}"
+ einfo "To start the server:"
+ einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
+ einfo "To stop:"
+ einfo " pg_ctl stop -D ${DATA_DIR}"
+ einfo
+ einfo "Or move the configuration files back:"
+ einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
+ elif use systemd; then
+ einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
+ einfo "instead of 'pg_ctl'."
+ else
+ einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
+ einfo "instead of 'pg_ctl'."
+ fi
+}
+
+src_test() {
+ if use server && [[ ${UID} -ne 0 ]] ; then
+ emake check
+
+ einfo "If you think other tests besides the regression tests are necessary, please"
+ einfo "submit a bug including a patch for this ebuild to enable them."
+ else
+ use server || \
+ ewarn 'Tests cannot be run without the "server" use flag enabled.'
+ [[ ${UID} -eq 0 ]] || \
+ ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
+
+ ewarn 'Skipping.'
+ fi
+}
diff --git a/dev-db/postgresql/postgresql-9999.ebuild b/dev-db/postgresql/postgresql-9999.ebuild
new file mode 100644
index 000000000000..65ea48f8b86c
--- /dev/null
+++ b/dev-db/postgresql/postgresql-9999.ebuild
@@ -0,0 +1,439 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit eutils flag-o-matic git-r3 linux-info multilib pam prefix \
+ python-single-r1 systemd user versionator
+
+KEYWORDS=""
+
+# Bump when rc released.
+SLOT="12"
+
+EGIT_REPO_URI="https://git.postgresql.org/git/postgresql.git"
+
+LICENSE="POSTGRESQL GPL-2"
+DESCRIPTION="PostgreSQL RDBMS"
+HOMEPAGE="https://www.postgresql.org/"
+
+IUSE="kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python
+ +readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+wanted_languages() {
+ local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
+ sk sl sv tr zh_CN zh_TW"
+ local enable_langs lingua
+
+ for lingua in ${linguas} ; do
+ has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
+ done
+
+ echo -n ${enable_langs}
+}
+
+CDEPEND="
+>=app-eselect/eselect-postgresql-2.0
+sys-apps/less
+virtual/libintl
+kerberos? ( virtual/krb5 )
+ldap? ( net-nds/openldap )
+pam? ( virtual/pam )
+perl? ( >=dev-lang/perl-5.8:= )
+python? ( ${PYTHON_DEPS} )
+readline? ( sys-libs/readline:0= )
+ssl? (
+ !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
+ libressl? ( dev-libs/libressl:= )
+)
+server? ( systemd? ( sys-apps/systemd ) )
+tcl? ( >=dev-lang/tcl-8:0= )
+uuid? ( dev-libs/ossp-uuid )
+xml? ( dev-libs/libxml2 dev-libs/libxslt )
+zlib? ( sys-libs/zlib )
+"
+
+DEPEND="${CDEPEND}
+!!<sys-apps/sandbox-2.0
+>=dev-lang/perl-5.8
+app-text/docbook-dsssl-stylesheets
+app-text/docbook-sgml-dtd:4.2
+app-text/docbook-xml-dtd:4.2
+app-text/docbook-xsl-stylesheets
+app-text/openjade
+dev-libs/libxml2
+dev-libs/libxslt
+sys-devel/bison
+sys-devel/flex
+nls? ( sys-devel/gettext )
+xml? ( virtual/pkgconfig )
+"
+RDEPEND="${CDEPEND}
+!dev-db/postgresql-docs:${SLOT}
+!dev-db/postgresql-base:${SLOT}
+!dev-db/postgresql-server:${SLOT}
+selinux? ( sec-policy/selinux-postgresql )
+"
+
+pkg_pretend() {
+ ewarn "You are using a live ebuild that uses the current source code as it is"
+ ewarn "available from PostgreSQL's Git repository at emerge time. Given such,"
+ ewarn "the GNU Makefiles may be altered by upstream without notice and the"
+ ewarn "documentation for this live version is not readily available"
+ ewarn "online. Ergo, the ebuild maintainers will not support building a"
+ ewarn "client-only and/or document-free version."
+}
+
+pkg_setup() {
+ CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
+
+ enewgroup postgres 70
+ enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
+
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # Set proper run directory
+ sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
+ -i src/include/pg_config_manual.h || die
+
+ # Rely on $PATH being in the proper order so that the correct
+ # install program is used for modules utilizing PGXS in both
+ # hardened and non-hardened environments. (Bug #528786)
+ sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
+
+ 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%/}"
+
+ econf \
+ --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
+ --datadir="${PO}/usr/share/postgresql-${SLOT}" \
+ --docdir="${PO}/usr/share/doc/${PF}" \
+ --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 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) \
+ $(use_with uuid ossp-uuid) \
+ $(use_with xml libxml) \
+ $(use_with xml libxslt) \
+ $(use_with zlib) \
+ "$(use_enable nls nls "$(wanted_languages)")"
+}
+
+src_compile() {
+ emake world
+}
+
+src_install() {
+ emake DESTDIR="${D}" install-world
+
+ dodoc README HISTORY doc/{TODO,bug.template}
+
+ insinto /etc/postgresql-${SLOT}
+ newins src/bin/psql/psqlrc.sample psqlrc
+
+ use static-libs || find "${ED}" -name '*.a' -delete
+
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
+
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
+
+ if use systemd; then
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.service-9.6-r1" | \
+ systemd_newunit - ${PN}-${SLOT}.service
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
+ fi
+
+ newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
+
+ use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
+
+ 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
+
+ # 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
+
+ if use prefix ; then
+ keepdir /run/postgresql
+ fperms 1775 /run/postgresql
+ fi
+}
+
+pkg_preinst() {
+ # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
+ # /usr/bin/psql97). 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(). We
+ # only worry about the 9.7 slot as that's the last slot that had its
+ # slot-specific links generated by eselect.
+ #
+ # This can be removed when 10 is the lowest slot in the tree.
+ 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
+ [[ $(${canonicalise} "${l}") == *postgresql-9.7* ]] && rm "${l}"
+ done
+
+ # Then move the symlinks created by the ebuild to their proper place.
+ for l in "${ED}"/usr/bin/*tmp ; do
+ mv "${l}" "${l%tmp}" \
+ || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
+ done
+}
+
+pkg_postinst() {
+ use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
+ postgresql-config update
+
+ elog "If you need a global psqlrc-file, you can place it in:"
+ elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
+
+ elog
+ elog "Gentoo specific documentation:"
+ elog "https://wiki.gentoo.org/wiki/PostgreSQL"
+ elog
+ elog "Official documentation:"
+ elog "${EROOT%/}/usr/share/doc/${PF}/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, and other options, 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}"
+}
+
+pkg_prerm() {
+ if [[ -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() {
+ [[ -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() {
+ einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
+
+ if [[ ${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
+ [[ ${UID} -eq 0 ]] || \
+ ewarn "Tests cannot be run as root. Enable 'userpriv' in FEATURES."
+
+ ewarn "Skipping."
+ fi
+}
diff --git a/dev-db/pspg-0.8.0 b/dev-db/pspg-0.8.0
deleted file mode 100644
index d32b84372316..000000000000
--- a/dev-db/pspg-0.8.0
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=-
-DEPEND=sys-libs/ncurses:*
-DESCRIPTION=A better pager for psql and mysql
-EAPI=6
-HOMEPAGE=https://github.com/okbob/pspg
-KEYWORDS=amd64 x86
-LICENSE=BSD-2
-RDEPEND=sys-libs/ncurses:*
-SLOT=0
-SRC_URI=https://github.com/okbob/pspg/archive/0.8.0.tar.gz -> pspg-0.8.0.tar.gz
-_md5_=f2f74bea8fa504eaf4860e89e683e1ee
diff --git a/dev-db/pspg-0.9.2 b/dev-db/pspg-0.9.2
deleted file mode 100644
index f37ebef47c67..000000000000
--- a/dev-db/pspg-0.9.2
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=-
-DEPEND=sys-libs/ncurses:*
-DESCRIPTION=A better pager for psql and mysql
-EAPI=6
-HOMEPAGE=https://github.com/okbob/pspg
-KEYWORDS=~amd64 ~x86
-LICENSE=BSD-2
-RDEPEND=sys-libs/ncurses:*
-SLOT=0
-SRC_URI=https://github.com/okbob/pspg/archive/0.9.2.tar.gz -> pspg-0.9.2.tar.gz
-_md5_=584f8a3d3cb871e00337361288a09afa
diff --git a/dev-db/pspg-0.9.3 b/dev-db/pspg-0.9.3
deleted file mode 100644
index df39e3ebe59f..000000000000
--- a/dev-db/pspg-0.9.3
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=-
-DEPEND=sys-libs/ncurses:*
-DESCRIPTION=A better pager for psql and mysql
-EAPI=6
-HOMEPAGE=https://github.com/okbob/pspg
-KEYWORDS=~amd64 ~x86
-LICENSE=BSD-2
-RDEPEND=sys-libs/ncurses:*
-SLOT=0
-SRC_URI=https://github.com/okbob/pspg/archive/0.9.3.tar.gz -> pspg-0.9.3.tar.gz
-_md5_=584f8a3d3cb871e00337361288a09afa
diff --git a/dev-db/pspg-1.1.0 b/dev-db/pspg-1.1.0
deleted file mode 100644
index 241fa3aa6821..000000000000
--- a/dev-db/pspg-1.1.0
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=-
-DEPEND=sys-libs/ncurses:*
-DESCRIPTION=A better pager for psql and mysql
-EAPI=6
-HOMEPAGE=https://github.com/okbob/pspg
-KEYWORDS=~amd64 ~x86
-LICENSE=BSD-2
-RDEPEND=sys-libs/ncurses:*
-SLOT=0
-SRC_URI=https://github.com/okbob/pspg/archive/1.1.0.tar.gz -> pspg-1.1.0.tar.gz
-_md5_=584f8a3d3cb871e00337361288a09afa
diff --git a/dev-db/pspg/Manifest b/dev-db/pspg/Manifest
new file mode 100644
index 000000000000..4e4a1ac8b3e8
--- /dev/null
+++ b/dev-db/pspg/Manifest
@@ -0,0 +1,9 @@
+DIST pspg-0.8.0.tar.gz 850508 BLAKE2B 2f2fb7f094f72f0b5d1c959ab73a355ea2ced155fdb64adef21eb70c4991b057e31688128f50db2d6a84ab850b57ab59d50c0dd5ba06998af11ff3a5479cc9bd SHA512 758d47e041f4c7c91ad2033fb95e6d33a27b6f896077dbcb287331496e47740c31c6ba6bf7ea01ad6c1a3c3d4c5e525b268795a16f9c819f4d489d3e98fa3092
+DIST pspg-0.9.2.tar.gz 855891 BLAKE2B 0e0a992e5885ca4b2e058d19df2d9c7eac862e1a45e8d80f31df33ab2f3c02616c67cc528af6a52225db938a0c1f27352e13c7dfd01b15bda908bbf3ee9ef128 SHA512 8ad31a5e744db96bec7cfea7d128aa4ac3b44ab51c3dd1d0661178c1d139571a955143a3ccfe6556ce2a215ec193a45224720794da5d2af1e93beb2fa713aea4
+DIST pspg-0.9.3.tar.gz 856766 BLAKE2B 3e1b41f786abd8e964adb87411ba9dca7bdc0ed07a02e51a869dfaca491497478818d85de32846d675ee90f32f01f693ea33ce0166bb939457c55799aabf900a SHA512 79c019ef30a1a06c15793e7b51f7e1cabd79711d3a2a4360933c219b01e9c8d8390a82b87bb1be5316cabbcad3705adca8dd09714e6e994d7aca0b94ddcf06c0
+DIST pspg-1.1.0.tar.gz 861442 BLAKE2B b62fa7e92cf4baae31da08b8f14eb18a54dd0912c08c73764f4571b5bcc22ff21e0ceb3809c4f0fb33c490241b2135594b1d2fb9fcb9006287ced9a031b75ffe SHA512 84db26b5fce668938f76a6250caca8a394b439d6496de411305605da1ec35cfe79e444a56e73423e56bede21f5da3208b140be0d995e9cf575ba76a5bd0d49b1
+EBUILD pspg-0.8.0.ebuild 387 BLAKE2B b2f49b9e1bc7a032b064e2d65cb832c1177a51fabfaaf2b466d024346635bb9af319f0c656328d0084519ba12697f4a385627194f34330cdcc28b7644298acd2 SHA512 27636211a65612ed5424d4984e737e751677048f41c91cfab69f5de351f875622a8edc68c26e69ad9a2cf13b0e294dff07742c037f57262f1149966ca53717b8
+EBUILD pspg-0.9.2.ebuild 389 BLAKE2B 30ebc1a109cc694a1bcb8f612d36a51570d7df89cd5c55e6142581783e6afb958512c5de4c1bc446828c36acc3c6788da001c98ee0d60a1153ff454b693bf381 SHA512 3c62b0fbaacd4be5248cd7101cc91511f9bb321a0437b65e17848d1ab30338d1de64d674d43feb4c8c33513c8b4215545b3548994167eba20e9860955a2d3e6d
+EBUILD pspg-0.9.3.ebuild 389 BLAKE2B 30ebc1a109cc694a1bcb8f612d36a51570d7df89cd5c55e6142581783e6afb958512c5de4c1bc446828c36acc3c6788da001c98ee0d60a1153ff454b693bf381 SHA512 3c62b0fbaacd4be5248cd7101cc91511f9bb321a0437b65e17848d1ab30338d1de64d674d43feb4c8c33513c8b4215545b3548994167eba20e9860955a2d3e6d
+EBUILD pspg-1.1.0.ebuild 389 BLAKE2B 30ebc1a109cc694a1bcb8f612d36a51570d7df89cd5c55e6142581783e6afb958512c5de4c1bc446828c36acc3c6788da001c98ee0d60a1153ff454b693bf381 SHA512 3c62b0fbaacd4be5248cd7101cc91511f9bb321a0437b65e17848d1ab30338d1de64d674d43feb4c8c33513c8b4215545b3548994167eba20e9860955a2d3e6d
+MISC metadata.xml 298 BLAKE2B 40abb765b052aa2cbbf749c54c686f1c98968cb1af2e93c149bfbfe6244d3c17e827189d7a1da90a566016758bfbed63b16ad0a0328725349748d1b18b2437b1 SHA512 167896d1d92ccb4b171cce16d63405369a9e28b0d01c12b2ed94fcec1f982892e179c007287fc3386e1c00393d6570a2ae9e8efe9420e53a82308426075d5c89
diff --git a/dev-db/pspg/metadata.xml b/dev-db/pspg/metadata.xml
new file mode 100644
index 000000000000..eb41154c968f
--- /dev/null
+++ b/dev-db/pspg/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>pgsql-bugs@gentoo.org</email>
+ <name>PostgreSQL and Related Package Development</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-db/pspg/pspg-0.8.0.ebuild b/dev-db/pspg/pspg-0.8.0.ebuild
new file mode 100644
index 000000000000..d9846d4a7335
--- /dev/null
+++ b/dev-db/pspg/pspg-0.8.0.ebuild
@@ -0,0 +1,16 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="A better pager for psql and mysql"
+HOMEPAGE="https://github.com/okbob/${PN}"
+SRC_URI="https://github.com/okbob/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="sys-libs/ncurses:*"
+RDEPEND="${DEPEND}"
diff --git a/dev-db/pspg/pspg-0.9.2.ebuild b/dev-db/pspg/pspg-0.9.2.ebuild
new file mode 100644
index 000000000000..9b1b64baa6d0
--- /dev/null
+++ b/dev-db/pspg/pspg-0.9.2.ebuild
@@ -0,0 +1,16 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="A better pager for psql and mysql"
+HOMEPAGE="https://github.com/okbob/${PN}"
+SRC_URI="https://github.com/okbob/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="sys-libs/ncurses:*"
+RDEPEND="${DEPEND}"
diff --git a/dev-db/pspg/pspg-0.9.3.ebuild b/dev-db/pspg/pspg-0.9.3.ebuild
new file mode 100644
index 000000000000..9b1b64baa6d0
--- /dev/null
+++ b/dev-db/pspg/pspg-0.9.3.ebuild
@@ -0,0 +1,16 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="A better pager for psql and mysql"
+HOMEPAGE="https://github.com/okbob/${PN}"
+SRC_URI="https://github.com/okbob/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="sys-libs/ncurses:*"
+RDEPEND="${DEPEND}"
diff --git a/dev-db/pspg/pspg-1.1.0.ebuild b/dev-db/pspg/pspg-1.1.0.ebuild
new file mode 100644
index 000000000000..9b1b64baa6d0
--- /dev/null
+++ b/dev-db/pspg/pspg-1.1.0.ebuild
@@ -0,0 +1,16 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="A better pager for psql and mysql"
+HOMEPAGE="https://github.com/okbob/${PN}"
+SRC_URI="https://github.com/okbob/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="sys-libs/ncurses:*"
+RDEPEND="${DEPEND}"
diff --git a/dev-db/psqlodbc-10.01.0000 b/dev-db/psqlodbc-10.01.0000
deleted file mode 100644
index 4cd92fc4a68d..000000000000
--- a/dev-db/psqlodbc-10.01.0000
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=configure install
-DEPEND=dev-db/postgresql:*[ssl?] !iodbc? ( dev-db/unixODBC ) iodbc? ( dev-db/libiodbc )
-DESCRIPTION=Official ODBC driver for PostgreSQL
-EAPI=6
-HOMEPAGE=https://www.postgresql.org/
-IUSE=doc iodbc ssl threads
-KEYWORDS=amd64 x86
-LICENSE=LGPL-2
-RDEPEND=dev-db/postgresql:*[ssl?] !iodbc? ( dev-db/unixODBC ) iodbc? ( dev-db/libiodbc )
-SLOT=0
-SRC_URI=mirror://postgresql/odbc/versions/src/psqlodbc-10.01.0000.tar.gz
-_md5_=d544f5eb52c39104afa9575921239e5c
diff --git a/dev-db/psqlodbc/Manifest b/dev-db/psqlodbc/Manifest
new file mode 100644
index 000000000000..f911540ff459
--- /dev/null
+++ b/dev-db/psqlodbc/Manifest
@@ -0,0 +1,3 @@
+DIST psqlodbc-10.01.0000.tar.gz 915109 BLAKE2B a09de8218dbfbacf7972fc02c02863891ed65d19b86217a646aa0176ad7a8b962da83bb5036ad11b819a583409e4d1f3ce257a0457838000bc9cc060753c67b3 SHA512 1c5b9732a9c7e7bff0fd0a04cc7f0b45db9150486a2c3a8a96d85fb55e9296a80f12ee652cfb7ff54700e7dfc10accf9e5420b7ca798df31be51f997bbda88aa
+EBUILD psqlodbc-10.01.0000.ebuild 683 BLAKE2B 76d3476a6e36f014af7c3db05aa468e98574997572b33f7f70d3ed3fe10aa3bd87028b2a9ba9509991b9050278fb66683b3f75d86d6b260cbaf0900cf33c8390 SHA512 cbd689bc332a0e43e4779286ee82ee4538ad6bb707b15acc0ae86b4c03b5a3a331c22b9115864b97ee5a825f6a09899709119d11e9c3c1e5d0d5f6de3c9f134c
+MISC metadata.xml 366 BLAKE2B 9ec9629e72aec8407fc260e061f7bfe22f4ed13c6a4a99ddfffbd16eeac41cc09bcbe10045f6e4cba92d7ced6a874b09b7a7614aedd7cd45afa6e03e096f869e SHA512 a6aa6cbb188fa2ed889ecb69c60b77d33c52ee69a5e9b3c20d8faf9bd9616d33f592c85bded3351fb099b6424e2f7728ee11fb1114121604ceacd9e7e0a13f7b
diff --git a/dev-db/psqlodbc/metadata.xml b/dev-db/psqlodbc/metadata.xml
new file mode 100644
index 000000000000..30334effd39b
--- /dev/null
+++ b/dev-db/psqlodbc/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+<email>pgsql-bugs@gentoo.org</email>
+<name>PostgreSQL and Related Package Development</name>
+</maintainer>
+<use>
+<flag name="iodbc">Use dev-db/libiodbc. Disable to use dev-db/unixODBC.</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-db/psqlodbc/psqlodbc-10.01.0000.ebuild b/dev-db/psqlodbc/psqlodbc-10.01.0000.ebuild
new file mode 100644
index 000000000000..075039ab2e17
--- /dev/null
+++ b/dev-db/psqlodbc/psqlodbc-10.01.0000.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+DESCRIPTION="Official ODBC driver for PostgreSQL"
+HOMEPAGE="https://www.postgresql.org/"
+SRC_URI="mirror://postgresql/odbc/versions/src/${P}.tar.gz"
+SLOT="0"
+LICENSE="LGPL-2"
+KEYWORDS="amd64 x86"
+IUSE="doc iodbc ssl threads"
+
+DEPEND="dev-db/postgresql:*[ssl?]
+ !iodbc? ( dev-db/unixODBC )
+ iodbc? ( dev-db/libiodbc )
+"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ econf \
+ $(use_with iodbc) \
+ $(use_with !iodbc unixodbc) \
+ $(use_enable threads pthreads)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc readme.txt
+ use doc && dodoc docs/*{html,jpg,txt}
+}
diff --git a/dev-db/qdbm-1.8.78-r2 b/dev-db/qdbm-1.8.78-r2
deleted file mode 100644
index 3b5f6c860099..000000000000
--- a/dev-db/qdbm-1.8.78-r2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare setup test unpack
-DEPEND=bzip2? ( app-arch/bzip2 ) java? ( >=virtual/jre-1.4:* ) lzo? ( dev-libs/lzo ) perl? ( dev-lang/perl ) ruby? ( ruby_targets_ruby23? ( dev-lang/ruby:2.3 ) ruby_targets_ruby24? ( dev-lang/ruby:2.4 ) ) zlib? ( sys-libs/zlib ) java? ( >=virtual/jdk-1.4:* ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 java? ( >=dev-java/java-config-2.2.0-r3 )
-DESCRIPTION=Quick Database Manager
-EAPI=6
-HOMEPAGE=http://fallabs.com/qdbm/
-IUSE=bzip2 cxx debug java lzo perl ruby zlib elibc_FreeBSD java elibc_FreeBSD ruby_targets_ruby23 ruby_targets_ruby24
-KEYWORDS=alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd
-LICENSE=LGPL-2.1
-RDEPEND=bzip2? ( app-arch/bzip2 ) java? ( >=virtual/jre-1.4:* ) lzo? ( dev-libs/lzo ) perl? ( dev-lang/perl ) ruby? ( ruby_targets_ruby23? ( dev-lang/ruby:2.3 ) ruby_targets_ruby24? ( dev-lang/ruby:2.4 ) ) zlib? ( sys-libs/zlib ) java? ( >=dev-java/java-config-2.2.0-r3 )
-SLOT=0
-SRC_URI=http://fallabs.com/qdbm/qdbm-1.8.78.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e perl-functions 01e8c68d5a528bbcda4d3c60205983df preserve-libs ef207dc62baddfddfd39a164d9797648 ruby-ng c1f44e746d7656dd6e02d8815ff9518a ruby-utils e5942a80e3c3b936c6b84d6dc4af9f9c toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=7b80f9d12c3898ac9bb5e5c495c789a4
diff --git a/dev-db/qdbm/Manifest b/dev-db/qdbm/Manifest
new file mode 100644
index 000000000000..475ba17a77a1
--- /dev/null
+++ b/dev-db/qdbm/Manifest
@@ -0,0 +1,7 @@
+AUX qdbm-configure.patch 3385 BLAKE2B e2ed0d851476efdec349b2a2c18f260f4da205d3ec3e9c869056e4606855ed3814358821812c420e9d471ad4fe77b03e55fe0c5283850a39c313c6d9f916fbdc SHA512 a6eeed36b87bdaf9bbddbc7aa641cfca89e72e2e6c2acaec66b0444db9bd39f57afae0c8fb065293875c45dbb14ff6826a4c93061b7457c32b42943e8113d89a
+AUX qdbm-perl.patch 1260 BLAKE2B e180ba6c2d57f6d813bbc6ae01ed787f6262a290eb59253b8950ec6f80ed29964e41cd3297b063db62e8c726a8e57399fe4ee52e67887bcaa74fad829b0b372f SHA512 a7356c2f5a4313e7da2524a6276bca5720459858d8619bfd8e6514cd9c1cd9aa1a2f7f0592e5ad1ee8b05e7e34452761e26be351f8e933e79a75cb4d19c862f3
+AUX qdbm-ruby19.patch 10116 BLAKE2B 9a15c5d2e0cf8237edb78e68b2f9fde4868841bcca6abc08a33d110b9f25283e37fcb306c18bcca5495c7e5cedc778e3a2de2fe8414ce46c661a7c40d517cddc SHA512 f3e6c320a600ad3355fc74a333c28fc2dd904a2a52ca91a51f21b3dd14c7527bf312f5040dbc3e4f61d2dbcc0ade185e226333c79f9a04fc05437a156befc0e7
+AUX qdbm-runpath.patch 1133 BLAKE2B 9b1c8c211d8e4075a77a34f3d79ca15cb3d833801777bdb328293047539bdd1a51c08031b3400c11d10732aa7864078ca8db02713a95cd90704e1a9e26f5bd10 SHA512 de8bde4a614617d742131e8025fd661019ec81b803817ef32ffca461b2c8b60c20756f6e6f84d6f23124eed3947ab3573b8c4a05b254f8b4d3e53f0cf7bc8452
+DIST qdbm-1.8.78.tar.gz 1015429 BLAKE2B 1b985d856ff18ddfeb2d779694ba9a76006908b4b2a7509d4e3668aded80e08bbde28bcc24762ec27048cdc01dc84f9872dbfc221e8eea6f1c68f5e81cdc69d3 SHA512 480549c56071bf82edf714a611aef863599c858ed63702820ae0890fd2c0029d1a231ed94a8090c74420dd648bd3625d270a5c078b113cbb86a12ef509e19037
+EBUILD qdbm-1.8.78-r2.ebuild 3356 BLAKE2B 96375a4d65e84e50f3ddeb51757f257f7e55c0c6e240c40996fea27e8403581acb4c7b3bb7339864150c9bc9c178b64ec4af8497a04130fa5f413304b7a1de8f SHA512 9fcbd9aa97778d22af56ae87013e3ef9345c9c1115d0dd2d2669ed658eee5f2ce39c2d00647f4f4e81734840e65ed4f461f8adeb7d0112aab8a06ca5738e239d
+MISC metadata.xml 221 BLAKE2B 6fb71e3c82061054a0c2d88c1ce8e591d5742628fe53032c9efd2c371ce1e8b0135b00ac91fa1905df39a507d5faa5871fb3a30d167dd46cec581682ba17c8ff SHA512 a11e9bbbabc9ac96985c5dc247e601b065fa762f12bce74224896c27aee34eb908187622bfc849c39c6c722a8ef8ee72b248afc84da1b0eb72f1ff5eeb13bbf0
diff --git a/dev-db/qdbm/files/qdbm-configure.patch b/dev-db/qdbm/files/qdbm-configure.patch
new file mode 100644
index 000000000000..364c5c9f653e
--- /dev/null
+++ b/dev-db/qdbm/files/qdbm-configure.patch
@@ -0,0 +1,108 @@
+--- a/cgi/configure.in
++++ b/cgi/configure.in
+@@ -13,15 +13,6 @@
+ # Export variables
+ TARGETS="all"
+
+-# Building paths
+-pathtmp="$PATH"
+-PATH="$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
+-PATH="$PATH:/usr/ccs/bin:/usr/ucb:/usr/xpg4/bin:/usr/xpg6/bin:$pathtmp"
+-LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LIBRARY_PATH"
+-LD_LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH"
+-CPATH="$HOME/include:/usr/local/include:$CPATH"
+-export PATH LIBRARY_PATH LD_LIBRARY_PATH CPATH
+-
+
+
+ #================================================================
+--- a/configure.in
++++ b/configure.in
+@@ -20,15 +20,6 @@
+ LD="ld"
+ AR="ar"
+
+-# Building paths
+-pathtmp="$PATH"
+-PATH="$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
+-PATH="$PATH:/usr/ccs/bin:/usr/ucb:/usr/xpg4/bin:/usr/xpg6/bin:$pathtmp"
+-LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LIBRARY_PATH"
+-LD_LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH"
+-CPATH="$HOME/include:/usr/local/include:$CPATH"
+-export PATH LIBRARY_PATH LD_LIBRARY_PATH CPATH
+-
+
+
+ #================================================================
+--- a/java/configure.in
++++ b/java/configure.in
+@@ -25,15 +25,6 @@
+ MYOPTS=""
+ LD="ld"
+
+-# Building paths
+-pathtmp="$PATH"
+-PATH="$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
+-PATH="$PATH:/usr/ccs/bin:/usr/ucb:/usr/xpg4/bin:/usr/xpg6/bin:$pathtmp"
+-LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LIBRARY_PATH"
+-LD_LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH"
+-CPATH="$HOME/include:/usr/local/include:$CPATH"
+-export PATH LIBRARY_PATH LD_LIBRARY_PATH CPATH
+-
+
+
+ #================================================================
+--- a/perl/configure.in
++++ b/perl/configure.in
+@@ -5,15 +5,6 @@
+ # Targets
+ AC_INIT(qdbm-perl, 1.0.0)
+
+-# Building paths
+-pathtmp="$PATH"
+-PATH="$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
+-PATH="$PATH:/usr/ccs/bin:/usr/ucb:/usr/xpg4/bin:/usr/xpg6/bin:$pathtmp"
+-LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LIBRARY_PATH"
+-LD_LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH"
+-CPATH="$HOME/include:/usr/local/include:$CPATH"
+-export PATH LIBRARY_PATH LD_LIBRARY_PATH CPATH
+-
+ # Setting the default prefix
+ if test "$prefix" = NONE
+ then
+--- a/plus/configure.in
++++ b/plus/configure.in
+@@ -19,15 +19,6 @@
+ LD="ld"
+ AR="ar"
+
+-# Building paths
+-pathtmp="$PATH"
+-PATH="$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
+-PATH="$PATH:/usr/ccs/bin:/usr/ucb:/usr/xpg4/bin:/usr/xpg6/bin:$pathtmp"
+-LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LIBRARY_PATH"
+-LD_LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH"
+-CPATH="$HOME/include:/usr/local/include:$CPATH"
+-export PATH LIBRARY_PATH LD_LIBRARY_PATH CPATH
+-
+
+
+ #================================================================
+--- a/ruby/configure.in
++++ b/ruby/configure.in
+@@ -5,15 +5,6 @@
+ # Targets
+ AC_INIT(qdbm-ruby, 1.0.0)
+
+-# Building paths
+-pathtmp="$PATH"
+-PATH="$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
+-PATH="$PATH:/usr/ccs/bin:/usr/ucb:/usr/xpg4/bin:/usr/xpg6/bin:$pathtmp"
+-LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LIBRARY_PATH"
+-LD_LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH"
+-CPATH="$HOME/include:/usr/local/include:$CPATH"
+-export PATH LIBRARY_PATH LD_LIBRARY_PATH CPATH
+-
+ # Setting the default prefix
+ if test "$prefix" = NONE
+ then
diff --git a/dev-db/qdbm/files/qdbm-perl.patch b/dev-db/qdbm/files/qdbm-perl.patch
new file mode 100644
index 000000000000..1a7ca6a70dcd
--- /dev/null
+++ b/dev-db/qdbm/files/qdbm-perl.patch
@@ -0,0 +1,34 @@
+--- a/perl/Makefile.in
++++ b/perl/Makefile.in
+@@ -25,10 +25,10 @@
+ DESTDIR =
+
+ # Building binaries
+-CC = gcc
++CC = @CC@
+ INC = -I. -I../.. -I$(HOME)/include -I/usr/local/include
+ OPTIMIZE = -O2
+-LD = gcc
++LD = @CC@
+ LIBS = -L../.. -I$(HOME)/lib -L/usr/local/lib -lqdbm @LIBS@
+ RUNENV = LD_LIBRARY_PATH=.:..:../..:/usr/local/lib:$(HOME)/lib
+
+@@ -42,15 +42,15 @@
+ all :
+ cd depot && [ -f Makefile ] || \
+ $(RUNENV) perl Makefile.PL CC="$(CC)" INC="$(INC)" OPTIMIZE="$(OPTIMIZE)" \
+- LD="$(LD)" LIBS="$(LIBS)" PREFIX="$(prefix)" ; \
++ LD="$(LD)" LIBS="$(LIBS)" PREFIX="$(prefix)" INSTALLDIRS="vendor" ; \
+ $(RUNENV) make
+ cd curia && [ -f Makefile ] || \
+ $(RUNENV) perl Makefile.PL CC="$(CC)" INC="$(INC)" OPTIMIZE="$(OPTIMIZE)" \
+- LD="$(LD)" LIBS="$(LIBS)" PREFIX="$(prefix)" ; \
++ LD="$(LD)" LIBS="$(LIBS)" PREFIX="$(prefix)" INSTALLDIRS="vendor" ; \
+ $(RUNENV) make
+ cd villa && [ -f Makefile ] || \
+ $(RUNENV) perl Makefile.PL CC="$(CC)" INC="$(INC)" OPTIMIZE="$(OPTIMIZE)" \
+- LD="$(LD)" LIBS="$(LIBS)" PREFIX="$(prefix)" ; \
++ LD="$(LD)" LIBS="$(LIBS)" PREFIX="$(prefix)" INSTALLDIRS="vendor" ; \
+ $(RUNENV) make
+ @printf '\n'
+ @printf '#================================================================\n'
diff --git a/dev-db/qdbm/files/qdbm-ruby19.patch b/dev-db/qdbm/files/qdbm-ruby19.patch
new file mode 100644
index 000000000000..8724e7cdc4ed
--- /dev/null
+++ b/dev-db/qdbm/files/qdbm-ruby19.patch
@@ -0,0 +1,373 @@
+--- a/ruby/Makefile.in
++++ b/ruby/Makefile.in
+@@ -85,27 +85,27 @@
+ sync ; sync
+ cd depot && rm -rf casket
+ cd depot && \
+- $(RUNENV) ruby -w -Ilib rbdptest write casket 10000 1000
++ $(RUNENV) ruby -w -Ilib -I. rbdptest write casket 10000 1000
+ cd depot && \
+- $(RUNENV) ruby -w -Ilib rbdptest read casket
++ $(RUNENV) ruby -w -Ilib -I. rbdptest read casket
+ cd depot && \
+- $(RUNENV) ruby -w -Ilib rbdptest misc casket
++ $(RUNENV) ruby -w -Ilib -I. rbdptest misc casket
+ cd depot && rm -rf casket
+ cd curia && rm -rf casket
+ cd curia && \
+- $(RUNENV) ruby -w -Ilib rbcrtest write casket 10000 1000 10
++ $(RUNENV) ruby -w -Ilib -I. rbcrtest write casket 10000 1000 10
+ cd curia && \
+- $(RUNENV) ruby -w -Ilib rbcrtest read casket
++ $(RUNENV) ruby -w -Ilib -I. rbcrtest read casket
+ cd curia && \
+- $(RUNENV) ruby -w -Ilib rbcrtest misc casket
++ $(RUNENV) ruby -w -Ilib -I. rbcrtest misc casket
+ cd curia && rm -rf casket
+ cd villa && rm -rf casket
+ cd villa && \
+- $(RUNENV) ruby -w -Ilib rbvltest write casket 10000
++ $(RUNENV) ruby -w -Ilib -I. rbvltest write casket 10000
+ cd villa && \
+- $(RUNENV) ruby -w -Ilib rbvltest read casket
++ $(RUNENV) ruby -w -Ilib -I. rbvltest read casket
+ cd villa && \
+- $(RUNENV) ruby -w -Ilib rbvltest misc casket
++ $(RUNENV) ruby -w -Ilib -I. rbvltest misc casket
+ cd villa && rm -rf casket
+ @printf '\n'
+ @printf '#================================================================\n'
+--- a/ruby/configure.in
++++ b/ruby/configure.in
+@@ -17,7 +17,7 @@
+ # Setting the default prefix
+ if test "$prefix" = NONE
+ then
+- prefix=`ruby -rrbconfig -e 'puts(Config::CONFIG.fetch("prefix"))'`
++ prefix=`ruby -rrbconfig -e 'puts(RbConfig::CONFIG.fetch("prefix"))'`
+ fi
+
+ # Duplication of QDBM for Ruby
+--- a/ruby/curia/mod_curia.c
++++ b/ruby/curia/mod_curia.c
+@@ -24,6 +24,13 @@
+
+ #define MAXOPEN 1024
+
++#ifndef StringValuePtr
++# define StringValuePtr(v) STR2CSTR(v)
++#endif
++#ifndef RSTRING_LEN
++# define RSTRING_LEN(s) (RSTRING(s)->len)
++#endif
++
+
+ VALUE ccuriaerror;
+ VALUE ccuriaerror_ENOERR;
+@@ -233,7 +240,7 @@
+ const char *name;
+ int index, omode, bnum, dnum;
+ if((index = getnewindex()) == -1) myerror(DP_EMISC);
+- name = STR2CSTR(vname);
++ name = StringValuePtr(vname);
+ FIXNUM_P(vomode);
+ omode = FIX2INT(vomode);
+ FIXNUM_P(vbnum);
+@@ -276,10 +283,10 @@
+ int index, ksiz, vsiz, dmode;
+ FIXNUM_P(vindex);
+ if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
+- kbuf = STR2CSTR(vkey);
+- ksiz = RSTRING(vkey)->len;
+- vbuf = STR2CSTR(vval);
+- vsiz = RSTRING(vval)->len;
++ kbuf = StringValuePtr(vkey);
++ ksiz = RSTRING_LEN(vkey);
++ vbuf = StringValuePtr(vval);
++ vsiz = RSTRING_LEN(vval);
+ FIXNUM_P(vdmode);
+ dmode = FIX2INT(vdmode);
+ curia = crtable[index];
+@@ -297,8 +304,8 @@
+ int index, ksiz;
+ FIXNUM_P(vindex);
+ if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
+- kbuf = STR2CSTR(vkey);
+- ksiz = RSTRING(vkey)->len;
++ kbuf = StringValuePtr(vkey);
++ ksiz = RSTRING_LEN(vkey);
+ curia = crtable[index];
+ if(!crout(curia, kbuf, ksiz)){
+ if(crsltable[index] && dpecode == DP_ENOITEM) return Qfalse;
+@@ -316,8 +323,8 @@
+ VALUE vval;
+ FIXNUM_P(vindex);
+ if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
+- kbuf = STR2CSTR(vkey);
+- ksiz = RSTRING(vkey)->len;
++ kbuf = StringValuePtr(vkey);
++ ksiz = RSTRING_LEN(vkey);
+ FIXNUM_P(vstart);
+ start = FIX2INT(vstart);
+ FIXNUM_P(vmax);
+@@ -339,8 +346,8 @@
+ int index, ksiz, vsiz;
+ FIXNUM_P(vindex);
+ if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
+- kbuf = STR2CSTR(vkey);
+- ksiz = RSTRING(vkey)->len;
++ kbuf = StringValuePtr(vkey);
++ ksiz = RSTRING_LEN(vkey);
+ curia = crtable[index];
+ if((vsiz = crvsiz(curia, kbuf, ksiz)) == -1){
+ if(crsltable[index] && dpecode == DP_ENOITEM) return INT2FIX(-1);
+--- a/ruby/curia/rbcrtest
++++ b/ruby/curia/rbcrtest
+@@ -21,7 +21,7 @@
+
+ # main routine
+ def main()
+- $0.gsub!(/.*\//, "")
++ $0 = $0.gsub(/.*\//, "")
+ (ARGV.length >= 1) || usage()
+ if(ARGV[0] == "write")
+ rv = runwrite()
+@@ -283,7 +283,7 @@
+
+
+ # execute main
+-$0.gsub!(/.*\//, "")
++$0 = $0.gsub(/.*\//, "")
+ exit(main())
+
+
+--- a/ruby/depot/mod_depot.c
++++ b/ruby/depot/mod_depot.c
+@@ -23,6 +23,13 @@
+
+ #define MAXOPEN 1024
+
++#ifndef StringValuePtr
++# define StringValuePtr(v) STR2CSTR(v)
++#endif
++#ifndef RSTRING_LEN
++# define RSTRING_LEN(s) (RSTRING(s)->len)
++#endif
++
+
+ VALUE cdepoterror;
+ VALUE cdepoterror_ENOERR;
+@@ -232,7 +239,7 @@
+ const char *name;
+ int index, omode, bnum;
+ if((index = getnewindex()) == -1) myerror(DP_EMISC);
+- name = STR2CSTR(vname);
++ name = StringValuePtr(vname);
+ FIXNUM_P(vomode);
+ omode = FIX2INT(vomode);
+ FIXNUM_P(vbnum);
+@@ -273,10 +280,10 @@
+ int index, ksiz, vsiz, dmode;
+ FIXNUM_P(vindex);
+ if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
+- kbuf = STR2CSTR(vkey);
+- ksiz = RSTRING(vkey)->len;
+- vbuf = STR2CSTR(vval);
+- vsiz = RSTRING(vval)->len;
++ kbuf = StringValuePtr(vkey);
++ ksiz = RSTRING_LEN(vkey);
++ vbuf = StringValuePtr(vval);
++ vsiz = RSTRING_LEN(vval);
+ FIXNUM_P(vdmode);
+ dmode = FIX2INT(vdmode);
+ depot = dptable[index];
+@@ -294,8 +301,8 @@
+ int index, ksiz;
+ FIXNUM_P(vindex);
+ if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
+- kbuf = STR2CSTR(vkey);
+- ksiz = RSTRING(vkey)->len;
++ kbuf = StringValuePtr(vkey);
++ ksiz = RSTRING_LEN(vkey);
+ depot = dptable[index];
+ if(!dpout(depot, kbuf, ksiz)){
+ if(dpsltable[index] && dpecode == DP_ENOITEM) return Qfalse;
+@@ -313,8 +320,8 @@
+ VALUE vval;
+ FIXNUM_P(vindex);
+ if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
+- kbuf = STR2CSTR(vkey);
+- ksiz = RSTRING(vkey)->len;
++ kbuf = StringValuePtr(vkey);
++ ksiz = RSTRING_LEN(vkey);
+ FIXNUM_P(vstart);
+ start = FIX2INT(vstart);
+ FIXNUM_P(vmax);
+@@ -336,8 +343,8 @@
+ int index, ksiz, vsiz;
+ FIXNUM_P(vindex);
+ if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
+- kbuf = STR2CSTR(vkey);
+- ksiz = RSTRING(vkey)->len;
++ kbuf = StringValuePtr(vkey);
++ ksiz = RSTRING_LEN(vkey);
+ depot = dptable[index];
+ if((vsiz = dpvsiz(depot, kbuf, ksiz)) == -1){
+ if(dpsltable[index] && dpecode == DP_ENOITEM) return INT2FIX(-1);
+--- a/ruby/depot/rbdptest
++++ b/ruby/depot/rbdptest
+@@ -21,7 +21,7 @@
+
+ # main routine
+ def main()
+- $0.gsub!(/.*\//, "")
++ $0 = $0.gsub(/.*\//, "")
+ (ARGV.length >= 1) || usage()
+ if(ARGV[0] == "write")
+ rv = runwrite()
+@@ -278,7 +278,7 @@
+
+
+ # execute main
+-$0.gsub!(/.*\//, "")
++$0 = $0.gsub(/.*\//, "")
+ exit(main())
+
+
+--- a/ruby/myrbdoc
++++ b/ruby/myrbdoc
+@@ -186,7 +186,7 @@
+
+
+ # execute main
+-#$0.gsub!(/.*\//, "")
++#$0 = $0.gsub(/.*\//, "")
+ exit(main())
+
+
+--- a/ruby/villa/mod_villa.c
++++ b/ruby/villa/mod_villa.c
+@@ -25,6 +25,13 @@
+
+ #define MAXOPEN 1024
+
++#ifndef StringValuePtr
++# define StringValuePtr(v) STR2CSTR(v)
++#endif
++#ifndef RSTRING_LEN
++# define RSTRING_LEN(s) (RSTRING(s)->len)
++#endif
++
+
+ VALUE cvillaerror;
+ VALUE cvillaerror_ENOERR;
+@@ -304,7 +311,7 @@
+ int index, omode, cmode;
+ VLCFUNC cmp;
+ if((index = getnewindex()) == -1) myerror(DP_EMISC);
+- name = STR2CSTR(vname);
++ name = StringValuePtr(vname);
+ FIXNUM_P(vomode);
+ omode = FIX2INT(vomode);
+ FIXNUM_P(vcmode);
+@@ -352,10 +359,10 @@
+ int index, ksiz, vsiz, dmode;
+ FIXNUM_P(vindex);
+ if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
+- kbuf = STR2CSTR(vkey);
+- ksiz = RSTRING(vkey)->len;
+- vbuf = STR2CSTR(vval);
+- vsiz = RSTRING(vval)->len;
++ kbuf = StringValuePtr(vkey);
++ ksiz = RSTRING_LEN(vkey);
++ vbuf = StringValuePtr(vval);
++ vsiz = RSTRING_LEN(vval);
+ FIXNUM_P(vdmode);
+ dmode = FIX2INT(vdmode);
+ villa = vltable[index];
+@@ -373,8 +380,8 @@
+ int index, ksiz;
+ FIXNUM_P(vindex);
+ if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
+- kbuf = STR2CSTR(vkey);
+- ksiz = RSTRING(vkey)->len;
++ kbuf = StringValuePtr(vkey);
++ ksiz = RSTRING_LEN(vkey);
+ villa = vltable[index];
+ if(!vlout(villa, kbuf, ksiz)){
+ if(vlsltable[index] && dpecode == DP_ENOITEM) return Qfalse;
+@@ -391,8 +398,8 @@
+ VALUE vval;
+ FIXNUM_P(vindex);
+ if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
+- kbuf = STR2CSTR(vkey);
+- ksiz = RSTRING(vkey)->len;
++ kbuf = StringValuePtr(vkey);
++ ksiz = RSTRING_LEN(vkey);
+ villa = vltable[index];
+ if(!(vbuf = vlget(villa, kbuf, ksiz, &vsiz))){
+ if(vlsltable[index] && dpecode == DP_ENOITEM) return Qnil;
+@@ -409,8 +416,8 @@
+ int index, ksiz, vsiz;
+ FIXNUM_P(vindex);
+ if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
+- kbuf = STR2CSTR(vkey);
+- ksiz = RSTRING(vkey)->len;
++ kbuf = StringValuePtr(vkey);
++ ksiz = RSTRING_LEN(vkey);
+ villa = vltable[index];
+ if((vsiz = vlvsiz(villa, kbuf, ksiz)) == -1){
+ if(vlsltable[index] && dpecode == DP_ENOITEM) return INT2FIX(-1);
+@@ -426,8 +433,8 @@
+ int index, ksiz, vnum;
+ FIXNUM_P(vindex);
+ if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
+- kbuf = STR2CSTR(vkey);
+- ksiz = RSTRING(vkey)->len;
++ kbuf = StringValuePtr(vkey);
++ ksiz = RSTRING_LEN(vkey);
+ villa = vltable[index];
+ vnum = vlvnum(villa, kbuf, ksiz);
+ return INT2FIX(vnum);
+@@ -497,8 +504,8 @@
+ VALUE vval;
+ FIXNUM_P(vindex);
+ if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
+- kbuf = STR2CSTR(vkey);
+- ksiz = RSTRING(vkey)->len;
++ kbuf = StringValuePtr(vkey);
++ ksiz = RSTRING_LEN(vkey);
+ FIXNUM_P(vjmode);
+ jmode = FIX2INT(vjmode);
+ villa = vltable[index];
+@@ -551,8 +558,8 @@
+ int index, vsiz, cpmode;
+ FIXNUM_P(vindex);
+ if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
+- vbuf = STR2CSTR(vval);
+- vsiz = RSTRING(vval)->len;
++ vbuf = StringValuePtr(vval);
++ vsiz = RSTRING_LEN(vval);
+ FIXNUM_P(vcpmode);
+ cpmode = FIX2INT(vcpmode);
+ villa = vltable[index];
+--- a/ruby/villa/rbvltest
++++ b/ruby/villa/rbvltest
+@@ -21,7 +21,7 @@
+
+ # main routine
+ def main()
+- $0.gsub!(/.*\//, "")
++ $0 = $0.gsub(/.*\//, "")
+ (ARGV.length >= 1) || usage()
+ if(ARGV[0] == "write")
+ rv = runwrite()
+@@ -280,7 +280,7 @@
+
+
+ # execute main
+-$0.gsub!(/.*\//, "")
++$0 = $0.gsub(/.*\//, "")
+ exit(main())
+
+
diff --git a/dev-db/qdbm/files/qdbm-runpath.patch b/dev-db/qdbm/files/qdbm-runpath.patch
new file mode 100644
index 000000000000..56d85a5b14a5
--- /dev/null
+++ b/dev-db/qdbm/files/qdbm-runpath.patch
@@ -0,0 +1,30 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -61,7 +61,6 @@
+ LIBS = -lqdbm @LIBS@
+ LIBLDFLAGS = @LDFLAGS@ -L. -L$(MYLIBDIR) -L$(HOME)/lib -L/usr/local/lib @LIBS@
+ LDFLAGS = @LDFLAGS@ -L. -L$(MYLIBDIR) -L$(HOME)/lib -L/usr/local/lib $(LIBS)
+-LDENV = LD_RUN_PATH=/lib:/usr/lib:$(MYLIBDIR):$(HOME)/lib:/usr/local/lib
+ AR = @AR@
+ ARFLAGS = rcsv
+ RUNENV = LD_LIBRARY_PATH=.:/lib:/usr/lib:$(MYLIBDIR):$(HOME)/lib:/usr/local/lib
+--- a/cgi/Makefile.in
++++ b/cgi/Makefile.in
+@@ -28,7 +28,6 @@
+ CFLAGS = -Wall -ansi -pedantic -fsigned-char -O2
+ LIBS = -lqdbm @LIBS@
+ LDFLAGS = -L$(srcdir)/.. -L$(HOME)/lib -L/usr/local/lib $(LIBS)
+-LDENV = LD_RUN_PATH=/lib:/usr/lib:$(HOME)/lib:/usr/local/lib:$(prefix)/lib
+
+ # Install destinations
+ prefix = @prefix@
+--- a/plus/Makefile.in
++++ b/plus/Makefile.in
+@@ -51,7 +51,6 @@
+ -L$(HOME)/lib -L/usr/local/lib $(LIBS)
+ LDFLAGS = @LDFLAGS@ -L. -L$(srcdir)/.. -L$(MYLIBDIR) \
+ -L$(HOME)/lib -L/usr/local/lib -lxqdbm $(LIBS)
+-LDENV = LD_RUN_PATH=/lib:/usr/lib:$(MYLIBDIR):$(HOME)/lib:/usr/local/lib
+ AR = @AR@
+ ARFLAGS = rcsv
+ RUNENV = LD_LIBRARY_PATH=.:..:/lib:/usr/lib:$(MYLIBDIR):$(HOME)/lib:/usr/local/lib
diff --git a/dev-db/qdbm/metadata.xml b/dev-db/qdbm/metadata.xml
new file mode 100644
index 000000000000..21dc8fdf43ff
--- /dev/null
+++ b/dev-db/qdbm/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>hattya@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-db/qdbm/qdbm-1.8.78-r2.ebuild b/dev-db/qdbm/qdbm-1.8.78-r2.ebuild
new file mode 100644
index 000000000000..fee0cfe58c34
--- /dev/null
+++ b/dev-db/qdbm/qdbm-1.8.78-r2.ebuild
@@ -0,0 +1,181 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+USE_RUBY="ruby21 ruby22 ruby23 ruby24"
+RUBY_OPTIONAL="yes"
+
+inherit autotools flag-o-matic java-pkg-opt-2 perl-functions ruby-ng
+
+DESCRIPTION="Quick Database Manager"
+HOMEPAGE="http://fallabs.com/qdbm/"
+SRC_URI="http://fallabs.com/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="bzip2 cxx debug java lzo perl ruby zlib"
+
+RDEPEND="bzip2? ( app-arch/bzip2 )
+ java? ( >=virtual/jre-1.4:* )
+ lzo? ( dev-libs/lzo )
+ perl? ( dev-lang/perl )
+ ruby? ( $(ruby_implementations_depend) )
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ java? ( >=virtual/jdk-1.4:* )"
+S="${WORKDIR}/all/${P}"
+RUBY_S="${P}/ruby"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-configure.patch
+ "${FILESDIR}"/${PN}-perl.patch
+ "${FILESDIR}"/${PN}-ruby19.patch
+ "${FILESDIR}"/${PN}-runpath.patch
+)
+HTML_DOCS=( doc/. )
+
+AT_NOELIBTOOLIZE="yes"
+
+pkg_setup() {
+ java-pkg-opt-2_pkg_setup
+ use ruby && ruby-ng_pkg_setup
+}
+
+qdbm_foreach_api() {
+ local u
+ for u in cxx java perl ruby; do
+ if ! use "${u}"; then
+ continue
+ fi
+ einfo "${EBUILD_PHASE} ${u}"
+ if [[ "${u}" == "cxx" ]]; then
+ u="plus"
+ fi
+ if [[ "${u}" != "ruby" ]]; then
+ cd "${u}"
+ case "${EBUILD_PHASE}" in
+ prepare)
+ mv configure.{in,ac}
+ eautoreconf
+ ;;
+ configure)
+ case "${u}" in
+ cgi|java|plus)
+ econf $(use_enable debug)
+ ;;
+ *)
+ econf
+ ;;
+ esac
+ ;;
+ compile)
+ emake
+ ;;
+ test)
+ emake check
+ ;;
+ install)
+ emake DESTDIR="${D}" MYDATADIR=/usr/share/doc/${P}/html install
+ esac
+ cd - >/dev/null
+ else
+ PATCHES= ruby-ng_src_${EBUILD_PHASE}
+ fi
+ done
+}
+
+src_prepare() {
+ default
+ java-pkg-opt-2_src_prepare
+
+ # fix build with >=sys-devel/gcc-7, bug #638878
+ append-cflags $(test-flags-CC -fno-tree-vrp)
+
+ sed -i \
+ -e "/^CFLAGS/s|$| ${CFLAGS}|" \
+ -e "/^OPTIMIZE/s|$| ${CFLAGS}|" \
+ -e "/^CXXFLAGS/s|$| ${CXXFLAGS}|" \
+ -e "/^JAVACFLAGS/s|$| ${JAVACFLAGS}|" \
+ -e 's/make\( \|$\)/$(MAKE)\1/g' \
+ -e '/^debug/,/^$/s/LDFLAGS="[^"]*" //' \
+ Makefile.in {cgi,java,perl,plus,ruby}/Makefile.in
+ find -name "*~" -delete
+
+ mv configure.{in,ac}
+ eautoreconf
+ qdbm_foreach_api
+}
+
+each_ruby_prepare() {
+ sed -i \
+ -e "s|ruby |${RUBY} |" \
+ -e "s|\.\./\.\.|${WORKDIR}/all/${P}|" \
+ {Makefile,configure}.in {curia,depot,villa}/extconf.rb
+
+ mv configure.{in,ac}
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable bzip2 bzip) \
+ $(use_enable debug) \
+ $(use_enable lzo) \
+ $(use_enable zlib) \
+ --enable-iconv \
+ --enable-pthread
+ qdbm_foreach_api
+}
+
+each_ruby_configure() {
+ econf
+}
+
+src_compile() {
+ default
+ qdbm_foreach_api
+}
+
+each_ruby_compile() {
+ emake
+}
+
+src_test() {
+ default
+ qdbm_foreach_api
+}
+
+each_ruby_test() {
+ emake check
+}
+
+src_install() {
+ default
+ qdbm_foreach_api
+
+ rm -rf "${ED}"/usr/share/${PN}
+
+ if use java; then
+ java-pkg_dojar "${ED}"/usr/$(get_libdir)/*.jar
+ rm -f "${ED}"/usr/$(get_libdir)/*.jar
+ fi
+ if use perl; then
+ perl_delete_module_manpages
+ perl_fix_packlist
+ fi
+
+ rm -f "${ED}"/usr/bin/*test
+ rm -f "${ED}"/usr/share/man/man1/*test.1*
+}
+
+each_ruby_install() {
+ local m
+ for m in curia depot villa; do
+ emake -C "${m}" DESTDIR="${D}" install
+ done
+}
+
+all_ruby_install() {
+ dodoc -r rb*.html rbapidoc
+}
diff --git a/dev-db/qt5-sqlcipher-1.0.1-r3 b/dev-db/qt5-sqlcipher-1.0.1-r3
deleted file mode 100644
index bc8e9b6491f1..000000000000
--- a/dev-db/qt5-sqlcipher-1.0.1-r3
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=>=dev-db/sqlcipher-3.4.1 >=dev-qt/qtcore-5.7.1:5= >=dev-qt/qtsql-5.7.1:5=[sqlite] <dev-qt/qtsql-5.12:5=[sqlite] sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=Qt SQL driver plugin for SQLCipher
-EAPI=6
-HOMEPAGE=https://github.com/blizzard4591/qt5-sqlcipher
-KEYWORDS=~amd64
-LICENSE=LGPL-2.1
-RDEPEND=>=dev-db/sqlcipher-3.4.1 >=dev-qt/qtcore-5.7.1:5= >=dev-qt/qtsql-5.7.1:5=[sqlite] <dev-qt/qtsql-5.12:5=[sqlite]
-SLOT=0
-SRC_URI=https://github.com/blizzard4591/qt5-sqlcipher/archive/1.0.1.tar.gz -> qt5-sqlcipher-1.0.1.tar.gz https://dev.gentoo.org/~ulm/distfiles/qt5-sqlcipher-1.0.1-qt-5.11.1.tar.xz
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=9861995a79cf302debbdb5c9038d9ddd
diff --git a/dev-db/qt5-sqlcipher/Manifest b/dev-db/qt5-sqlcipher/Manifest
new file mode 100644
index 000000000000..af7293f067e2
--- /dev/null
+++ b/dev-db/qt5-sqlcipher/Manifest
@@ -0,0 +1,5 @@
+AUX qt5-sqlcipher-install-path.patch 542 BLAKE2B 099aec88aa739615c444478dcf946a11782d34bcda0ea9905d88a766745a063b97f1198d0e03bb7222f338293178dad2c00d430eab7754475766ebfdf95a785d SHA512 a46bb590fe8f56f61d404b4c5deba362f70ecf3044fd746f5de3a897cf884aada1bd2345e768774e674ee8e91bd162775b6f2131e4f822cc91fae22c4d71bb13
+DIST qt5-sqlcipher-1.0.1-qt-5.11.1.tar.xz 8528 BLAKE2B 981565882399943c6ab47b09968c27fa9f53cade5baee66259e416d749905a6bf7a9c1c27ed8165d7b6fc0a72fee85d51bb9ac0c3819b9dab5e89e741e880b13 SHA512 9d64b12990cd81ad1e81b941ff970388c8e7f34fd446ecd4ce2ed58e3f8e50acc06fe88fc0f6693e48b19422e70372516bc36b5c71908e18096e092f261c9eff
+DIST qt5-sqlcipher-1.0.1.tar.gz 56994 BLAKE2B 9de780126bc7ba99e23b529e6e45d629e9b20d52dfb4d91fcb7c8a6b77b8a8bc17bedaa40a288c4af32e40cc563631e164428be0f8c5a81ffa6143acc58b2e55 SHA512 ba83ba1d98b7764c7ad4bf776b1f39baff44ff6189e51cbc2131150e5a4c2962a21134d21d5ed41f171629395c721fce11ee911d080d304566033d53c552642a
+EBUILD qt5-sqlcipher-1.0.1-r3.ebuild 1281 BLAKE2B e3b45a2ef37f67bdc021c6c8b5108af6cc6def1dbab04c8c4a5b19991751cf2b16cfb12ec444a413b9e5b5f1c2915170d5cde70c2f7ee3668261ac04bdf7ef3e SHA512 3a28c4a2c67c2b5ce77d92843b549c26df8d222c540c369217b09947ccdbf1b472a8a0869eb86a831b3fa8ac9be9584cf1ba48d94766ea8fb725baf00beeaf0d
+MISC metadata.xml 212 BLAKE2B ecb53eb3efac6ceef048d345601c5ca0430e2f62d6409dc2a18494ee188f792d4763892816f197418d2e9a6d04452091a0c69d83afc207b366fca816632209ee SHA512 3919b8b096abf61c7edaa6a76898603b6ca2e206e2eccd27c671957a9d085bc2591a2fb4839a85ef2a51dcbf887bb2c752d4b38e82ea19c48dfd6d99b67954fa
diff --git a/dev-db/qt5-sqlcipher/files/qt5-sqlcipher-install-path.patch b/dev-db/qt5-sqlcipher/files/qt5-sqlcipher-install-path.patch
new file mode 100644
index 000000000000..d5eb79f5f04e
--- /dev/null
+++ b/dev-db/qt5-sqlcipher/files/qt5-sqlcipher-install-path.patch
@@ -0,0 +1,12 @@
+--- qt5-sqlcipher-orig/CMakeLists.txt
++++ qt5-sqlcipher/CMakeLists.txt
+@@ -120,8 +120,7 @@
+ INSTALL(TARGETS qsqlcipher DESTINATION lib/i386-linux-gnu/qt5/plugins/sqldrivers)
+ endif()
+ else()
+- message(WARNING "Packaging is not set up for this platform, either submit a ticket or change/add pathes yourself, if packaging is required.")
+- INSTALL(TARGETS qsqlcipher DESTINATION sqldrivers)
++ INSTALL(TARGETS qsqlcipher DESTINATION @LIBDIR@/qt5/plugins/sqldrivers)
+ endif()
+ else()
+ INSTALL(TARGETS qsqlcipher DESTINATION sqldrivers)
diff --git a/dev-db/qt5-sqlcipher/metadata.xml b/dev-db/qt5-sqlcipher/metadata.xml
new file mode 100644
index 000000000000..c665e48637be
--- /dev/null
+++ b/dev-db/qt5-sqlcipher/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>ulm@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-db/qt5-sqlcipher/qt5-sqlcipher-1.0.1-r3.ebuild b/dev-db/qt5-sqlcipher/qt5-sqlcipher-1.0.1-r3.ebuild
new file mode 100644
index 000000000000..2a2bd7f67a3a
--- /dev/null
+++ b/dev-db/qt5-sqlcipher/qt5-sqlcipher-1.0.1-r3.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils eapi7-ver
+
+DESCRIPTION="Qt SQL driver plugin for SQLCipher"
+HOMEPAGE="https://github.com/blizzard4591/qt5-sqlcipher"
+SRC_URI="https://github.com/blizzard4591/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
+ https://dev.gentoo.org/~ulm/distfiles/${P}-qt-5.11.1.tar.xz"
+
+LICENSE="LGPL-2.1" # version 2.1 only
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND=">=dev-db/sqlcipher-3.4.1
+ >=dev-qt/qtcore-5.7.1:5=
+ >=dev-qt/qtsql-5.7.1:5=[sqlite] <dev-qt/qtsql-5.12:5=[sqlite]"
+DEPEND="${RDEPEND}"
+
+DOCS=(README.md)
+
+src_prepare() {
+ eapply "${FILESDIR}"/${PN}-install-path.patch
+ sed -i -e "s/@LIBDIR@/$(get_libdir)/" CMakeLists.txt || die
+
+ local v=$(best_version dev-qt/qtsql:5)
+ v=$(ver_cut 1-3 ${v#*/qtsql-})
+ [[ -n ${v} ]] || die "could not determine qtsql version"
+ if ! [[ -d qt-file-cache/${v} ]]; then
+ local vc
+ case $(ver_cut 1-2 ${v}) in
+ 5.7) vc=5.7.1 ;;
+ 5.9) vc=5.9.3 ;;
+ 5.11) vc=5.11.1 ;;
+ *) die "qtsql-${v} not supported" ;;
+ esac
+ elog "qtsql-${v} not in cache, using ${vc} instead"
+ cp -R qt-file-cache/${vc} qt-file-cache/${v} || die
+ fi
+
+ cmake-utils_src_prepare
+}
+
+src_test() {
+ cd "${BUILD_DIR}" || die
+ ./qsqlcipher-test || die
+}
diff --git a/dev-db/redis-3.0.7 b/dev-db/redis-3.0.7
deleted file mode 100644
index 12a3f60c7fa6..000000000000
--- a/dev-db/redis-3.0.7
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup
-DEPEND=virtual/pkgconfig >=sys-devel/autoconf-2.63 test? ( dev-lang/tcl:0= ) >=dev-lang/lua-5.1:* tcmalloc? ( dev-util/google-perftools ) jemalloc? ( >=dev-libs/jemalloc-3.2 ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 virtual/pkgconfig
-DESCRIPTION=A persistent caching system, key-value and data structures database
-EAPI=5
-HOMEPAGE=http://redis.io/
-IUSE=+jemalloc tcmalloc test
-KEYWORDS=amd64 arm hppa ~ppc ~ppc64 x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris
-LICENSE=BSD
-RDEPEND=>=dev-lang/lua-5.1:* tcmalloc? ( dev-util/google-perftools ) jemalloc? ( >=dev-libs/jemalloc-3.2 )
-REQUIRED_USE=?? ( tcmalloc jemalloc )
-SLOT=0
-SRC_URI=http://download.redis.io/releases/redis-3.0.7.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=0bb08139ac4d11383ebf44b7a8e5e8a0
diff --git a/dev-db/redis-3.0.7-r1 b/dev-db/redis-3.0.7-r1
deleted file mode 100644
index 12a3f60c7fa6..000000000000
--- a/dev-db/redis-3.0.7-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup
-DEPEND=virtual/pkgconfig >=sys-devel/autoconf-2.63 test? ( dev-lang/tcl:0= ) >=dev-lang/lua-5.1:* tcmalloc? ( dev-util/google-perftools ) jemalloc? ( >=dev-libs/jemalloc-3.2 ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 virtual/pkgconfig
-DESCRIPTION=A persistent caching system, key-value and data structures database
-EAPI=5
-HOMEPAGE=http://redis.io/
-IUSE=+jemalloc tcmalloc test
-KEYWORDS=amd64 arm hppa ~ppc ~ppc64 x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris
-LICENSE=BSD
-RDEPEND=>=dev-lang/lua-5.1:* tcmalloc? ( dev-util/google-perftools ) jemalloc? ( >=dev-libs/jemalloc-3.2 )
-REQUIRED_USE=?? ( tcmalloc jemalloc )
-SLOT=0
-SRC_URI=http://download.redis.io/releases/redis-3.0.7.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=0bb08139ac4d11383ebf44b7a8e5e8a0
diff --git a/dev-db/redis-3.2.12 b/dev-db/redis-3.2.12
deleted file mode 100644
index a65efcb2cf66..000000000000
--- a/dev-db/redis-3.2.12
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup
-DEPEND=virtual/pkgconfig >=sys-devel/autoconf-2.63 test? ( dev-lang/tcl:0= ) luajit? ( dev-lang/luajit:2 ) !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) ) tcmalloc? ( dev-util/google-perftools ) jemalloc? ( >=dev-libs/jemalloc-3.2 ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 virtual/pkgconfig
-DESCRIPTION=A persistent caching system, key-value and data structures database
-EAPI=6
-HOMEPAGE=http://redis.io/
-IUSE=+jemalloc tcmalloc luajit test
-KEYWORDS=amd64 arm arm64 ~hppa ~ppc ppc64 x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris
-LICENSE=BSD
-RDEPEND=luajit? ( dev-lang/luajit:2 ) !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) ) tcmalloc? ( dev-util/google-perftools ) jemalloc? ( >=dev-libs/jemalloc-3.2 )
-REQUIRED_USE=?? ( tcmalloc jemalloc )
-SLOT=0
-SRC_URI=http://download.redis.io/releases/redis-3.2.12.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=c4934b517f99abecbc040b413f2071c0
diff --git a/dev-db/redis-3.2.5 b/dev-db/redis-3.2.5
deleted file mode 100644
index 2ee33ebaf18c..000000000000
--- a/dev-db/redis-3.2.5
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup
-DEPEND=virtual/pkgconfig >=sys-devel/autoconf-2.63 test? ( dev-lang/tcl:0= ) luajit? ( dev-lang/luajit:2 ) !luajit? ( >=dev-lang/lua-5.1:* ) tcmalloc? ( dev-util/google-perftools ) jemalloc? ( >=dev-libs/jemalloc-3.2 ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 virtual/pkgconfig
-DESCRIPTION=A persistent caching system, key-value and data structures database
-EAPI=6
-HOMEPAGE=http://redis.io/
-IUSE=+jemalloc tcmalloc luajit test
-KEYWORDS=amd64 ~arm arm64 hppa ppc ppc64 x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris
-LICENSE=BSD
-RDEPEND=luajit? ( dev-lang/luajit:2 ) !luajit? ( >=dev-lang/lua-5.1:* ) tcmalloc? ( dev-util/google-perftools ) jemalloc? ( >=dev-libs/jemalloc-3.2 )
-REQUIRED_USE=?? ( tcmalloc jemalloc )
-SLOT=0
-SRC_URI=http://download.redis.io/releases/redis-3.2.5.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=dbdd3026d648121a156c4da455e8c72a
diff --git a/dev-db/redis-3.2.8-r2 b/dev-db/redis-3.2.8-r2
deleted file mode 100644
index 9649592777a2..000000000000
--- a/dev-db/redis-3.2.8-r2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup
-DEPEND=virtual/pkgconfig >=sys-devel/autoconf-2.63 test? ( dev-lang/tcl:0= ) luajit? ( dev-lang/luajit:2 ) !luajit? ( >=dev-lang/lua-5.1:* ) tcmalloc? ( dev-util/google-perftools ) jemalloc? ( >=dev-libs/jemalloc-3.2 ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 virtual/pkgconfig
-DESCRIPTION=A persistent caching system, key-value and data structures database
-EAPI=6
-HOMEPAGE=http://redis.io/
-IUSE=+jemalloc tcmalloc luajit test
-KEYWORDS=amd64 arm ~arm64 ~hppa ppc ppc64 x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris
-LICENSE=BSD
-RDEPEND=luajit? ( dev-lang/luajit:2 ) !luajit? ( >=dev-lang/lua-5.1:* ) tcmalloc? ( dev-util/google-perftools ) jemalloc? ( >=dev-libs/jemalloc-3.2 )
-REQUIRED_USE=?? ( tcmalloc jemalloc )
-SLOT=0
-SRC_URI=http://download.redis.io/releases/redis-3.2.8.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=08520c7c07e3347401612f15ff5d9f81
diff --git a/dev-db/redis-3.2.8-r5 b/dev-db/redis-3.2.8-r5
deleted file mode 100644
index e48efb5ccb56..000000000000
--- a/dev-db/redis-3.2.8-r5
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup
-DEPEND=virtual/pkgconfig >=sys-devel/autoconf-2.63 test? ( dev-lang/tcl:0= ) luajit? ( dev-lang/luajit:2 ) !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) ) tcmalloc? ( dev-util/google-perftools ) jemalloc? ( >=dev-libs/jemalloc-3.2 ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 virtual/pkgconfig
-DESCRIPTION=A persistent caching system, key-value and data structures database
-EAPI=6
-HOMEPAGE=http://redis.io/
-IUSE=+jemalloc tcmalloc luajit test
-KEYWORDS=amd64 arm arm64 hppa ppc ppc64 x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris
-LICENSE=BSD
-RDEPEND=luajit? ( dev-lang/luajit:2 ) !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) ) tcmalloc? ( dev-util/google-perftools ) jemalloc? ( >=dev-libs/jemalloc-3.2 )
-REQUIRED_USE=?? ( tcmalloc jemalloc )
-SLOT=0
-SRC_URI=http://download.redis.io/releases/redis-3.2.8.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=1f134d20bb6d81df448ae8033bf856bf
diff --git a/dev-db/redis-4.0.1 b/dev-db/redis-4.0.1
deleted file mode 100644
index 2ea1e9a730b7..000000000000
--- a/dev-db/redis-4.0.1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup
-DEPEND=virtual/pkgconfig >=sys-devel/autoconf-2.63 test? ( dev-lang/tcl:0= ) luajit? ( dev-lang/luajit:2 ) !luajit? ( >=dev-lang/lua-5.1:* ) tcmalloc? ( dev-util/google-perftools ) jemalloc? ( >=dev-libs/jemalloc-3.2 ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 virtual/pkgconfig
-DESCRIPTION=A persistent caching system, key-value and data structures database
-EAPI=6
-HOMEPAGE=http://redis.io/
-IUSE=+jemalloc tcmalloc luajit test
-KEYWORDS=~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris
-LICENSE=BSD
-RDEPEND=luajit? ( dev-lang/luajit:2 ) !luajit? ( >=dev-lang/lua-5.1:* ) tcmalloc? ( dev-util/google-perftools ) jemalloc? ( >=dev-libs/jemalloc-3.2 )
-REQUIRED_USE=?? ( tcmalloc jemalloc )
-SLOT=0
-SRC_URI=http://download.redis.io/releases/redis-4.0.1.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=47512cd53ca0a4d3d16a382f726dd96e
diff --git a/dev-db/redis-4.0.1-r1 b/dev-db/redis-4.0.1-r1
deleted file mode 100644
index 3a4423b0b12a..000000000000
--- a/dev-db/redis-4.0.1-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup
-DEPEND=virtual/pkgconfig >=sys-devel/autoconf-2.63 test? ( dev-lang/tcl:0= ) luajit? ( dev-lang/luajit:2 ) !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) ) tcmalloc? ( dev-util/google-perftools ) jemalloc? ( >=dev-libs/jemalloc-3.2 ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 virtual/pkgconfig
-DESCRIPTION=A persistent caching system, key-value and data structures database
-EAPI=6
-HOMEPAGE=http://redis.io/
-IUSE=+jemalloc tcmalloc luajit test
-KEYWORDS=~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris
-LICENSE=BSD
-RDEPEND=luajit? ( dev-lang/luajit:2 ) !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) ) tcmalloc? ( dev-util/google-perftools ) jemalloc? ( >=dev-libs/jemalloc-3.2 )
-REQUIRED_USE=?? ( tcmalloc jemalloc )
-SLOT=0
-SRC_URI=http://download.redis.io/releases/redis-4.0.1.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=4872326f25417061b668b8bfb7e3a8f6
diff --git a/dev-db/redis-4.0.10 b/dev-db/redis-4.0.10
deleted file mode 100644
index 0cffb18b77a5..000000000000
--- a/dev-db/redis-4.0.10
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup
-DEPEND=luajit? ( dev-lang/luajit:2 ) !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) ) tcmalloc? ( dev-util/google-perftools ) jemalloc? ( >=dev-libs/jemalloc-3.2 ) virtual/pkgconfig >=sys-devel/autoconf-2.63 test? ( dev-lang/tcl:0= ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 virtual/pkgconfig
-DESCRIPTION=A persistent caching system, key-value and data structures database
-EAPI=6
-HOMEPAGE=https://redis.io
-IUSE=+jemalloc tcmalloc luajit test
-KEYWORDS=amd64 arm arm64 ~hppa ~ppc ppc64 x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris
-LICENSE=BSD
-RDEPEND=luajit? ( dev-lang/luajit:2 ) !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) ) tcmalloc? ( dev-util/google-perftools ) jemalloc? ( >=dev-libs/jemalloc-3.2 )
-REQUIRED_USE=?? ( tcmalloc jemalloc )
-SLOT=0
-SRC_URI=http://download.redis.io/releases/redis-4.0.10.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=79fc147bec7fc206bab28ee6b80670b0
diff --git a/dev-db/redis-4.0.2-r1 b/dev-db/redis-4.0.2-r1
deleted file mode 100644
index 7ecbeca7b518..000000000000
--- a/dev-db/redis-4.0.2-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup
-DEPEND=virtual/pkgconfig >=sys-devel/autoconf-2.63 test? ( dev-lang/tcl:0= ) luajit? ( dev-lang/luajit:2 ) !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) ) tcmalloc? ( dev-util/google-perftools ) jemalloc? ( >=dev-libs/jemalloc-3.2 ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 virtual/pkgconfig
-DESCRIPTION=A persistent caching system, key-value and data structures database
-EAPI=6
-HOMEPAGE=http://redis.io/
-IUSE=+jemalloc tcmalloc luajit test
-KEYWORDS=amd64 arm arm64 hppa ppc ppc64 x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris
-LICENSE=BSD
-RDEPEND=luajit? ( dev-lang/luajit:2 ) !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) ) tcmalloc? ( dev-util/google-perftools ) jemalloc? ( >=dev-libs/jemalloc-3.2 )
-REQUIRED_USE=?? ( tcmalloc jemalloc )
-SLOT=0
-SRC_URI=http://download.redis.io/releases/redis-4.0.2.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=1acf24eeb73e1c6a3d02f67b517a747d
diff --git a/dev-db/redis-4.0.6 b/dev-db/redis-4.0.6
deleted file mode 100644
index 9e1dd757660f..000000000000
--- a/dev-db/redis-4.0.6
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup
-DEPEND=luajit? ( dev-lang/luajit:2 ) !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) ) tcmalloc? ( dev-util/google-perftools ) jemalloc? ( >=dev-libs/jemalloc-3.2 ) virtual/pkgconfig >=sys-devel/autoconf-2.63 test? ( dev-lang/tcl:0= ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 virtual/pkgconfig
-DESCRIPTION=A persistent caching system, key-value and data structures database
-EAPI=6
-HOMEPAGE=http://redis.io/
-IUSE=+jemalloc tcmalloc luajit test
-KEYWORDS=~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris
-LICENSE=BSD
-RDEPEND=luajit? ( dev-lang/luajit:2 ) !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) ) tcmalloc? ( dev-util/google-perftools ) jemalloc? ( >=dev-libs/jemalloc-3.2 )
-REQUIRED_USE=?? ( tcmalloc jemalloc )
-SLOT=0
-SRC_URI=http://download.redis.io/releases/redis-4.0.6.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=565f8e6a8bc6d8dcff7bce5b07edb512
diff --git a/dev-db/redis-4.0.7 b/dev-db/redis-4.0.7
deleted file mode 100644
index 2365298dc1ea..000000000000
--- a/dev-db/redis-4.0.7
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup
-DEPEND=luajit? ( dev-lang/luajit:2 ) !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) ) tcmalloc? ( dev-util/google-perftools ) jemalloc? ( >=dev-libs/jemalloc-3.2 ) virtual/pkgconfig >=sys-devel/autoconf-2.63 test? ( dev-lang/tcl:0= ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 virtual/pkgconfig
-DESCRIPTION=A persistent caching system, key-value and data structures database
-EAPI=6
-HOMEPAGE=http://redis.io/
-IUSE=+jemalloc tcmalloc luajit test
-KEYWORDS=~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris
-LICENSE=BSD
-RDEPEND=luajit? ( dev-lang/luajit:2 ) !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) ) tcmalloc? ( dev-util/google-perftools ) jemalloc? ( >=dev-libs/jemalloc-3.2 )
-REQUIRED_USE=?? ( tcmalloc jemalloc )
-SLOT=0
-SRC_URI=http://download.redis.io/releases/redis-4.0.7.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=012a9724e3a1abf9cd303f8dee77a9c6
diff --git a/dev-db/redis-4.0.8 b/dev-db/redis-4.0.8
deleted file mode 100644
index ed3d3ec3c8ff..000000000000
--- a/dev-db/redis-4.0.8
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup
-DEPEND=luajit? ( dev-lang/luajit:2 ) !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) ) tcmalloc? ( dev-util/google-perftools ) jemalloc? ( >=dev-libs/jemalloc-3.2 ) virtual/pkgconfig >=sys-devel/autoconf-2.63 test? ( dev-lang/tcl:0= ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 virtual/pkgconfig
-DESCRIPTION=A persistent caching system, key-value and data structures database
-EAPI=6
-HOMEPAGE=http://redis.io/
-IUSE=+jemalloc tcmalloc luajit test
-KEYWORDS=~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris
-LICENSE=BSD
-RDEPEND=luajit? ( dev-lang/luajit:2 ) !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) ) tcmalloc? ( dev-util/google-perftools ) jemalloc? ( >=dev-libs/jemalloc-3.2 )
-REQUIRED_USE=?? ( tcmalloc jemalloc )
-SLOT=0
-SRC_URI=http://download.redis.io/releases/redis-4.0.8.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=012a9724e3a1abf9cd303f8dee77a9c6
diff --git a/dev-db/redis-4.0.9 b/dev-db/redis-4.0.9
deleted file mode 100644
index 606347a113a4..000000000000
--- a/dev-db/redis-4.0.9
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup
-DEPEND=luajit? ( dev-lang/luajit:2 ) !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) ) tcmalloc? ( dev-util/google-perftools ) jemalloc? ( >=dev-libs/jemalloc-3.2 ) virtual/pkgconfig >=sys-devel/autoconf-2.63 test? ( dev-lang/tcl:0= ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 virtual/pkgconfig
-DESCRIPTION=A persistent caching system, key-value and data structures database
-EAPI=6
-HOMEPAGE=https://redis.io
-IUSE=+jemalloc tcmalloc luajit test
-KEYWORDS=~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris
-LICENSE=BSD
-RDEPEND=luajit? ( dev-lang/luajit:2 ) !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) ) tcmalloc? ( dev-util/google-perftools ) jemalloc? ( >=dev-libs/jemalloc-3.2 )
-REQUIRED_USE=?? ( tcmalloc jemalloc )
-SLOT=0
-SRC_URI=http://download.redis.io/releases/redis-4.0.9.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=5458e1a24dacbea1f44938e75af4a23e
diff --git a/dev-db/redis/Manifest b/dev-db/redis/Manifest
new file mode 100644
index 000000000000..c4a424c3dc3b
--- /dev/null
+++ b/dev-db/redis/Manifest
@@ -0,0 +1,46 @@
+AUX configure.ac-2.2 1522 BLAKE2B 68489a5ad1db0c1e04438900113c786911a260bd54bb839796b23c78d1fdd80f0443700eef8fc251d93c58ae11931ce53460d47c06200ac056ca1fd3a4bfbda9 SHA512 7a67bbd2f5fcfd7e1bfe18b739438342d40484c3f178ef5e2ddb617480715626e7f5a47d58660761489867ae460a58457a85a14bb2af90fe2e2ab3b8bd940b34
+AUX configure.ac-3.2 1882 BLAKE2B b8bc3e04c3203977218ee1d6d68e9f841b84fe82ab8803027034237275fb548cde282748a2f96bc25532e61f8e25a50cba9e165aac578d5db634a7ffc587ee9e SHA512 13d9f16cde8a95c96bcd726056d670d390dea6e2752ac607bc68eefb6214f0ab18b0e27d3283f2b219febd2da82e6489bd434215c9380c3c85c711aa00cb2be5
+AUX redis-2.8.17-config.patch 1660 BLAKE2B 1ad57de0e164fa06bcee988bfd69663d06a8abe4f0ca829a2d1c4bcfc595970a8e6ec62ce548fcc0e6959645fe2cdd551df0acb8724db8d74060e143b05e27a4 SHA512 4b7f88361ca33fb676d47e6e5e364cd33731031cf83d0cec34d6542e6e832a6b7187b847fde7c65b8c838b309feec7033e0d44f5a5690d6ed0e6694773d4195e
+AUX redis-2.8.3-shared.patch 909 BLAKE2B 674846cc8e596a62d78de2525c7e2ef727f0733f750b1133800c184b183ac14eeb345dfe1e2ff4b860a911fa9d7816a1058187e7c2c8024c0a95e32f716a7135 SHA512 1070d9d22654a0ee00ecb2536dd2644cc59917650aa56af10689302c3ac962c172bc24a0c493c17f78aa2632bfd3d924ceef221340622d46fd6bf7346e69f49d
+AUX redis-3.0.0-sharedlua.patch 1900 BLAKE2B 1f58f977420d94b62a71a14d77be65d6882ec6eddf6679003006a94444045c5368b2fcc04878577bdd0c2ddb602fda915fc9455f56d6dab81aa62ba509d293cf SHA512 817719139b500073ab038286e2457f5ce5978a88ceb910cccf51015d607b4d9b640d1d5ffeeb55f06781cd04a1f7d604bf1cceddd3cab480753c8c119ecda49d
+AUX redis-3.2.3-config.patch 1495 BLAKE2B 9f3c04dfd97845dcd364b75e2e5f543bc40ec0221a5ce19ab3c194e55ceaf24f13c307276f616d9a7742662d9e4fa76152c7036f7728f787bbac55f2b1a00999 SHA512 d71c918ea4952ecb55cc4c87649745ee468587c289d60bd1bee87a2948a6e882d42afe36bb113392b5aaab17d315732cabfc472804204d3a043305a5488a4124
+AUX redis-3.2.3-sharedlua.patch 2535 BLAKE2B 4affacfc27ee228f5050eb9133bee892b91690589a5b5885ad828f8cf408486bf9e2e4830eea8baf66feacd36bde56a565d54aebacb857215b1b76e0ef01ab39 SHA512 4b60271a24a27f69292450575f9316dd009e154980db2b70d7035794bc1f332fe54957558037c75de625d1eaf98cc0f1ec02fcd0ef510c86a3c605c474c1117e
+AUX redis-3.2.5-shared.patch 754 BLAKE2B cb119c20e219ab7c38bceffa9f7b3e59dc4eafe49bf28c652793c24044065a2de1c07e94baa24e9ba7e45840daf7d926667214e6ec468a99ac4637337949d6b5 SHA512 dcb0755a0cc24b4dc21c7a20891df5fa0c643beb8f411779548893ac9681c41510ecba79b0ba031d7eeeccbf5b15ae32be04241b197524de4f8f9aafa02ccaab
+AUX redis-4.0.1-shared.patch 866 BLAKE2B 55531d6437ba89e37674377795ed8f7b4a34982571358d3ac73071951929ba96f101dfc9f9336f04d3851b4d360023c50d7832d9ae5ba9cfa405f317ec70b983 SHA512 f58ae83d3370949187325b1f1f75feb7d85d3112ae65e7cd330d193490c42aa6288f05cd4d2309dbde5d32015a067ec831255a3dab937cd0889970c8eecfb3f1
+AUX redis-4.0.1-sharedlua.patch 2568 BLAKE2B dc943602aba26455b94536571ee6be2969cbdf04da63805db0da0de5c5da3eb5fe16bb3c9e282020cf5a0d2cb9ac02244614fb8929847ce930c2ed25f4c4b8ff SHA512 c7c08b67c09425876da513bbeb52667fe5917b56a43749a914dac356fa37c091b696765eabca100f2506cf461107abdbf22bce075879a8aa82a0e8d54f696fee
+AUX redis-sentinel-4.0.6-config.patch 285 BLAKE2B 97b8fb6c2af74e6d2736e9dcdd9faa579800fecec53752168fc5e5e43c509fc00a1192215b5fef89af915456e5ab0d7c438df51e2b214399a4482f7683525a8b SHA512 12fd77b38fbcc3bf4b25f519a8f40e43c5d2f32be341155f5e6d08f2a4513043917452d45a20608dc56c0e92e324cef8480d42d670752056c821b4ffca93e2b1
+AUX redis-sentinel.confd 470 BLAKE2B f77fd7e35c753e35aafa6e773dcc00d2779bc29d8579334078bd6124aab436dff671ae790c0b0e3cefdd4082fe212b4b71501b529176cb0a1e5f8c8cdcf1387e SHA512 ea455f8c73c21bc46127ea5c7b99dc5707ad41160e5fd61367555dd2e3fd5c1518026257651e7d371a60a64b682b6839dd37580f75308c73239edeba49d6b372
+AUX redis-sentinel.initd 648 BLAKE2B eaea4a047dfa61a325fa2bfeb30b422220d4fad699a693b9141a74575dc153ad3db2dafa3fa06ef195914a32f2a6aacfb3fc2e3b80ebe6b75316700fbd84221d SHA512 dfd1dadedf9b7376667d1966072c28e5e23e17592bf66753eae4bbc084225714f30c6450001f643c1561ff3a2eb2e50f719d32ff34f5419040ff42a2c4fbd70d
+AUX redis.confd 450 BLAKE2B 99d00c43c6496c66c6abbebf8703ebffd13f688382b3634feed97b5c1af6cc4c4e356b79bf71f39b0bf82596ea1f9dedf36077b2669e1c88d94ef31d4bd9964b SHA512 c6347cc6e17e9ce93fd081608b19c4977c3e1ffd58d2a417804ca3e647967800ac11859bd05d5437c36310dcd7552c11f35965e4521c5266c3414387d4796a6b
+AUX redis.confd-r1 511 BLAKE2B 911e6f7ca70013d4feefb6ec7ee3f98220f303d48c95f27c2558efee00559cf2b9ae8c0303f85d2b081aac8f636de326b52e3493a9be2c027ec7d97114f856da SHA512 f041e6b1da2c579a7dcf40e411ff47bc4675e5931e04f4353888ed5864b7e0c94d53fc98faee982c65a69d0154ee1f624fbadbbcc3a324aec583eefee6fb7133
+AUX redis.initd-4 780 BLAKE2B 3bd1629bc43194d90b5f0af4e2abd4998fed6f9c5c64d410d8e1a6432b7d8d23f64ba90a2db63ab630f67cceb1ebd53deea5fed94109917adb53fdd48aa3f407 SHA512 779a35db0f603956c9ab7827f1d0a0b20d5dcab041aafca2055dfd413056de5e572c9996929ef9bf3c54b5f56e4a3a20f2eaaec306b5790252b46ebae30e74b6
+AUX redis.initd-5 696 BLAKE2B 11b2a50a74c9aea57b01ee7be7d3e1d70ca21db994c35b6d386115eb4f9c329ad6f77b80ce46c17e026a440e532e976c3e1a1f7c550e9f50cc812ef557c5f8d9 SHA512 cd5ae1cb0beded7c70fc7ab0bcbfe378dbac5bf78235877fedb4599c01bfcffc36909e638b032b29c79c5a5c55da11795c58a845b6eadf4cc41174903070183d
+AUX redis.logrotate 105 BLAKE2B 1281fd86d399b40aaaa69d1fe170b2c49523c074e14b12907428b676b03d510b680363dd5041428d5fddecb91a510baf53dfa57df66d697ba4846f1e49ab59fe SHA512 9cbd27732c7f8270bf9b8563df0964af142d1ac4e97417e495fcb02e730e93fdfafac9370188a2fce040d55d6c3704e284a50b6300616a3f13a03a6e25c1ae49
+AUX redis.service-2 253 BLAKE2B 0b78b45eaed3c7adbc68703968e1c843eeff785261cf7f4636df215d742c717d6fe95bb24e0aa947d64962ad20adacd48a4dd59b98eae479e7a33c1a0f2af7e1 SHA512 b42b73bb54ccc0d16adafb91aabe010092f548ec7979d8a0ed1c4563d9fca378eeb74c0c556f7565a32199ed30ca8a13d6b610d9cda39fd23da1428a410f62cc
+AUX redis.tmpfiles 61 BLAKE2B 1c3bf8aa105940c408163f61c63ed16b86de7a979cb5143d15700cac329970f351cb9b9377aa82e6f4dae377b00c1710a1e0f54334f007cfed64551f761034d4 SHA512 741ff5a4df5b04e7af4e81357812bf5b6cf992bc18b6052074aef134401d0a92703a2e41f52966012c05ea80fac5636435c8d3e6ed55e62a5711526ba67ee738
+DIST redis-3.0.7.tar.gz 1375200 BLAKE2B 74088cb128e5d8e32427845b6bb267957b7df7ee091b1110260b26cc61649892bdb3ec79ae09fa4aca302c5708f26e3e05c6fb1e821ff468d982c274fa2792b4 SHA512 6c8f4c88d911e1433fd28efff2f6d62763e08be89814ebf4aa4e68e2c8bd605eba24ca3410548b2f480ae094437ce96c0bafa7a5762b3b405d5d850886297ba3
+DIST redis-3.2.12.tar.gz 1551468 BLAKE2B 85483de2588e4161521fe958225a53ab4357d0db83954c22f755d5d512e6e2126f9e7fdc1032353bd491353af3805c806b89546f886fe78fa5e5d2dc1446420b SHA512 eec64a17e331ac220ba425a495127b3873048dc2597a6508962469c0c99763deffcec97254915e2b1f3867eb556b917e8861baa9609c727d0abb254a90d87cdc
+DIST redis-3.2.5.tar.gz 1544040 BLAKE2B a67b46feacddcc7e4cafd91fb5d295a972f3a09db0a05b8a90bf8c89870f110c6c598ffe945475228caa37ccca7921f4981fe7002edc3689e833ecddc5c2032e SHA512 4ecf6277c8fdf4411223b9f5a5c8308829da9bd756b45de5217d469e9def8faad8c05b6348c06aef99eca9245d45abfd52df056c3c819723da66a2ca20c381dd
+DIST redis-3.2.8.tar.gz 1547237 BLAKE2B fb03e263ad7b135dff38e018d9b830c4992cf331efc7c23c10b087c47e597abedb52f259d4dd9a9ee1d661685157fc29a2022d74bc21d406bb10c9b7dfab8b7e SHA512 7334faf73af3644f7f9dcaddd322955d5df1e88a1640b509ae623f322615a20f6dc143eb57dd89ff3a278557df309ac4215c3fb458235682ce28e16c817068ba
+DIST redis-4.0.1.tar.gz 1711660 BLAKE2B 0b8881baa78908df4adcc1aabfa0ea9554900f8b54d204ffa054752ba4355da2b56408501ede81a69cc1f34ebbb9fc984335738ea9f343ddcd4e9fb9a0d64c8e SHA512 62dec537aebd12340b9642f5f8b07fd98757c9e648dcd539a0411f207db3495923c5a6a9941036c56b2d574ee38b46d08558668111e322345ef549f93fada26f
+DIST redis-4.0.10.tar.gz 1738465 BLAKE2B 572cbb3d2d5d7209f81ebd53ee68f40b404d0e4623bd1864845bf1f47135d4e097a6974d346ffd845d848c39ace6d3fb9f1a347e0c9d16d06d22aed7a8b3ae7b SHA512 0978dabaf637e61889d492fd3629acd58ca8fb0c0088cdd7036ffd1a7ed3f018c107039d4c96bd61d0b7d35757df2366d051f57d77ffb5642aca0e5651b30603
+DIST redis-4.0.2.tar.gz 1713990 BLAKE2B 307ab76b336f7520e14a23a1577c46e1b63cc5a5a5b6afb725cb87934fbcb62107085671fd1072d1142ce8e92f069e6b6064c9f4468335bc6997897c8f494471 SHA512 1458909c6fc16cff8ca5e6dddff23b988ee1e447f2d0bccf5941553b22bab6abb851732b3fe53dafb8a69d6c0939c3ce7e0686d51e03be720fb018c038d3b1b4
+DIST redis-4.0.6.tar.gz 1723533 BLAKE2B 94c2a9b7eeaa676efaac75cd5c143b0f4b02440b5a21ecc9b2a68cc27ad4abc1fc4d7dbc903dea5d956ce737ca434ea5b5bdde4a35df3a3689da60c5fb0bddf1 SHA512 784aad612664df666c36f969cb6a9ab794f004abcf9aa761bd1f5f0f8fdb248d5b38f48a59b68c2de7d2a344755f1537efc9d5847de0d662302699ed94d40813
+DIST redis-4.0.7.tar.gz 1729488 BLAKE2B 7a5337b868e4da4a7387b31bc9d6bd4c86abd701b9ba999f64296ed5188cbba7208ced466973a500730ca03e70a9a85fbab2fb4700fdc977e58defc0126487d1 SHA512 6f317d9e76224b2a2b047dc8f56b126ea85ee5c6112c4c6238cb5cdfa3a83756bff3a82b106b00d1124a93d210a900d836587b8d9563916f19274de0e84c4c6b
+DIST redis-4.0.8.tar.gz 1729973 BLAKE2B 32d82a07beba9ea8f0b08a8fc69da548a1974e5839f052a9803ffb0f52ef920df9b128092e061b5e693581a50efef4a1212c1f6310dc8492eff5ca841ff3b03a SHA512 11c126ddef3bedbceb02ee7a80a61374e081da8087055d77970b0097066a6f1c5e0c4f0d246c9851f8c3beca22f185c184669a9dc4f1c7c229f8cd2c34196ab6
+DIST redis-4.0.9.tar.gz 1737022 BLAKE2B 35a83d146062f5b14c023d7fd9f28d743ba6bec3e0e4bf9ce8e065a706bbd7508ffbcb8b1b4d18f6b6774589b5456540ba8717b9f449fcbd758c0f57dbd505a3 SHA512 a6cf63cb361f0a87da3955ba628190dc04cad342f7a664d18e44416ee67dd86ed6e3a46b9701e994f1417e56b819b3c6fc595f363c10bb4b83d5033919d29598
+EBUILD redis-3.0.7-r1.ebuild 3312 BLAKE2B f7eb238c4cfb353330436453849d12ef8c1e0d083f7af2a7a7813cf5db478281499dc36757a3f1bad06e65cfc7decd604edeb087b02485e6922ddf30bc13e88f SHA512 de42869cd28e6b9f7ce63ef0baaa64acc0b5465d2bb2a0c23013a42c0a00059a18620ab428eae88b33f4d6a3b37b2e6cc0dc71135af807dbd9d524908d1d80fb
+EBUILD redis-3.0.7.ebuild 3312 BLAKE2B f7eb238c4cfb353330436453849d12ef8c1e0d083f7af2a7a7813cf5db478281499dc36757a3f1bad06e65cfc7decd604edeb087b02485e6922ddf30bc13e88f SHA512 de42869cd28e6b9f7ce63ef0baaa64acc0b5465d2bb2a0c23013a42c0a00059a18620ab428eae88b33f4d6a3b37b2e6cc0dc71135af807dbd9d524908d1d80fb
+EBUILD redis-3.2.12.ebuild 3886 BLAKE2B ea98fec96f660ef6c663d3700d8b90ee6a98c904e6c798e81416d14609e238e395d6096cdea1dafd0d7591b401b68803c44dd4c9d7831c43168643cea458b05c SHA512 ff68d691ee3555a74e6e4305d54d9848137d0887b6c96a97b81f48adfd06129291a51eac1c87cf358b8670dad93dc372d8e70455efa348f5ec296ec0035af6be
+EBUILD redis-3.2.5.ebuild 3578 BLAKE2B 140d00e2acb3c78d6f089689b911e77df1a0b4cac32dfac312040639fc1935a8a08fdf97be95fbbe83862de22ef43d08d137e58716db1523b57ac5d90122a64e SHA512 72d8563a1eee0e62d34a3c04583c210a95c0fdd306512f63714324ac6e1302f5a06debb56bae083f9102eef9cade1674f6d5dd746ca7ab796e70592aef659021
+EBUILD redis-3.2.8-r2.ebuild 3579 BLAKE2B e6813a5e2b7b85c0c2b2628cae28ec894c05f89f82b59dbdd0916bd02d8c94aaf12b01a83374d6651112374144231862f49810ef6dc98eacf9a02b6cd02bca4d SHA512 3acf577e2509cf29ae5274117ec5c512fe390167d88c38b6fd375a5d145e4b94704990b23e3a18d6e8ab6c91e5d5bebb5d6c9330a9975b7ef9aa2d14c0914282
+EBUILD redis-3.2.8-r5.ebuild 3884 BLAKE2B 27c4d67ff9d9f1d23c9ac0c5dcbfdaa7eda60b0957a955f7e66e9ad54c0490052a28cb6f02195dd606d8ff65f2b95c43325af771649048d80e7124e3df8d1907 SHA512 fde594959130b3999c8c31e5711b48f7d29824c189495b6d94124ef7190ce4cfc10b635ec2141fd980cfc709d7a7aa9f9474996742ed1fac8cde509cba22712c
+EBUILD redis-4.0.1-r1.ebuild 3722 BLAKE2B 9f99ed17dbac2e4249e425293b769b87bbce62865e6cbfed53eba91578c14c1e97c636f460b3c2738162f89a771fb833bc3158db1f4ac41440b244ffd855b49c SHA512 d928b9714a9c028fbe14286c975a5ba385384c4ff32311e060252ccf9802e2f58d945d261a9fd5cd512d7142cb82fdb41a44955c046c253ee399e09578b42a0d
+EBUILD redis-4.0.1.ebuild 3507 BLAKE2B 4418b445f34274ae86edd3033552935fd8e740ab0c1029cdf9f43f2fcc7bf0e1fdaf0fa07d6504af4c4975af09fe2ea808ce0e515d8f5a4809cb84b664f6672c SHA512 e0a258e5e2333d9c88d5ebba37f52cb772bb17d77b719edc0ce443a3a2ac09cd064766fcf7541503fe656ca2f77d890ae911f518b2552e2673f650cc8bd4d13d
+EBUILD redis-4.0.10.ebuild 4069 BLAKE2B 33bf7fbd67db2035d3bdc92f01f1252c9a27a1a3c736f555d21c6670920e03057b30bc51594898414dc5a18312c1af5f74f01b86ede936025cb44d6f0e478855 SHA512 52c9a38d8823fa87ddb8aea6db611bf43b0e3543eddb275a991da075095e27758de2f5456685a01eb79e3166a642a38256cd95f75d5cf7b1a432dcb3af29f671
+EBUILD redis-4.0.2-r1.ebuild 3807 BLAKE2B 7dbd27ad7593b53f1f7184321ba33f140072ef946859b33cf8dacf7eb98c9d7398c512ce403132bf3b9fece12e73cc0e4dd5cca1dbc220d50dea105ea87ef774 SHA512 d7744c01cbf4b6f1fec17ce7733a31f4deb3e925afbafb3a9aaa360d9598aff78b44c3bcadc54e82c809ff6ba0211e475d32f96ec4244f6081e3f5cfde1b1daa
+EBUILD redis-4.0.6.ebuild 4074 BLAKE2B 8c650824c8216e360014750cfe64d205dc02d33b6997b31f4e1a282836c670e97c2c4158818b226a98a3b0cb1954def0ac356c5f154e93e6d41356fb68ec6550 SHA512 f864f88c8ce91cfb73448e4427b82d7a76276dfad851004e9b13f96c395e369a101d878cfba65f277aae878885b58202d0b52c0d37a160419aa55904ad8cb7f7
+EBUILD redis-4.0.7.ebuild 4074 BLAKE2B a6190e8b3223f516c48889f5bd455e7c94c1c68e0f142f8370fc74931d7b9fb79621bae4a080956eb8cc9cf00ece885535c2e3a17e717d1c2c069e61bed479ee SHA512 aafbb4f1a85133e3baf0b73f026281c6dba2cd2146c9d3a9e5fa610e5e1ca5a9ea8458b9b031345f7346b74e42fc2a238f3824ddf12ec7d83ba571ebe7d18e3d
+EBUILD redis-4.0.8.ebuild 4074 BLAKE2B a6190e8b3223f516c48889f5bd455e7c94c1c68e0f142f8370fc74931d7b9fb79621bae4a080956eb8cc9cf00ece885535c2e3a17e717d1c2c069e61bed479ee SHA512 aafbb4f1a85133e3baf0b73f026281c6dba2cd2146c9d3a9e5fa610e5e1ca5a9ea8458b9b031345f7346b74e42fc2a238f3824ddf12ec7d83ba571ebe7d18e3d
+EBUILD redis-4.0.9.ebuild 4074 BLAKE2B 609631167471b07d3caccad80d601e4d73a594a97979b25f828c171c341f2f8d24c12e2399ad81b8952e5f459f0a340726a4e8ee69a1f51b0626b52d18e7ce3c SHA512 86c003235c630c87a551b31f359a5fe824d7114016f22788cf8dc84dec56d5bea24c3fdbc86efd15734ccb636394bb6fc4f4d757566ac857605fa23c841db4d4
+MISC metadata.xml 535 BLAKE2B 8b38981c28c1a1ac98cbadcc1a7e6ae9b48eff471f56a8ce182b26a331e8fdb92e0d76fa44f0c7f84f6d262fc7b1ad23ddb348d445dfc472f9b8be86d6ca222b SHA512 10302874f9e9818bfa599f4cb1e75bf9dc27f187cf7858855c2d77ddfb282ead944f40027596a80e8e22bdd5bf374613362be0c1779c0e5941e4135ad994c120
diff --git a/dev-db/redis/files/configure.ac-2.2 b/dev-db/redis/files/configure.ac-2.2
new file mode 100644
index 000000000000..3ff6650407ca
--- /dev/null
+++ b/dev-db/redis/files/configure.ac-2.2
@@ -0,0 +1,58 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.63)
+AC_INIT(redis, 2.0.0, antirez@gmail.com)
+AM_CFLAGS="-std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6"
+if test x"$CFLAGS" = x""; then
+ AM_CFLAGS="$AM_CFLAGS -O2"
+else
+ AM_CFLAGS="$AM_CFLAGS $CFLAGS"
+fi
+
+# options
+AC_MSG_CHECKING([whether to build with debug information])
+AC_ARG_ENABLE([debug],
+ [AS_HELP_STRING([--enable-debug],
+ [enable debug data generation (def=no)])],
+ [debugit="$enableval"],
+ [debugit=no])
+AC_MSG_RESULT([$debugit])
+
+if test x"$debugit" = x"yes"; then
+ AC_DEFINE([DEBUG],[],[Debug Mode])
+ AM_CFLAGS="$AM_CFLAGS -g -rdynamic -ggdb"
+else
+ AC_DEFINE([NDEBUG],[],[No-debug Mode])
+fi
+AC_SUBST([AM_CFLAGS])
+
+# Checks for programs.
+AC_PROG_CC
+
+# Checks for libraries.
+
+# Checks for header files.
+AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h limits.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_HEADER_STDBOOL
+AC_C_INLINE
+AC_TYPE_INT16_T
+AC_TYPE_INT32_T
+AC_TYPE_OFF_T
+AC_TYPE_PID_T
+AC_TYPE_SIZE_T
+AC_TYPE_SSIZE_T
+AC_TYPE_UINT16_T
+AC_TYPE_UINT32_T
+
+# Checks for library functions.
+AC_FUNC_ERROR_AT_LINE
+AC_FUNC_FORK
+AC_FUNC_STRCOLL
+AC_FUNC_STRTOD
+AC_CHECK_FUNCS([dup2 gethostbyname gettimeofday inet_ntoa memchr memmove memset select socket strcasecmp strchr strerror strstr strtol])
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/dev-db/redis/files/configure.ac-3.2 b/dev-db/redis/files/configure.ac-3.2
new file mode 100644
index 000000000000..3e2cf9267266
--- /dev/null
+++ b/dev-db/redis/files/configure.ac-3.2
@@ -0,0 +1,66 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.63)
+AC_INIT(redis, 3.2.3, antirez@gmail.com)
+AM_CFLAGS="-std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6"
+if test x"$CFLAGS" = x""; then
+ AM_CFLAGS="$AM_CFLAGS -O2"
+else
+ AM_CFLAGS="$AM_CFLAGS $CFLAGS"
+fi
+
+# options
+AC_MSG_CHECKING([whether to build with debug information])
+AC_ARG_ENABLE([debug],
+ [AS_HELP_STRING([--enable-debug],
+ [enable debug data generation (def=no)])],
+ [debugit="$enableval"],
+ [debugit=no])
+AC_MSG_RESULT([$debugit])
+
+if test x"$debugit" = x"yes"; then
+ AC_DEFINE([DEBUG],[],[Debug Mode])
+ AM_CFLAGS="$AM_CFLAGS -g -rdynamic -ggdb"
+else
+ AC_DEFINE([NDEBUG],[],[No-debug Mode])
+fi
+AC_SUBST([AM_CFLAGS])
+
+# Checks for programs.
+AC_PROG_CC
+
+# Checks for libraries.
+
+# Checks for header files.
+AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h limits.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_HEADER_STDBOOL
+AC_C_INLINE
+AC_TYPE_INT16_T
+AC_TYPE_INT32_T
+AC_TYPE_OFF_T
+AC_TYPE_PID_T
+AC_TYPE_SIZE_T
+AC_TYPE_SSIZE_T
+AC_TYPE_UINT16_T
+AC_TYPE_UINT32_T
+
+# Checks for library functions.
+AC_FUNC_ERROR_AT_LINE
+AC_FUNC_FORK
+AC_FUNC_STRCOLL
+AC_FUNC_STRTOD
+AC_CHECK_FUNCS([dup2 gethostbyname gettimeofday inet_ntoa memchr memmove memset select socket strcasecmp strchr strerror strstr strtol])
+
+# Check for lua-5.1 or luajit
+AC_ARG_WITH([luajit],
+ AS_HELP_STRING([--with-luajit], [Use luajit instead of lua]))
+
+AS_IF([test "x$with_luajit" = "xyes"],
+ [PKG_CHECK_MODULES([LUA], [luajit >= 2], [], [AC_MSG_ERROR([luajit requested but not found])])],
+ [PKG_CHECK_MODULES([LUA], [lua5.1], [], [AC_MSG_ERROR([lua-5.1 required but not found])])])
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/dev-db/redis/files/redis-2.8.17-config.patch b/dev-db/redis/files/redis-2.8.17-config.patch
new file mode 100644
index 000000000000..c9f6b2af172b
--- /dev/null
+++ b/dev-db/redis/files/redis-2.8.17-config.patch
@@ -0,0 +1,46 @@
+--- a/redis.conf 2014-12-02 16:22:38.722433643 +0100
++++ b/redis.conf 2014-12-02 16:22:16.252249350 +0100
+@@ -38,7 +38,7 @@
+
+ # When running daemonized, Redis writes a pid file in /var/run/redis.pid by
+ # default. You can specify a custom pid file location here.
+-pidfile /var/run/redis.pid
++pidfile /run/redis/redis.pid
+
+ # Accept connections on the specified port, default is 6379.
+ # If port 0 is specified Redis will not listen on a TCP socket.
+@@ -61,7 +61,7 @@
+ # Examples:
+ #
+ # bind 192.168.1.100 10.0.0.1
+-# bind 127.0.0.1
++bind 127.0.0.1
+
+ # Specify the path for the Unix socket that will be used to listen for
+ # incoming connections. There is no default, so Redis will not listen
+@@ -100,7 +100,7 @@
+ # Specify the log file name. Also the empty string can be used to force
+ # Redis to log on the standard output. Note that if you use standard
+ # output for logging but daemonize, logs will be sent to /dev/null
+-logfile ""
++logfile /var/log/redis/redis.log
+
+ # To enable logging to the system logger, just set 'syslog-enabled' to yes,
+ # and optionally update the other syslog parameters to suit your needs.
+@@ -184,7 +184,7 @@
+ # The Append Only File will also be created inside this directory.
+ #
+ # Note that you must specify a directory here, not a file name.
+-dir ./
++dir /var/lib/redis/
+
+ ################################# REPLICATION #################################
+
+@@ -403,6 +403,7 @@
+ # output buffers (but this is not needed if the policy is 'noeviction').
+ #
+ # maxmemory <bytes>
++maxmemory 67108864
+
+ # MAXMEMORY POLICY: how Redis will select what to remove when maxmemory
+ # is reached. You can select among five behaviors:
diff --git a/dev-db/redis/files/redis-2.8.3-shared.patch b/dev-db/redis/files/redis-2.8.3-shared.patch
new file mode 100644
index 000000000000..d32484f0cd18
--- /dev/null
+++ b/dev-db/redis/files/redis-2.8.3-shared.patch
@@ -0,0 +1,36 @@
+commit 388a76f24c96767c831ee7682234fd9f2bc5b9ac
+Author: Johan Bergström <bugs@bergstroem.nu>
+Date: Mon Nov 25 09:17:14 2013 +1100
+
+ Use shared jemalloc
+
+diff --git src/Makefile src/Makefile
+index c37549d..77e6255 100644
+--- src/Makefile
++++ src/Makefile
+@@ -26,12 +26,7 @@ PREFIX?=/usr/local
+ INSTALL_BIN=$(PREFIX)/bin
+ INSTALL=install
+
+-# Default allocator
+-ifeq ($(uname_S),Linux)
+- MALLOC=jemalloc
+-else
+- MALLOC=libc
+-endif
++MALLOC?=jemalloc
+
+ # Backwards compatibility for selecting an allocator
+ ifeq ($(USE_TCMALLOC),yes)
+@@ -79,9 +74,8 @@ ifeq ($(MALLOC),tcmalloc_minimal)
+ endif
+
+ ifeq ($(MALLOC),jemalloc)
+- DEPENDENCY_TARGETS+= jemalloc
+- FINAL_CFLAGS+= -DUSE_JEMALLOC -I../deps/jemalloc/include
+- FINAL_LIBS+= ../deps/jemalloc/lib/libjemalloc.a -ldl
++ FINAL_CFLAGS+= -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE
++ FINAL_LIBS+= -ljemalloc -ldl
+ endif
+
+ REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS)
diff --git a/dev-db/redis/files/redis-3.0.0-sharedlua.patch b/dev-db/redis/files/redis-3.0.0-sharedlua.patch
new file mode 100644
index 000000000000..ba983efafc7c
--- /dev/null
+++ b/dev-db/redis/files/redis-3.0.0-sharedlua.patch
@@ -0,0 +1,44 @@
+commit fd0fc43f6e0ea45bce0e1a68c1f736e481fc4429
+Author: Johan Bergström <bugs@bergstroem.nu>
+Date: Thu Apr 2 14:33:51 2015 +1100
+
+ Use shared LUA
+
+diff --git src/Makefile src/Makefile
+index a88f1d2..f71e7b5 100644
+--- src/Makefile
++++ src/Makefile
+@@ -15,7 +15,7 @@
+ release_hdr := $(shell sh -c './mkreleasehdr.sh')
+ uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
+ OPTIMIZATION?=-O2
+-DEPENDENCY_TARGETS=hiredis linenoise lua
++DEPENDENCY_TARGETS=hiredis linenoise
+
+ # Default settings
+ STD=-std=c99 -pedantic
+@@ -47,6 +47,7 @@ endif
+ FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS)
+ FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG)
+ FINAL_LIBS=-lm
++FINAL_LIBS+=$(shell pkg-config --libs lua)
+ DEBUG=-g -ggdb
+
+ ifeq ($(uname_S),SunOS)
+@@ -108,6 +109,7 @@ endif
+ REDIS_SERVER_NAME=redis-server
+ REDIS_SENTINEL_NAME=redis-sentinel
+ REDIS_SERVER_OBJ=adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o cluster.o crc16.o endianconv.o slowlog.o scripting.o bio.o rio.o rand.o memtest.o crc64.o bitops.o sentinel.o notify.o setproctitle.o blocked.o hyperloglog.o latency.o sparkline.o
++REDIS_SERVER_OBJ+=fpconv.o strbuf.o lua_bit.o lua_cjson.o lua_cmsgpack.o lua_struct.o
+ REDIS_CLI_NAME=redis-cli
+ REDIS_CLI_OBJ=anet.o sds.o adlist.o redis-cli.o zmalloc.o release.o anet.o ae.o crc64.o
+ REDIS_BENCHMARK_NAME=redis-benchmark
+@@ -162,7 +164,7 @@ endif
+
+ # redis-server
+ $(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ)
+- $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a $(FINAL_LIBS)
++ $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a $(FINAL_LIBS)
+
+ # redis-sentinel
+ $(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME)
diff --git a/dev-db/redis/files/redis-3.2.3-config.patch b/dev-db/redis/files/redis-3.2.3-config.patch
new file mode 100644
index 000000000000..bde0ef7cbaf1
--- /dev/null
+++ b/dev-db/redis/files/redis-3.2.3-config.patch
@@ -0,0 +1,40 @@
+diff --git a/redis.conf b/redis.conf
+index 22e00bc..b09de57 100644
+--- a/redis.conf
++++ b/redis.conf
+@@ -147,7 +147,7 @@ supervised no
+ #
+ # Creating a pid file is best effort: if Redis is not able to create it
+ # nothing bad happens, the server will start and run normally.
+-pidfile /var/run/redis_6379.pid
++pidfile /run/redis/redis.pid
+
+ # Specify the server verbosity level.
+ # This can be one of:
+@@ -160,7 +160,7 @@ loglevel notice
+ # Specify the log file name. Also the empty string can be used to force
+ # Redis to log on the standard output. Note that if you use standard
+ # output for logging but daemonize, logs will be sent to /dev/null
+-logfile ""
++logfile /var/log/redis/redis.log
+
+ # To enable logging to the system logger, just set 'syslog-enabled' to yes,
+ # and optionally update the other syslog parameters to suit your needs.
+@@ -244,7 +244,7 @@ dbfilename dump.rdb
+ # The Append Only File will also be created inside this directory.
+ #
+ # Note that you must specify a directory here, not a file name.
+-dir ./
++dir /var/lib/redis/
+
+ ################################# REPLICATION #################################
+
+@@ -534,7 +534,7 @@ slave-priority 100
+ # limit for maxmemory so that there is some free RAM on the system for slave
+ # output buffers (but this is not needed if the policy is 'noeviction').
+ #
+-# maxmemory <bytes>
++maxmemory 64MB
+
+ # MAXMEMORY POLICY: how Redis will select what to remove when maxmemory
+ # is reached. You can select among five behaviors:
diff --git a/dev-db/redis/files/redis-3.2.3-sharedlua.patch b/dev-db/redis/files/redis-3.2.3-sharedlua.patch
new file mode 100644
index 000000000000..52de9048463f
--- /dev/null
+++ b/dev-db/redis/files/redis-3.2.3-sharedlua.patch
@@ -0,0 +1,60 @@
+diff --git a/deps/lua/src/lua_cjson.c b/deps/lua/src/lua_cjson.c
+index c26c0d7..fa50c41 100644
+--- a/deps/lua/src/lua_cjson.c
++++ b/deps/lua/src/lua_cjson.c
+@@ -46,7 +46,7 @@
+ #include "strbuf.h"
+ #include "fpconv.h"
+
+-#include "../../../src/solarisfixes.h"
++#include "solarisfixes.h"
+
+ #ifndef CJSON_MODNAME
+ #define CJSON_MODNAME "cjson"
+diff --git a/src/Makefile b/src/Makefile
+index 648127a..1f96d98 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -15,7 +15,7 @@
+ release_hdr := $(shell sh -c './mkreleasehdr.sh')
+ uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
+ OPTIMIZATION?=-O2
+-DEPENDENCY_TARGETS=hiredis linenoise lua geohash-int
++DEPENDENCY_TARGETS=hiredis linenoise geohash-int
+
+ # Default settings
+ STD=-std=c99 -pedantic -DREDIS_STATIC=''
+@@ -56,6 +56,7 @@ endif
+ FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) -I../deps/geohash-int
+ FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG)
+ FINAL_LIBS=-lm
++FINAL_LIBS+=@LUA_LIBS@
+ DEBUG=-g -ggdb
+
+ ifeq ($(uname_S),SunOS)
+@@ -80,7 +81,7 @@ endif
+ endif
+ endif
+ # Include paths to dependencies
+-FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src
++FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise @LUA_CFLAGS@
+
+ ifeq ($(MALLOC),tcmalloc)
+ FINAL_CFLAGS+= -DUSE_TCMALLOC
+@@ -118,6 +119,7 @@ endif
+ REDIS_SERVER_NAME=redis-server
+ REDIS_SENTINEL_NAME=redis-sentinel
+ REDIS_SERVER_OBJ=adlist.o quicklist.o ae.o anet.o dict.o server.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o cluster.o crc16.o endianconv.o slowlog.o scripting.o bio.o rio.o rand.o memtest.o crc64.o bitops.o sentinel.o notify.o setproctitle.o blocked.o hyperloglog.o latency.o sparkline.o redis-check-rdb.o geo.o
++REDIS_SERVER_OBJ+=fpconv.o strbuf.o lua_bit.o lua_cjson.o lua_cmsgpack.o lua_struct.o
+ REDIS_GEOHASH_OBJ=../deps/geohash-int/geohash.o ../deps/geohash-int/geohash_helper.o
+ REDIS_CLI_NAME=redis-cli
+ REDIS_CLI_OBJ=anet.o adlist.o redis-cli.o zmalloc.o release.o anet.o ae.o crc64.o
+@@ -172,7 +174,7 @@ endif
+
+ # redis-server
+ $(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ)
+- $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a $(REDIS_GEOHASH_OBJ) $(FINAL_LIBS)
++ $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a $(REDIS_GEOHASH_OBJ) $(FINAL_LIBS)
+
+ # redis-sentinel
+ $(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME)
diff --git a/dev-db/redis/files/redis-3.2.5-shared.patch b/dev-db/redis/files/redis-3.2.5-shared.patch
new file mode 100644
index 000000000000..7ebff12b5196
--- /dev/null
+++ b/dev-db/redis/files/redis-3.2.5-shared.patch
@@ -0,0 +1,30 @@
+diff --git a/src/Makefile b/src/Makefile
+index fdbe36a..df224ae 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -26,12 +26,7 @@ PREFIX?=/usr/local
+ INSTALL_BIN=$(PREFIX)/bin
+ INSTALL=install
+
+-# Default allocator
+-ifeq ($(uname_S),Linux)
+- MALLOC=jemalloc
+-else
+- MALLOC=libc
+-endif
++MALLOC?=jemalloc
+
+ # Backwards compatibility for selecting an allocator
+ ifeq ($(USE_TCMALLOC),yes)
+@@ -103,9 +98,8 @@ ifeq ($(MALLOC),tcmalloc_minimal)
+ endif
+
+ ifeq ($(MALLOC),jemalloc)
+- DEPENDENCY_TARGETS+= jemalloc
+- FINAL_CFLAGS+= -DUSE_JEMALLOC -I../deps/jemalloc/include
+- FINAL_LIBS+= ../deps/jemalloc/lib/libjemalloc.a
++ FINAL_CFLAGS+= -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE
++ FINAL_LIBS+= -ljemalloc -ldl
+ endif
+
+ REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS)
diff --git a/dev-db/redis/files/redis-4.0.1-shared.patch b/dev-db/redis/files/redis-4.0.1-shared.patch
new file mode 100644
index 000000000000..945d114ae2fb
--- /dev/null
+++ b/dev-db/redis/files/redis-4.0.1-shared.patch
@@ -0,0 +1,32 @@
+diff --git a/src/Makefile b/src/Makefile
+index 86e0b3fe..c7db0ee9 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -29,14 +29,7 @@ INSTALL_BIN=$(PREFIX)/bin
+ INSTALL=install
+
+ # Default allocator defaults to Jemalloc if it's not an ARM
+-MALLOC=libc
+-ifneq ($(uname_M),armv6l)
+-ifneq ($(uname_M),armv7l)
+-ifeq ($(uname_S),Linux)
+- MALLOC=jemalloc
+-endif
+-endif
+-endif
++MALLOC?=jemalloc
+
+ # To get ARM stack traces if Redis crashes we need a special C flag.
+ ifneq (,$(findstring armv,$(uname_M)))
+@@ -120,9 +113,8 @@ ifeq ($(MALLOC),tcmalloc_minimal)
+ endif
+
+ ifeq ($(MALLOC),jemalloc)
+- DEPENDENCY_TARGETS+= jemalloc
+- FINAL_CFLAGS+= -DUSE_JEMALLOC -I../deps/jemalloc/include
+- FINAL_LIBS+= ../deps/jemalloc/lib/libjemalloc.a
++ FINAL_CFLAGS+= -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE
++ FINAL_LIBS+= -ljemalloc -ldl
+ endif
+
+ REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS)
diff --git a/dev-db/redis/files/redis-4.0.1-sharedlua.patch b/dev-db/redis/files/redis-4.0.1-sharedlua.patch
new file mode 100644
index 000000000000..d2b572250e86
--- /dev/null
+++ b/dev-db/redis/files/redis-4.0.1-sharedlua.patch
@@ -0,0 +1,60 @@
+diff --git a/deps/lua/src/lua_cjson.c b/deps/lua/src/lua_cjson.c
+index c26c0d7b..fa50c410 100644
+--- a/deps/lua/src/lua_cjson.c
++++ b/deps/lua/src/lua_cjson.c
+@@ -46,7 +46,7 @@
+ #include "strbuf.h"
+ #include "fpconv.h"
+
+-#include "../../../src/solarisfixes.h"
++#include "solarisfixes.h"
+
+ #ifndef CJSON_MODNAME
+ #define CJSON_MODNAME "cjson"
+diff --git a/src/Makefile b/src/Makefile
+index 86e0b3fe..09630321 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -16,7 +16,7 @@ release_hdr := $(shell sh -c './mkreleasehdr.sh')
+ uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
+ uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not')
+ OPTIMIZATION?=-O2
+-DEPENDENCY_TARGETS=hiredis linenoise lua
++DEPENDENCY_TARGETS=hiredis linenoise
+ NODEPS:=clean distclean
+
+ # Default settings
+@@ -66,6 +66,7 @@ endif
+ FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS)
+ FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG)
+ FINAL_LIBS=-lm
++FINAL_LIBS+=@LUA_LIBS@
+ DEBUG=-g -ggdb
+
+ ifeq ($(uname_S),SunOS)
+@@ -107,7 +108,7 @@ endif
+ endif
+ endif
+ # Include paths to dependencies
+-FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src
++FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise @LUA_CFLAGS@
+
+ ifeq ($(MALLOC),tcmalloc)
+ FINAL_CFLAGS+= -DUSE_TCMALLOC
+@@ -145,6 +146,7 @@ endif
+ REDIS_SERVER_NAME=redis-server
+ REDIS_SENTINEL_NAME=redis-sentinel
+ REDIS_SERVER_OBJ=adlist.o quicklist.o ae.o anet.o dict.o server.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o cluster.o crc16.o endianconv.o slowlog.o scripting.o bio.o rio.o rand.o memtest.o crc64.o bitops.o sentinel.o notify.o setproctitle.o blocked.o hyperloglog.o latency.o sparkline.o redis-check-rdb.o redis-check-aof.o geo.o lazyfree.o module.o evict.o expire.o geohash.o geohash_helper.o childinfo.o defrag.o siphash.o rax.o
++REDIS_SERVER_OBJ+=fpconv.o strbuf.o lua_bit.o lua_cjson.o lua_cmsgpack.o lua_struct.o
+ REDIS_CLI_NAME=redis-cli
+ REDIS_CLI_OBJ=anet.o adlist.o redis-cli.o zmalloc.o release.o anet.o ae.o crc64.o
+ REDIS_BENCHMARK_NAME=redis-benchmark
+@@ -196,7 +198,7 @@ endif
+
+ # redis-server
+ $(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ)
+- $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a $(FINAL_LIBS)
++ $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a $(FINAL_LIBS)
+
+ # redis-sentinel
+ $(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME)
diff --git a/dev-db/redis/files/redis-sentinel-4.0.6-config.patch b/dev-db/redis/files/redis-sentinel-4.0.6-config.patch
new file mode 100644
index 000000000000..f2a75814951c
--- /dev/null
+++ b/dev-db/redis/files/redis-sentinel-4.0.6-config.patch
@@ -0,0 +1,9 @@
+diff --git a/sentinel.conf b/sentinel.conf
+index 0e1b266..869a4b9 100644
+--- a/sentinel.conf
++++ b/sentinel.conf
+@@ -194,3 +194,4 @@ sentinel failover-timeout mymaster 180000
+ #
+ # sentinel client-reconfig-script mymaster /var/redis/reconfig.sh
+
++logfile "/var/log/redis/sentinel.log"
diff --git a/dev-db/redis/files/redis-sentinel.confd b/dev-db/redis/files/redis-sentinel.confd
new file mode 100644
index 000000000000..f465a5c3e91f
--- /dev/null
+++ b/dev-db/redis/files/redis-sentinel.confd
@@ -0,0 +1,16 @@
+# Redis-sentinel user.
+REDIS_SENTINEL_USER="redis"
+
+# Redis-sentinel group.
+REDIS_SENTINEL_GROUP="redis"
+
+# Redis-sentinel configuration file.
+REDIS_SENTINEL_CONF="/etc/sentinel.conf"
+
+# Redis-sentinel working directory.
+REDIS_SENTINEL_DIR="/tmp"
+
+# Specify the network service that corresponds to the "bind" setting
+# in your sentinel.conf. For example, if you bind to 127.0.0.1, this should
+# be set to "net.lo" which provides the loopback interface.
+rc_need="net.lo"
diff --git a/dev-db/redis/files/redis-sentinel.initd b/dev-db/redis/files/redis-sentinel.initd
new file mode 100644
index 000000000000..6a22d08db697
--- /dev/null
+++ b/dev-db/redis/files/redis-sentinel.initd
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+: ${REDIS_SENTINEL_DIR:=/tmp}
+: ${REDIS_SENTINEL_CONF:=/etc/sentinel.conf}
+: ${REDIS_SENTINEL_USER:=redis}
+: ${REDIS_SENTINEL_GROUP:=redis}
+: ${REDIS_SENTINEL_TIMEOUT:=30}
+
+command="/usr/sbin/redis-sentinel"
+command_args="${REDIS_SENTINEL_CONF}"
+command_background="true"
+command_user="${REDIS_SENTINEL_USER}:${REDIS_SENTINEL_GROUP}"
+pidfile="/run/${RC_SVCNAME}.pid"
+retry="${REDIS_SENTINEL_TIMEOUT}"
+start_stop_daemon_args="--chdir \"${REDIS_SENTINEL_DIR}\""
+
+depend() {
+ use localmount logger
+ after keepalived redis
+}
diff --git a/dev-db/redis/files/redis.confd b/dev-db/redis/files/redis.confd
new file mode 100644
index 000000000000..07585fa7a116
--- /dev/null
+++ b/dev-db/redis/files/redis.confd
@@ -0,0 +1,20 @@
+# Redis user.
+REDIS_USER="redis"
+
+# Redis group.
+REDIS_GROUP="redis"
+
+# Redis configuration file.
+REDIS_CONF="/etc/redis.conf"
+
+# Redis dump directory.
+REDIS_DIR="/var/lib/redis"
+
+# Redis pid file.
+# (Be sure to change the main redis configuration file as well if you change
+# this from the default.)
+REDIS_PID="/var/run/redis/redis.pid"
+
+# Redis options.
+# (Redis expects the first argument to be the configuration file.)
+REDIS_OPTS="${REDIS_CONF}"
diff --git a/dev-db/redis/files/redis.confd-r1 b/dev-db/redis/files/redis.confd-r1
new file mode 100644
index 000000000000..1f4ff23f211b
--- /dev/null
+++ b/dev-db/redis/files/redis.confd-r1
@@ -0,0 +1,20 @@
+# Redis user.
+REDIS_USER="redis"
+
+# Redis group.
+REDIS_GROUP="redis"
+
+# Redis configuration file.
+REDIS_CONF="/etc/redis.conf"
+
+# Redis dump directory.
+REDIS_DIR="/var/lib/redis"
+
+# Redis options.
+# (Redis expects the first argument to be the configuration file.)
+REDIS_OPTS="${REDIS_CONF}"
+
+# Specify the network service that corresponds to the "bind" setting
+# in your redis.conf. For example, if you bind to 127.0.0.1, this should
+# be set to "net.lo" which provides the loopback interface.
+rc_need="net.lo"
diff --git a/dev-db/redis/files/redis.initd-4 b/dev-db/redis/files/redis.initd-4
new file mode 100644
index 000000000000..5c12fdc7c79d
--- /dev/null
+++ b/dev-db/redis/files/redis.initd-4
@@ -0,0 +1,31 @@
+#!/sbin/openrc-run
+
+REDIS_DIR=${REDIS_DIR:-/var/lib/redis}
+REDIS_CONF=${REDIS_CONF:-/etc/redis.conf}
+REDIS_OPTS=${REDIS_OPTS:-"${REDIS_CONF}"}
+REDIS_USER=${REDIS_USER:-redis}
+REDIS_GROUP=${REDIS_GROUP:-redis}
+REDIS_TIMEOUT=${REDIS_TIMEOUT:-30}
+
+command=/usr/sbin/redis-server
+pidfile=${REDIS_PID:-/run/redis/redis.pid}
+start_stop_daemon_args="--background --pidfile ${pidfile} --chdir \"${REDIS_DIR}\" --user ${REDIS_USER} --group ${REDIS_GROUP}"
+command_args="${REDIS_OPTS}"
+
+depend() {
+ use net localmount logger
+ after keepalived
+}
+
+start_pre() {
+ checkpath -d -m 0775 -o ${REDIS_USER}:${REDIS_GROUP} $(dirname ${REDIS_PID})
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop \
+ --exec ${command} \
+ --retry ${REDIS_TIMEOUT} \
+ --pidfile ${pidfile}
+ eend
+}
diff --git a/dev-db/redis/files/redis.initd-5 b/dev-db/redis/files/redis.initd-5
new file mode 100644
index 000000000000..bfeeb6925ec0
--- /dev/null
+++ b/dev-db/redis/files/redis.initd-5
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+: ${REDIS_DIR:=/var/lib/redis}
+: ${REDIS_CONF:=/etc/redis.conf}
+: ${REDIS_OPTS:="${REDIS_CONF}"}
+: ${REDIS_USER:=redis}
+: ${REDIS_GROUP:=redis}
+: ${REDIS_TIMEOUT:=30}
+
+# https://bugs.gentoo.org/631002#c10
+# Force '--daemonize no' to override the config file
+command="/usr/sbin/redis-server"
+command_args="${REDIS_OPTS} --daemonize no"
+command_background="true"
+command_user="${REDIS_USER}:${REDIS_GROUP}"
+pidfile="/run/${RC_SVCNAME}.pid"
+retry="${REDIS_TIMEOUT}"
+start_stop_daemon_args="--chdir \"${REDIS_DIR}\""
+
+depend() {
+ use localmount logger
+ after keepalived
+}
diff --git a/dev-db/redis/files/redis.logrotate b/dev-db/redis/files/redis.logrotate
new file mode 100644
index 000000000000..2df390c2d1b4
--- /dev/null
+++ b/dev-db/redis/files/redis.logrotate
@@ -0,0 +1,6 @@
+/var/log/redis/redis.log /var/log/redis/sentinel.log {
+ compress
+ delaycompress
+ notifempty
+ missingok
+}
diff --git a/dev-db/redis/files/redis.service-2 b/dev-db/redis/files/redis.service-2
new file mode 100644
index 000000000000..c36d7960ef71
--- /dev/null
+++ b/dev-db/redis/files/redis.service-2
@@ -0,0 +1,14 @@
+[Unit]
+Description=A persistent key-value database
+After=syslog.target network.target
+
+[Service]
+Type=simple
+PIDFile=/var/run/redis/redis.pid
+ExecStart=/usr/sbin/redis-server /etc/redis.conf
+User=redis
+Group=redis
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/dev-db/redis/files/redis.tmpfiles b/dev-db/redis/files/redis.tmpfiles
new file mode 100644
index 000000000000..657d8a551d4b
--- /dev/null
+++ b/dev-db/redis/files/redis.tmpfiles
@@ -0,0 +1,2 @@
+# redis runtime directory
+d /var/run/redis 0755 redis root -
diff --git a/dev-db/redis/metadata.xml b/dev-db/redis/metadata.xml
new file mode 100644
index 000000000000..19c095efc2a0
--- /dev/null
+++ b/dev-db/redis/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>ultrabug@gentoo.org</email>
+ </maintainer>
+ <maintainer type="person">
+ <email>robbat2@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="jemalloc">
+ Use <pkg>dev-libs/jemalloc</pkg> for allocations.
+ </flag>
+ <flag name="tcmalloc">
+ Use tcmalloc from <pkg>dev-util/google-perftools</pkg> for allocations.
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-db/redis/redis-3.0.7-r1.ebuild b/dev-db/redis/redis-3.0.7-r1.ebuild
new file mode 100644
index 000000000000..e46c5c221e5a
--- /dev/null
+++ b/dev-db/redis/redis-3.0.7-r1.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic systemd toolchain-funcs user
+
+DESCRIPTION="A persistent caching system, key-value and data structures database"
+HOMEPAGE="http://redis.io/"
+SRC_URI="http://download.redis.io/releases/${P}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="amd64 arm hppa ~ppc ~ppc64 x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="+jemalloc tcmalloc test"
+SLOT="0"
+
+RDEPEND=">=dev-lang/lua-5.1:*
+ tcmalloc? ( dev-util/google-perftools )
+ jemalloc? ( >=dev-libs/jemalloc-3.2 )"
+DEPEND="virtual/pkgconfig
+ >=sys-devel/autoconf-2.63
+ test? ( dev-lang/tcl:0= )
+ ${RDEPEND}"
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+S="${WORKDIR}/${PN}-${PV/_/-}"
+
+pkg_setup() {
+ enewgroup redis 75
+ enewuser redis 75 -1 /var/lib/redis redis
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.8.3-shared.patch
+ epatch "${FILESDIR}"/${PN}-2.8.17-config.patch
+ epatch "${FILESDIR}"/${PN}-3.0.0-sharedlua.patch
+
+ # Copy lua modules into build dir
+ cp "${S}"/deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die
+ cp "${S}"/deps/lua/src/{fpconv,strbuf}.h "${S}"/src || die
+ # Append cflag for lua_cjson
+ # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61
+ append-cflags "-DENABLE_CJSON_GLOBAL"
+
+ # now we will rewrite present Makefiles
+ local makefiles=""
+ for MKF in $(find -name 'Makefile' | cut -b 3-); do
+ mv "${MKF}" "${MKF}.in"
+ sed -i -e 's:$(CC):@CC@:g' \
+ -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
+ -e 's: $(DEBUG)::g' \
+ -e 's:$(OBJARCH)::g' \
+ -e 's:ARCH:TARCH:g' \
+ -e '/^CCOPT=/s:$: $(LDFLAGS):g' \
+ "${MKF}.in" \
+ || die "Sed failed for ${MKF}"
+ makefiles+=" ${MKF}"
+ done
+ # autodetection of compiler and settings; generates the modified Makefiles
+ cp "${FILESDIR}"/configure.ac-2.2 configure.ac
+ sed -i -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
+ configure.ac || die "Sed failed for configure.ac"
+ eautoconf
+}
+
+src_configure() {
+ econf
+
+ # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
+ # also, don't define ANSI/c99 for lua twice
+ sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die
+}
+
+src_compile() {
+ tc-export CC AR RANLIB
+
+ local myconf=""
+
+ if use tcmalloc ; then
+ myconf="${myconf} USE_TCMALLOC=yes"
+ elif use jemalloc ; then
+ myconf="${myconf} JEMALLOC_SHARED=yes"
+ else
+ myconf="${myconf} MALLOC=yes"
+ fi
+
+ emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}"
+}
+
+src_install() {
+ insinto /etc/
+ doins redis.conf sentinel.conf
+ use prefix || fowners redis:redis /etc/{redis,sentinel}.conf
+ fperms 0644 /etc/{redis,sentinel}.conf
+
+ newconfd "${FILESDIR}/redis.confd" redis
+ newinitd "${FILESDIR}/redis.initd-4" redis
+
+ systemd_newunit "${FILESDIR}/redis.service-2" redis.service
+ systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf
+
+ dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README
+
+ dobin src/redis-cli
+ dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-dump
+ fperms 0750 /usr/sbin/redis-benchmark
+ dosym redis-server /usr/sbin/redis-sentinel
+
+ if use prefix; then
+ diropts -m0750
+ else
+ diropts -m0750 -o redis -g redis
+ fi
+ keepdir /var/{log,lib}/redis
+}
diff --git a/dev-db/redis/redis-3.0.7.ebuild b/dev-db/redis/redis-3.0.7.ebuild
new file mode 100644
index 000000000000..e46c5c221e5a
--- /dev/null
+++ b/dev-db/redis/redis-3.0.7.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic systemd toolchain-funcs user
+
+DESCRIPTION="A persistent caching system, key-value and data structures database"
+HOMEPAGE="http://redis.io/"
+SRC_URI="http://download.redis.io/releases/${P}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="amd64 arm hppa ~ppc ~ppc64 x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="+jemalloc tcmalloc test"
+SLOT="0"
+
+RDEPEND=">=dev-lang/lua-5.1:*
+ tcmalloc? ( dev-util/google-perftools )
+ jemalloc? ( >=dev-libs/jemalloc-3.2 )"
+DEPEND="virtual/pkgconfig
+ >=sys-devel/autoconf-2.63
+ test? ( dev-lang/tcl:0= )
+ ${RDEPEND}"
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+S="${WORKDIR}/${PN}-${PV/_/-}"
+
+pkg_setup() {
+ enewgroup redis 75
+ enewuser redis 75 -1 /var/lib/redis redis
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.8.3-shared.patch
+ epatch "${FILESDIR}"/${PN}-2.8.17-config.patch
+ epatch "${FILESDIR}"/${PN}-3.0.0-sharedlua.patch
+
+ # Copy lua modules into build dir
+ cp "${S}"/deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die
+ cp "${S}"/deps/lua/src/{fpconv,strbuf}.h "${S}"/src || die
+ # Append cflag for lua_cjson
+ # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61
+ append-cflags "-DENABLE_CJSON_GLOBAL"
+
+ # now we will rewrite present Makefiles
+ local makefiles=""
+ for MKF in $(find -name 'Makefile' | cut -b 3-); do
+ mv "${MKF}" "${MKF}.in"
+ sed -i -e 's:$(CC):@CC@:g' \
+ -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
+ -e 's: $(DEBUG)::g' \
+ -e 's:$(OBJARCH)::g' \
+ -e 's:ARCH:TARCH:g' \
+ -e '/^CCOPT=/s:$: $(LDFLAGS):g' \
+ "${MKF}.in" \
+ || die "Sed failed for ${MKF}"
+ makefiles+=" ${MKF}"
+ done
+ # autodetection of compiler and settings; generates the modified Makefiles
+ cp "${FILESDIR}"/configure.ac-2.2 configure.ac
+ sed -i -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
+ configure.ac || die "Sed failed for configure.ac"
+ eautoconf
+}
+
+src_configure() {
+ econf
+
+ # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
+ # also, don't define ANSI/c99 for lua twice
+ sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die
+}
+
+src_compile() {
+ tc-export CC AR RANLIB
+
+ local myconf=""
+
+ if use tcmalloc ; then
+ myconf="${myconf} USE_TCMALLOC=yes"
+ elif use jemalloc ; then
+ myconf="${myconf} JEMALLOC_SHARED=yes"
+ else
+ myconf="${myconf} MALLOC=yes"
+ fi
+
+ emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}"
+}
+
+src_install() {
+ insinto /etc/
+ doins redis.conf sentinel.conf
+ use prefix || fowners redis:redis /etc/{redis,sentinel}.conf
+ fperms 0644 /etc/{redis,sentinel}.conf
+
+ newconfd "${FILESDIR}/redis.confd" redis
+ newinitd "${FILESDIR}/redis.initd-4" redis
+
+ systemd_newunit "${FILESDIR}/redis.service-2" redis.service
+ systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf
+
+ dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README
+
+ dobin src/redis-cli
+ dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-dump
+ fperms 0750 /usr/sbin/redis-benchmark
+ dosym redis-server /usr/sbin/redis-sentinel
+
+ if use prefix; then
+ diropts -m0750
+ else
+ diropts -m0750 -o redis -g redis
+ fi
+ keepdir /var/{log,lib}/redis
+}
diff --git a/dev-db/redis/redis-3.2.12.ebuild b/dev-db/redis/redis-3.2.12.ebuild
new file mode 100644
index 000000000000..eea23ad53470
--- /dev/null
+++ b/dev-db/redis/redis-3.2.12.ebuild
@@ -0,0 +1,131 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils flag-o-matic systemd toolchain-funcs user
+
+DESCRIPTION="A persistent caching system, key-value and data structures database"
+HOMEPAGE="http://redis.io/"
+SRC_URI="http://download.redis.io/releases/${P}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="amd64 arm arm64 ~hppa ~ppc ppc64 x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="+jemalloc tcmalloc luajit test"
+SLOT="0"
+
+# Redis does NOT build with Lua 5.2 or newer at this time.
+# This should link correctly with both unslotted & slotted Lua, without
+# changes.
+RDEPEND="luajit? ( dev-lang/luajit:2 )
+ !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) )
+ tcmalloc? ( dev-util/google-perftools )
+ jemalloc? ( >=dev-libs/jemalloc-3.2 )"
+DEPEND="virtual/pkgconfig
+ >=sys-devel/autoconf-2.63
+ test? ( dev-lang/tcl:0= )
+ ${RDEPEND}"
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+S="${WORKDIR}/${PN}-${PV/_/-}"
+
+pkg_setup() {
+ enewgroup redis 75
+ enewuser redis 75 -1 /var/lib/redis redis
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-3.2.5-shared.patch \
+ "${FILESDIR}"/${PN}-3.2.3-config.patch \
+ "${FILESDIR}"/${PN}-3.2.3-sharedlua.patch
+ eapply_user
+
+ # Copy lua modules into build dir
+ cp "${S}"/deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die
+ cp "${S}"/deps/lua/src/{fpconv,strbuf}.h "${S}"/src || die
+ # Append cflag for lua_cjson
+ # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61
+ append-cflags "-DENABLE_CJSON_GLOBAL"
+
+ # now we will rewrite present Makefiles
+ local makefiles=""
+ for MKF in $(find -name 'Makefile' | cut -b 3-); do
+ mv "${MKF}" "${MKF}.in"
+ sed -i -e 's:$(CC):@CC@:g' \
+ -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
+ -e 's: $(DEBUG)::g' \
+ -e 's:$(OBJARCH)::g' \
+ -e 's:ARCH:TARCH:g' \
+ -e '/^CCOPT=/s:$: $(LDFLAGS):g' \
+ "${MKF}.in" \
+ || die "Sed failed for ${MKF}"
+ makefiles+=" ${MKF}"
+ done
+ # autodetection of compiler and settings; generates the modified Makefiles
+ cp "${FILESDIR}"/configure.ac-3.2 configure.ac
+
+ # Use the correct pkgconfig name for Lua
+ has_version 'dev-lang/lua:5.1' \
+ && LUAPKGCONFIG=lua5.1 \
+ || LUAPKGCONFIG=lua
+ sed -i \
+ -e "/^AC_INIT/s|, [0-9].+, |, $PV, |" \
+ -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
+ -e "/PKG_CHECK_MODULES.*\<LUA\>/s,lua5.1,${LUAPKGCONFIG},g" \
+ configure.ac || die "Sed failed for configure.ac"
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with luajit)
+
+ # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
+ # geohash-int can't be built with -std=c99 either
+ # also, don't define ANSI/c99 for lua twice
+ sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/geohash-int/Makefile deps/Makefile || die
+}
+
+src_compile() {
+ tc-export CC AR RANLIB
+
+ local myconf=""
+
+ if use tcmalloc ; then
+ myconf="${myconf} USE_TCMALLOC=yes"
+ elif use jemalloc ; then
+ myconf="${myconf} JEMALLOC_SHARED=yes"
+ else
+ myconf="${myconf} MALLOC=yes"
+ fi
+
+ emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}"
+}
+
+src_install() {
+ insinto /etc/
+ doins redis.conf sentinel.conf
+ use prefix || fowners redis:redis /etc/{redis,sentinel}.conf
+ fperms 0644 /etc/{redis,sentinel}.conf
+
+ newconfd "${FILESDIR}/redis.confd-r1" redis
+ newinitd "${FILESDIR}/redis.initd-5" redis
+
+ systemd_newunit "${FILESDIR}/redis.service-2" redis.service
+ systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf
+
+ dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README.md
+
+ dobin src/redis-cli
+ dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb
+ fperms 0750 /usr/sbin/redis-benchmark
+ dosym redis-server /usr/sbin/redis-sentinel
+
+ if use prefix; then
+ diropts -m0750
+ else
+ diropts -m0750 -o redis -g redis
+ fi
+ keepdir /var/{log,lib}/redis
+}
diff --git a/dev-db/redis/redis-3.2.5.ebuild b/dev-db/redis/redis-3.2.5.ebuild
new file mode 100644
index 000000000000..125fe7e3d229
--- /dev/null
+++ b/dev-db/redis/redis-3.2.5.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils flag-o-matic systemd toolchain-funcs user
+
+DESCRIPTION="A persistent caching system, key-value and data structures database"
+HOMEPAGE="http://redis.io/"
+SRC_URI="http://download.redis.io/releases/${P}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="amd64 ~arm arm64 hppa ppc ppc64 x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="+jemalloc tcmalloc luajit test"
+SLOT="0"
+
+RDEPEND="luajit? ( dev-lang/luajit:2 )
+ !luajit? ( >=dev-lang/lua-5.1:* )
+ tcmalloc? ( dev-util/google-perftools )
+ jemalloc? ( >=dev-libs/jemalloc-3.2 )"
+DEPEND="virtual/pkgconfig
+ >=sys-devel/autoconf-2.63
+ test? ( dev-lang/tcl:0= )
+ ${RDEPEND}"
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+S="${WORKDIR}/${PN}-${PV/_/-}"
+
+pkg_setup() {
+ enewgroup redis 75
+ enewuser redis 75 -1 /var/lib/redis redis
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-3.2.5-shared.patch \
+ "${FILESDIR}"/${PN}-3.2.3-config.patch \
+ "${FILESDIR}"/${PN}-3.2.3-sharedlua.patch
+ eapply_user
+
+ # Copy lua modules into build dir
+ cp "${S}"/deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die
+ cp "${S}"/deps/lua/src/{fpconv,strbuf}.h "${S}"/src || die
+ # Append cflag for lua_cjson
+ # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61
+ append-cflags "-DENABLE_CJSON_GLOBAL"
+
+ # now we will rewrite present Makefiles
+ local makefiles=""
+ for MKF in $(find -name 'Makefile' | cut -b 3-); do
+ mv "${MKF}" "${MKF}.in"
+ sed -i -e 's:$(CC):@CC@:g' \
+ -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
+ -e 's: $(DEBUG)::g' \
+ -e 's:$(OBJARCH)::g' \
+ -e 's:ARCH:TARCH:g' \
+ -e '/^CCOPT=/s:$: $(LDFLAGS):g' \
+ "${MKF}.in" \
+ || die "Sed failed for ${MKF}"
+ makefiles+=" ${MKF}"
+ done
+ # autodetection of compiler and settings; generates the modified Makefiles
+ cp "${FILESDIR}"/configure.ac-3.2 configure.ac
+ sed -i \
+ -e "/^AC_INIT/s|, [0-9].+, |, $PV, |" \
+ -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
+ -e "/PKG_CHECK_MODULES.*\<LUA\>/s,lua5.1,lua,g" \
+ configure.ac || die "Sed failed for configure.ac"
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with luajit)
+
+ # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
+ # geohash-int can't be built with -std=c99 either
+ # also, don't define ANSI/c99 for lua twice
+ sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/geohash-int/Makefile deps/Makefile || die
+}
+
+src_compile() {
+ tc-export CC AR RANLIB
+
+ local myconf=""
+
+ if use tcmalloc ; then
+ myconf="${myconf} USE_TCMALLOC=yes"
+ elif use jemalloc ; then
+ myconf="${myconf} JEMALLOC_SHARED=yes"
+ else
+ myconf="${myconf} MALLOC=yes"
+ fi
+
+ emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}"
+}
+
+src_install() {
+ insinto /etc/
+ doins redis.conf sentinel.conf
+ use prefix || fowners redis:redis /etc/{redis,sentinel}.conf
+ fperms 0644 /etc/{redis,sentinel}.conf
+
+ newconfd "${FILESDIR}/redis.confd" redis
+ newinitd "${FILESDIR}/redis.initd-4" redis
+
+ systemd_newunit "${FILESDIR}/redis.service-2" redis.service
+ systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf
+
+ dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README.md
+
+ dobin src/redis-cli
+ dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb
+ fperms 0750 /usr/sbin/redis-benchmark
+ dosym redis-server /usr/sbin/redis-sentinel
+
+ if use prefix; then
+ diropts -m0750
+ else
+ diropts -m0750 -o redis -g redis
+ fi
+ keepdir /var/{log,lib}/redis
+}
diff --git a/dev-db/redis/redis-3.2.8-r2.ebuild b/dev-db/redis/redis-3.2.8-r2.ebuild
new file mode 100644
index 000000000000..9ad05c87cf7c
--- /dev/null
+++ b/dev-db/redis/redis-3.2.8-r2.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils flag-o-matic systemd toolchain-funcs user
+
+DESCRIPTION="A persistent caching system, key-value and data structures database"
+HOMEPAGE="http://redis.io/"
+SRC_URI="http://download.redis.io/releases/${P}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="amd64 arm ~arm64 ~hppa ppc ppc64 x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="+jemalloc tcmalloc luajit test"
+SLOT="0"
+
+RDEPEND="luajit? ( dev-lang/luajit:2 )
+ !luajit? ( >=dev-lang/lua-5.1:* )
+ tcmalloc? ( dev-util/google-perftools )
+ jemalloc? ( >=dev-libs/jemalloc-3.2 )"
+DEPEND="virtual/pkgconfig
+ >=sys-devel/autoconf-2.63
+ test? ( dev-lang/tcl:0= )
+ ${RDEPEND}"
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+S="${WORKDIR}/${PN}-${PV/_/-}"
+
+pkg_setup() {
+ enewgroup redis 75
+ enewuser redis 75 -1 /var/lib/redis redis
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-3.2.5-shared.patch \
+ "${FILESDIR}"/${PN}-3.2.3-config.patch \
+ "${FILESDIR}"/${PN}-3.2.3-sharedlua.patch
+ eapply_user
+
+ # Copy lua modules into build dir
+ cp "${S}"/deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die
+ cp "${S}"/deps/lua/src/{fpconv,strbuf}.h "${S}"/src || die
+ # Append cflag for lua_cjson
+ # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61
+ append-cflags "-DENABLE_CJSON_GLOBAL"
+
+ # now we will rewrite present Makefiles
+ local makefiles=""
+ for MKF in $(find -name 'Makefile' | cut -b 3-); do
+ mv "${MKF}" "${MKF}.in"
+ sed -i -e 's:$(CC):@CC@:g' \
+ -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
+ -e 's: $(DEBUG)::g' \
+ -e 's:$(OBJARCH)::g' \
+ -e 's:ARCH:TARCH:g' \
+ -e '/^CCOPT=/s:$: $(LDFLAGS):g' \
+ "${MKF}.in" \
+ || die "Sed failed for ${MKF}"
+ makefiles+=" ${MKF}"
+ done
+ # autodetection of compiler and settings; generates the modified Makefiles
+ cp "${FILESDIR}"/configure.ac-3.2 configure.ac
+ sed -i \
+ -e "/^AC_INIT/s|, [0-9].+, |, $PV, |" \
+ -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
+ -e "/PKG_CHECK_MODULES.*\<LUA\>/s,lua5.1,lua,g" \
+ configure.ac || die "Sed failed for configure.ac"
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with luajit)
+
+ # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
+ # geohash-int can't be built with -std=c99 either
+ # also, don't define ANSI/c99 for lua twice
+ sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/geohash-int/Makefile deps/Makefile || die
+}
+
+src_compile() {
+ tc-export CC AR RANLIB
+
+ local myconf=""
+
+ if use tcmalloc ; then
+ myconf="${myconf} USE_TCMALLOC=yes"
+ elif use jemalloc ; then
+ myconf="${myconf} JEMALLOC_SHARED=yes"
+ else
+ myconf="${myconf} MALLOC=yes"
+ fi
+
+ emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}"
+}
+
+src_install() {
+ insinto /etc/
+ doins redis.conf sentinel.conf
+ use prefix || fowners redis:redis /etc/{redis,sentinel}.conf
+ fperms 0644 /etc/{redis,sentinel}.conf
+
+ newconfd "${FILESDIR}/redis.confd" redis
+ newinitd "${FILESDIR}/redis.initd-4" redis
+
+ systemd_newunit "${FILESDIR}/redis.service-2" redis.service
+ systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf
+
+ dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README.md
+
+ dobin src/redis-cli
+ dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb
+ fperms 0750 /usr/sbin/redis-benchmark
+ dosym redis-server /usr/sbin/redis-sentinel
+
+ if use prefix; then
+ diropts -m0750
+ else
+ diropts -m0750 -o redis -g redis
+ fi
+ keepdir /var/{log,lib}/redis
+}
diff --git a/dev-db/redis/redis-3.2.8-r5.ebuild b/dev-db/redis/redis-3.2.8-r5.ebuild
new file mode 100644
index 000000000000..6a28e4c4b95d
--- /dev/null
+++ b/dev-db/redis/redis-3.2.8-r5.ebuild
@@ -0,0 +1,131 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils flag-o-matic systemd toolchain-funcs user
+
+DESCRIPTION="A persistent caching system, key-value and data structures database"
+HOMEPAGE="http://redis.io/"
+SRC_URI="http://download.redis.io/releases/${P}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="amd64 arm arm64 hppa ppc ppc64 x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="+jemalloc tcmalloc luajit test"
+SLOT="0"
+
+# Redis does NOT build with Lua 5.2 or newer at this time.
+# This should link correctly with both unslotted & slotted Lua, without
+# changes.
+RDEPEND="luajit? ( dev-lang/luajit:2 )
+ !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) )
+ tcmalloc? ( dev-util/google-perftools )
+ jemalloc? ( >=dev-libs/jemalloc-3.2 )"
+DEPEND="virtual/pkgconfig
+ >=sys-devel/autoconf-2.63
+ test? ( dev-lang/tcl:0= )
+ ${RDEPEND}"
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+S="${WORKDIR}/${PN}-${PV/_/-}"
+
+pkg_setup() {
+ enewgroup redis 75
+ enewuser redis 75 -1 /var/lib/redis redis
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-3.2.5-shared.patch \
+ "${FILESDIR}"/${PN}-3.2.3-config.patch \
+ "${FILESDIR}"/${PN}-3.2.3-sharedlua.patch
+ eapply_user
+
+ # Copy lua modules into build dir
+ cp "${S}"/deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die
+ cp "${S}"/deps/lua/src/{fpconv,strbuf}.h "${S}"/src || die
+ # Append cflag for lua_cjson
+ # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61
+ append-cflags "-DENABLE_CJSON_GLOBAL"
+
+ # now we will rewrite present Makefiles
+ local makefiles=""
+ for MKF in $(find -name 'Makefile' | cut -b 3-); do
+ mv "${MKF}" "${MKF}.in"
+ sed -i -e 's:$(CC):@CC@:g' \
+ -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
+ -e 's: $(DEBUG)::g' \
+ -e 's:$(OBJARCH)::g' \
+ -e 's:ARCH:TARCH:g' \
+ -e '/^CCOPT=/s:$: $(LDFLAGS):g' \
+ "${MKF}.in" \
+ || die "Sed failed for ${MKF}"
+ makefiles+=" ${MKF}"
+ done
+ # autodetection of compiler and settings; generates the modified Makefiles
+ cp "${FILESDIR}"/configure.ac-3.2 configure.ac
+
+ # Use the correct pkgconfig name for Lua
+ has_version 'dev-lang/lua:5.1' \
+ && LUAPKGCONFIG=lua5.1 \
+ || LUAPKGCONFIG=lua
+ sed -i \
+ -e "/^AC_INIT/s|, [0-9].+, |, $PV, |" \
+ -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
+ -e "/PKG_CHECK_MODULES.*\<LUA\>/s,lua5.1,${LUAPKGCONFIG},g" \
+ configure.ac || die "Sed failed for configure.ac"
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with luajit)
+
+ # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
+ # geohash-int can't be built with -std=c99 either
+ # also, don't define ANSI/c99 for lua twice
+ sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/geohash-int/Makefile deps/Makefile || die
+}
+
+src_compile() {
+ tc-export CC AR RANLIB
+
+ local myconf=""
+
+ if use tcmalloc ; then
+ myconf="${myconf} USE_TCMALLOC=yes"
+ elif use jemalloc ; then
+ myconf="${myconf} JEMALLOC_SHARED=yes"
+ else
+ myconf="${myconf} MALLOC=yes"
+ fi
+
+ emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}"
+}
+
+src_install() {
+ insinto /etc/
+ doins redis.conf sentinel.conf
+ use prefix || fowners redis:redis /etc/{redis,sentinel}.conf
+ fperms 0644 /etc/{redis,sentinel}.conf
+
+ newconfd "${FILESDIR}/redis.confd-r1" redis
+ newinitd "${FILESDIR}/redis.initd-5" redis
+
+ systemd_newunit "${FILESDIR}/redis.service-2" redis.service
+ systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf
+
+ dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README.md
+
+ dobin src/redis-cli
+ dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb
+ fperms 0750 /usr/sbin/redis-benchmark
+ dosym redis-server /usr/sbin/redis-sentinel
+
+ if use prefix; then
+ diropts -m0750
+ else
+ diropts -m0750 -o redis -g redis
+ fi
+ keepdir /var/{log,lib}/redis
+}
diff --git a/dev-db/redis/redis-4.0.1-r1.ebuild b/dev-db/redis/redis-4.0.1-r1.ebuild
new file mode 100644
index 000000000000..c93a6b4061fc
--- /dev/null
+++ b/dev-db/redis/redis-4.0.1-r1.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils flag-o-matic systemd toolchain-funcs user
+
+DESCRIPTION="A persistent caching system, key-value and data structures database"
+HOMEPAGE="http://redis.io/"
+SRC_URI="http://download.redis.io/releases/${P}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="+jemalloc tcmalloc luajit test"
+SLOT="0"
+
+# Does NOT build with Lua 5.2 or newer at this time.
+RDEPEND="luajit? ( dev-lang/luajit:2 )
+ !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) )
+ tcmalloc? ( dev-util/google-perftools )
+ jemalloc? ( >=dev-libs/jemalloc-3.2 )"
+DEPEND="virtual/pkgconfig
+ >=sys-devel/autoconf-2.63
+ test? ( dev-lang/tcl:0= )
+ ${RDEPEND}"
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+S="${WORKDIR}/${PN}-${PV/_/-}"
+
+pkg_setup() {
+ enewgroup redis 75
+ enewuser redis 75 -1 /var/lib/redis redis
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-4.0.1-shared.patch \
+ "${FILESDIR}"/${PN}-3.2.3-config.patch \
+ "${FILESDIR}"/${PN}-4.0.1-sharedlua.patch
+ eapply_user
+
+ # Copy lua modules into build dir
+ cp "${S}"/deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die
+ cp "${S}"/deps/lua/src/{fpconv,strbuf}.h "${S}"/src || die
+ # Append cflag for lua_cjson
+ # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61
+ append-cflags "-DENABLE_CJSON_GLOBAL"
+
+ # now we will rewrite present Makefiles
+ local makefiles=""
+ for MKF in $(find -name 'Makefile' | cut -b 3-); do
+ mv "${MKF}" "${MKF}.in"
+ sed -i -e 's:$(CC):@CC@:g' \
+ -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
+ -e 's: $(DEBUG)::g' \
+ -e 's:$(OBJARCH)::g' \
+ -e 's:ARCH:TARCH:g' \
+ -e '/^CCOPT=/s:$: $(LDFLAGS):g' \
+ "${MKF}.in" \
+ || die "Sed failed for ${MKF}"
+ makefiles+=" ${MKF}"
+ done
+ # autodetection of compiler and settings; generates the modified Makefiles
+ cp "${FILESDIR}"/configure.ac-3.2 configure.ac
+
+ # Use the correct pkgconfig name for Lua
+ has_version 'dev-lang/lua:5.1' \
+ && LUAPKGCONFIG=lua5.1 \
+ || LUAPKGCONFIG=lua
+ sed -i \
+ -e "/^AC_INIT/s|, [0-9].+, |, $PV, |" \
+ -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
+ -e "/PKG_CHECK_MODULES.*\<LUA\>/s,lua5.1,${LUAPKGCONFIG},g" \
+ configure.ac || die "Sed failed for configure.ac"
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with luajit)
+
+ # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
+ # also, don't define ANSI/c99 for lua twice
+ sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die
+}
+
+src_compile() {
+ tc-export CC AR RANLIB
+
+ local myconf=""
+
+ if use tcmalloc ; then
+ myconf="${myconf} USE_TCMALLOC=yes"
+ elif use jemalloc ; then
+ myconf="${myconf} JEMALLOC_SHARED=yes"
+ else
+ myconf="${myconf} MALLOC=yes"
+ fi
+
+ emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}"
+}
+
+src_install() {
+ insinto /etc/
+ doins redis.conf sentinel.conf
+ use prefix || fowners redis:redis /etc/{redis,sentinel}.conf
+ fperms 0644 /etc/{redis,sentinel}.conf
+
+ newconfd "${FILESDIR}/redis.confd" redis
+ newinitd "${FILESDIR}/redis.initd-4" redis
+
+ systemd_newunit "${FILESDIR}/redis.service-2" redis.service
+ systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf
+
+ dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README.md
+
+ dobin src/redis-cli
+ dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb
+ fperms 0750 /usr/sbin/redis-benchmark
+ dosym redis-server /usr/sbin/redis-sentinel
+
+ if use prefix; then
+ diropts -m0750
+ else
+ diropts -m0750 -o redis -g redis
+ fi
+ keepdir /var/{log,lib}/redis
+}
diff --git a/dev-db/redis/redis-4.0.1.ebuild b/dev-db/redis/redis-4.0.1.ebuild
new file mode 100644
index 000000000000..aece2a0822b3
--- /dev/null
+++ b/dev-db/redis/redis-4.0.1.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils flag-o-matic systemd toolchain-funcs user
+
+DESCRIPTION="A persistent caching system, key-value and data structures database"
+HOMEPAGE="http://redis.io/"
+SRC_URI="http://download.redis.io/releases/${P}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="+jemalloc tcmalloc luajit test"
+SLOT="0"
+
+RDEPEND="luajit? ( dev-lang/luajit:2 )
+ !luajit? ( >=dev-lang/lua-5.1:* )
+ tcmalloc? ( dev-util/google-perftools )
+ jemalloc? ( >=dev-libs/jemalloc-3.2 )"
+DEPEND="virtual/pkgconfig
+ >=sys-devel/autoconf-2.63
+ test? ( dev-lang/tcl:0= )
+ ${RDEPEND}"
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+S="${WORKDIR}/${PN}-${PV/_/-}"
+
+pkg_setup() {
+ enewgroup redis 75
+ enewuser redis 75 -1 /var/lib/redis redis
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-4.0.1-shared.patch \
+ "${FILESDIR}"/${PN}-3.2.3-config.patch \
+ "${FILESDIR}"/${PN}-4.0.1-sharedlua.patch
+ eapply_user
+
+ # Copy lua modules into build dir
+ cp "${S}"/deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die
+ cp "${S}"/deps/lua/src/{fpconv,strbuf}.h "${S}"/src || die
+ # Append cflag for lua_cjson
+ # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61
+ append-cflags "-DENABLE_CJSON_GLOBAL"
+
+ # now we will rewrite present Makefiles
+ local makefiles=""
+ for MKF in $(find -name 'Makefile' | cut -b 3-); do
+ mv "${MKF}" "${MKF}.in"
+ sed -i -e 's:$(CC):@CC@:g' \
+ -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
+ -e 's: $(DEBUG)::g' \
+ -e 's:$(OBJARCH)::g' \
+ -e 's:ARCH:TARCH:g' \
+ -e '/^CCOPT=/s:$: $(LDFLAGS):g' \
+ "${MKF}.in" \
+ || die "Sed failed for ${MKF}"
+ makefiles+=" ${MKF}"
+ done
+ # autodetection of compiler and settings; generates the modified Makefiles
+ cp "${FILESDIR}"/configure.ac-3.2 configure.ac
+ sed -i \
+ -e "/^AC_INIT/s|, [0-9].+, |, $PV, |" \
+ -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
+ -e "/PKG_CHECK_MODULES.*\<LUA\>/s,lua5.1,lua,g" \
+ configure.ac || die "Sed failed for configure.ac"
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with luajit)
+
+ # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
+ # also, don't define ANSI/c99 for lua twice
+ sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die
+}
+
+src_compile() {
+ tc-export CC AR RANLIB
+
+ local myconf=""
+
+ if use tcmalloc ; then
+ myconf="${myconf} USE_TCMALLOC=yes"
+ elif use jemalloc ; then
+ myconf="${myconf} JEMALLOC_SHARED=yes"
+ else
+ myconf="${myconf} MALLOC=yes"
+ fi
+
+ emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}"
+}
+
+src_install() {
+ insinto /etc/
+ doins redis.conf sentinel.conf
+ use prefix || fowners redis:redis /etc/{redis,sentinel}.conf
+ fperms 0644 /etc/{redis,sentinel}.conf
+
+ newconfd "${FILESDIR}/redis.confd" redis
+ newinitd "${FILESDIR}/redis.initd-4" redis
+
+ systemd_newunit "${FILESDIR}/redis.service-2" redis.service
+ systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf
+
+ dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README.md
+
+ dobin src/redis-cli
+ dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb
+ fperms 0750 /usr/sbin/redis-benchmark
+ dosym redis-server /usr/sbin/redis-sentinel
+
+ if use prefix; then
+ diropts -m0750
+ else
+ diropts -m0750 -o redis -g redis
+ fi
+ keepdir /var/{log,lib}/redis
+}
diff --git a/dev-db/redis/redis-4.0.10.ebuild b/dev-db/redis/redis-4.0.10.ebuild
new file mode 100644
index 000000000000..0062f6313ebb
--- /dev/null
+++ b/dev-db/redis/redis-4.0.10.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils flag-o-matic systemd toolchain-funcs user
+
+DESCRIPTION="A persistent caching system, key-value and data structures database"
+HOMEPAGE="https://redis.io"
+SRC_URI="http://download.redis.io/releases/${P}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="amd64 arm arm64 ~hppa ~ppc ppc64 x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="+jemalloc tcmalloc luajit test"
+SLOT="0"
+
+# Redis does NOT build with Lua 5.2 or newer at this time.
+# This should link correctly with both unslotted & slotted Lua, without
+# changes.
+RDEPEND="
+ luajit? ( dev-lang/luajit:2 )
+ !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) )
+ tcmalloc? ( dev-util/google-perftools )
+ jemalloc? ( >=dev-libs/jemalloc-3.2 )"
+
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+ >=sys-devel/autoconf-2.63
+ test? ( dev-lang/tcl:0= )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+S="${WORKDIR}/${PN}-${PV/_/-}"
+
+pkg_setup() {
+ enewgroup redis 75
+ enewuser redis 75 -1 /var/lib/redis redis
+}
+
+src_prepare() {
+ eapply \
+ "${FILESDIR}"/${PN}-3.2.3-config.patch \
+ "${FILESDIR}"/${PN}-4.0.1-shared.patch \
+ "${FILESDIR}"/${PN}-4.0.1-sharedlua.patch \
+ "${FILESDIR}"/${PN}-sentinel-4.0.6-config.patch
+ eapply_user
+
+ # Copy lua modules into build dir
+ cp "${S}"/deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die
+ cp "${S}"/deps/lua/src/{fpconv,strbuf}.h "${S}"/src || die
+ # Append cflag for lua_cjson
+ # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61
+ append-cflags "-DENABLE_CJSON_GLOBAL"
+
+ # now we will rewrite present Makefiles
+ local makefiles="" MKF
+ for MKF in $(find -name 'Makefile' | cut -b 3-); do
+ mv "${MKF}" "${MKF}.in"
+ sed -i -e 's:$(CC):@CC@:g' \
+ -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
+ -e 's: $(DEBUG)::g' \
+ -e 's:$(OBJARCH)::g' \
+ -e 's:ARCH:TARCH:g' \
+ -e '/^CCOPT=/s:$: $(LDFLAGS):g' \
+ "${MKF}.in" \
+ || die "Sed failed for ${MKF}"
+ makefiles+=" ${MKF}"
+ done
+ # autodetection of compiler and settings; generates the modified Makefiles
+ cp "${FILESDIR}"/configure.ac-3.2 configure.ac || die
+
+ # Use the correct pkgconfig name for Lua
+ has_version 'dev-lang/lua:5.1' \
+ && LUAPKGCONFIG=lua5.1 \
+ || LUAPKGCONFIG=lua
+ sed -i \
+ -e "/^AC_INIT/s|, [0-9].+, |, $PV, |" \
+ -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
+ -e "/PKG_CHECK_MODULES.*\<LUA\>/s,lua5.1,${LUAPKGCONFIG},g" \
+ configure.ac || die "Sed failed for configure.ac"
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with luajit)
+
+ # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
+ # also, don't define ANSI/c99 for lua twice
+ sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die
+}
+
+src_compile() {
+ tc-export CC AR RANLIB
+
+ local myconf=""
+
+ if use tcmalloc; then
+ myconf="${myconf} USE_TCMALLOC=yes"
+ elif use jemalloc; then
+ myconf="${myconf} JEMALLOC_SHARED=yes"
+ else
+ myconf="${myconf} MALLOC=yes"
+ fi
+
+ emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}"
+}
+
+src_install() {
+ insinto /etc/
+ doins redis.conf sentinel.conf
+ use prefix || fowners redis:redis /etc/{redis,sentinel}.conf
+ fperms 0644 /etc/{redis,sentinel}.conf
+
+ newconfd "${FILESDIR}/redis.confd-r1" redis
+ newinitd "${FILESDIR}/redis.initd-5" redis
+
+ systemd_newunit "${FILESDIR}/redis.service-2" redis.service
+ systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf
+
+ newconfd "${FILESDIR}/redis-sentinel.confd" redis-sentinel
+ newinitd "${FILESDIR}/redis-sentinel.initd" redis-sentinel
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README.md
+
+ dobin src/redis-cli
+ dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb
+ fperms 0750 /usr/sbin/redis-benchmark
+ dosym redis-server /usr/sbin/redis-sentinel
+
+ if use prefix; then
+ diropts -m0750
+ else
+ diropts -m0750 -o redis -g redis
+ fi
+ keepdir /var/{log,lib}/redis
+}
diff --git a/dev-db/redis/redis-4.0.2-r1.ebuild b/dev-db/redis/redis-4.0.2-r1.ebuild
new file mode 100644
index 000000000000..dd90a7deb368
--- /dev/null
+++ b/dev-db/redis/redis-4.0.2-r1.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils flag-o-matic systemd toolchain-funcs user
+
+DESCRIPTION="A persistent caching system, key-value and data structures database"
+HOMEPAGE="http://redis.io/"
+SRC_URI="http://download.redis.io/releases/${P}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="amd64 arm arm64 hppa ppc ppc64 x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="+jemalloc tcmalloc luajit test"
+SLOT="0"
+
+# Redis does NOT build with Lua 5.2 or newer at this time.
+# This should link correctly with both unslotted & slotted Lua, without
+# changes.
+RDEPEND="luajit? ( dev-lang/luajit:2 )
+ !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) )
+ tcmalloc? ( dev-util/google-perftools )
+ jemalloc? ( >=dev-libs/jemalloc-3.2 )"
+DEPEND="virtual/pkgconfig
+ >=sys-devel/autoconf-2.63
+ test? ( dev-lang/tcl:0= )
+ ${RDEPEND}"
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+S="${WORKDIR}/${PN}-${PV/_/-}"
+
+pkg_setup() {
+ enewgroup redis 75
+ enewuser redis 75 -1 /var/lib/redis redis
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-4.0.1-shared.patch \
+ "${FILESDIR}"/${PN}-3.2.3-config.patch \
+ "${FILESDIR}"/${PN}-4.0.1-sharedlua.patch
+ eapply_user
+
+ # Copy lua modules into build dir
+ cp "${S}"/deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die
+ cp "${S}"/deps/lua/src/{fpconv,strbuf}.h "${S}"/src || die
+ # Append cflag for lua_cjson
+ # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61
+ append-cflags "-DENABLE_CJSON_GLOBAL"
+
+ # now we will rewrite present Makefiles
+ local makefiles=""
+ for MKF in $(find -name 'Makefile' | cut -b 3-); do
+ mv "${MKF}" "${MKF}.in"
+ sed -i -e 's:$(CC):@CC@:g' \
+ -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
+ -e 's: $(DEBUG)::g' \
+ -e 's:$(OBJARCH)::g' \
+ -e 's:ARCH:TARCH:g' \
+ -e '/^CCOPT=/s:$: $(LDFLAGS):g' \
+ "${MKF}.in" \
+ || die "Sed failed for ${MKF}"
+ makefiles+=" ${MKF}"
+ done
+ # autodetection of compiler and settings; generates the modified Makefiles
+ cp "${FILESDIR}"/configure.ac-3.2 configure.ac
+
+ # Use the correct pkgconfig name for Lua
+ has_version 'dev-lang/lua:5.1' \
+ && LUAPKGCONFIG=lua5.1 \
+ || LUAPKGCONFIG=lua
+ sed -i \
+ -e "/^AC_INIT/s|, [0-9].+, |, $PV, |" \
+ -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
+ -e "/PKG_CHECK_MODULES.*\<LUA\>/s,lua5.1,${LUAPKGCONFIG},g" \
+ configure.ac || die "Sed failed for configure.ac"
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with luajit)
+
+ # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
+ # also, don't define ANSI/c99 for lua twice
+ sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die
+}
+
+src_compile() {
+ tc-export CC AR RANLIB
+
+ local myconf=""
+
+ if use tcmalloc ; then
+ myconf="${myconf} USE_TCMALLOC=yes"
+ elif use jemalloc ; then
+ myconf="${myconf} JEMALLOC_SHARED=yes"
+ else
+ myconf="${myconf} MALLOC=yes"
+ fi
+
+ emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}"
+}
+
+src_install() {
+ insinto /etc/
+ doins redis.conf sentinel.conf
+ use prefix || fowners redis:redis /etc/{redis,sentinel}.conf
+ fperms 0644 /etc/{redis,sentinel}.conf
+
+ newconfd "${FILESDIR}/redis.confd-r1" redis
+ newinitd "${FILESDIR}/redis.initd-5" redis
+
+ systemd_newunit "${FILESDIR}/redis.service-2" redis.service
+ systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf
+
+ dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README.md
+
+ dobin src/redis-cli
+ dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb
+ fperms 0750 /usr/sbin/redis-benchmark
+ dosym redis-server /usr/sbin/redis-sentinel
+
+ if use prefix; then
+ diropts -m0750
+ else
+ diropts -m0750 -o redis -g redis
+ fi
+ keepdir /var/{log,lib}/redis
+}
diff --git a/dev-db/redis/redis-4.0.6.ebuild b/dev-db/redis/redis-4.0.6.ebuild
new file mode 100644
index 000000000000..92f1b4d63f31
--- /dev/null
+++ b/dev-db/redis/redis-4.0.6.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils flag-o-matic systemd toolchain-funcs user
+
+DESCRIPTION="A persistent caching system, key-value and data structures database"
+HOMEPAGE="http://redis.io/"
+SRC_URI="http://download.redis.io/releases/${P}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="+jemalloc tcmalloc luajit test"
+SLOT="0"
+
+# Redis does NOT build with Lua 5.2 or newer at this time.
+# This should link correctly with both unslotted & slotted Lua, without
+# changes.
+RDEPEND="
+ luajit? ( dev-lang/luajit:2 )
+ !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) )
+ tcmalloc? ( dev-util/google-perftools )
+ jemalloc? ( >=dev-libs/jemalloc-3.2 )"
+
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+ >=sys-devel/autoconf-2.63
+ test? ( dev-lang/tcl:0= )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+S="${WORKDIR}/${PN}-${PV/_/-}"
+
+pkg_setup() {
+ enewgroup redis 75
+ enewuser redis 75 -1 /var/lib/redis redis
+}
+
+src_prepare() {
+ eapply \
+ "${FILESDIR}"/${PN}-3.2.3-config.patch \
+ "${FILESDIR}"/${PN}-4.0.1-shared.patch \
+ "${FILESDIR}"/${PN}-4.0.1-sharedlua.patch \
+ "${FILESDIR}"/${PN}-sentinel-4.0.6-config.patch
+ eapply_user
+
+ # Copy lua modules into build dir
+ cp "${S}"/deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die
+ cp "${S}"/deps/lua/src/{fpconv,strbuf}.h "${S}"/src || die
+ # Append cflag for lua_cjson
+ # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61
+ append-cflags "-DENABLE_CJSON_GLOBAL"
+
+ # now we will rewrite present Makefiles
+ local makefiles="" MKF
+ for MKF in $(find -name 'Makefile' | cut -b 3-); do
+ mv "${MKF}" "${MKF}.in"
+ sed -i -e 's:$(CC):@CC@:g' \
+ -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
+ -e 's: $(DEBUG)::g' \
+ -e 's:$(OBJARCH)::g' \
+ -e 's:ARCH:TARCH:g' \
+ -e '/^CCOPT=/s:$: $(LDFLAGS):g' \
+ "${MKF}.in" \
+ || die "Sed failed for ${MKF}"
+ makefiles+=" ${MKF}"
+ done
+ # autodetection of compiler and settings; generates the modified Makefiles
+ cp "${FILESDIR}"/configure.ac-3.2 configure.ac || die
+
+ # Use the correct pkgconfig name for Lua
+ has_version 'dev-lang/lua:5.1' \
+ && LUAPKGCONFIG=lua5.1 \
+ || LUAPKGCONFIG=lua
+ sed -i \
+ -e "/^AC_INIT/s|, [0-9].+, |, $PV, |" \
+ -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
+ -e "/PKG_CHECK_MODULES.*\<LUA\>/s,lua5.1,${LUAPKGCONFIG},g" \
+ configure.ac || die "Sed failed for configure.ac"
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with luajit)
+
+ # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
+ # also, don't define ANSI/c99 for lua twice
+ sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die
+}
+
+src_compile() {
+ tc-export CC AR RANLIB
+
+ local myconf=""
+
+ if use tcmalloc; then
+ myconf="${myconf} USE_TCMALLOC=yes"
+ elif use jemalloc; then
+ myconf="${myconf} JEMALLOC_SHARED=yes"
+ else
+ myconf="${myconf} MALLOC=yes"
+ fi
+
+ emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}"
+}
+
+src_install() {
+ insinto /etc/
+ doins redis.conf sentinel.conf
+ use prefix || fowners redis:redis /etc/{redis,sentinel}.conf
+ fperms 0644 /etc/{redis,sentinel}.conf
+
+ newconfd "${FILESDIR}/redis.confd-r1" redis
+ newinitd "${FILESDIR}/redis.initd-5" redis
+
+ systemd_newunit "${FILESDIR}/redis.service-2" redis.service
+ systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf
+
+ newconfd "${FILESDIR}/redis-sentinel.confd" redis-sentinel
+ newinitd "${FILESDIR}/redis-sentinel.initd" redis-sentinel
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README.md
+
+ dobin src/redis-cli
+ dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb
+ fperms 0750 /usr/sbin/redis-benchmark
+ dosym redis-server /usr/sbin/redis-sentinel
+
+ if use prefix; then
+ diropts -m0750
+ else
+ diropts -m0750 -o redis -g redis
+ fi
+ keepdir /var/{log,lib}/redis
+}
diff --git a/dev-db/redis/redis-4.0.7.ebuild b/dev-db/redis/redis-4.0.7.ebuild
new file mode 100644
index 000000000000..c7f8131160d1
--- /dev/null
+++ b/dev-db/redis/redis-4.0.7.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils flag-o-matic systemd toolchain-funcs user
+
+DESCRIPTION="A persistent caching system, key-value and data structures database"
+HOMEPAGE="http://redis.io/"
+SRC_URI="http://download.redis.io/releases/${P}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="+jemalloc tcmalloc luajit test"
+SLOT="0"
+
+# Redis does NOT build with Lua 5.2 or newer at this time.
+# This should link correctly with both unslotted & slotted Lua, without
+# changes.
+RDEPEND="
+ luajit? ( dev-lang/luajit:2 )
+ !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) )
+ tcmalloc? ( dev-util/google-perftools )
+ jemalloc? ( >=dev-libs/jemalloc-3.2 )"
+
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+ >=sys-devel/autoconf-2.63
+ test? ( dev-lang/tcl:0= )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+S="${WORKDIR}/${PN}-${PV/_/-}"
+
+pkg_setup() {
+ enewgroup redis 75
+ enewuser redis 75 -1 /var/lib/redis redis
+}
+
+src_prepare() {
+ eapply \
+ "${FILESDIR}"/${PN}-3.2.3-config.patch \
+ "${FILESDIR}"/${PN}-4.0.1-shared.patch \
+ "${FILESDIR}"/${PN}-4.0.1-sharedlua.patch \
+ "${FILESDIR}"/${PN}-sentinel-4.0.6-config.patch
+ eapply_user
+
+ # Copy lua modules into build dir
+ cp "${S}"/deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die
+ cp "${S}"/deps/lua/src/{fpconv,strbuf}.h "${S}"/src || die
+ # Append cflag for lua_cjson
+ # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61
+ append-cflags "-DENABLE_CJSON_GLOBAL"
+
+ # now we will rewrite present Makefiles
+ local makefiles="" MKF
+ for MKF in $(find -name 'Makefile' | cut -b 3-); do
+ mv "${MKF}" "${MKF}.in"
+ sed -i -e 's:$(CC):@CC@:g' \
+ -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
+ -e 's: $(DEBUG)::g' \
+ -e 's:$(OBJARCH)::g' \
+ -e 's:ARCH:TARCH:g' \
+ -e '/^CCOPT=/s:$: $(LDFLAGS):g' \
+ "${MKF}.in" \
+ || die "Sed failed for ${MKF}"
+ makefiles+=" ${MKF}"
+ done
+ # autodetection of compiler and settings; generates the modified Makefiles
+ cp "${FILESDIR}"/configure.ac-3.2 configure.ac || die
+
+ # Use the correct pkgconfig name for Lua
+ has_version 'dev-lang/lua:5.1' \
+ && LUAPKGCONFIG=lua5.1 \
+ || LUAPKGCONFIG=lua
+ sed -i \
+ -e "/^AC_INIT/s|, [0-9].+, |, $PV, |" \
+ -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
+ -e "/PKG_CHECK_MODULES.*\<LUA\>/s,lua5.1,${LUAPKGCONFIG},g" \
+ configure.ac || die "Sed failed for configure.ac"
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with luajit)
+
+ # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
+ # also, don't define ANSI/c99 for lua twice
+ sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die
+}
+
+src_compile() {
+ tc-export CC AR RANLIB
+
+ local myconf=""
+
+ if use tcmalloc; then
+ myconf="${myconf} USE_TCMALLOC=yes"
+ elif use jemalloc; then
+ myconf="${myconf} JEMALLOC_SHARED=yes"
+ else
+ myconf="${myconf} MALLOC=yes"
+ fi
+
+ emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}"
+}
+
+src_install() {
+ insinto /etc/
+ doins redis.conf sentinel.conf
+ use prefix || fowners redis:redis /etc/{redis,sentinel}.conf
+ fperms 0644 /etc/{redis,sentinel}.conf
+
+ newconfd "${FILESDIR}/redis.confd-r1" redis
+ newinitd "${FILESDIR}/redis.initd-5" redis
+
+ systemd_newunit "${FILESDIR}/redis.service-2" redis.service
+ systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf
+
+ newconfd "${FILESDIR}/redis-sentinel.confd" redis-sentinel
+ newinitd "${FILESDIR}/redis-sentinel.initd" redis-sentinel
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README.md
+
+ dobin src/redis-cli
+ dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb
+ fperms 0750 /usr/sbin/redis-benchmark
+ dosym redis-server /usr/sbin/redis-sentinel
+
+ if use prefix; then
+ diropts -m0750
+ else
+ diropts -m0750 -o redis -g redis
+ fi
+ keepdir /var/{log,lib}/redis
+}
diff --git a/dev-db/redis/redis-4.0.8.ebuild b/dev-db/redis/redis-4.0.8.ebuild
new file mode 100644
index 000000000000..c7f8131160d1
--- /dev/null
+++ b/dev-db/redis/redis-4.0.8.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils flag-o-matic systemd toolchain-funcs user
+
+DESCRIPTION="A persistent caching system, key-value and data structures database"
+HOMEPAGE="http://redis.io/"
+SRC_URI="http://download.redis.io/releases/${P}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="+jemalloc tcmalloc luajit test"
+SLOT="0"
+
+# Redis does NOT build with Lua 5.2 or newer at this time.
+# This should link correctly with both unslotted & slotted Lua, without
+# changes.
+RDEPEND="
+ luajit? ( dev-lang/luajit:2 )
+ !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) )
+ tcmalloc? ( dev-util/google-perftools )
+ jemalloc? ( >=dev-libs/jemalloc-3.2 )"
+
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+ >=sys-devel/autoconf-2.63
+ test? ( dev-lang/tcl:0= )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+S="${WORKDIR}/${PN}-${PV/_/-}"
+
+pkg_setup() {
+ enewgroup redis 75
+ enewuser redis 75 -1 /var/lib/redis redis
+}
+
+src_prepare() {
+ eapply \
+ "${FILESDIR}"/${PN}-3.2.3-config.patch \
+ "${FILESDIR}"/${PN}-4.0.1-shared.patch \
+ "${FILESDIR}"/${PN}-4.0.1-sharedlua.patch \
+ "${FILESDIR}"/${PN}-sentinel-4.0.6-config.patch
+ eapply_user
+
+ # Copy lua modules into build dir
+ cp "${S}"/deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die
+ cp "${S}"/deps/lua/src/{fpconv,strbuf}.h "${S}"/src || die
+ # Append cflag for lua_cjson
+ # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61
+ append-cflags "-DENABLE_CJSON_GLOBAL"
+
+ # now we will rewrite present Makefiles
+ local makefiles="" MKF
+ for MKF in $(find -name 'Makefile' | cut -b 3-); do
+ mv "${MKF}" "${MKF}.in"
+ sed -i -e 's:$(CC):@CC@:g' \
+ -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
+ -e 's: $(DEBUG)::g' \
+ -e 's:$(OBJARCH)::g' \
+ -e 's:ARCH:TARCH:g' \
+ -e '/^CCOPT=/s:$: $(LDFLAGS):g' \
+ "${MKF}.in" \
+ || die "Sed failed for ${MKF}"
+ makefiles+=" ${MKF}"
+ done
+ # autodetection of compiler and settings; generates the modified Makefiles
+ cp "${FILESDIR}"/configure.ac-3.2 configure.ac || die
+
+ # Use the correct pkgconfig name for Lua
+ has_version 'dev-lang/lua:5.1' \
+ && LUAPKGCONFIG=lua5.1 \
+ || LUAPKGCONFIG=lua
+ sed -i \
+ -e "/^AC_INIT/s|, [0-9].+, |, $PV, |" \
+ -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
+ -e "/PKG_CHECK_MODULES.*\<LUA\>/s,lua5.1,${LUAPKGCONFIG},g" \
+ configure.ac || die "Sed failed for configure.ac"
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with luajit)
+
+ # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
+ # also, don't define ANSI/c99 for lua twice
+ sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die
+}
+
+src_compile() {
+ tc-export CC AR RANLIB
+
+ local myconf=""
+
+ if use tcmalloc; then
+ myconf="${myconf} USE_TCMALLOC=yes"
+ elif use jemalloc; then
+ myconf="${myconf} JEMALLOC_SHARED=yes"
+ else
+ myconf="${myconf} MALLOC=yes"
+ fi
+
+ emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}"
+}
+
+src_install() {
+ insinto /etc/
+ doins redis.conf sentinel.conf
+ use prefix || fowners redis:redis /etc/{redis,sentinel}.conf
+ fperms 0644 /etc/{redis,sentinel}.conf
+
+ newconfd "${FILESDIR}/redis.confd-r1" redis
+ newinitd "${FILESDIR}/redis.initd-5" redis
+
+ systemd_newunit "${FILESDIR}/redis.service-2" redis.service
+ systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf
+
+ newconfd "${FILESDIR}/redis-sentinel.confd" redis-sentinel
+ newinitd "${FILESDIR}/redis-sentinel.initd" redis-sentinel
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README.md
+
+ dobin src/redis-cli
+ dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb
+ fperms 0750 /usr/sbin/redis-benchmark
+ dosym redis-server /usr/sbin/redis-sentinel
+
+ if use prefix; then
+ diropts -m0750
+ else
+ diropts -m0750 -o redis -g redis
+ fi
+ keepdir /var/{log,lib}/redis
+}
diff --git a/dev-db/redis/redis-4.0.9.ebuild b/dev-db/redis/redis-4.0.9.ebuild
new file mode 100644
index 000000000000..a8d59c405e63
--- /dev/null
+++ b/dev-db/redis/redis-4.0.9.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils flag-o-matic systemd toolchain-funcs user
+
+DESCRIPTION="A persistent caching system, key-value and data structures database"
+HOMEPAGE="https://redis.io"
+SRC_URI="http://download.redis.io/releases/${P}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="+jemalloc tcmalloc luajit test"
+SLOT="0"
+
+# Redis does NOT build with Lua 5.2 or newer at this time.
+# This should link correctly with both unslotted & slotted Lua, without
+# changes.
+RDEPEND="
+ luajit? ( dev-lang/luajit:2 )
+ !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) )
+ tcmalloc? ( dev-util/google-perftools )
+ jemalloc? ( >=dev-libs/jemalloc-3.2 )"
+
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+ >=sys-devel/autoconf-2.63
+ test? ( dev-lang/tcl:0= )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+S="${WORKDIR}/${PN}-${PV/_/-}"
+
+pkg_setup() {
+ enewgroup redis 75
+ enewuser redis 75 -1 /var/lib/redis redis
+}
+
+src_prepare() {
+ eapply \
+ "${FILESDIR}"/${PN}-3.2.3-config.patch \
+ "${FILESDIR}"/${PN}-4.0.1-shared.patch \
+ "${FILESDIR}"/${PN}-4.0.1-sharedlua.patch \
+ "${FILESDIR}"/${PN}-sentinel-4.0.6-config.patch
+ eapply_user
+
+ # Copy lua modules into build dir
+ cp "${S}"/deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die
+ cp "${S}"/deps/lua/src/{fpconv,strbuf}.h "${S}"/src || die
+ # Append cflag for lua_cjson
+ # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61
+ append-cflags "-DENABLE_CJSON_GLOBAL"
+
+ # now we will rewrite present Makefiles
+ local makefiles="" MKF
+ for MKF in $(find -name 'Makefile' | cut -b 3-); do
+ mv "${MKF}" "${MKF}.in"
+ sed -i -e 's:$(CC):@CC@:g' \
+ -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
+ -e 's: $(DEBUG)::g' \
+ -e 's:$(OBJARCH)::g' \
+ -e 's:ARCH:TARCH:g' \
+ -e '/^CCOPT=/s:$: $(LDFLAGS):g' \
+ "${MKF}.in" \
+ || die "Sed failed for ${MKF}"
+ makefiles+=" ${MKF}"
+ done
+ # autodetection of compiler and settings; generates the modified Makefiles
+ cp "${FILESDIR}"/configure.ac-3.2 configure.ac || die
+
+ # Use the correct pkgconfig name for Lua
+ has_version 'dev-lang/lua:5.1' \
+ && LUAPKGCONFIG=lua5.1 \
+ || LUAPKGCONFIG=lua
+ sed -i \
+ -e "/^AC_INIT/s|, [0-9].+, |, $PV, |" \
+ -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
+ -e "/PKG_CHECK_MODULES.*\<LUA\>/s,lua5.1,${LUAPKGCONFIG},g" \
+ configure.ac || die "Sed failed for configure.ac"
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with luajit)
+
+ # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
+ # also, don't define ANSI/c99 for lua twice
+ sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die
+}
+
+src_compile() {
+ tc-export CC AR RANLIB
+
+ local myconf=""
+
+ if use tcmalloc; then
+ myconf="${myconf} USE_TCMALLOC=yes"
+ elif use jemalloc; then
+ myconf="${myconf} JEMALLOC_SHARED=yes"
+ else
+ myconf="${myconf} MALLOC=yes"
+ fi
+
+ emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}"
+}
+
+src_install() {
+ insinto /etc/
+ doins redis.conf sentinel.conf
+ use prefix || fowners redis:redis /etc/{redis,sentinel}.conf
+ fperms 0644 /etc/{redis,sentinel}.conf
+
+ newconfd "${FILESDIR}/redis.confd-r1" redis
+ newinitd "${FILESDIR}/redis.initd-5" redis
+
+ systemd_newunit "${FILESDIR}/redis.service-2" redis.service
+ systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf
+
+ newconfd "${FILESDIR}/redis-sentinel.confd" redis-sentinel
+ newinitd "${FILESDIR}/redis-sentinel.initd" redis-sentinel
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README.md
+
+ dobin src/redis-cli
+ dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb
+ fperms 0750 /usr/sbin/redis-benchmark
+ dosym redis-server /usr/sbin/redis-sentinel
+
+ if use prefix; then
+ diropts -m0750
+ else
+ diropts -m0750 -o redis -g redis
+ fi
+ keepdir /var/{log,lib}/redis
+}
diff --git a/dev-db/repmgr-3.0.1 b/dev-db/repmgr-3.0.1
deleted file mode 100644
index e085daf66882..000000000000
--- a/dev-db/repmgr-3.0.1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile install
-DEPEND=>=dev-db/postgresql-9.3[server,static-libs]
-DESCRIPTION=PostgreSQL Replication Manager
-EAPI=5
-HOMEPAGE=http://www.repmgr.org/
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-3
-RDEPEND=>=dev-db/postgresql-9.3[server,static-libs] net-misc/rsync
-SLOT=0
-SRC_URI=http://www.repmgr.org/download/repmgr-3.0.1.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=f6d376309329cddee0e76c7b96cb816c
diff --git a/dev-db/repmgr-3.3.2 b/dev-db/repmgr-3.3.2
deleted file mode 100644
index 97a2160f6b8d..000000000000
--- a/dev-db/repmgr-3.3.2
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile install
-DEPEND=>=dev-db/postgresql-9.3[server,static-libs]
-DESCRIPTION=PostgreSQL Replication Manager
-EAPI=5
-HOMEPAGE=http://www.repmgr.org/
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-3
-RDEPEND=>=dev-db/postgresql-9.3[server,static-libs] net-misc/rsync
-SLOT=0
-SRC_URI=http://www.repmgr.org/download/repmgr-3.3.2.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=0a4ca5b13b0554c810d1a68c38e2957f
diff --git a/dev-db/repmgr/Manifest b/dev-db/repmgr/Manifest
new file mode 100644
index 000000000000..163a045c5f8d
--- /dev/null
+++ b/dev-db/repmgr/Manifest
@@ -0,0 +1,5 @@
+DIST repmgr-3.0.1.tar.gz 91724 BLAKE2B be0ac2d54dbaae7a45abaa90ed1a851e22f05a1bb0969a1c5d95e58d7c3f89513cc47555b77cc57bb5cd5baf60c21c9c44375363a757510f07b111ec78f87441 SHA512 5655745df18132ee53ff36f80b3a2bb8caa6cedd8091350464cf343386baa31c47d46b25c171dda0fd1f4c3402babea9864f4557a10659111449a2eb2e1fa2b9
+DIST repmgr-3.3.2.tar.gz 162107 BLAKE2B b1029297fa548241dc5d58bcdcffc0a6f749725eba2d3c7d2cb70b1f46a96b491dc27deb7baf8459e91eae9663df000a1713e80f05e7e0e39afc020b4136c9a4 SHA512 98fba8fc0d9074e496c66762dbec45734fe279f39c9c51adb3e66dca929ac37f66a609789c8c658545856fd81f5afc5b35f6b5e389e52bce8c04ce8c52acd8dd
+EBUILD repmgr-3.0.1.ebuild 1093 BLAKE2B b1bea77367d0485c85243730480fb97acc476606aa0db0587f1e3f2c70557456a489b84c88b70c17d14fb781bd27d505bd416ad57172ee0f56c2f47a67280105 SHA512 20196fa1f8819d40fb9eb2d72b76e4fe152ed1ac4ee4c35fd6b052af19ad8f3704888ffcae008869635661880a9e81076b012a2ecbd271e4553f74db1904930f
+EBUILD repmgr-3.3.2.ebuild 1093 BLAKE2B 8cce7fa79f044e9f5c5d459ee443f4d49b1dedb36e42e62670a39bb824d6e654dfd7c9c072a64dc40fa3ec9b89ea2c18d8f0e55954277877aabc89de781157db SHA512 6412c5cc1a9bde4fc6cac191146c0a529a67016690353b733547270198515b13ac56f9ecc081fb58eebe93b4afd03095001a9b4986e5f2ce55e3175c6893955b
+MISC metadata.xml 224 BLAKE2B e14c5e39ad6d95b550997301c1ff5fe7b690fc3a146c1b0811fd4d0441c09622fb029728028b464152abd3bb36b467dd4299fccd03d666a8755070b90e99d107 SHA512 823068733b2edd6bd6d3d211f2ec383dbc3571bb4f9a57fd0dd0f48633a99e90e4ee979cc82e9a8aca6667b0ebe6a66c1c76551dce88ed25f163ce9a25a9cd41
diff --git a/dev-db/repmgr/metadata.xml b/dev-db/repmgr/metadata.xml
new file mode 100644
index 000000000000..d8c0e2f2db10
--- /dev/null
+++ b/dev-db/repmgr/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>robbat2@gentoo.org</email>
+ </maintainer>
+ </pkgmetadata>
diff --git a/dev-db/repmgr/repmgr-3.0.1.ebuild b/dev-db/repmgr/repmgr-3.0.1.ebuild
new file mode 100644
index 000000000000..7a82e8739f28
--- /dev/null
+++ b/dev-db/repmgr/repmgr-3.0.1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils multilib
+DESCRIPTION="PostgreSQL Replication Manager"
+HOMEPAGE="http://www.repmgr.org/"
+SRC_URI="http://www.repmgr.org/download/${P}.tar.gz"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE=""
+
+DEPEND=">=dev-db/postgresql-9.3[server,static-libs]"
+RDEPEND="${DEPEND}
+ net-misc/rsync"
+
+src_compile() {
+ emake USE_PGXS=1
+}
+
+src_install() {
+ emake DESTDIR="${D}" USE_PGXS=1 install
+ export PGSLOT="$(postgresql-config show)"
+ einfo "PGSLOT: ${PGSLOT}"
+ PGBASEDIR=/usr/$(get_libdir)/postgresql-${PGSLOT}
+ PGBINDIR=${PGBASEDIR}/bin/
+ PGCONTRIB=/usr/share/postgresql-${PGSLOT}/contrib/
+ dodir $PGCONTRIB $PGBINDIR
+ insinto $PGCONTRIB
+ doins sql/repmgr2_repmgr3.sql
+ dosym $PGBINDIR/repmgr /usr/bin/repmgr${PGSLOT//.}
+ dosym $PGBINDIR/repmgrd /usr/bin/repmgrd${PGSLOT//.}
+ dodoc CREDITS HISTORY COPYRIGHT TODO *.md *.rst
+ insinto /etc
+ newins repmgr.conf.sample repmgr.conf
+ fowners postgres:postgres /etc/repmgr.conf
+ ewarn "Remember to modify /etc/repmgr.conf"
+}
diff --git a/dev-db/repmgr/repmgr-3.3.2.ebuild b/dev-db/repmgr/repmgr-3.3.2.ebuild
new file mode 100644
index 000000000000..8aa275358e43
--- /dev/null
+++ b/dev-db/repmgr/repmgr-3.3.2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils multilib
+DESCRIPTION="PostgreSQL Replication Manager"
+HOMEPAGE="http://www.repmgr.org/"
+SRC_URI="http://www.repmgr.org/download/${P}.tar.gz"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE=""
+
+DEPEND=">=dev-db/postgresql-9.3[server,static-libs]"
+RDEPEND="${DEPEND}
+ net-misc/rsync"
+
+src_compile() {
+ emake USE_PGXS=1
+}
+
+src_install() {
+ emake DESTDIR="${D}" USE_PGXS=1 install
+ export PGSLOT="$(postgresql-config show)"
+ einfo "PGSLOT: ${PGSLOT}"
+ PGBASEDIR=/usr/$(get_libdir)/postgresql-${PGSLOT}
+ PGBINDIR=${PGBASEDIR}/bin/
+ PGCONTRIB=/usr/share/postgresql-${PGSLOT}/contrib/
+ dodir $PGCONTRIB $PGBINDIR
+ insinto $PGCONTRIB
+ doins sql/repmgr2_repmgr3.sql
+ dosym $PGBINDIR/repmgr /usr/bin/repmgr${PGSLOT//.}
+ dosym $PGBINDIR/repmgrd /usr/bin/repmgrd${PGSLOT//.}
+ dodoc CREDITS HISTORY COPYRIGHT TODO *.md *.rst
+ insinto /etc
+ newins repmgr.conf.sample repmgr.conf
+ fowners postgres:postgres /etc/repmgr.conf
+ ewarn "Remember to modify /etc/repmgr.conf"
+}
diff --git a/dev-db/rethinkdb-2.3.6 b/dev-db/rethinkdb-2.3.6
deleted file mode 100644
index 8bc9dc2383ff..000000000000
--- a/dev-db/rethinkdb-2.3.6
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile config configure install prepare setup
-DEPEND=>=dev-libs/re2-0.2016.05.01 dev-cpp/gtest dev-libs/boost dev-libs/protobuf-c net-misc/curl sys-libs/libunwind sys-libs/ncurses:= jemalloc? ( >=dev-libs/jemalloc-4.0 ) tcmalloc? ( dev-util/google-perftools ) virtual/pkgconfig
-DESCRIPTION=The open-source database for the realtime web.
-EAPI=6
-HOMEPAGE=https://www.rethinkdb.com
-IUSE=doc +jemalloc tcmalloc
-KEYWORDS=~amd64 ~x86
-LICENSE=AGPL-3
-RDEPEND=>=dev-libs/re2-0.2016.05.01 dev-cpp/gtest dev-libs/boost dev-libs/protobuf-c net-misc/curl sys-libs/libunwind sys-libs/ncurses:= jemalloc? ( >=dev-libs/jemalloc-4.0 ) tcmalloc? ( dev-util/google-perftools )
-REQUIRED_USE=?? ( tcmalloc jemalloc )
-SLOT=0
-SRC_URI=https://download.rethinkdb.com/dist/rethinkdb-2.3.6.tgz
-_eclasses_=multilib 97f470f374f2e94ccab04a2fb21d811e python-utils-r1 7db901256449fef43c3aaa4d486c1c63 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81
-_md5_=05c7696963bf694a436ba925151bad24
diff --git a/dev-db/rethinkdb/Manifest b/dev-db/rethinkdb/Manifest
new file mode 100644
index 000000000000..95b7ff5998e4
--- /dev/null
+++ b/dev-db/rethinkdb/Manifest
@@ -0,0 +1,9 @@
+AUX rethinkdb-2.3.5-gcc6.patch 1588 BLAKE2B 01770dbba244a9f8b914ca25d97aec97c733988c563b1e6438d42a901bfd35e9df7c9713d3f9d8dab23acc832d15a1954c7d1dbe69fbcaabf49a13954cf2cbed SHA512 ac902b1eea3dd5d5c2c76bf9aa1b513553624cccfbda282e9be50589f9f74f01cf4b9968f08b22c139af80e92f4e5a4930364c4af2977359ee95b7587c8f292c
+AUX rethinkdb-2.3.5-libressl.patch 4365 BLAKE2B 83487fb920acc136e37d0823a52de943f629560f37b2b8434ea4599fd4d02e4c548841da3d892da168bf50b640a5562b335252f532cf65e5ac359d9228e87bf2 SHA512 ec18f3916def1f76ef58fcb1f077c8f405e86b3bc0ab660d547d5c4b4e7132495d35b4003d21ff019d660d03a14b205b74d1defb7e69f359903b4a9004f558f8
+AUX rethinkdb.confd 606 BLAKE2B 5fae810572fb4edcc55e0f20fb2c2c8e933fbcb6221ad6a398f74e24f099787f924f489c0185bb899b10e365f8e7d1384f00ceaf61921e88138dbaec5d1b0efe SHA512 3a07f9c78ef96b2ca37fca508ee14a644d3c08612f662ba5260182fbfcceba064d20253f1261f56dc0a2c28d1a4d5e2320872c3c4e7595cb7ab4e202eb28ad42
+AUX rethinkdb.initd 1645 BLAKE2B 762589fe4c4b4a73b88f0777f092c5e4b6746c4da3ac9bb738c114f2dde1bb6457d7d29e3ab7c1097faea72a18e379684d862da8d4cac537a0983caad9353203 SHA512 4449b8a4d25232a1d8f375f161d3801d67d93756bd9b3e2f33b58a87e8a257e2e94e47f8aa4a74b69df3da528ffc349f15198a939552c3b5b9ffaacc18a096a9
+AUX rethinkdb.service 261 BLAKE2B ac1f760843ebe249a5066031b5637c1375f84ee63ee23076dfcd68c3baafcf89e468bae3632e38a07fa49831f48b4751e9190e510ce9f649415edc4a332e5bf2 SHA512 70389797ae79481b7d47b45f1676bd0531bc830a2f2daf7baec87533a7a6a0e67177572bab7d42324fe719f8a056899babc5ab2358a679c6a59899ed1272374b
+AUX rethinkdb.tmpfilesd 43 BLAKE2B a294bf834c883ebca33fb289328007e144d14f0fd9c685f3f10bb209af01100347334d21e49243e83f0cf6d5ac1bcc07f49071dc2017f2606f06c9304f67e296 SHA512 5996f72b8e08aac80285373e8e1b5a664177e9d0e8d13e5638c6b821fe5b7a0368001fbfa9ef3f6709dabf0616abcabea40adc4808d176572f8f99b7a3255bae
+DIST rethinkdb-2.3.6.tgz 76787356 BLAKE2B 291f5ff7f2574329e3c96a838a2b4a5f801fae5221612f97d9c6ac250f07e8b8495ce55e9b59fa6085328ef9b9061f63c90db088175458102d2ab319b08c3be1 SHA512 653177750f7439fa1d61a121e488d578be1eab90f87c7d17ad52b9793d8543f22bbe98f8d501c2ab2d7048c65118096430fe7bde945d87c7a3228905af801af2
+EBUILD rethinkdb-2.3.6.ebuild 3887 BLAKE2B dbc1ed84b0c50ac172d9b8e2e36f2f75ce831f1c9043de5e654908a4a2789442e4c25dede7cf07c94bf4b29002c369e750834edce8596c2605e29898085fce57 SHA512 593edaccf511e503382a40cfd2e637a49706b3cb9f5235fdcb93abed619987042e785fdae795eae97d06b8ca9c630a15b3b79de2b58d3020b26b76660953e5d9
+MISC metadata.xml 584 BLAKE2B 33c0de170a389d6a2a4d705786c5534881977fe779facc6e647b30d2c4c3cd66d7b7bd5669b58623af766b69f5c86c744ef9ba89489bca1a6b5df1912512fd98 SHA512 50641820a4f298ad66ceedafcb388b8f99d2732e0e7de9c0aa412d75482488a9d382845802ea55a451c39890ff5167715f47e3346aad29992fd3bc069d097dae
diff --git a/dev-db/rethinkdb/files/rethinkdb-2.3.5-gcc6.patch b/dev-db/rethinkdb/files/rethinkdb-2.3.5-gcc6.patch
new file mode 100644
index 000000000000..e3d5eac88a45
--- /dev/null
+++ b/dev-db/rethinkdb/files/rethinkdb-2.3.5-gcc6.patch
@@ -0,0 +1,37 @@
+Bug: https://bugs.gentoo.org/594220
+Commit: https://github.com/rethinkdb/rethinkdb/commit/871bd3705a1f29c4ab07a096d562a4b06231a97c
+
+From 871bd3705a1f29c4ab07a096d562a4b06231a97c Mon Sep 17 00:00:00 2001
+From: Etienne Laurin <etienne@atnnn.com>
+Date: Wed, 16 Nov 2016 04:17:41 +0000
+Subject: [PATCH] Workaround for building V8 with GCC 6.2
+
+---
+ mk/support/pkg/v8.sh | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/mk/support/pkg/v8.sh b/mk/support/pkg/v8.sh
+index dc339ad0715..97f4d336c03 100644
+--- a/mk/support/pkg/v8.sh
++++ b/mk/support/pkg/v8.sh
+@@ -44,8 +44,10 @@ pkg_install () {
+ arm*) arch=arm; arch_gypflags=$raspberry_pi_gypflags ;;
+ *) arch=native ;;
+ esac
++
+ mode=release
+- pkg_make $arch.$mode CXX=$CXX LINK=$CXX LINK.target=$CXX GYPFLAGS="-Dwerror= $arch_gypflags" V=1
++ pkg_make $arch.$mode CXX=$CXX LINK=$CXX LINK.target=$CXX GYPFLAGS="-Dwerror= -Dv8_use_snapshot=false $arch_gypflags" V=1
++
+ for lib in `find "$build_dir/out/$arch.$mode" -maxdepth 1 -name \*.a` `find "$build_dir/out/$arch.$mode/obj.target" -name \*.a`; do
+ name=`basename $lib`
+ cp $lib "$install_dir/lib/${name/.$arch/}"
+@@ -56,7 +58,7 @@ pkg_install () {
+ pkg_link-flags () {
+ # These are the necessary libraries recommended by the docs:
+ # https://developers.google.com/v8/get_started#hello
+- for lib in libv8_{base,libbase,snapshot,libplatform}; do
++ for lib in libv8_{base,nosnapshot,libbase,libplatform}; do
+ echo "$install_dir/lib/$lib.a"
+ done
+ for lib in libicu{i18n,uc,data}; do
diff --git a/dev-db/rethinkdb/files/rethinkdb-2.3.5-libressl.patch b/dev-db/rethinkdb/files/rethinkdb-2.3.5-libressl.patch
new file mode 100644
index 000000000000..b79850b0b6b3
--- /dev/null
+++ b/dev-db/rethinkdb/files/rethinkdb-2.3.5-libressl.patch
@@ -0,0 +1,162 @@
+Bug: https://bugs.gentoo.org/594998
+Issue: https://github.com/rethinkdb/rethinkdb/issues/6336
+Patch: https://git.alpinelinux.org/cgit/aports/tree/community/rethinkdb/libressl.patch?id=146fb0d67a1b861d5c776d97f533efe0bb26af7a
+
+From d52a694a806c1a8b6dd4d7d17d0671a96240449a Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 4 Jan 2017 15:31:40 +0100
+Subject: [PATCH] Improve OpenSSL compatibility
+
+Refactor the conditionals for openssl 1.1 support so we avoid multiple
+if/else and add a check for LibreSSL as well.
+---
+ src/crypto/hash.cc | 13 +++++--------
+ src/crypto/hmac.cc | 34 ++++++++++++++++++----------------
+ src/crypto/initialization_guard.cc | 15 ++++++---------
+ 3 files changed, 29 insertions(+), 33 deletions(-)
+
+diff --git a/src/crypto/hash.cc b/src/crypto/hash.cc
+index 4427dfddeb..e035f695fc 100644
+--- a/src/crypto/hash.cc
++++ b/src/crypto/hash.cc
+@@ -8,27 +8,24 @@
+
+ #include "crypto/error.hpp"
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
++#define EVP_MD_CTX_new EVP_MD_CTX_create
++#define EVP_MD_CTX_free EVP_MD_CTX_destroy
++#endif
++
+ namespace crypto {
+
+ class evp_md_ctx_wrapper_t {
+ public:
+ evp_md_ctx_wrapper_t() {
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+- m_evp_md_ctx = EVP_MD_CTX_create();
+-#else
+ m_evp_md_ctx = EVP_MD_CTX_new();
+-#endif
+ if (m_evp_md_ctx == nullptr) {
+ throw openssl_error_t(ERR_get_error());
+ }
+ }
+
+ ~evp_md_ctx_wrapper_t() {
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+- EVP_MD_CTX_destroy(m_evp_md_ctx);
+-#else
+ EVP_MD_CTX_free(m_evp_md_ctx);
+-#endif
+ }
+
+ EVP_MD_CTX *get() {
+diff --git a/src/crypto/hmac.cc b/src/crypto/hmac.cc
+index 2ac4314e24..0e3f91a0c1 100644
+--- a/src/crypto/hmac.cc
++++ b/src/crypto/hmac.cc
+@@ -7,43 +7,45 @@
+
+ #include "crypto/error.hpp"
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
++
++inline HMAC_CTX *HMAC_CTX_new() {
++ HMAC_CTX *tmp = (HMAC_CTX *)OPENSSL_malloc(sizeof(HMAC_CTX));
++ if (tmp)
++ HMAC_CTX_init(tmp);
++ return tmp;
++}
++
++inline void HMAC_CTX_free(HMAC_CTX *ctx) {
++ if (ctx) {
++ HMAC_CTX_cleanup(ctx);
++ OPENSSL_free(ctx);
++ }
++}
++
++#endif
++
+ namespace crypto {
+
+ class hmac_ctx_wrapper_t {
+ public:
+ hmac_ctx_wrapper_t() {
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+- HMAC_CTX_init(&m_hmac_ctx);
+-#else
+ m_hmac_ctx = HMAC_CTX_new();
+ if (m_hmac_ctx == nullptr) {
+ throw openssl_error_t(ERR_get_error());
+ }
+-#endif
+ }
+
+ ~hmac_ctx_wrapper_t() {
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+- HMAC_CTX_cleanup(&m_hmac_ctx);
+-#else
+ HMAC_CTX_free(m_hmac_ctx);
+-#endif
+ }
+
+ HMAC_CTX *get() {
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+- return &m_hmac_ctx;
+-#else
+ return m_hmac_ctx;
+-#endif
+ }
+
+ private:
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+- HMAC_CTX m_hmac_ctx;
+-#else
+ HMAC_CTX *m_hmac_ctx;
+-#endif
+ };
+
+ std::array<unsigned char, SHA256_DIGEST_LENGTH> detail::hmac_sha256(
+diff --git a/src/crypto/initialization_guard.cc b/src/crypto/initialization_guard.cc
+index ba0503efc6..f76ffd96da 100644
+--- a/src/crypto/initialization_guard.cc
++++ b/src/crypto/initialization_guard.cc
+@@ -14,16 +14,17 @@
+ #include "arch/io/concurrency.hpp"
+ #include "arch/runtime/runtime.hpp"
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
++#define OPENSSL_init_ssl(x, y) SSL_library_init()
++#define OPENSSL_init_crypto(x, y) SSL_load_error_strings()
++#define OPENSSL_cleanup ERR_free_strings
++#endif
++
+ namespace crypto {
+
+ initialization_guard_t::initialization_guard_t() {
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+- SSL_library_init();
+- SSL_load_error_strings();
+-#else
+ OPENSSL_init_ssl(0, nullptr);
+ OPENSSL_init_crypto(0, nullptr);
+-#endif
+
+ // Make OpenSSL thread-safe by registering the required callbacks
+ CRYPTO_THREADID_set_callback([](CRYPTO_THREADID *thread_out) {
+@@ -49,11 +50,7 @@ initialization_guard_t::initialization_guard_t() {
+ }
+
+ initialization_guard_t::~initialization_guard_t() {
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+- ERR_free_strings();
+-#else
+ OPENSSL_cleanup();
+-#endif
+ }
+
+ } // namespace crypto
+--
+2.11.0
+
diff --git a/dev-db/rethinkdb/files/rethinkdb.confd b/dev-db/rethinkdb/files/rethinkdb.confd
new file mode 100644
index 000000000000..af65794a44bd
--- /dev/null
+++ b/dev-db/rethinkdb/files/rethinkdb.confd
@@ -0,0 +1,12 @@
+# !! IMPORTANT !!
+#
+# This file is ONLY used to override some of the init script configuration.
+#
+# You should NOT use this file to configure your rethinkdb instance,
+# see the /etc/rethinkdb/default.conf.sample file instead.
+#
+# Available init script modifiers :
+# - config_file : the configuration file to use (default : /etc/rethinkdb/instance.d/<instance-name>.conf)
+# - user : the user used to run your rethinkdb instance (default : rethinkdb)
+# - group : the group used to run your rethinkdb instance (default : rethinkdb)
+# - run_dir : the run directory for your PID files (default : /run/rethinkdb) \ No newline at end of file
diff --git a/dev-db/rethinkdb/files/rethinkdb.initd b/dev-db/rethinkdb/files/rethinkdb.initd
new file mode 100644
index 000000000000..9f55aa49c8e6
--- /dev/null
+++ b/dev-db/rethinkdb/files/rethinkdb.initd
@@ -0,0 +1,49 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+instance_name=${SVCNAME/*.}
+config_file=${config_file:-/etc/rethinkdb/instances.d/${instance_name}.conf}
+run_dir=${run_dir:-/run/rethinkdb}
+
+command="/usr/bin/rethinkdb"
+command_args="--config-file ${config_file}"
+command_background="true"
+pidfile=${run_dir}/${instance_name}.pid
+user=${user:-rethinkdb}
+group=${group:-rethinkdb}
+start_stop_daemon_args="--user ${user} --group ${group} --wait 2000"
+
+depend() {
+ use net
+}
+
+start_pre() {
+ checkpath -d -m 0750 -o "${user}":"${group}" "${run_dir}"
+ if [ "${instance_name}" == "rethinkdb" ]; then
+ eerror "You should not run this default init script directly"
+ eerror "Create a symlink to an instance name"
+ eerror "and create a configuration file in /etc/rethinkdb/instances.d/"
+ eerror "then run this instance init script instead."
+ return 1
+ fi
+ if [ ! -f ${config_file} ]; then
+ eerror "Missing configuration file ${config_file}"
+ return 1
+ else
+ # respect configured directory or set a default
+ directory=$(egrep -e '^directory=' "${config_file}" | cut -d'=' -f2)
+ if [ -z "${directory}" ]; then
+ directory=/var/lib/rethinkdb/instances.d/"${instance_name}"
+ fi
+ checkpath -d -m 0750 -o "${user}":"${group}" "${directory}"
+ command_args="${command_args} --directory ${directory}"
+
+ # respect configured log-file or set a default
+ log_file=$(egrep -e '^log_file=' "${config_file}" | cut -d'=' -f2)
+ if [ -z "${log_file}" ]; then
+ log_file=/var/log/rethinkdb/"${instance_name}".log
+ fi
+ command_args="${command_args} --log-file ${log_file}"
+ fi
+}
diff --git a/dev-db/rethinkdb/files/rethinkdb.service b/dev-db/rethinkdb/files/rethinkdb.service
new file mode 100644
index 000000000000..09645c2ae6ab
--- /dev/null
+++ b/dev-db/rethinkdb/files/rethinkdb.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=RethinkDB database server for instance '%i'
+
+[Service]
+User=rethinkdb
+Group=rethinkdb
+ExecStart=/usr/bin/rethinkdb serve --config-file /etc/rethinkdb/instances.d/%i.conf
+KillMode=process
+PrivateTmp=true
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/dev-db/rethinkdb/files/rethinkdb.tmpfilesd b/dev-db/rethinkdb/files/rethinkdb.tmpfilesd
new file mode 100644
index 000000000000..694501e8ab55
--- /dev/null
+++ b/dev-db/rethinkdb/files/rethinkdb.tmpfilesd
@@ -0,0 +1 @@
+d /run/rethinkdb 0755 rethinkdb rethinkdb - \ No newline at end of file
diff --git a/dev-db/rethinkdb/metadata.xml b/dev-db/rethinkdb/metadata.xml
new file mode 100644
index 000000000000..91224a49a819
--- /dev/null
+++ b/dev-db/rethinkdb/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>ultrabug@gentoo.org</email>
+ <name>Ultrabug</name>
+ </maintainer>
+ <use>
+ <flag name="jemalloc">
+ Use <pkg>dev-libs/jemalloc</pkg> for allocations (default).
+ </flag>
+ <flag name="tcmalloc">
+ Use tcmalloc from <pkg>dev-util/google-perftools</pkg> for allocations.
+ </flag>
+ </use>
+ <upstream>
+ <bugs-to>https://github.com/rethinkdb/rethinkdb/issues</bugs-to>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/rethinkdb/rethinkdb-2.3.6.ebuild b/dev-db/rethinkdb/rethinkdb-2.3.6.ebuild
new file mode 100644
index 000000000000..3c1b8ac0ee83
--- /dev/null
+++ b/dev-db/rethinkdb/rethinkdb-2.3.6.ebuild
@@ -0,0 +1,139 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit python-utils-r1 systemd user
+
+DESCRIPTION="The open-source database for the realtime web."
+HOMEPAGE="https://www.rethinkdb.com"
+LICENSE="AGPL-3"
+SLOT="0"
+SRC_URI="https://download.rethinkdb.com/dist/${P}.tgz"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="doc +jemalloc tcmalloc"
+
+# TODO: rly need some webui libs ?
+DEPEND=">=dev-libs/re2-0.2016.05.01
+ dev-cpp/gtest
+ dev-libs/boost
+ dev-libs/protobuf-c
+ net-misc/curl
+ sys-libs/libunwind
+ sys-libs/ncurses:=
+ jemalloc? ( >=dev-libs/jemalloc-4.0 )
+ tcmalloc? ( dev-util/google-perftools )"
+RDEPEND="${DEPEND}"
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+pkg_setup() {
+ enewgroup rethinkdb
+ enewuser rethinkdb -1 -1 /var/lib/${PN} rethinkdb
+}
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.3.5-gcc6.patch
+ "${FILESDIR}"/${PN}-2.3.5-libressl.patch
+)
+
+src_prepare() {
+ default
+
+ # don't use predefined configuration
+ rm configure.default
+
+ # fix doc and init script auto installation
+ sed -e 's/ install-docs / /g' -e 's/ install-init / /g' -i mk/install.mk || die
+
+ # default config for Gentoo
+ # fix default pid-file path
+ # fix default directory path
+ # fix default log-file path
+ sed -e 's@/var/run/@/run/@g' \
+ -e 's@/var/lib/rethinkdb/@/var/lib/rethinkdb/instances.d/@g' \
+ -e 's@/var/log/rethinkdb@/var/log/rethinkdb/default.log@g' \
+ -i packaging/assets/config/default.conf.sample || die
+
+ # proper CXX declaration
+ sed -e "s/CXX=\$(.*/CXX=$(tc-getCXX)/g" -i configure || die
+
+ # respect user CXXFLAGS optimizations
+ sed -e 's/-O3//g' -i src/build.mk || die
+}
+
+src_configure() {
+ local conf_opts=(
+ --prefix="/usr"
+ --sysconfdir="/etc"
+ --localstatedir="/var"
+ --static=none
+ --dynamic=gtest
+ --dynamic=re2
+ )
+ if use jemalloc; then
+ conf_opts+=(--with-jemalloc)
+ elif use tcmalloc; then
+ conf_opts+=(--with-tcmalloc)
+ else
+ conf_opts+=(--with-system-malloc)
+ fi
+ ./configure "${conf_opts[@]}"
+}
+
+src_compile() {
+ python_export python2.7 EPYTHON
+ emake VERBOSE=1
+}
+
+src_install() {
+ emake DESTDIR="${D}" VERBOSE=1 install
+
+ for x in /var/{lib,log}/${PN}; do
+ keepdir "${x}"
+ fowners rethinkdb:rethinkdb "${x}"
+ done
+
+ newconfd "${FILESDIR}/rethinkdb.confd" rethinkdb
+ newinitd "${FILESDIR}/rethinkdb.initd" rethinkdb
+
+ systemd_newunit "${FILESDIR}/"${PN}.service "rethinkdb@.service"
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd "rethinkdb.conf"
+
+ use doc && dodoc COPYRIGHT NOTES.md README.md
+}
+
+pkg_config() {
+ einfo "This will prepare a new RethinkDB instance. Press Control-C to abort."
+
+ einfo "Enter the name for the new instance: "
+ read instance_name
+ [[ -z "${instance_name}" ]] && die "Invalid instance name"
+
+ local instance_data="/var/lib/rethinkdb/instances.d/${instance_name}"
+ local instance_config="/etc/rethinkdb/instances.d/${instance_name}.conf"
+ if [[ -e "${instance_data}" || -e "${instance_config}" ]]; then
+ eerror "An instance with the same name already exists:"
+ eerror "Check ${instance_data} or ${instance_config}."
+ die "Instance already exists"
+ fi
+
+ /usr/bin/rethinkdb create -d "${instance_data}" &>/dev/null \
+ || die "Creating instance failed"
+ chown -R rethinkdb:rethinkdb "${instance_data}" \
+ || die "Correcting permissions for instance failed"
+ cp /etc/rethinkdb/default.conf.sample "${instance_config}" \
+ || die "Creating configuration file failed"
+ sed -e "s:^# \(directory=\).*$:\1${instance_data}:" \
+ -i "${instance_config}" \
+ || die "Modifying configuration file failed"
+ ln -s /etc/init.d/rethinkdb "/etc/init.d/rethinkdb.${instance_name}" \
+ || die "Creating init script symlink failed"
+
+ einfo "Successfully created the instance at ${instance_data}."
+ einfo "To change the default settings edit the configuration file:"
+ einfo "${instance_config}"
+ einfo " "
+ einfo "To start your instance, run:"
+ einfo "/etc/init.d/rethinkdb.${instance_name} start"
+}
diff --git a/dev-db/rqlite-4.1.0 b/dev-db/rqlite-4.1.0
deleted file mode 100644
index 8cb4a6caca4d..000000000000
--- a/dev-db/rqlite-4.1.0
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile install unpack
-DEPEND=>=dev-lang/go-1.9
-DESCRIPTION=Replicated SQLite using the Raft consensus protocol
-EAPI=6
-HOMEPAGE=https://github.com/rqlite/rqlite http://www.philipotoole.com/tag/rqlite/
-KEYWORDS=~amd64
-LICENSE=MIT
-SLOT=0
-SRC_URI=https://github.com/rqlite/rqlite/archive/v4.1.0.tar.gz -> rqlite-4.1.0.tar.gz https://github.com/Bowery/prompt/archive/753711fea478fa77bb2c83f6ec244b814d4a8bad.tar.gz -> github.com-Bowery-prompt-753711fea478fa77bb2c83f6ec244b814d4a8bad.tar.gz https://github.com/armon/go-metrics/archive/0a12dc6f6b9da6da644031a1b9b5a85478c5ee27.tar.gz -> github.com-armon-go-metrics-0a12dc6f6b9da6da644031a1b9b5a85478c5ee27.tar.gz https://github.com/boltdb/bolt/archive/fa5367d20c994db73282594be0146ab221657943.tar.gz -> github.com-boltdb-bolt-fa5367d20c994db73282594be0146ab221657943.tar.gz https://github.com/hashicorp/go-immutable-radix/archive/8aac2701530899b64bdea735a1de8da899815220.tar.gz -> github.com-hashicorp-go-immutable-radix-8aac2701530899b64bdea735a1de8da899815220.tar.gz https://github.com/hashicorp/go-msgpack/archive/fa3f63826f7c23912c15263591e65d54d080b458.tar.gz -> github.com-hashicorp-go-msgpack-fa3f63826f7c23912c15263591e65d54d080b458.tar.gz https://github.com/hashicorp/golang-lru/archive/0a025b7e63adc15a622f29b0b2c4c3848243bbf6.tar.gz -> github.com-hashicorp-golang-lru-0a025b7e63adc15a622f29b0b2c4c3848243bbf6.tar.gz https://github.com/hashicorp/raft/archive/3b4d64b29e422f04808b905005eb5a38bf9150e8.tar.gz -> github.com-hashicorp-raft-3b4d64b29e422f04808b905005eb5a38bf9150e8.tar.gz https://github.com/hashicorp/raft-boltdb/archive/df631556b57507bd5d0ed4f87468fd93ab025bef.tar.gz -> github.com-hashicorp-raft-boltdb-df631556b57507bd5d0ed4f87468fd93ab025bef.tar.gz https://github.com/labstack/gommon/archive/779b8a8b9850a97acba6a3fe20feb628c39e17c1.tar.gz -> github.com-labstack-gommon-779b8a8b9850a97acba6a3fe20feb628c39e17c1.tar.gz https://github.com/mattn/go-colorable/archive/ad5389df28cdac544c99bd7b9161a0b5b6ca9d1b.tar.gz -> github.com-mattn-go-colorable-ad5389df28cdac544c99bd7b9161a0b5b6ca9d1b.tar.gz https://github.com/mattn/go-isatty/archive/fc9e8d8ef48496124e79ae0df75490096eccf6fe.tar.gz -> github.com-mattn-go-isatty-fc9e8d8ef48496124e79ae0df75490096eccf6fe.tar.gz https://github.com/mattn/go-sqlite3/archive/05548ff55570cdb9ac72ff4a25a3b5e77a6fb7e5.tar.gz -> github.com-mattn-go-sqlite3-05548ff55570cdb9ac72ff4a25a3b5e77a6fb7e5.tar.gz https://github.com/mkideal/cli/archive/a9c1104566927924fdb041d198f05617492913f9.tar.gz -> github.com-mkideal-cli-a9c1104566927924fdb041d198f05617492913f9.tar.gz https://github.com/mkideal/pkg/archive/3e188c9e7ecc83d0fe7040a9161ce3c67885470d.tar.gz -> github.com-mkideal-pkg-3e188c9e7ecc83d0fe7040a9161ce3c67885470d.tar.gz https://github.com/golang/net/archive/859d1a86bb617c0c20d154590c3c5d3fcb670b07.tar.gz -> github.com-golang-net-859d1a86bb617c0c20d154590c3c5d3fcb670b07.tar.gz https://github.com/golang/sys/archive/062cd7e4e68206d8bab9b18396626e855c992658.tar.gz -> github.com-golang-sys-062cd7e4e68206d8bab9b18396626e855c992658.tar.gz
-_eclasses_=golang-base d4e3a3f895016e5c9d7afb1a33e7cf3c golang-vcs-snapshot 913580335becddd3ebecefe852e47536
-_md5_=63b15582eb2bf258dd8f92912aaa8453
diff --git a/dev-db/rqlite-4.3.0 b/dev-db/rqlite-4.3.0
deleted file mode 100644
index 0eef45e7e0fa..000000000000
--- a/dev-db/rqlite-4.3.0
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile install unpack
-DEPEND=>=dev-lang/go-1.9
-DESCRIPTION=Replicated SQLite using the Raft consensus protocol
-EAPI=6
-HOMEPAGE=https://github.com/rqlite/rqlite http://www.philipotoole.com/tag/rqlite/
-KEYWORDS=~amd64
-LICENSE=MIT
-SLOT=0
-SRC_URI=https://github.com/rqlite/rqlite/archive/v4.3.0.tar.gz -> rqlite-4.3.0.tar.gz https://github.com/Bowery/prompt/archive/94b504f42fdd503acc3b3c79ec2b517d90e0de8a.tar.gz -> github.com-Bowery-prompt-94b504f42fdd503acc3b3c79ec2b517d90e0de8a.tar.gz https://github.com/armon/go-metrics/archive/783273d703149aaeb9897cf58613d5af48861c25.tar.gz -> github.com-armon-go-metrics-783273d703149aaeb9897cf58613d5af48861c25.tar.gz https://github.com/boltdb/bolt/archive/fd01fc79c553a8e99d512a07e8e0c63d4a3ccfc5.tar.gz -> github.com-boltdb-bolt-fd01fc79c553a8e99d512a07e8e0c63d4a3ccfc5.tar.gz https://github.com/hashicorp/go-immutable-radix/archive/7f3cd4390caab3250a57f30efdb2a65dd7649ecf.tar.gz -> github.com-hashicorp-go-immutable-radix-7f3cd4390caab3250a57f30efdb2a65dd7649ecf.tar.gz https://github.com/hashicorp/go-msgpack/archive/fa3f63826f7c23912c15263591e65d54d080b458.tar.gz -> github.com-hashicorp-go-msgpack-fa3f63826f7c23912c15263591e65d54d080b458.tar.gz https://github.com/hashicorp/golang-lru/archive/0fb14efe8c47ae851c0034ed7a448854d3d34cf3.tar.gz -> github.com-hashicorp-golang-lru-0fb14efe8c47ae851c0034ed7a448854d3d34cf3.tar.gz https://github.com/labstack/gommon/archive/0a22a0df01a7c84944c607e8a6e91cfe421ea7ed.tar.gz -> github.com-labstack-gommon-0a22a0df01a7c84944c607e8a6e91cfe421ea7ed.tar.gz https://github.com/mattn/go-colorable/archive/efa589957cd060542a26d2dd7832fd6a6c6c3ade.tar.gz -> github.com-mattn-go-colorable-efa589957cd060542a26d2dd7832fd6a6c6c3ade.tar.gz https://github.com/mattn/go-isatty/archive/6ca4dbf54d38eea1a992b3c722a76a5d1c4cb25c.tar.gz -> github.com-mattn-go-isatty-6ca4dbf54d38eea1a992b3c722a76a5d1c4cb25c.tar.gz https://github.com/mattn/go-sqlite3/archive/b8b158db6fdb72096ff3510373df0f61ea8de773.tar.gz -> github.com-mattn-go-sqlite3-b8b158db6fdb72096ff3510373df0f61ea8de773.tar.gz https://github.com/mkideal/cli/archive/a9c1104566927924fdb041d198f05617492913f9.tar.gz -> github.com-mkideal-cli-a9c1104566927924fdb041d198f05617492913f9.tar.gz https://github.com/mkideal/pkg/archive/3e188c9e7ecc83d0fe7040a9161ce3c67885470d.tar.gz -> github.com-mkideal-pkg-3e188c9e7ecc83d0fe7040a9161ce3c67885470d.tar.gz https://github.com/golang/crypto/archive/a3beeb748656e13e54256fd2cde19e058f41f60f.tar.gz -> github.com-golang-crypto-a3beeb748656e13e54256fd2cde19e058f41f60f.tar.gz https://github.com/golang/sys/archive/c11f84a56e43e20a78cee75a7c034031ecf57d1f.tar.gz -> github.com-golang-sys-c11f84a56e43e20a78cee75a7c034031ecf57d1f.tar.gz
-_eclasses_=golang-base d4e3a3f895016e5c9d7afb1a33e7cf3c golang-vcs-snapshot 913580335becddd3ebecefe852e47536
-_md5_=fe75ae7f9b9adf1ab968f9767774b14f
diff --git a/dev-db/rqlite/Manifest b/dev-db/rqlite/Manifest
new file mode 100644
index 000000000000..a04a4898fb3a
--- /dev/null
+++ b/dev-db/rqlite/Manifest
@@ -0,0 +1,32 @@
+DIST github.com-Bowery-prompt-753711fea478fa77bb2c83f6ec244b814d4a8bad.tar.gz 11327 BLAKE2B c0cc0b21d1b554a603c5f1621569984768ee63e8adc10ba947e114e0e33f24fd4356bbb4e6635ba68d5609750fa225e75a8d6b3e1e7e58b1fd18be03cacc2d6f SHA512 a365bc6542080e6d6ddf3736923e58552684cd0d204e78fc59993f39eef46a073e4c30d980052c2b6bf5175985b59ac7b4f762f8aa1a15db39481466696b8a28
+DIST github.com-Bowery-prompt-94b504f42fdd503acc3b3c79ec2b517d90e0de8a.tar.gz 11343 BLAKE2B cc2666f68db87466e66f30840b173ff7fc8cb3b55b7fb0ee01fb0c0e1f90cbe582ab04e40b2484d115e765d2123da5c01b2a83800dc568bc8567f0f3e1e8f7f9 SHA512 51013116829fd7287535effed3f808351dc1a664429fb4a8c87a17e637b77654013a65022c5254ab2df3d8a1f2421dd98ef4e03263e84ee7a79d8f7070a471d0
+DIST github.com-armon-go-metrics-0a12dc6f6b9da6da644031a1b9b5a85478c5ee27.tar.gz 21391 BLAKE2B 104cea2e49b19686aa8acfd7b1d487502a4df91aec8cf2789114d20ec157a4deca4ba6f2e809ed51dd9c8567aed13b43d1c93db90732b8619a739260ec1dca2a SHA512 d93d2ed9068ba0e65a8477f8edbd02b39be99b015adb881558ff878e04a0c7730c0758ba91e6fe76009bb9e41ece3c8ded2cbdfcf194df8058a6c46489079b2d
+DIST github.com-armon-go-metrics-783273d703149aaeb9897cf58613d5af48861c25.tar.gz 22373 BLAKE2B dd4daca721ac0643f6ba4300966217ec57cb5d21c495029fb356badacfb4032a275807d7498a8fd1bd97315e70ee0c2d3501ae7e3bb072feea94787c5ca8f608 SHA512 a1a245cd9ccc07af7fc30bff358819389a18d1be21179626a2e79f0ccb82d71f7a4ad009d8919bbdfb547176346716c3f0b1f764f0e75171381a56aeb066685e
+DIST github.com-boltdb-bolt-fa5367d20c994db73282594be0146ab221657943.tar.gz 83957 BLAKE2B 14c29a394454944dde249bc4a135395f4382500557aeae3d2ad63500acb0271c7cf41fcdbc2463fc73918f7cfc7cd8fdcbc573bef9a4ae17b150d8064a1b6da3 SHA512 d877c68da702a5bd0cbec5d7f7c2d2f6d58e1fe1dd0071b095d1ba1d12e5a9844e53dbef7d4855e56852e4669c976dc0705358ad8ee5466e49cc4a2a5ca5202a
+DIST github.com-boltdb-bolt-fd01fc79c553a8e99d512a07e8e0c63d4a3ccfc5.tar.gz 83950 BLAKE2B 04b9aa5632ccf231f319e8d25309f024a2a60c84e8eafac8b4bc16152fb7581d1a563903034e47668d7e9c61fdd6828294342c5b84d843e70367e578864ba4dd SHA512 5effccc7dadb214ef5ce53092db48c04ae25a388962c58732190c34f4537b579ef645ae579df5d0de30645574ff753486a6f743bf4fd58ec1d2aff76ba537694
+DIST github.com-golang-crypto-a3beeb748656e13e54256fd2cde19e058f41f60f.tar.gz 1611181 BLAKE2B 2d2d8d25d30e1e517b2e4e79bc5e6b2121d5420739cf7eaf1838b2cde7bf01e122d272dc125f739fc87cb0a898175ec57a783187f6500aff19b4886e42d2b746 SHA512 a0255fdb06727d660e7c3f6f7c23cb3a14b6341c2f1745f78fb967864ecac980d9ec6619b22da4309078ab95643955e1f896ef645c40247fb931dd21da4c410d
+DIST github.com-golang-net-859d1a86bb617c0c20d154590c3c5d3fcb670b07.tar.gz 920336 BLAKE2B 4a80a4cbf866ff64c699860bef3a971b6ba6bc002e85106e2268b494f40b8a87c61f923c70818e4dc59bf898986393a8c8e972c50152a3abc48545d780ee5474 SHA512 49ccb64c9b675460d12ea6d0456bb1124a92d56e70b04398d14b33dd5879c4e188dcc3e6c79c1aa6f491507f854911a9298fbc61aed60cbdab0205b6995bb4a3
+DIST github.com-golang-sys-062cd7e4e68206d8bab9b18396626e855c992658.tar.gz 769037 BLAKE2B 5b49fd85030ec5f4ee28a8a354f614797a1203ef98e039fd4c70f9dd228c528e6c71c763ad7cd65aefc83c4ec235ad2a0911e6915aca63ca4431e28aee6a93a8 SHA512 fd7ce44eef01931b5017d9054858d9f3197b03e5e824ec1e4377b2e1cc11beceb5e3fa2fcf5222e7d8624f054608be4e9edfe47261ecdb60ebd3156124ccd6e8
+DIST github.com-golang-sys-c11f84a56e43e20a78cee75a7c034031ecf57d1f.tar.gz 971425 BLAKE2B 2b052ad1211863234b767d77b3757b93a755d5f533e677247b2c63bb16a9c1f9caa85d3c507f86f30c568bf2bc17f6bd7766a389364d3c684c3c0f508efa4047 SHA512 40937a901f32b6e1ddf0350a804bdc93b2a17c1c2bb42c09f6522c87c465b8ac4dd3e68057ef7a99b21894ee4b31583a51b49c484cdcd77ff4e195e0fcc8bcc5
+DIST github.com-hashicorp-go-immutable-radix-7f3cd4390caab3250a57f30efdb2a65dd7649ecf.tar.gz 18972 BLAKE2B b66c34ca0286353bd19154c735a8a2cc3d6469c68cb4a0a58a7709c29d472d37506366e56c2a6de2e1a6685bb312aa79c63100704668063c4297e9e70df980ad SHA512 3b237511fca5c8bf17f718cc8e71479e839be8db3b71a1abb418bd25fe0ed05d80e954a231093cc7f13bacbcf2a98b2d8d82b2586cbc3a7d6ab5aca75c817a1f
+DIST github.com-hashicorp-go-immutable-radix-8aac2701530899b64bdea735a1de8da899815220.tar.gz 18806 BLAKE2B 4936583140ea8b13bbcde70a09cd23f8b8f47eb6baf12f945efa3d0d15383bc6d9cf4854948545f119504b6379c580153f071f9f2fa47e76182657ea77e9be53 SHA512 6b748a06d21972f9011cd85e9128cc27ac67539f8a1be021733b25055d8c6c731a393078ee0418a1929e35cd701bba128a96053cd77fc0a01af51ee58baa5c36
+DIST github.com-hashicorp-go-msgpack-fa3f63826f7c23912c15263591e65d54d080b458.tar.gz 49488 BLAKE2B 03d54419cc6fde9b6d51935d49ba2828471a06615e556355352837cc962608144afc505fa31375c0a1907c68752a633bd13618ae849141f853c0d83f4824ae38 SHA512 7e60a122cca007bf5455d6e15f77c24eaa5739deedc9e0c158282249e84698f873628bffa9eb7d23c1c59bda7632b1968ca770c8e1796e2d50750ac86e80fcb2
+DIST github.com-hashicorp-golang-lru-0a025b7e63adc15a622f29b0b2c4c3848243bbf6.tar.gz 12306 BLAKE2B 75d8fdf662dbff8db32bad9c45e132963bb6a78d218906ecacadba39716d8a38e0b40e95dce54888a3b421ad78a1622b2abc161d98d7556446cc62472bd35cf3 SHA512 59a53fd3613e16343982ab802a85c9c70feb708c82c687e52712f2c3f3698f1c6799fb7d5c5d95154347301a38223dd19756a580a60b8054783e05e667ce11d7
+DIST github.com-hashicorp-golang-lru-0fb14efe8c47ae851c0034ed7a448854d3d34cf3.tar.gz 12907 BLAKE2B 8c9abac355ad96db8511807b8ad01f62a0748801328e004d90776f3a3093d7ad08ec07f4fcf48d801f3bd233df3e13dc179fc74736bce0b8a201407cdd7abd68 SHA512 ad1b89546de54da93c81648b8bce3cf6dbb0b4595df670ea569f2f5fc9e297c6465f280e6ef443cafdb09430767fad70d4020069b512b496d6157f72499a697c
+DIST github.com-hashicorp-raft-3b4d64b29e422f04808b905005eb5a38bf9150e8.tar.gz 68568 BLAKE2B 61428f4943938eb0d0e0956af0fbc050713a54cf7118bca6ec8dde77b1b39d1ea8fc4b40703bb5902b2a9c3217e00d8a3a8ad21a599e13efee698c06221909c4 SHA512 aead9470f68c32bc80dba0e4eab922e0ef13e2d12da161b570ba245a9f1e3dd23fd5af25e6352120b2ac152f3d8e6dcec371c651e70b86f8401d6c0dbd641938
+DIST github.com-hashicorp-raft-boltdb-df631556b57507bd5d0ed4f87468fd93ab025bef.tar.gz 9828 BLAKE2B 3b695cd0bf85236e2101341c4711420ff8b54af1a1034a713a4964ca410bd6404951069d6e8784550104a54e2ba7db3ad3d8f877a0974ea4bef86b08f8c517df SHA512 1b09821dd5eec9781298ca1e40c19598e5c7e6dba7bcf279bb73c79712b39429eace238a669cac6a6db7196ec72c2d4eb682353efc0813541980cb71dddeba5e
+DIST github.com-labstack-gommon-0a22a0df01a7c84944c607e8a6e91cfe421ea7ed.tar.gz 10631 BLAKE2B 6ea84f719457d91405bf640c03f4081b4e117f75cad299fd7bad5a6d13baeca56e243c38f50f5db4eefa135d5eb49a518038057e7e7b5c05908c5d2938e72d95 SHA512 d3bfe9329ae61ca8bfb842d4af95151eadbe8c3c13c53cb12c0c081dc0fb6fa6907ac11072bb58f6576d497f8cdd4fe026f5e473927729430e0320dac1c56956
+DIST github.com-labstack-gommon-779b8a8b9850a97acba6a3fe20feb628c39e17c1.tar.gz 10150 BLAKE2B c43fd9286274fa3db0fea17bfd122475c9125c0f5505483467b63d760ce00fb78efcd82de4c55f2052d111f9d655e28a64db570f8da2549e3f9f7ecfa6e59a79 SHA512 432ee53a8ec8a1278ef8348151bb80c2323774861eefb85e54bc45b6ed5cf7c3a801187e072a7016929f8682cf653ee1a12ca31e44ab87ba524812eec1bc1e08
+DIST github.com-mattn-go-colorable-ad5389df28cdac544c99bd7b9161a0b5b6ca9d1b.tar.gz 8089 BLAKE2B 315c9f5338909f59c10492e9a86bea26d6d039bf251657caffd998d07b4e3de5961d9d73b7f8b177af733207d149723578e61f93b1b8f72b186cb6c3cbae0e55 SHA512 0f458e6acfec266b58cd458bd05bc04617df0ef223ffa6a6c374decd29555a78441f3a17df7b5f782d96a25f56bcece061407e9778e25ceafeedafa014a45bb4
+DIST github.com-mattn-go-colorable-efa589957cd060542a26d2dd7832fd6a6c6c3ade.tar.gz 8208 BLAKE2B 4cd558c21bd893f17280c05550015f2f8148344d50dbd958f7cc7fa68d06223d0e732ace81c445f0091357d6d0a1564efd7d246af5cf432de0d8728f5cb1d250 SHA512 fc274e5699b637e953b31e5014b759f0367d925c289f9eabd7538eaf916ec8a7613e3eaf6d8f9294869f54e943448cca21130daccf1717525aa123761026902e
+DIST github.com-mattn-go-isatty-6ca4dbf54d38eea1a992b3c722a76a5d1c4cb25c.tar.gz 3383 BLAKE2B 2034048312c4abc88a813d8ad83013f57e9a23477ecd847e92c3cf30e909e209f9a65acacf41d80b3569770c1400e338115c42fd48d358b66f68ccde69a9008d SHA512 1714a9e9ac7ad2ff30825328723b4c9a5c5f7544e876c6fe79b84c72ba1dd9bfcd6ded2308f6fcae8f1c893d22b84d6c72dfd30742edaa2a5b0d8e88eee27421
+DIST github.com-mattn-go-isatty-fc9e8d8ef48496124e79ae0df75490096eccf6fe.tar.gz 3262 BLAKE2B 6b64f8ae69fdd8beb3cb783a80bfc827af3797903065de3bc3253c90fbf0a2b706c3a5bd63560b19d765d6a9e0b19413436a9f999ac3c483075e9431e0971eab SHA512 8627d22f5ee5a087744bbf4dd391f8f87ebabe8940564206935dec9e406e40a98976479ea973e61afeb1774df211992cd61c67ee198d546e22fbf60826b64ac9
+DIST github.com-mattn-go-sqlite3-05548ff55570cdb9ac72ff4a25a3b5e77a6fb7e5.tar.gz 2030395 BLAKE2B 4503ca9d406cff857639b488da345aa9cd841acd6f41bfa97c25b97b494dee972f00d88ab77b3bb3c7013de6a216afd2912008afc503924c4d2c98e03f318807 SHA512 0899042c28f4dec19f830155d1da03830ddf6c03c96fc10190184f1ad2ed5eb2d69b5b989c40f489846201ba664ed80554f76a03c9e1e291d7fb9636967aba52
+DIST github.com-mattn-go-sqlite3-b8b158db6fdb72096ff3510373df0f61ea8de773.tar.gz 2122948 BLAKE2B 4f1535c0eb1b834bd4c0a97618737baed80ecb007cd69089279cb28ae87e3cf4323af83b52e1436c0f7a41eaeebdba671d5a3f00ce9729347856ea398d0972e5 SHA512 6cd20f78a5cd776fdf613c4d894257fe71424e7bb77d293873585e6a391c526305f4747ede509a3c99475173a056f31450e025bd26d2bcc72fdf3fec1c1b250e
+DIST github.com-mkideal-cli-a9c1104566927924fdb041d198f05617492913f9.tar.gz 43950 BLAKE2B 54dccb6118338884784dc36f6c0b6e2ae249b322691e57ed94c04a5a2f35c1362ed240a9b4385abbef9a40a6d6bc6fde573259edef7772172d7ce927e6fcfe51 SHA512 ced5936b659673383295da6a55c21767ed21ba91ca6aed0fd27e8cd317026bf1bcb29da9e7d714f93fe783aa54a9e58d435c56aa84e8ff06c59a333dc9150499
+DIST github.com-mkideal-pkg-3e188c9e7ecc83d0fe7040a9161ce3c67885470d.tar.gz 69219 BLAKE2B 6df0a553da3a225352c4e712c2fb7f12b73850e0e1c9d0aaf9eb0dc917c36a026a10db1b8b23d45070567d209a6298fef84e794347fdd1951d0ec421fa1c72d4 SHA512 1c6b5cd345da17f8c2691a4f132bcb8ce1e794db54ecdcf2bf20392bb2f3195db6c1579ffd220bb21f121ccbec0c8c9ea4160a4a6c38734c68d1e163622ec1cd
+DIST rqlite-4.1.0.tar.gz 284026 BLAKE2B 13f7bc40e31cff56707b889b94923e85d70f115545341df2d00aac4ee594d7d0f6286e602d19b4d46f7f6f3d13384349d0c3aebc8023f4712f1ddb9545e71590 SHA512 ea1b5fab399728b970813c913669245320eddcde658d0a57ab7525e5de9cbfd60ee61dd5facd98ff89f8dfcda25948a5b22d4cdd6f34c28a8e8aaf45d8cd0168
+DIST rqlite-4.3.0.tar.gz 363060 BLAKE2B 7384ab6311eb3e042aa156a3879090d0c7efa1a29aba463d844adc693630f256bc91ac52ba765474e6bfa192ca06538c9d22a3f1503b76dcdcc83dca4d1d6fb2 SHA512 c1dc8f24ea1295d7495e59a53308480c8c21203fd6cbd9aca9f5c88530e4d0418b9b6d8d535f0e7ec3fec633d94b2e6a16ba063b3d342688e935ae2340e31cab
+EBUILD rqlite-4.1.0.ebuild 1903 BLAKE2B 5a480462b3a069d8ecbbe8e30b93e49c697cfdf64318b22ed960de582763df213485e7acaa637938de23280d2ed1ab0d6ebaac83b7235ddaa45bbbb70c1b8649 SHA512 0fbb73656e7fcc926f906019abafe8a2af5f0290986c650a736c23682616db281ccc61051638377598830b53af5d7e087e03e9f13c61b73898c5286f48dd2b61
+EBUILD rqlite-4.3.0.ebuild 2005 BLAKE2B 0e96efd821181471a086b09e3bbadf38f63927b92b236d77de77e1e2980a3e31dc2bd28d53091e0a039a14d27e585296078a44b611940022845b80ba7338e7a3 SHA512 e2e336ad48a7d1ea22526ce92f93a3a2ae65651bce327550132952c9c6a2e48103bb4a285aab01e5e4b6d48aa2065c6a1364595a6c4f56909dfd421af4c9ba20
+MISC metadata.xml 304 BLAKE2B aa848abaaeaf54cb85ddb9600c6044a9ed2f3e446f3131f3725431b3a3eefa0058a8c962c708f1735dd97caee1c25a461da3f6fd622b521ad36234157580f6f4 SHA512 3e536da8ed6a50cbffad3574074029e67b25627d80050f388742e7b086ffa73e6fd93fa307cc267bc23b4eca080ddefa7845a3ac90ad3736862362f9c0e29c92
diff --git a/dev-db/rqlite/metadata.xml b/dev-db/rqlite/metadata.xml
new file mode 100644
index 000000000000..90df09b8fd4d
--- /dev/null
+++ b/dev-db/rqlite/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>zmedico@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">rqlite/rqlite</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/rqlite/rqlite-4.1.0.ebuild b/dev-db/rqlite/rqlite-4.1.0.ebuild
new file mode 100644
index 000000000000..a7408b506076
--- /dev/null
+++ b/dev-db/rqlite/rqlite-4.1.0.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGO_PN="github.com/rqlite/rqlite"
+EGO_VENDOR=(
+ "github.com/Bowery/prompt 753711fea478fa77bb2c83f6ec244b814d4a8bad"
+ "github.com/armon/go-metrics 0a12dc6f6b9da6da644031a1b9b5a85478c5ee27"
+ "github.com/boltdb/bolt fa5367d20c994db73282594be0146ab221657943"
+ "github.com/hashicorp/go-immutable-radix 8aac2701530899b64bdea735a1de8da899815220"
+ "github.com/hashicorp/go-msgpack fa3f63826f7c23912c15263591e65d54d080b458"
+ "github.com/hashicorp/golang-lru 0a025b7e63adc15a622f29b0b2c4c3848243bbf6"
+ "github.com/hashicorp/raft 3b4d64b29e422f04808b905005eb5a38bf9150e8"
+ "github.com/hashicorp/raft-boltdb df631556b57507bd5d0ed4f87468fd93ab025bef"
+ "github.com/labstack/gommon 779b8a8b9850a97acba6a3fe20feb628c39e17c1"
+ "github.com/mattn/go-colorable ad5389df28cdac544c99bd7b9161a0b5b6ca9d1b"
+ "github.com/mattn/go-isatty fc9e8d8ef48496124e79ae0df75490096eccf6fe"
+ "github.com/mattn/go-sqlite3 05548ff55570cdb9ac72ff4a25a3b5e77a6fb7e5"
+ "github.com/mkideal/cli a9c1104566927924fdb041d198f05617492913f9"
+ "github.com/mkideal/pkg 3e188c9e7ecc83d0fe7040a9161ce3c67885470d"
+ "golang.org/x/net 859d1a86bb617c0c20d154590c3c5d3fcb670b07 github.com/golang/net"
+ "golang.org/x/sys 062cd7e4e68206d8bab9b18396626e855c992658 github.com/golang/sys"
+)
+
+inherit golang-vcs-snapshot
+
+KEYWORDS="~amd64"
+DESCRIPTION="Replicated SQLite using the Raft consensus protocol"
+
+HOMEPAGE="https://github.com/rqlite/rqlite http://www.philipotoole.com/tag/rqlite/"
+LICENSE="MIT"
+SLOT="0"
+IUSE=""
+EGIT_REPO_URI="https://${EGO_PN}.git"
+EGIT_COMMIT="v${PV}"
+SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz
+ ${EGO_VENDOR_URI}"
+
+src_compile() {
+ GOPATH="${S}" \
+ go install -v -work -x ${EGO_BUILD_FLAGS} ${EGO_PN}/cmd/... || die
+}
+
+src_install() {
+ dobin bin/${PN}{,d}
+ dodoc "${S}/src/${EGO_PN}/"*.md
+}
diff --git a/dev-db/rqlite/rqlite-4.3.0.ebuild b/dev-db/rqlite/rqlite-4.3.0.ebuild
new file mode 100644
index 000000000000..52a09d755d7c
--- /dev/null
+++ b/dev-db/rqlite/rqlite-4.3.0.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGO_PN="github.com/rqlite/rqlite"
+EGO_VENDOR=(
+ "github.com/Bowery/prompt 94b504f42fdd503acc3b3c79ec2b517d90e0de8a"
+ "github.com/armon/go-metrics 783273d703149aaeb9897cf58613d5af48861c25"
+ "github.com/boltdb/bolt fd01fc79c553a8e99d512a07e8e0c63d4a3ccfc5"
+ "github.com/hashicorp/go-immutable-radix 7f3cd4390caab3250a57f30efdb2a65dd7649ecf"
+ "github.com/hashicorp/go-msgpack fa3f63826f7c23912c15263591e65d54d080b458"
+ "github.com/hashicorp/golang-lru 0fb14efe8c47ae851c0034ed7a448854d3d34cf3"
+ "github.com/labstack/gommon 0a22a0df01a7c84944c607e8a6e91cfe421ea7ed"
+ "github.com/mattn/go-colorable efa589957cd060542a26d2dd7832fd6a6c6c3ade"
+ "github.com/mattn/go-isatty 6ca4dbf54d38eea1a992b3c722a76a5d1c4cb25c"
+ "github.com/mattn/go-sqlite3 b8b158db6fdb72096ff3510373df0f61ea8de773"
+ "github.com/mkideal/cli a9c1104566927924fdb041d198f05617492913f9"
+ "github.com/mkideal/pkg 3e188c9e7ecc83d0fe7040a9161ce3c67885470d"
+ "golang.org/x/crypto a3beeb748656e13e54256fd2cde19e058f41f60f github.com/golang/crypto"
+ "golang.org/x/sys c11f84a56e43e20a78cee75a7c034031ecf57d1f github.com/golang/sys"
+)
+
+inherit golang-vcs-snapshot
+
+KEYWORDS="~amd64"
+DESCRIPTION="Replicated SQLite using the Raft consensus protocol"
+
+HOMEPAGE="https://github.com/rqlite/rqlite http://www.philipotoole.com/tag/rqlite/"
+LICENSE="MIT"
+SLOT="0"
+IUSE=""
+EGIT_REPO_URI="https://${EGO_PN}.git"
+EGIT_COMMIT="77e345b97c5597c1ef86e75e690539de369b8dd3"
+SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ ${EGO_VENDOR_URI}"
+S="${WORKDIR}/${P}/src/${EGO_PN}"
+
+src_compile() {
+ GOPATH="${WORKDIR}/${P}" \
+ GOBIN="${WORKDIR}/${P}/bin" \
+ go install \
+ -ldflags="-X main.version=v${PV} -X main.branch=master -X main.commit=${EGIT_COMMIT} -X main.buildtime=$(date +%Y-%m-%dT%T%z)" \
+ -v -work -x ${EGO_BUILD_FLAGS} ${EGO_PN}/cmd/... || die
+}
+
+src_install() {
+ dobin "${WORKDIR}/${P}/bin"/${PN}{,d}
+ dodoc -r *.md DOC
+}
diff --git a/dev-db/sadisplay-0.4.8 b/dev-db/sadisplay-0.4.8
deleted file mode 100644
index 0b0d986eefc7..000000000000
--- a/dev-db/sadisplay-0.4.8
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-python/setuptools[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] test? ( dev-python/sqlalchemy[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] ) python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_targets_python3_4? ( dev-lang/python:3.4 ) python_targets_python3_5? ( dev-lang/python:3.5 ) python_targets_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)]
-DESCRIPTION=SqlAlchemy schema display script
-EAPI=6
-HOMEPAGE=https://bitbucket.org/estin/sadisplay/wiki/Home
-IUSE=test python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 python_targets_python3_6
-KEYWORDS=~amd64 ~x86
-LICENSE=BSD
-RDEPEND=dev-python/sqlalchemy[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_targets_python3_4? ( dev-lang/python:3.4 ) python_targets_python3_5? ( dev-lang/python:3.5 ) python_targets_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)]
-REQUIRED_USE=|| ( python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 python_targets_python3_6 )
-SLOT=0
-SRC_URI=https://bitbucket.org/estin/sadisplay/get/d67d12894ebd.tar.gz -> sadisplay-0.4.8.tar.gz
-_eclasses_=distutils-r1 63fea93ca1cc4fdc5fa2247afc4e3a15 multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 python-r1 0b5829eb6369d7af3a834b6eed7b7107 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=66822bcc5e4d8ec58cce7efe9e81841e
diff --git a/dev-db/sadisplay/Manifest b/dev-db/sadisplay/Manifest
new file mode 100644
index 000000000000..5398f713845d
--- /dev/null
+++ b/dev-db/sadisplay/Manifest
@@ -0,0 +1,3 @@
+DIST sadisplay-0.4.8.tar.gz 9063 BLAKE2B a6b965d6703102000510ae6100a6bb4d0ad5b42543408aea520476128897bf8f38fda276ea39ac066e9b6621ecf2634d20e82ca21543b8c0bb472ac5d804b2a1 SHA512 c3707f90a20028fdb164caa3037f4ffff3da3f4bc763c400f8204dae4d7d71862e65902892d8ad0fe3bbe636cf87e4f96a475e01e8ce0ac55bed4e17073e3308
+EBUILD sadisplay-0.4.8.ebuild 664 BLAKE2B b4484af68f6bee2a285a52aff2288ec2fc16bacec5f9731c538bb0a49205791c4f6a3633dd48f8c654a30fb73a1b5a1b7bee620edca87dc573b4afbd891e388e SHA512 ce7377769fa177cec3e959845c584b264efe54a4933eac04874dd04c53a6b6edd61bf97fae4e7c66f9ea879f91d55b6ac6f4e480c1c136a1a24fd89399d9248e
+MISC metadata.xml 731 BLAKE2B f661d037e9ab428af2c3033ccd1ea68578e66200ceb5cda2318b23c87b1a98fa36ccc4941c38ccfeaf4718395df81f1fc3dc6eb793068372f7ced968954b9b2b SHA512 c05e53460ae66a3c52b3a17ec0547962338bd7beb07b9d8f79d43184ff8fd433eb8eaf4bafbb288555016b33f6b296715fcaf2eb73f571dfffdc593773ffbf74
diff --git a/dev-db/sadisplay/metadata.xml b/dev-db/sadisplay/metadata.xml
new file mode 100644
index 000000000000..5e098e138e88
--- /dev/null
+++ b/dev-db/sadisplay/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>horea.christ@gmail.com</email>
+ <name>Horea Christian</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription lang="en">
+ Simple package for describing SQLAlchemy schema and display raw
+ database tables by reflecting feature. Works with mapped classes
+ and raw tables. Relation detecting by ForeignKey columns.
+ Supports mapped class inherit.
+ </longdescription>
+ <upstream>
+ <remote-id type="bitbucket">estin/sadisplay</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/sadisplay/sadisplay-0.4.8.ebuild b/dev-db/sadisplay/sadisplay-0.4.8.ebuild
new file mode 100644
index 000000000000..04ab38a361c6
--- /dev/null
+++ b/dev-db/sadisplay/sadisplay-0.4.8.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+
+inherit distutils-r1
+
+DESCRIPTION="SqlAlchemy schema display script"
+HOMEPAGE="https://bitbucket.org/estin/sadisplay/wiki/Home"
+COMMIT_ID="d67d12894ebd"
+SRC_URI="https://bitbucket.org/estin/sadisplay/get/${COMMIT_ID}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+RDEPEND="dev-python/sqlalchemy[${PYTHON_USEDEP}]"
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? ( ${RDEPEND} )
+ "
+S="${WORKDIR}/estin-${PN}-${COMMIT_ID}"
+
+python_test() {
+ nosetests -v || die
+}
diff --git a/dev-db/slony1-2.2.6 b/dev-db/slony1-2.2.6
deleted file mode 100644
index 83022c0f7d25..000000000000
--- a/dev-db/slony1-2.2.6
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst prepare setup test
-DEPEND=postgres_targets_postgres10? ( dev-db/postgresql:10=[server,threads] ) postgres_targets_postgres9_6? ( dev-db/postgresql:9.6=[server,threads] ) postgres_targets_postgres9_5? ( dev-db/postgresql:9.5=[server,threads] ) postgres_targets_postgres9_4? ( dev-db/postgresql:9.4=[server,threads] ) postgres_targets_postgres9_3? ( dev-db/postgresql:9.3=[server,threads] ) perl? ( dev-perl/DBD-Pg )
-DESCRIPTION=A replication system for the PostgreSQL Database Management System
-EAPI=6
-HOMEPAGE=http://slony.info/
-IUSE=doc perl postgres_targets_postgres10 postgres_targets_postgres9_6 postgres_targets_postgres9_5 postgres_targets_postgres9_4 postgres_targets_postgres9_3
-KEYWORDS=amd64 ppc x86
-LICENSE=BSD GPL-2
-RDEPEND=postgres_targets_postgres10? ( dev-db/postgresql:10=[server,threads] ) postgres_targets_postgres9_6? ( dev-db/postgresql:9.6=[server,threads] ) postgres_targets_postgres9_5? ( dev-db/postgresql:9.5=[server,threads] ) postgres_targets_postgres9_4? ( dev-db/postgresql:9.4=[server,threads] ) postgres_targets_postgres9_3? ( dev-db/postgresql:9.3=[server,threads] ) perl? ( dev-perl/DBD-Pg )
-RESTRICT=test
-SLOT=0
-SRC_URI=http://main.slony.info/downloads/2.2/source/slony1-2.2.6.tar.bz2 http://main.slony.info/downloads/2.2/source/slony1-2.2.6-docs.tar.bz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e postgres a3ad839d319097167f1802b25f50d9c0 postgres-multi 4ad3669c874bed68b375f87035e46db8 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=4d627ff01e9eb780f7c3282c2d2dd9b1
diff --git a/dev-db/slony1/Manifest b/dev-db/slony1/Manifest
new file mode 100644
index 000000000000..781f7794dba5
--- /dev/null
+++ b/dev-db/slony1/Manifest
@@ -0,0 +1,6 @@
+AUX slony1.conf 249 BLAKE2B ec214fb9a7d51bcaa58dc191d7e943c0d07be85c0f31dadbf199f5b309fb61c631d62eac659f4473120ee67649029c45cab606205fd62e1679413d2077fedac6 SHA512 3ef2b9a326cb237aa6ceaf4f161d9ff183c291f423b7ad29cb9102a67de849dbf5a52120ecc756efc5a8d226f0860a2517ced64ab44f135e62cb2e53611775a8
+AUX slony1.init 615 BLAKE2B f1b3fc27ad3c4087713cceb6c2bb9451004b70e87c0347274c75e1c3ed8d439bb99f51d5e6e904d3957150e62760272312423a47235ff4e76792e0661b683bb3 SHA512 d450bba5f65372509e542f138d297202371bcaf78332ba13de72ddf937fcffe419083dddc5032c7bafd51993fbc677b37262e1b1e938e9e3c927e130c0a7c693
+DIST slony1-2.2.6-docs.tar.bz2 1450956 BLAKE2B 949d0736eb9ab021767b80b4240e30a8cd11daa218cac6d722827a8db98f2b54cc093031e02d0cd14cb1eb60d56dc160dcd1c2e0708e7228fdac31ef26d2fcf4 SHA512 b5a870d5688ca24c0a9012d7da539917c74ee697f1b1ae663ead3cb1032345c0d8f5fc5bddc2ca2fec5d738fb9ca74822343cce8739b3b4b478928f26d214a0d
+DIST slony1-2.2.6.tar.bz2 1465709 BLAKE2B 87e581638aab5ac9f51437fc43b65f200c29e012fa2b5331d4a7972359bb345c8d5aec9917fbc348ce8338115f8270d6e55025905aa5aba642090a8486d0a3fc SHA512 5aeadb9ed72b83d303596e4f8513409a1f826f25fe283ca6aa969a7563172bbc5f5360f876fa87780f6a6fc70cb55688a2daf678b9cf91972a3c403cb76184b8
+EBUILD slony1-2.2.6.ebuild 1646 BLAKE2B 41751e24ac6d64d484f4c7502d093dcb36236eac011d79f8e9fc8095be906f45e1285d6c5305e95253d3fcb2636040354fa58e968cbf44e4d0c541f1161bc284 SHA512 9e220005ba13513b8f7d20853bc659d586e8d0b5a5d2c93b0997601dc84cee845826d31d37cb2726d37b114341d9f60502557e8fe7dfd3447720fd41021c90eb
+MISC metadata.xml 280 BLAKE2B 75bfaba3095bd67dfa80654885579e51053fd130ae4e3ad61ac75192eebad9fe8d08cbdf63773dad3837ef2805e0594d0823655966fde8876ba5919e01f0e698 SHA512 efb5fb6652ac8cd75fff4eea8b2b044a2c9201cce2faf3bbe13a97565d150e64f9ba0dd8bb691a44a1b6726455306ea8b6c1b121678a721a82e7ea8b6589c94f
diff --git a/dev-db/slony1/files/slony1.conf b/dev-db/slony1/files/slony1.conf
new file mode 100644
index 000000000000..a660b0b16c40
--- /dev/null
+++ b/dev-db/slony1/files/slony1.conf
@@ -0,0 +1,11 @@
+# /etc/conf.d/slony1:
+
+# Configuration file for /etc/init.d/slony1
+
+USER=postgres
+CLUSTER=your_cluster_name
+DBUSER=postgres
+DBNAME=your_database_name
+DBHOST=localhost
+LOGFILE=/var/lib/postgresql/data/slony1.log
+LOGLEVEL=1 # 1(minimum)..4(maximum)
diff --git a/dev-db/slony1/files/slony1.init b/dev-db/slony1/files/slony1.init
new file mode 100644
index 000000000000..d85c99c733f0
--- /dev/null
+++ b/dev-db/slony1/files/slony1.init
@@ -0,0 +1,36 @@
+#!/sbin/openrc-run
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need postgresql
+}
+
+start() {
+ ebegin "Starting slony1"
+ /usr/bin/slon -p /var/run/slony1.pid -d $LOGLEVEL $CLUSTER "dbname=$DBNAME user=$DBUSER host=$DBHOST" >> $LOGFILE 2>&1 &
+
+ while :
+ do
+ cnt=$(($cnt + 1))
+ if [ -f "/var/run/slony1.pid" ]; then
+ ret=0
+ break
+ fi
+
+ if [ $cnt -eq 30 ]; then
+ eerror "Please see log file: $LOGFILE"
+ ret=1
+ break
+ fi
+ sleep 1
+ done
+ eend $ret
+}
+
+stop() {
+ ebegin "Stopping slony1"
+ kill `cat /var/run/slony1.pid`
+ eend $?
+}
+
diff --git a/dev-db/slony1/metadata.xml b/dev-db/slony1/metadata.xml
new file mode 100644
index 000000000000..711734ad7566
--- /dev/null
+++ b/dev-db/slony1/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>pgsql-bugs@gentoo.org</email>
+ <name>PostgreSQL and Related Package Development</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-db/slony1/slony1-2.2.6.ebuild b/dev-db/slony1/slony1-2.2.6.ebuild
new file mode 100644
index 000000000000..c390f13f5a65
--- /dev/null
+++ b/dev-db/slony1/slony1-2.2.6.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+POSTGRES_COMPAT=( 9.{3..6} 10 )
+POSTGRES_USEDEP="server,threads"
+
+inherit eutils postgres-multi versionator
+
+IUSE="doc perl"
+
+DESCRIPTION="A replication system for the PostgreSQL Database Management System"
+HOMEPAGE="http://slony.info/"
+
+# ${P}-docs.tar.bz2 contains man pages as well as additional documentation
+MAJ_PV=$(get_version_component_range 1-2)
+SRC_URI="http://main.slony.info/downloads/${MAJ_PV}/source/${P}.tar.bz2
+ http://main.slony.info/downloads/${MAJ_PV}/source/${P}-docs.tar.bz2"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+
+DEPEND="${POSTGRES_DEP}
+ perl? ( dev-perl/DBD-Pg )
+"
+
+RDEPEND=${DEPEND}
+
+REQUIRE_USE="${POSTGRES_REQ_USE}"
+
+RESTRICT="test"
+
+src_configure() {
+ local slot_bin_dir="/usr/$(get_libdir)/postgresql-@PG_SLOT@/bin"
+ use perl && myconf=" --with-perltools=\"${slot_bin_dir}\""
+ postgres-multi_foreach econf ${myconf} \
+ --with-pgconfigdir="${slot_bin_dir}" \
+ --with-slonybindir="${slot_bin_dir}"
+}
+
+src_install() {
+ postgres-multi_foreach emake DESTDIR="${D}" install
+
+ dodoc INSTALL README SAMPLE TODO UPGRADING share/slon.conf-sample
+
+ if use doc ; then
+ cd "${S}"/doc
+ dohtml -r *
+ fi
+
+ newinitd "${FILESDIR}"/slony1.init slony1
+ newconfd "${FILESDIR}"/slony1.conf slony1
+}
+
+pkg_postinst() {
+ # Slony-I installs its executables into a directory that is
+ # processed by the PostgreSQL eselect module. Call it here so that
+ # the symlinks will be created.
+ ebegin "Refreshing PostgreSQL $(postgresql-config show) symlinks"
+ postgresql-config update
+ eend $?
+}
diff --git a/dev-db/soci-3.2.3 b/dev-db/soci-3.2.3
deleted file mode 100644
index 473b61ccccc8..000000000000
--- a/dev-db/soci-3.2.3
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=firebird? ( dev-db/firebird ) mysql? ( virtual/mysql ) odbc? ( dev-db/unixODBC ) oracle? ( dev-db/oracle-instantclient-basic ) postgres? ( dev-db/postgresql:= ) sqlite? ( dev-db/sqlite:3 ) boost? ( dev-libs/boost ) sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=Makes the illusion of embedding SQL queries in the regular C++ code
-EAPI=6
-HOMEPAGE=http://soci.sourceforge.net/
-IUSE=boost doc +empty firebird mysql odbc oracle postgres sqlite static-libs test
-KEYWORDS=~amd64 ~x86
-LICENSE=Boost-1.0
-RDEPEND=firebird? ( dev-db/firebird ) mysql? ( virtual/mysql ) odbc? ( dev-db/unixODBC ) oracle? ( dev-db/oracle-instantclient-basic ) postgres? ( dev-db/postgresql:= ) sqlite? ( dev-db/sqlite:3 )
-SLOT=0
-SRC_URI=mirror://sourceforge/soci/soci-3.2.3.zip
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=9e707d8c6fc431bcc39f50f1c354b115
diff --git a/dev-db/soci/Manifest b/dev-db/soci/Manifest
new file mode 100644
index 000000000000..d6300739bed3
--- /dev/null
+++ b/dev-db/soci/Manifest
@@ -0,0 +1,3 @@
+DIST soci-3.2.3.zip 508929 BLAKE2B e1a83172391508506744b18ac0b18d69bec34bfbd31d9156b2cb786cdb7cdd8a99ace21d1286a2c4432ba18e18dedc4f390075a25a30fa2e45f36d802661ddb2 SHA512 dd9b7eaf535502e3230eada4d4d019963d2c9cf59b69fff5d466b4fc00976fa08f7b0199a0e4564a0395d0d30095b97aa1d613dfbaa329feb077ece3b0efacdf
+EBUILD soci-3.2.3.ebuild 1235 BLAKE2B ce606fe16c860275ac1eb0d9e165c3bd6cf57ada31fc1698b30854ff9f3dfc6ffbbf4ec523466c4d6f06dd79bbaa800aef49885679bdd55dd6b89121f4868d32 SHA512 331534dc170ae1cf0d986069bca6dea98b4e97868c155972ae2ba28f15499bcf26af9abf15549a5b39102f592cc535be969f24699f1f3cb6f39c4b465211b1cb
+MISC metadata.xml 343 BLAKE2B 7257e5f29bfd60e7231870e28d745ea123af37110ddf907c7a4dedb4e984a330e62f02f61b59075ee7eb30a77f89e5b3edc72070a18158fa5cbf6e5bb3596908 SHA512 a3441b5c5f7127af874a08bc9e05dd95f1594167906383c44fcfb9620e52fdabdd90b23c2cbc6f082699150b1593b4600f7a9eae54c799f501b95ca9022d83c7
diff --git a/dev-db/soci/metadata.xml b/dev-db/soci/metadata.xml
new file mode 100644
index 000000000000..3f843d86929c
--- /dev/null
+++ b/dev-db/soci/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <use>
+ <flag name="boost">Enable boost support</flag>
+ <flag name="empty">Build the sample backend called Empty</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">soci</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/soci/soci-3.2.3.ebuild b/dev-db/soci/soci-3.2.3.ebuild
new file mode 100644
index 000000000000..f31882f3e189
--- /dev/null
+++ b/dev-db/soci/soci-3.2.3.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils
+
+DESCRIPTION="Makes the illusion of embedding SQL queries in the regular C++ code"
+HOMEPAGE="http://soci.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.zip"
+
+LICENSE="Boost-1.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="boost doc +empty firebird mysql odbc oracle postgres sqlite static-libs test"
+
+RDEPEND="
+ firebird? ( dev-db/firebird )
+ mysql? ( virtual/mysql )
+ odbc? ( dev-db/unixODBC )
+ oracle? ( dev-db/oracle-instantclient-basic )
+ postgres? ( dev-db/postgresql:= )
+ sqlite? ( dev-db/sqlite:3 )
+"
+DEPEND="${RDEPEND}
+ boost? ( dev-libs/boost )
+"
+
+src_configure() {
+ local mycmakeargs=(
+ -DWITH_BOOST=$(usex boost)
+ -DSOCI_EMPTY=$(usex empty)
+ -DWITH_FIREBIRD=$(usex firebird)
+ -DWITH_MYSQL=$(usex mysql)
+ -DWITH_ODBC=$(usex odbc)
+ -DWITH_ORACLE=$(usex oracle)
+ -DWITH_POSTGRESQL=$(usex postgres)
+ -DWITH_SQLITE3=$(usex sqlite)
+ -DSOCI_STATIC=$(usex static-libs)
+ -DSOCI_TESTS=$(usex test)
+ -DWITH_DB2=OFF
+ )
+ #use MYCMAKEARGS if you want enable IBM DB2 support
+ cmake-utils_src_configure
+}
+
+src_install() {
+ use doc && local HTML_DOCS=( doc/. )
+ cmake-utils_src_install
+}
diff --git a/dev-db/spatialite-4.3.0-r1 b/dev-db/spatialite-4.3.0-r1
deleted file mode 100644
index 8804c39780dc..000000000000
--- a/dev-db/spatialite-4.3.0-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=configure install
-DEPEND=>=dev-db/sqlite-3.7.5:3[extensions(+)] sys-libs/zlib geos? ( >=sci-libs/geos-3.4 ) proj? ( sci-libs/proj ) xls? ( dev-libs/freexl ) xml? ( dev-libs/libxml2 )
-DESCRIPTION=A complete Spatial DBMS in a nutshell built upon sqlite
-EAPI=6
-HOMEPAGE=https://www.gaia-gis.it/gaia-sins/
-IUSE=+geos iconv +proj test +xls +xml
-KEYWORDS=amd64 ~arm ~ppc ~ppc64 x86
-LICENSE=MPL-1.1
-RDEPEND=>=dev-db/sqlite-3.7.5:3[extensions(+)] sys-libs/zlib geos? ( >=sci-libs/geos-3.4 ) proj? ( sci-libs/proj ) xls? ( dev-libs/freexl ) xml? ( dev-libs/libxml2 )
-REQUIRED_USE=test? ( iconv )
-SLOT=0
-SRC_URI=https://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-4.3.0.tar.gz
-_md5_=41dd187b4823b40e6bfcbd7e193b43df
diff --git a/dev-db/spatialite-4.3.0a b/dev-db/spatialite-4.3.0a
deleted file mode 100644
index e86b0ec51938..000000000000
--- a/dev-db/spatialite-4.3.0a
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=configure install
-DEPEND=>=dev-db/sqlite-3.7.5:3[extensions(+)] sys-libs/zlib geos? ( >=sci-libs/geos-3.4 ) proj? ( sci-libs/proj ) xls? ( dev-libs/freexl ) xml? ( dev-libs/libxml2 )
-DESCRIPTION=A complete Spatial DBMS in a nutshell built upon sqlite
-EAPI=6
-HOMEPAGE=https://www.gaia-gis.it/gaia-sins/
-IUSE=+geos iconv +proj test +xls +xml
-KEYWORDS=~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86
-LICENSE=MPL-1.1
-RDEPEND=>=dev-db/sqlite-3.7.5:3[extensions(+)] sys-libs/zlib geos? ( >=sci-libs/geos-3.4 ) proj? ( sci-libs/proj ) xls? ( dev-libs/freexl ) xml? ( dev-libs/libxml2 )
-REQUIRED_USE=test? ( iconv )
-SLOT=0
-SRC_URI=https://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-4.3.0a.tar.gz
-_md5_=4a4665b32f359f477a8229e09b32117d
diff --git a/dev-db/spatialite-tools-4.3.0-r1 b/dev-db/spatialite-tools-4.3.0-r1
deleted file mode 100644
index 5678aa44a1cd..000000000000
--- a/dev-db/spatialite-tools-4.3.0-r1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=configure
-DEPEND=dev-db/sqlite:3[extensions(+)] >=dev-db/spatialite-3.0.1[geos,xls] dev-libs/expat dev-libs/libxml2 sci-geosciences/readosm sci-libs/geos sci-libs/proj readline? ( sys-libs/ncurses:= sys-libs/readline:= )
-DESCRIPTION=A collection of CLI tools supporting SpatiaLite
-EAPI=6
-HOMEPAGE=https://www.gaia-gis.it/spatialite
-IUSE=readline
-KEYWORDS=~amd64 ~x86
-LICENSE=MPL-1.1
-RDEPEND=dev-db/sqlite:3[extensions(+)] >=dev-db/spatialite-3.0.1[geos,xls] dev-libs/expat dev-libs/libxml2 sci-geosciences/readosm sci-libs/geos sci-libs/proj readline? ( sys-libs/ncurses:= sys-libs/readline:= )
-SLOT=0
-SRC_URI=https://www.gaia-gis.it/gaia-sins/spatialite-tools-sources/spatialite-tools-4.3.0.tar.gz
-_md5_=be554a4688a753c62fc783e6aee3a196
diff --git a/dev-db/spatialite-tools/Manifest b/dev-db/spatialite-tools/Manifest
new file mode 100644
index 000000000000..628205bbddb8
--- /dev/null
+++ b/dev-db/spatialite-tools/Manifest
@@ -0,0 +1,3 @@
+DIST spatialite-tools-4.3.0.tar.gz 540811 BLAKE2B 3de4301380a0b64cdd388cb0dc1917b90a02a721b1e34d3781b5b4e14a810809c922a3760a269c3980790801b66a100f9bacf1249f2874374295b5bb9431b133 SHA512 e1de27c1c65ff2ff0b08583113517bea74edf33fff59ad6e9c77492ea3ae87d9c0f17d7670ee6602b32eea73ad3678bb5410ef2c6fac6e213bf2e341a907db88
+EBUILD spatialite-tools-4.3.0-r1.ebuild 666 BLAKE2B 2c650ad394cf4a945713a89c4cdb80e41e55279e98003cb31054cb2c55d16671322d04538b7018c10ae3bb764e9c735adf1e900a4bf570fb5b41646a98fa6d85 SHA512 20ceb663ce052d6955229d7667e23d0674f5edffa62b73bdba8b24b051f97f0e989826d9d0c9320f7f7edd564b5c6c416e5cb5beb3cdbc58ca71561ba90c131c
+MISC metadata.xml 269 BLAKE2B d4815f943b682786bd83cbc5840e99f36fc2f1bf175394ef9389228bfa8bd22b1bfbbf763eb9c396338b72b7927b431e73598bb67eaadf1d437c4afa5877c189 SHA512 9877d09d42c801d752617b41c7fb790db8e10c033c02ee9fe9a04fa1c6a8ea06d3baeb4f81d041b57e883d5d9dadb429289faae90d0293c62334ba35549e0276
diff --git a/dev-db/spatialite-tools/metadata.xml b/dev-db/spatialite-tools/metadata.xml
new file mode 100644
index 000000000000..2761b1b9e5c0
--- /dev/null
+++ b/dev-db/spatialite-tools/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-geosciences@gentoo.org</email>
+ <name>Gentoo Geosciences Project</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-db/spatialite-tools/spatialite-tools-4.3.0-r1.ebuild b/dev-db/spatialite-tools/spatialite-tools-4.3.0-r1.ebuild
new file mode 100644
index 000000000000..a4a242e63a90
--- /dev/null
+++ b/dev-db/spatialite-tools/spatialite-tools-4.3.0-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="A collection of CLI tools supporting SpatiaLite"
+HOMEPAGE="https://www.gaia-gis.it/spatialite"
+SRC_URI="https://www.gaia-gis.it/gaia-sins/${PN}-sources/${P}.tar.gz"
+
+LICENSE="MPL-1.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="readline"
+
+RDEPEND="
+ dev-db/sqlite:3[extensions(+)]
+ >=dev-db/spatialite-3.0.1[geos,xls]
+ dev-libs/expat
+ dev-libs/libxml2
+ sci-geosciences/readosm
+ sci-libs/geos
+ sci-libs/proj
+ readline? (
+ sys-libs/ncurses:=
+ sys-libs/readline:=
+ )
+"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ econf \
+ $(use_enable readline)
+}
diff --git a/dev-db/spatialite/Manifest b/dev-db/spatialite/Manifest
new file mode 100644
index 000000000000..bcbd9f30192d
--- /dev/null
+++ b/dev-db/spatialite/Manifest
@@ -0,0 +1,5 @@
+DIST libspatialite-4.3.0.tar.gz 4439538 BLAKE2B f3bbda3b9d6099197691eb85e20c693d5cbc3a8958c8f23bd1ba57add9d8676895163d845a4aadd690650244ffa7ae2a02ce86e844e032b815fe4c94f30fb4b8 SHA512 b686766ed90711a41efbf219a8942ead8aefda8784a9cabc59233f107e0e10eda949d022152af1064a169975aa6a47515f6064589166418b853427dde5779ecc
+DIST libspatialite-4.3.0a.tar.gz 4440660 BLAKE2B 2eb2afb96b096b86be9c30cf71663b7b2839d345b6c418fc8511653ed59d0aeff1756b6b19807140c67128c938e39be66d13088640658d14883c92c438c97251 SHA512 adfd63e8dde0f370b07e4e7bb557647d2bfb5549205b60bdcaaca69ff81298a3d885e7c1ca515ef56dd0aca152ae940df8b5dbcb65bb61ae0a9337499895c3c0
+EBUILD spatialite-4.3.0-r1.ebuild 1057 BLAKE2B 0c6b757b74f0af4aa3e621d8a0e60e9b70d95d6aea4b5bca307d5eb3048ef754c2b0c187d44e591d62f6af47848f36ff29da929f660d07b68b6a850f8a9a1e10 SHA512 6507bf86455097d9eef6a3b4e67066c02a6037ec37b7536b7c712c29e5d48e28e6fbb55600843bae38c5ab079d015784d20ad5a402e9f621a16f57a8d28da30f
+EBUILD spatialite-4.3.0a.ebuild 1072 BLAKE2B fca30b1c5e55b319b8b06ad509a2e305e8bad3fd5c208ec17991f0aba11ea8acdf8bd32a976511cb55d979e298c09f8973757ed2c627e4c91b658154d8682ac1 SHA512 1c63596e1101681677dfb36866f1e6135520cc6687243383d3c5b859d85bb899ea6ee0729a98448c7a8d8e882a79739c4b5cf235edead99ddc75d2336d47c90e
+MISC metadata.xml 559 BLAKE2B b128c4425723bb652063fd3ebebcd83de75a44c7a01e5a8b6c6596cad0bcd1a5f86977f4e3b49d2f1945ea83f12f9761ba712d5f1d919338996c7ddf18bc4a66 SHA512 a21438d83d828b52e4fc16f91edd29e6ace87ada9b697cf233b847a6d3a9f5196135769993873f23409f98548bf852a4e89645c2b0eaf57bd8427ff6dcc36111
diff --git a/dev-db/spatialite/metadata.xml b/dev-db/spatialite/metadata.xml
new file mode 100644
index 000000000000..f3d7fe3cbb04
--- /dev/null
+++ b/dev-db/spatialite/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-geosciences@gentoo.org</email>
+ <name>Gentoo Geosciences Project</name>
+ </maintainer>
+<use>
+ <flag name="geos">Add the <pkg>sci-libs/geos</pkg> library for exact topological tests</flag>
+ <flag name="proj">Add the <pkg>sci-libs/proj</pkg> library for reprojection features</flag>
+ <flag name="xls">Add the <pkg>dev-libs/freexl</pkg> library for xls import support</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-db/spatialite/spatialite-4.3.0-r1.ebuild b/dev-db/spatialite/spatialite-4.3.0-r1.ebuild
new file mode 100644
index 000000000000..9adfb477cd11
--- /dev/null
+++ b/dev-db/spatialite/spatialite-4.3.0-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MY_PN="lib${PN}"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="A complete Spatial DBMS in a nutshell built upon sqlite"
+HOMEPAGE="https://www.gaia-gis.it/gaia-sins/"
+SRC_URI="https://www.gaia-gis.it/gaia-sins/${MY_PN}-sources/${MY_P}.tar.gz"
+
+LICENSE="MPL-1.1"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~ppc ~ppc64 x86"
+IUSE="+geos iconv +proj test +xls +xml"
+
+RDEPEND="
+ >=dev-db/sqlite-3.7.5:3[extensions(+)]
+ sys-libs/zlib
+ geos? ( >=sci-libs/geos-3.4 )
+ proj? ( sci-libs/proj )
+ xls? ( dev-libs/freexl )
+ xml? ( dev-libs/libxml2 )
+"
+DEPEND="${RDEPEND}"
+
+REQUIRED_USE="test? ( iconv )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_configure() {
+ econf \
+ --disable-examples \
+ --disable-static \
+ --enable-epsg \
+ --enable-geocallbacks \
+ $(use_enable geos) \
+ $(use_enable geos geosadvanced) \
+ $(use_enable iconv) \
+ $(use_enable proj) \
+ $(use_enable xls freexl) \
+ $(use_enable xml libxml2)
+}
+
+src_install() {
+ default
+ find "${D}" -name '*.la' -delete || die
+}
diff --git a/dev-db/spatialite/spatialite-4.3.0a.ebuild b/dev-db/spatialite/spatialite-4.3.0a.ebuild
new file mode 100644
index 000000000000..d822e5ce055d
--- /dev/null
+++ b/dev-db/spatialite/spatialite-4.3.0a.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MY_PN="lib${PN}"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="A complete Spatial DBMS in a nutshell built upon sqlite"
+HOMEPAGE="https://www.gaia-gis.it/gaia-sins/"
+SRC_URI="https://www.gaia-gis.it/gaia-sins/${MY_PN}-sources/${MY_P}.tar.gz"
+
+LICENSE="MPL-1.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86"
+IUSE="+geos iconv +proj test +xls +xml"
+
+RDEPEND="
+ >=dev-db/sqlite-3.7.5:3[extensions(+)]
+ sys-libs/zlib
+ geos? ( >=sci-libs/geos-3.4 )
+ proj? ( sci-libs/proj )
+ xls? ( dev-libs/freexl )
+ xml? ( dev-libs/libxml2 )
+"
+DEPEND="${RDEPEND}"
+
+REQUIRED_USE="test? ( iconv )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_configure() {
+ econf \
+ --disable-examples \
+ --disable-static \
+ --enable-epsg \
+ --enable-geocallbacks \
+ $(use_enable geos) \
+ $(use_enable geos geosadvanced) \
+ $(use_enable iconv) \
+ $(use_enable proj) \
+ $(use_enable xls freexl) \
+ $(use_enable xml libxml2)
+}
+
+src_install() {
+ default
+ find "${D}" -name '*.la' -delete || die
+}
diff --git a/dev-db/sqlcipher-3.4.1 b/dev-db/sqlcipher-3.4.1
deleted file mode 100644
index aab9336871ef..000000000000
--- a/dev-db/sqlcipher-3.4.1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=!libressl? ( dev-libs/openssl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) readline? ( sys-libs/readline:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) tcl? ( dev-lang/tcl:=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) dev-lang/tcl:* >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=Full Database Encryption for SQLite
-EAPI=6
-HOMEPAGE=https://www.zetetic.net/sqlcipher/
-IUSE=readline libressl static-libs tcl test abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=amd64 x86
-LICENSE=BSD
-RDEPEND=!libressl? ( dev-libs/openssl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) readline? ( sys-libs/readline:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) tcl? ( dev-lang/tcl:=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] )
-REQUIRED_USE=test? ( tcl )
-SLOT=0
-SRC_URI=https://github.com/sqlcipher/sqlcipher/archive/v3.4.1.tar.gz -> sqlcipher-3.4.1.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=6558cdbfc85ff4942281d7e11f5767c8
diff --git a/dev-db/sqlcipher-3.4.2 b/dev-db/sqlcipher-3.4.2
deleted file mode 100644
index 36ecba047c3c..000000000000
--- a/dev-db/sqlcipher-3.4.2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=libedit? ( dev-libs/libedit[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) !libressl? ( dev-libs/openssl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) readline? ( sys-libs/readline:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) tcl? ( dev-lang/tcl:=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) dev-lang/tcl:* >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=Full Database Encryption for SQLite
-EAPI=6
-HOMEPAGE=https://www.zetetic.net/sqlcipher/
-IUSE=libedit readline libressl static-libs tcl test abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=~amd64 ~x86
-LICENSE=BSD
-RDEPEND=libedit? ( dev-libs/libedit[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) !libressl? ( dev-libs/openssl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) readline? ( sys-libs/readline:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) tcl? ( dev-lang/tcl:=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] )
-REQUIRED_USE=libedit? ( !readline ) test? ( tcl )
-SLOT=0
-SRC_URI=https://github.com/sqlcipher/sqlcipher/archive/v3.4.2.tar.gz -> sqlcipher-3.4.2.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=642a44a0ec7a36f0381316ba55100093
diff --git a/dev-db/sqlcipher/Manifest b/dev-db/sqlcipher/Manifest
new file mode 100644
index 000000000000..693415a194b9
--- /dev/null
+++ b/dev-db/sqlcipher/Manifest
@@ -0,0 +1,6 @@
+AUX sqlcipher-3.4.1-libressl.patch 450 BLAKE2B 23bacf888e5744f012ef1bb080984b99f81a365750ef6c660aa80d0c1b0f5185966c59e1d0b8ead7d7d605d3daf8e475bce9a49833ec66d854a36319a2480b96 SHA512 ceb74cfb4b2dd3dae16bcb0ac53ed2746f59d88811a81b5099c6fbac71ccc83ccde08642d25eed5ae8229a672f74baa5a28221ae071a32836bb3e2f2fedfbad4
+DIST sqlcipher-3.4.1.tar.gz 13873645 BLAKE2B 8d910691fff6d31393a9e4adb549c084472b3f962f46a6ecd9f0860e5ad3c225d1e7bccd1fc4d87fb0641de0091408ef82521718c21e874a622f5304b6a7df08 SHA512 1c08ccdf438c0de23b1293192c687cb869db1ea904c47da5643c69f3a21f3f6a801fe8e87eb2e660acf0fe977b1f05bf8801b79162c609ffa3711706392c642b
+DIST sqlcipher-3.4.2.tar.gz 14743960 BLAKE2B 88ee265b02bb9a42734c2ef93070c8fd8e13d546d7cc85e7fbfd6e6046ccbf2626d75e14b19cbba379c99784c7311d0100de06235b99b4908c60c99890d8d7a2 SHA512 c620bf2b175e404afd60ebe76b5476f5a447ff5fcdfa31bebc3f4bd7f1ebfcd507ee423cd582c9b3d6431d8b57320171492da2586e1a739adb4f440e7443dc03
+EBUILD sqlcipher-3.4.1.ebuild 1292 BLAKE2B fd9485d5be219da430ac438d00eb2054912a5365ae8f1cca9d179b028a31f6f0179cc9b994ab5e6ba60a5a17bcae80ed5ea9b8e12c19f9d3bd11f263987f0312 SHA512 9e3b046b8d46e6bce55403b5166de1f86131b8bc2c713581c78c4c5602af8f9a9a89df9d8b48b58698176481ab93ce062f54a5b73e914027648f411633f97ca6
+EBUILD sqlcipher-3.4.2.ebuild 1410 BLAKE2B ae910fa7f159d974f2fab78ad43f8c42e83807b9f55ae6ebe98132f9f27081065427e768ed63e7f9182a5716a627ae553c02a252048511f7099762630a13e143 SHA512 2fb0ac3c64b3d771bfe1b605c1b316cb90b3afefd9e4744bb215204f30896be4a13d023ff5e4e0f2076e4de6c7e815c71d0822e202f8a929e2ef61ffc926c114
+MISC metadata.xml 341 BLAKE2B f5035fe38770437027936a72b9b7d66854fd6a19cf19f7140e409e8004297ed3da11aab122ba81b2f2b5d82302e8252462a7f185de0a998f79d348dd45e16c7e SHA512 b387658993279fb3c74c7647b36035f5c0e0e3e81a3cf4eab28f3dac19319f0b6958cfa16fab30295e5508c0810d601b0e2899710f57e992886f35c781e37dfa
diff --git a/dev-db/sqlcipher/files/sqlcipher-3.4.1-libressl.patch b/dev-db/sqlcipher/files/sqlcipher-3.4.1-libressl.patch
new file mode 100644
index 000000000000..f12f1284514d
--- /dev/null
+++ b/dev-db/sqlcipher/files/sqlcipher-3.4.1-libressl.patch
@@ -0,0 +1,11 @@
+--- a/src/crypto_openssl.c 2017-07-06 08:11:21.560000000 +0300
++++ b/src/crypto_openssl.c 2017-07-06 08:11:32.180000000 +0300
+@@ -46,7 +46,7 @@
+ static unsigned int openssl_init_count = 0;
+ static sqlite3_mutex* openssl_rand_mutex = NULL;
+
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ static HMAC_CTX *HMAC_CTX_new(void)
+ {
+ HMAC_CTX *ctx = OPENSSL_malloc(sizeof(*ctx));
diff --git a/dev-db/sqlcipher/metadata.xml b/dev-db/sqlcipher/metadata.xml
new file mode 100644
index 000000000000..97d08dafb28d
--- /dev/null
+++ b/dev-db/sqlcipher/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">sqlcipher/sqlcipher</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/sqlcipher/sqlcipher-3.4.1.ebuild b/dev-db/sqlcipher/sqlcipher-3.4.1.ebuild
new file mode 100644
index 000000000000..d75de25de377
--- /dev/null
+++ b/dev-db/sqlcipher/sqlcipher-3.4.1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils flag-o-matic multilib-minimal
+
+DESCRIPTION="Full Database Encryption for SQLite"
+HOMEPAGE="https://www.zetetic.net/sqlcipher/"
+SRC_URI="https://github.com/sqlcipher/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+IUSE="readline libressl static-libs tcl test"
+
+# Tcl is always needed by buildsystem
+RDEPEND="
+ !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
+ libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
+ readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
+ tcl? ( dev-lang/tcl:=[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}
+ dev-lang/tcl:*"
+
+# Testsuite requires compilation with TCL, bug #582584
+REQUIRED_USE="test? ( tcl )"
+
+DOCS=( README.md )
+
+src_prepare() {
+ append-cflags -DSQLITE_HAS_CODEC
+
+ # bug #622114
+ epatch "${FILESDIR}/${P}-libressl.patch"
+
+ eapply_user
+ eautoreconf
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} \
+ econf \
+ --enable-fts3 \
+ --enable-fts4 \
+ --enable-fts5 \
+ --enable-json1 \
+ --enable-tempstore \
+ $(use_enable readline) \
+ $(use_enable static-libs static) \
+ $(use_enable tcl)
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+ einstalldocs
+}
diff --git a/dev-db/sqlcipher/sqlcipher-3.4.2.ebuild b/dev-db/sqlcipher/sqlcipher-3.4.2.ebuild
new file mode 100644
index 000000000000..fce76e2a5797
--- /dev/null
+++ b/dev-db/sqlcipher/sqlcipher-3.4.2.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils flag-o-matic multilib-minimal
+
+DESCRIPTION="Full Database Encryption for SQLite"
+HOMEPAGE="https://www.zetetic.net/sqlcipher/"
+SRC_URI="https://github.com/sqlcipher/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="libedit readline libressl static-libs tcl test"
+
+# Tcl is always needed by buildsystem
+RDEPEND="
+ libedit? ( dev-libs/libedit[${MULTILIB_USEDEP}] )
+ !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
+ libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
+ readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
+ tcl? ( dev-lang/tcl:=[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}
+ dev-lang/tcl:*"
+
+# Libedit and readline support are mutually exclusive
+# Testsuite requires compilation with TCL, bug #582584
+REQUIRED_USE="
+ libedit? ( !readline )
+ test? ( tcl )
+"
+
+DOCS=( README.md )
+
+src_prepare() {
+ append-cflags -DSQLITE_HAS_CODEC
+ eapply_user
+ eautoreconf
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} \
+ econf \
+ --enable-fts3 \
+ --enable-fts4 \
+ --enable-fts5 \
+ --enable-json1 \
+ --enable-tempstore \
+ $(use_enable libedit editline) \
+ $(use_enable readline) \
+ $(use_enable static-libs static) \
+ $(use_enable tcl)
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+ einstalldocs
+}
diff --git a/dev-db/sqlcl-bin-17.4.0.354.2224 b/dev-db/sqlcl-bin-17.4.0.354.2224
deleted file mode 100644
index 2e0ea32d2d84..000000000000
--- a/dev-db/sqlcl-bin-17.4.0.354.2224
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=install nofetch prepare
-DESCRIPTION=Oracle SQLcl is the new SQL*Plus
-EAPI=6
-HOMEPAGE=http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html
-KEYWORDS=~amd64 ~x86
-LICENSE=OTN
-RDEPEND=virtual/jre:1.8 dev-java/java-config:2 dev-db/oracle-instantclient
-RESTRICT=bindist fetch mirror
-SLOT=0
-SRC_URI=sqlcl-17.4.0.354.2224-no-jre.zip
-_md5_=4e2a1b93ee667095767d784ff82734a0
diff --git a/dev-db/sqlcl-bin/Manifest b/dev-db/sqlcl-bin/Manifest
new file mode 100644
index 000000000000..23615f0a34e6
--- /dev/null
+++ b/dev-db/sqlcl-bin/Manifest
@@ -0,0 +1,3 @@
+DIST sqlcl-17.4.0.354.2224-no-jre.zip 19731560 BLAKE2B 0ee78a39e5be5d2c23a583cf3f4790897d79e1b082036d30a071fa629912e31c3fc3dbb0e873f4013ba6d41c27c8e1d99aff851922202983842cbf09cf1c6b0b SHA512 d03e949755fc3c99661d3b87dc4576fd4cb0edd33fa2b05818bbb26cd6d066d221ad6bcc0fc2f1453a80351b82e5698a193730cbabbf84a55607a118c39b4243
+EBUILD sqlcl-bin-17.4.0.354.2224.ebuild 1107 BLAKE2B f6935a3f432d72fad4346f06d4f64bbf687d8602bae2876db09b2e1b88db82d4d62aafa2b1ea0d86ca7622b7de495e08af487c05191ed84e0ef8854136494e7d SHA512 adf1788e0125a26caddacd7903d583272d1c6b6746a588bc8bcc76aeb7328c30985c309c339279bfe79cd2073e635ec3afb0d55d42fe69d3158af53140def9cf
+MISC metadata.xml 483 BLAKE2B 1ed85dae79388f3c548163e5fafd2838e1adf9bfc9a9c793ce7f9e7e323f8e3c9e7e2f3190b3ec54a0c598d048c61b6ad67c8eefb3845cd446ea67b01e0df8a8 SHA512 e88ad9fd8c20d5be5569c64544c3f4dd72eb3243d46333c30aaa1b939eb6ce35855aa3e771008b2fff990de5b2e5bf79ca378714e3cf7dc375144b7cd8f5649c
diff --git a/dev-db/sqlcl-bin/metadata.xml b/dev-db/sqlcl-bin/metadata.xml
new file mode 100644
index 000000000000..0a47874eaf48
--- /dev/null
+++ b/dev-db/sqlcl-bin/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>fedeliallalinea@gmail.com</email>
+ <name>Marco Genasci</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>mudler@gentoo.org</email>
+ <name>Ettore Di Giacinto</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-db/sqlcl-bin/sqlcl-bin-17.4.0.354.2224.ebuild b/dev-db/sqlcl-bin/sqlcl-bin-17.4.0.354.2224.ebuild
new file mode 100644
index 000000000000..2da7c12ea1eb
--- /dev/null
+++ b/dev-db/sqlcl-bin/sqlcl-bin-17.4.0.354.2224.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MY_PN="${PN/-bin}"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Oracle SQLcl is the new SQL*Plus"
+HOMEPAGE="http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html"
+SRC_URI="${MY_P}-no-jre.zip"
+RESTRICT="bindist fetch mirror"
+
+LICENSE="OTN"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND=""
+RDEPEND="virtual/jre:1.8
+ dev-java/java-config:2
+ dev-db/oracle-instantclient"
+
+S="${WORKDIR}"
+
+pkg_nofetch() {
+ eerror "Please go to"
+ eerror " ${HOMEPAGE}"
+ eerror "and download"
+ eerror " Command Line - SQLcl"
+ eerror " ${SRC_URI}"
+ eerror "and move it to DISTDIR directory."
+}
+
+src_prepare() {
+ default
+ find ./ \( -iname "*.bat" -or -iname "*.exe" \) -exec rm {} + || die "remove files failed"
+ mv sqlcl/bin/sql sqlcl/bin/"${MY_PN}" || die "rename executable failed"
+}
+
+src_install() {
+ exeinto "/opt/${MY_PN}/bin/"
+ doexe "${S}/${MY_PN}/bin/${MY_PN}"
+
+ insinto "/opt/${MY_PN}/lib/"
+ doins -r "${S}/${MY_PN}/lib/"*
+
+ dosym "${ED%/}/opt/${MY_PN}/bin/${MY_PN}" "/opt/bin/${MY_PN}"
+}
diff --git a/dev-db/sqldeveloper-4.2.0.17.089.1709 b/dev-db/sqldeveloper-4.2.0.17.089.1709
deleted file mode 100644
index 953f4242aa7d..000000000000
--- a/dev-db/sqldeveloper-4.2.0.17.089.1709
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile install nofetch postinst preinst prepare setup
-DEPEND=mssql? ( dev-java/jtds:1.3 ) mysql? ( dev-java/jdbc-mysql:0 ) sybase? ( dev-java/jtds:1.3 ) >=dev-java/java-config-2.2.0-r3
-DESCRIPTION=Oracle SQL Developer is a graphical tool for database development
-EAPI=5
-HOMEPAGE=http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/index.html
-IUSE=mssql mysql sybase elibc_FreeBSD
-KEYWORDS=amd64 x86
-LICENSE=OTN
-RDEPEND=>=virtual/jdk-1.8 mssql? ( dev-java/jtds:1.3 ) mysql? ( dev-java/jdbc-mysql:0 ) sybase? ( dev-java/jtds:1.3 ) >=dev-java/java-config-2.2.0-r3
-RESTRICT=fetch
-SLOT=0
-SRC_URI=sqldeveloper-4.2.0.17.089.1709-no-jre.zip
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-pkg-2 c4e6af2574fd1dc79b43a6e27af4b5fb java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=3896588619ac98ee862ecaeaf0091336
diff --git a/dev-db/sqldeveloper/Manifest b/dev-db/sqldeveloper/Manifest
new file mode 100644
index 000000000000..41c90e8ca069
--- /dev/null
+++ b/dev-db/sqldeveloper/Manifest
@@ -0,0 +1,5 @@
+AUX sqldeveloper 325 BLAKE2B e89acd5441362bc693296e2fef189e637944413094169c09be73bb1f514393f0239c7f4c5b186dd0e34bd1bda9730f4bb2e029b166f1db740ac34eff25097c84 SHA512 ab1d70c5b693efe5e6270d7fcd0ba7ef30852ed98fe88a1853c5b415178c51bbb754a4da6964b5e57e87c38015cc90ac2fc04b7aa121b660300434523457bad2
+AUX sqldeveloper-r1 407 BLAKE2B 26bf826e6ccf1cd45b52e7cdf6e694d88570118c0e98cab83f66f078ed79fea36fb3fa6df67dc271a74faad4307996c4968f6d316d9fc71d1a5360804f39782e SHA512 cf089f58c9de3677dbaa7b0c4bdd81e234bffac4c25f5a433c7854068ca33b5a4165d8a5d24188890d5d8c60c209adee5267a255505b978a5a7f73646fd1dfbe
+DIST sqldeveloper-4.2.0.17.089.1709-no-jre.zip 348604841 BLAKE2B 0c3adff04f148102e6460c7550f787329c7e5a69aca0b81c2de4725b9c9ea27c03bb2f588671a95371aa3612839805f2042855b443bb5635c70d0e0b2140295b SHA512 4d1e270376ae125a60146228e35fcb2cb615d593c0e9f2ca98e4deef4d8fd1ddff59cf15064d63e33e77125f49e8da9fe317ed1fd96a9b00a699bf6c5e739874
+EBUILD sqldeveloper-4.2.0.17.089.1709.ebuild 3190 BLAKE2B e4e4e81cc5c01cdeddf44055ca5ec19fec36bc7675cdb3d1ec4a53818cf219b5d51099d4b0e53ca837a71f2de36e290f286841588a5c5ec628ace9f6376b6e4d SHA512 305a91cfc7fde07dbaecff945a4bad4681d06d671a5aa3df0871dd7a91319bd43580bae1790142b891dc03ed9ed1b0b5c567effe0dd1ba1ce9914408b29cc5b6
+MISC metadata.xml 167 BLAKE2B ee34aa7c86910531f97e3ba5ec71670012761b3523ddf4e0e1fccb2134b6ddaabdc9329c3b45d697b4f745a707dd513f6b71a8cd32fb840a6b0b5af774ac0015 SHA512 bb251ebe24a6b0c9ff8ee0298e1aa3653443fc97bf44ff71ff56b88b82c36696a5db75c19cb345a1852e6a455874c603efff97b15799d7e8a224124a312df8b8
diff --git a/dev-db/sqldeveloper/files/sqldeveloper b/dev-db/sqldeveloper/files/sqldeveloper
new file mode 100644
index 000000000000..eba773e10267
--- /dev/null
+++ b/dev-db/sqldeveloper/files/sqldeveloper
@@ -0,0 +1,9 @@
+#!/bin/bash
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# skip their stupid [ -f `which java` ] test, which will always fail on Gentoo
+export APP_SKIP_J2SE_TEST=1
+export JAVA_HOME=$(java-config -o)
+
+cd /opt/sqldeveloper/sqldeveloper/bin && bash sqldeveloper $@
diff --git a/dev-db/sqldeveloper/files/sqldeveloper-r1 b/dev-db/sqldeveloper/files/sqldeveloper-r1
new file mode 100644
index 000000000000..7173cbbb75d2
--- /dev/null
+++ b/dev-db/sqldeveloper/files/sqldeveloper-r1
@@ -0,0 +1,10 @@
+#!/bin/bash
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# skip their stupid [ -f `which java` ] test, which will always fail on Gentoo
+export APP_SKIP_J2SE_TEST=1
+export GENTOO_VM=$( eval $(gjl --get-vm -p sqldeveloper) && echo ${gjl_vm} )
+export JAVA_HOME=$(java-config -o)
+
+cd /opt/sqldeveloper/sqldeveloper/bin && exec bash sqldeveloper $@
diff --git a/dev-db/sqldeveloper/metadata.xml b/dev-db/sqldeveloper/metadata.xml
new file mode 100644
index 000000000000..684b678e70f5
--- /dev/null
+++ b/dev-db/sqldeveloper/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
+
diff --git a/dev-db/sqldeveloper/sqldeveloper-4.2.0.17.089.1709.ebuild b/dev-db/sqldeveloper/sqldeveloper-4.2.0.17.089.1709.ebuild
new file mode 100644
index 000000000000..378497466c31
--- /dev/null
+++ b/dev-db/sqldeveloper/sqldeveloper-4.2.0.17.089.1709.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils java-pkg-2
+
+DESCRIPTION="Oracle SQL Developer is a graphical tool for database development"
+HOMEPAGE="http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/index.html"
+SRC_URI="${P}-no-jre.zip"
+
+RESTRICT="fetch"
+
+LICENSE="OTN"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+IUSE="mssql mysql sybase"
+
+DEPEND="mssql? ( dev-java/jtds:1.3 )
+ mysql? ( dev-java/jdbc-mysql:0 )
+ sybase? ( dev-java/jtds:1.3 )"
+RDEPEND=">=virtual/jdk-1.8
+ ${DEPEND}"
+
+S="${WORKDIR}/${PN}"
+
+QA_PREBUILT="
+opt/${PN}/netbeans/platform/modules/lib/amd64/linux/*.so
+opt/${PN}/netbeans/platform/modules/lib/i386/linux/*.so
+"
+
+pkg_nofetch() {
+ eerror "Please go to"
+ eerror " ${HOMEPAGE}"
+ eerror "and download"
+ eerror " Oracle SQL Developer for other platforms"
+ eerror " ${SRC_URI}"
+ eerror "and move it to ${DISTDIR}"
+}
+
+src_prepare() {
+ # we don't need these, do we?
+ find ./ \( -iname "*.exe" -or -iname "*.dll" -or -iname "*.bat" \) -exec rm {} +
+
+ # they both use jtds, enabling one of them also enables the other one
+ if use mssql && ! use sybase; then
+ einfo "You requested MSSQL support, this also enables Sybase support."
+ fi
+ if use sybase && ! use mssql; then
+ einfo "You requested Sybase support, this also enables MSSQL support."
+ fi
+
+ if use mssql || use sybase; then
+ echo "AddJavaLibFile $(java-pkg_getjars jtds-1.3)" >> sqldeveloper/bin/sqldeveloper.conf || die
+ fi
+
+ if use mysql; then
+ echo "AddJavaLibFile $(java-pkg_getjars jdbc-mysql)" >> sqldeveloper/bin/sqldeveloper.conf || die
+ fi
+}
+
+src_install() {
+ dodir /opt/${PN}
+ # NOTE For future version to get that line (what to copy) go to the unpacked sources dir
+ # using `bash` and press Meta+_ (i.e. Meta+Shift+-) -- that is a builtin bash feature ;-)
+ cp -r {configuration,d{ataminer,ropins,vt},e{quinox,xternal},ide,j{avavm,d{bc,ev},lib,views},modules,netbeans,ords,rdbms,s{leepycat,ql{developer,j},vnkit}} \
+ "${D}"/opt/${PN}/ || die "Install failed"
+
+ newbin "${FILESDIR}"/${PN}-r1 ${PN}
+
+ newicon icon.png ${PN}-32x32.png
+ make_desktop_entry ${PN} "Oracle SQL Developer" ${PN}-32x32
+
+ # This is normally called automatically by java-pkg_dojar, which
+ # hasn't been used above. We need to create package.env to help the
+ # launcher select the correct VM.
+ java-pkg_do_write_
+}
+
+pkg_postinst() {
+ # this temporary fixes FileNotFoundException with datamodeler
+ # this is more like a workaround than permanent fix
+ mkdir -p /opt/sqldeveloper/sqldeveloper/extensions/oracle.datamodeler/log || die
+ touch /opt/sqldeveloper/sqldeveloper/extensions/oracle.datamodeler/log/datamodeler.log || die
+ chmod -R 1777 /opt/sqldeveloper/sqldeveloper/extensions/oracle.datamodeler/log/datamodeler.log || die
+
+ # this fixes another datamodeler FileNotFoundException
+ # also more like a workaround than permanent fix
+ chmod 1777 /opt/sqldeveloper/sqldeveloper/extensions/oracle.datamodeler/types/dr_custom_scripts.xml || die
+
+ echo
+ einfo "If you want to use the TNS connection type you need to set up the"
+ einfo "TNS_ADMIN environment variable to point to the directory your"
+ einfo "tnsnames.ora resides in."
+ echo
+}
diff --git a/dev-db/sqlite-3.23.1 b/dev-db/sqlite-3.23.1
deleted file mode 100644
index d282b94621eb..000000000000
--- a/dev-db/sqlite-3.23.1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup test
-DEPEND=sys-libs/zlib:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] icu? ( dev-libs/icu:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) readline? ( sys-libs/readline:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) tcl? ( dev-lang/tcl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) tools? ( dev-lang/tcl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) doc? ( app-arch/unzip ) tcl? ( app-arch/unzip ) test? ( app-arch/unzip >=dev-lang/tcl-8.6:0[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) tools? ( app-arch/unzip ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=A SQL Database Engine in a C Library
-EAPI=6
-HOMEPAGE=https://sqlite.org/
-IUSE=debug doc icu +readline secure-delete static-libs tcl test tools abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=alpha amd64 arm arm64 ~hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris
-LICENSE=public-domain
-RDEPEND=sys-libs/zlib:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] icu? ( dev-libs/icu:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) readline? ( sys-libs/readline:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) tcl? ( dev-lang/tcl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) tools? ( dev-lang/tcl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] )
-SLOT=3
-SRC_URI=doc? ( https://sqlite.org/2018/sqlite-doc-3230100.zip ) tcl? ( https://sqlite.org/2018/sqlite-src-3230100.zip ) test? ( https://sqlite.org/2018/sqlite-src-3230100.zip ) tools? ( https://sqlite.org/2018/sqlite-src-3230100.zip ) !tcl? ( !test? ( !tools? ( https://sqlite.org/2018/sqlite-autoconf-3230100.tar.gz ) ) )
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=7caaf246b3c7c4453ecb81debe0a8c83
diff --git a/dev-db/sqlite-3.24.0 b/dev-db/sqlite-3.24.0
deleted file mode 100644
index 80dce173a4c8..000000000000
--- a/dev-db/sqlite-3.24.0
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup test
-DEPEND=sys-libs/zlib:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] icu? ( dev-libs/icu:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) readline? ( sys-libs/readline:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) tcl? ( dev-lang/tcl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) tools? ( dev-lang/tcl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) doc? ( app-arch/unzip ) tcl? ( app-arch/unzip ) test? ( app-arch/unzip >=dev-lang/tcl-8.6:0[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) tools? ( app-arch/unzip ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=SQL database engine
-EAPI=6
-HOMEPAGE=https://sqlite.org/
-IUSE=debug doc icu +readline secure-delete static-libs tcl test tools abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris
-LICENSE=public-domain
-RDEPEND=sys-libs/zlib:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] icu? ( dev-libs/icu:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) readline? ( sys-libs/readline:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) tcl? ( dev-lang/tcl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) tools? ( dev-lang/tcl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] )
-SLOT=3
-SRC_URI=doc? ( https://sqlite.org/2018/sqlite-doc-3240000.zip ) tcl? ( https://sqlite.org/2018/sqlite-src-3240000.zip ) test? ( https://sqlite.org/2018/sqlite-src-3240000.zip ) tools? ( https://sqlite.org/2018/sqlite-src-3240000.zip ) !tcl? ( !test? ( !tools? ( https://sqlite.org/2018/sqlite-autoconf-3240000.tar.gz ) ) )
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=3bb9719598dc909d4fe7fb9f1ddc5367
diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
new file mode 100644
index 000000000000..3f882c78da90
--- /dev/null
+++ b/dev-db/sqlite/Manifest
@@ -0,0 +1,17 @@
+AUX sqlite-3.21.0-nonfull_archive-build.patch 407 BLAKE2B 38f71008ce9554333668bd1d3a2ff94a95a060e2d920f05f7d7be7e65fb3cbc549d265beaf3bebcf653dc4ab28eccc762fd51e983167c82b899a2d35789ac48a SHA512 1047210c37e638a8bcf80b071e780f28e4260c73c581e0fbf9021d0df5287c5e9a17193e563e8de76b41d3f158ecb8fcccd3df227c1f9360246bc52a70f75651
+AUX sqlite-3.23.0-full_archive-build.patch 13851 BLAKE2B 2de321270247cc436ba5261b75c03534ce43ee415566c896d59ea5e96633887a738e32e15ddaf5fe33c1d594bb60669df8480f210c4bd8c1c4bd0f22e086a18a SHA512 20a1ef769fa9420ebc66941ba6889cdb8e6eca6567662af7462fb5f8618b656e0e57ba86be3abc34e4437fcc979c9b811a117a841ea60a89abf2f2629f7c83b0
+AUX sqlite-3.23.1-full_archive-prohibit_bound_parameters_in_arguments_to_table-valued_functions_within_triggers.patch 796 BLAKE2B ef4f5a9824f2a5492912f9076b9b9db96552e675264e04b093ed907f8b47175b680cab4a4934763910b5320b3f7c5fc2f230b026ad76af6172325abae7cce2c7 SHA512 81ea6bba9f1b06e77f7a5019eeb3e4abfb542c929b00f8d327f8b47101ad046bee40e49c12df00ce50c35ca2ec1906fd82b3fd75d4e5c97db61fa1cc9997d31c
+AUX sqlite-3.23.1-full_archive-tests.patch 6164 BLAKE2B 5aa905e440e49f9863c737e6be3dee070388979f2e2b2e9358725d8ca1de0f52aca51c21f74127b37ae125e96abc8092b4ef9e23eea70b2c7a725aa41fee74b1 SHA512 85dc56b9bc2b3ad904edf4c926d8705a6f5f07d3c21f7c48e22b8702dace3090bf5bbef415486299befd5fac3b49a5776ed2be2d31e7582889e84a79e264a8a9
+AUX sqlite-3.23.1-nonfull_archive-prohibit_bound_parameters_in_arguments_to_table-valued_functions_within_triggers.patch 349 BLAKE2B 89bafb8ecc94927eaecd5619a159519a885fad36989ea53ca0a28857182c954d6763088cb1a5b9d0bba026c1fb90f39f7fc64125fd7f71a5c29e897c7ad6e3ce SHA512 d8e6bdea949e0940ad47fbb59c15d90b15125ff456da640b02d5f8ec26432595aacdb0f4b6aca3e427fa407c4c0297bdf27fecf70d8a8883d15e72fa4b71dc92
+AUX sqlite-3.24.0-full_archive-archive_command_paths_handling.patch 431 BLAKE2B f2ed5b15db753821cef0a51c1301bb79c3fabc908c328ac33b21cef594f068b2f19863cbae4a909e19b7370c5a2c20839edffb407ba1f1946b407672f7bb4fd7 SHA512 d8449092d5892398fd827973d18f7eff189562b70fb5ea93e41a0789a573945c7555b602ec0b73df66af597c6ada79c73edeecb3d496ccbd8b29f05a05871089
+AUX sqlite-3.24.0-full_archive-build.patch 13851 BLAKE2B cc40445f0ef248d21fb40500186614a7092abaa174db63710471c8aae2bf435f8ffd62a7b8332785a8ebe29bad39469ab3ea03d9c8287576c83a927df02b9102 SHA512 e6c6d5545ea7578952bbadef324ca8ee988542917ee314e6da69db69fb5727493bd36f55aa9dd0cece21ec8d9235361b12a87ce768849596cee9a5bf98cb0a5d
+AUX sqlite-3.24.0-nonfull_archive-archive_command_paths_handling.patch 419 BLAKE2B 378e99da6cca145c69bb8fd883f69ae7e82964ed67ac4ad16f89e3a80fe863cfe67b3c68e79c6fa48170b222589f7b0bdd0f623ca8c12732d5c4f93b6b235164 SHA512 29aa164628870e4e002f5a5819f808dcd66da2f84e4202303ebd1eebc3ace5cdad19af60879de54ea5ca05b23e68337a3f4ee3401866197ad3046dd17941f263
+DIST sqlite-autoconf-3230100.tar.gz 2675362 BLAKE2B 2dd075f0dc05425563a8e679bb463724296294b5845746f06b51a24c9601be203ee0f2213f43eaca0757fcbb54b777cee746d873c98f377a0b010d8066d7fcb5 SHA512 52cae7ed0678b763d40373ae260672b906861379428529a58a017cbc82419a6b109e0b2ac7ff5532e6d941693cc4ab68e6563f424b92b3b27c8916859a6e4826
+DIST sqlite-autoconf-3240000.tar.gz 2699252 BLAKE2B c8beb3b90bdd06f76cafeba859cbf91cf4d0cb313fc9202d210ccbad5fca7f9a062ede63387e814d664f0ae38bcfa48db222f466dbcd429fecfb53cfdac155c4 SHA512 eaec866de26003ec36559aab15dd18dc0e6029453002a4eec5e176bb35a712b8b06c235436e6c1a226b67c7eb90d7a26c2b3b3d9a5e6e92a5af485236b77c878
+DIST sqlite-doc-3230100.zip 8882546 BLAKE2B 1e80647e3789b9130a93e881933fb1260794d9ccf359969a16bdeb0df5a51787eaf8404641c4b760bedd45063d46f8874fd74a4da1fef0234f3d8e92db754d76 SHA512 d3a42621480a928446c5f71d0f2ee68e245b071971da38438f9070bd5bcbe1930ea5bd20e06c68543df75badd2e4565abc94420df50b7152c9cd129587471471
+DIST sqlite-doc-3240000.zip 9030826 BLAKE2B 4444e3dd0ce782e19fa01c881e0b5453723419ef1cf95cbe751d759a264bbe288a5c23a2b6514ed459b99b11637349c02def68fed7df8625bfc161307e44564c SHA512 31e9046cea569d7ad1b3af176e1bb18cd59474afb6849871ead6e7c9c096f046162fb313a38684a8c944fad9f689c4c3c692be1d7dc6a8ef5a6685bbc7dfdab6
+DIST sqlite-src-3230100.zip 10849436 BLAKE2B 6bed0a45c83ddb51d665835d174f623b30b1c3b81562fdea2317b58d876a0852136fe4f8a3ebc7679676f366e19c84d0ad2f54d3d8c73712145099975f80cf1a SHA512 69a87b76860c3b172d9e68b0fc0b8c157b606375e2b7d793ce4bd4b898ef737cd721189bc6a3342c749e224e60fa96203d449668c49dff2ebdc682b49630a59b
+DIST sqlite-src-3240000.zip 10980065 BLAKE2B 201a59cb34271e5ac79e96e4e2ea64f8b61aa99c44eedf61c0a21752ad4376caaf7980a6923dca66266b1a315d9867871d0d172c17907b4147c15431aa212a70 SHA512 812c2df7179abb1e445b5b3e161c940b120c53366a7b2c1f0bfc3599cd9921e5543ba39ca3f297eeaefec318f10c15f630f00f9cf04133c7cd419a04f3bbdd0e
+EBUILD sqlite-3.23.1.ebuild 9714 BLAKE2B 14ba94c1080849812a14be508a8813ddd9591f841a7104f77e777793cc40359be5e38e40b151f4e39783bc7066424b74ec7168d0351d30a20d5fe4eb86dfbe15 SHA512 ec11bb7517de52b3185e726b4150d3da164a2abf820b75f6a5eb46a79aa3acf724fc63a1f96b57fcd442d8e059c2dcba102fccb7ce13df1be5fad6475a8b5189
+EBUILD sqlite-3.24.0.ebuild 9548 BLAKE2B 7529ee37ee8f5fcf2103db447d74297f57c677cd5dc315c1c6072700c47173b21d24ef116c865341a289fe19d646f7cfab882a7302672df963dbae898903d526 SHA512 816865d8e9e5a5a27ca25f5c09cbc1293801969a67a38b1fc9e7662beddc728779ff464d69a24c21062291566a3c6d322869c8a3ce3f6d03190bf50568f8eb2f
+MISC metadata.xml 723 BLAKE2B 8866fbde770e7b8582de27303c72df047db80e0d70b1a1ceca0951a05b51bb704452071ceb6c29ecf3704d523888351615d1798aaab092e6b7505d4c6e3698ad SHA512 40616710b1d4edd3e24b5ac0797c1c9b606aeacac9f9543722bc9529e7c2c704a0c10b0ca68a5ba6e0a0ee8bc605212e8a49a050c8687afbdd7dbf28d6d4506a
diff --git a/dev-db/sqlite/files/sqlite-3.21.0-nonfull_archive-build.patch b/dev-db/sqlite/files/sqlite-3.21.0-nonfull_archive-build.patch
new file mode 100644
index 000000000000..06ea8b290536
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.21.0-nonfull_archive-build.patch
@@ -0,0 +1,14 @@
+Fix building with dlopen() not available.
+
+--- /configure.ac
++++ /configure.ac
+@@ -102,6 +102,9 @@
+ [], [enable_dynamic_extensions=yes])
+ if test x"$enable_dynamic_extensions" != "xno"; then
+ AC_SEARCH_LIBS(dlopen, dl)
++ if test "${ac_cv_search_dlopen}" = "no" ; then
++ DYNAMIC_EXTENSION_FLAGS=-DSQLITE_OMIT_LOAD_EXTENSION=1
++ fi
+ else
+ DYNAMIC_EXTENSION_FLAGS=-DSQLITE_OMIT_LOAD_EXTENSION=1
+ fi
diff --git a/dev-db/sqlite/files/sqlite-3.23.0-full_archive-build.patch b/dev-db/sqlite/files/sqlite-3.23.0-full_archive-build.patch
new file mode 100644
index 000000000000..f46df1c15a50
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.23.0-full_archive-build.patch
@@ -0,0 +1,407 @@
+Move some code to libsqlite3.so to avoid duplication.
+Link executables against libsqlite3.so.
+Increase timeout for fuzzcheck.
+Fix building with dlopen() not available.
+
+--- /Makefile.in
++++ /Makefile.in
+@@ -308,6 +308,9 @@
+ # Source code for extensions
+ #
+ SRC += \
++ $(TOP)/ext/expert/sqlite3expert.c \
++ $(TOP)/ext/expert/sqlite3expert.h
++SRC += \
+ $(TOP)/ext/fts1/fts1.c \
+ $(TOP)/ext/fts1/fts1.h \
+ $(TOP)/ext/fts1/fts1_hash.c \
+@@ -356,8 +359,11 @@
+ $(TOP)/ext/rbu/sqlite3rbu.h \
+ $(TOP)/ext/rbu/sqlite3rbu.c
+ SRC += \
++ $(TOP)/ext/misc/appendvfs.c \
+ $(TOP)/ext/misc/json1.c \
+- $(TOP)/ext/misc/stmt.c
++ $(TOP)/ext/misc/sqlar.c \
++ $(TOP)/ext/misc/stmt.c \
++ $(TOP)/ext/misc/zipfile.c
+
+ # Generated source code files
+ #
+@@ -426,7 +432,6 @@
+ # Statically linked extensions
+ #
+ TESTSRC += \
+- $(TOP)/ext/expert/sqlite3expert.c \
+ $(TOP)/ext/expert/test_expert.c \
+ $(TOP)/ext/misc/amatch.c \
+ $(TOP)/ext/misc/carray.c \
+@@ -449,8 +454,7 @@
+ $(TOP)/ext/misc/spellfix.c \
+ $(TOP)/ext/misc/totype.c \
+ $(TOP)/ext/misc/unionvtab.c \
+- $(TOP)/ext/misc/wholenumber.c \
+- $(TOP)/ext/misc/zipfile.c
++ $(TOP)/ext/misc/wholenumber.c
+
+ # Source code to the library files needed by the test fixture
+ #
+@@ -613,25 +617,25 @@
+
+ libtclsqlite3.la: tclsqlite.lo libsqlite3.la
+ $(LTLINK) -no-undefined -o $@ tclsqlite.lo \
+- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
++ libsqlite3.la @TCL_STUB_LIB_SPEC@ \
+ -rpath "$(TCLLIBDIR)" \
+ -version-info "8:6:8" \
+ -avoid-version
+
+-sqlite3$(TEXE): shell.c sqlite3.c
+- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
+- shell.c sqlite3.c \
+- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
++sqlite3$(TEXE): shell.c libsqlite3.la
++ $(LTLINK) $(READLINE_FLAGS) -o $@ \
++ shell.c libsqlite3.la \
++ $(LIBREADLINE)
+
+-sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
++sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
+
+-dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
++dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
+
+-scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
++scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la
+ $(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
+- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
++ $(TOP)/ext/misc/scrub.c libsqlite3.la
+
+ srcck1$(BEXE): $(TOP)/tool/srcck1.c
+ $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
+@@ -710,7 +714,7 @@
+ # Rule to build the amalgamation
+ #
+ sqlite3.lo: sqlite3.c
+- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
++ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
+
+ # Rules to build the LEMON compiler generator
+ #
+@@ -1004,14 +1008,9 @@
+ # Source files that go into making shell.c
+ SHELL_SRC = \
+ $(TOP)/src/shell.c.in \
+- $(TOP)/ext/misc/appendvfs.c \
+ $(TOP)/ext/misc/shathree.c \
+ $(TOP)/ext/misc/fileio.c \
+ $(TOP)/ext/misc/completion.c \
+- $(TOP)/ext/misc/sqlar.c \
+- $(TOP)/ext/expert/sqlite3expert.c \
+- $(TOP)/ext/expert/sqlite3expert.h \
+- $(TOP)/ext/misc/zipfile.c \
+ $(TOP)/src/test_windirent.c
+
+ shell.c: $(SHELL_SRC) $(TOP)/tool/mkshellc.tcl
+@@ -1170,15 +1169,15 @@
+
+ # Fuzz testing
+ fuzztest: fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+- ./fuzzcheck$(TEXE) $(FUZZDATA)
++ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
+ ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+
+ fastfuzztest: fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+- ./fuzzcheck$(TEXE) --limit-mem 100M $(FUZZDATA)
++ ./fuzzcheck$(TEXE) --limit-mem 100M --timeout 3600 $(FUZZDATA)
+ ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+
+ valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
++ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
+ valgrind ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+
+ # The veryquick.test TCL tests.
+@@ -1209,24 +1208,23 @@
+ smoketest: $(TESTPROGS) fuzzcheck$(TEXE)
+ ./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS)
+
+-sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
++sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c
+
+-sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
+- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la
++ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
+
+-sqltclsh.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/ext/misc/appendvfs.c $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
++sqltclsh.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in >sqltclsh.c
+
+-sqltclsh$(TEXE): sqltclsh.c
+- $(LTLINK) sqltclsh.c -o $@ $(LIBTCL) $(TLIBS)
++sqltclsh$(TEXE): sqltclsh.c libsqlite3.la
++ $(LTLINK) sqltclsh.c -o $@ libsqlite3.la $(LIBTCL)
+
+-sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c
+- $(LTLINK) $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c -o sqlite3_expert $(TLIBS)
++sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/expert.c libsqlite3.la
++ $(LTLINK) $(TOP)/ext/expert/expert.c -o sqlite3_expert libsqlite3.la
+
+ CHECKER_DEPS =\
+ $(TOP)/tool/mkccode.tcl \
+- sqlite3.c \
+ $(TOP)/src/tclsqlite.c \
+ $(TOP)/ext/repair/sqlite3_checker.tcl \
+ $(TOP)/ext/repair/checkindex.c \
+@@ -1237,30 +1235,30 @@
+ sqlite3_checker.c: $(CHECKER_DEPS)
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/ext/repair/sqlite3_checker.c.in >$@
+
+-sqlite3_checker$(TEXE): sqlite3_checker.c
+- $(LTLINK) sqlite3_checker.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_checker$(TEXE): sqlite3_checker.c libsqlite3.la
++ $(LTLINK) sqlite3_checker.c -o $@ libsqlite3.la $(LIBTCL)
+
+-dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
++dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c libsqlite3.la
+ $(LTLINK) -DDBDUMP_STANDALONE -o $@ \
+- $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
++ $(TOP)/ext/misc/dbdump.c libsqlite3.la
+
+-showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
++showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
+
+-showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
++showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
+
+-showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
++showjournal$(TEXE): $(TOP)/tool/showjournal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c
+
+-showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
++showwal$(TEXE): $(TOP)/tool/showwal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showwal.c
+
+ showshm$(TEXE): $(TOP)/tool/showshm.c
+ $(LTLINK) -o $@ $(TOP)/tool/showshm.c
+
+-changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
++changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
+
+ rollback-test$(TEXE): $(TOP)/tool/rollback-test.c sqlite3.lo
+ $(LTLINK) -o $@ $(TOP)/tool/rollback-test.c sqlite3.lo $(TLIBS)
+@@ -1279,11 +1277,11 @@
+ kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c
+ $(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
+
+-rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
+- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
++rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la
++ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
+
+-loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
+- $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
++loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
++ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
+
+ # This target will fail if the SQLite amalgamation contains any exported
+ # symbols that do not begin with "sqlite3_". It is run as part of the
+--- /configure.ac
++++ /configure.ac
+@@ -590,6 +590,9 @@
+ if test "${use_loadextension}" = "yes" ; then
+ OPT_FEATURE_FLAGS=""
+ AC_SEARCH_LIBS(dlopen, dl)
++ if test "${ac_cv_search_dlopen}" = "no" ; then
++ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
++ fi
+ else
+ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
+ fi
+--- /ext/misc/sqlar.c
++++ /ext/misc/sqlar.c
+@@ -14,6 +14,8 @@
+ ** for working with sqlar archives and used by the shell tool's built-in
+ ** sqlar support.
+ */
++#ifdef SQLITE_HAVE_ZLIB
++
+ #include "sqlite3ext.h"
+ SQLITE_EXTENSION_INIT1
+ #include <zlib.h>
+@@ -119,3 +121,5 @@
+ }
+ return rc;
+ }
++
++#endif /* SQLITE_HAVE_ZLIB */
+--- /ext/misc/zipfile.c
++++ /ext/misc/zipfile.c
+@@ -24,6 +24,8 @@
+ ** * No support for zip64 extensions
+ ** * Only the "inflate/deflate" (zlib) compression method is supported
+ */
++#ifdef SQLITE_HAVE_ZLIB
++
+ #include "sqlite3ext.h"
+ SQLITE_EXTENSION_INIT1
+ #include <stdio.h>
+@@ -2175,3 +2177,5 @@
+ (void)pzErrMsg; /* Unused parameter */
+ return zipfileRegister(db);
+ }
++
++#endif /* SQLITE_HAVE_ZLIB */
+--- /ext/repair/sqlite3_checker.c.in
++++ /ext/repair/sqlite3_checker.c.in
+@@ -2,6 +2,7 @@
+ ** Read an SQLite database file and analyze its space utilization. Generate
+ ** text on standard output.
+ */
++#define SQLITE_CORE 1
+ #define TCLSH_INIT_PROC sqlite3_checker_init_proc
+ #define SQLITE_ENABLE_DBPAGE_VTAB 1
+ #define SQLITE_ENABLE_JSON1 1
+@@ -14,7 +15,7 @@
+ #define SQLITE_OMIT_SHARED_CACHE 1
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+-INCLUDE sqlite3.c
++#include "sqlite3.h"
+ INCLUDE $ROOT/src/tclsqlite.c
+ INCLUDE $ROOT/ext/misc/btreeinfo.c
+ INCLUDE $ROOT/ext/repair/checkindex.c
+--- /src/shell.c.in
++++ /src/shell.c.in
+@@ -61,6 +61,7 @@
+ #include <stdio.h>
+ #include <assert.h>
+ #include "sqlite3.h"
++#include "ext/expert/sqlite3expert.h"
+ typedef sqlite3_int64 i64;
+ typedef sqlite3_uint64 u64;
+ typedef unsigned char u8;
+@@ -124,6 +125,10 @@
+ # define SHELL_USE_LOCAL_GETLINE 1
+ #endif
+
++#ifdef SQLITE_HAVE_ZLIB
++#include <zlib.h>
++#endif
++
+
+ #if defined(_WIN32) || defined(WIN32)
+ # include <io.h>
+@@ -966,13 +971,6 @@
+ INCLUDE ../ext/misc/shathree.c
+ INCLUDE ../ext/misc/fileio.c
+ INCLUDE ../ext/misc/completion.c
+-INCLUDE ../ext/misc/appendvfs.c
+-#ifdef SQLITE_HAVE_ZLIB
+-INCLUDE ../ext/misc/zipfile.c
+-INCLUDE ../ext/misc/sqlar.c
+-#endif
+-INCLUDE ../ext/expert/sqlite3expert.h
+-INCLUDE ../ext/expert/sqlite3expert.c
+
+ #if defined(SQLITE_ENABLE_SESSION)
+ /*
+@@ -3522,7 +3520,9 @@
+ sqlite3_shathree_init(p->db, 0, 0);
+ sqlite3_completion_init(p->db, 0, 0);
+ #ifdef SQLITE_HAVE_ZLIB
++ extern int sqlite3_zipfile_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_zipfile_init(p->db, 0, 0);
++ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_sqlar_init(p->db, 0, 0);
+ #endif
+ sqlite3_create_function(p->db, "shell_add_schema", 3, SQLITE_UTF8, 0,
+@@ -5411,6 +5411,7 @@
+ goto end_ar_command;
+ }
+ sqlite3_fileio_init(cmd.db, 0, 0);
++ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_sqlar_init(cmd.db, 0, 0);
+ sqlite3_create_function(cmd.db, "shell_putsnl", 1, SQLITE_UTF8, cmd.p,
+ shellPutsFunc, 0, 0);
+@@ -8367,6 +8368,7 @@
+ #endif
+ }
+ data.out = stdout;
++ extern int sqlite3_appendvfs_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_appendvfs_init(0,0,0);
+
+ /* Go ahead and open the database file if it already exists. If the
+--- /tool/mksqlite3c.tcl
++++ /tool/mksqlite3c.tcl
+@@ -116,6 +116,7 @@
+ rtree.h
+ sqlite3session.h
+ sqlite3.h
++ sqlite3expert.h
+ sqlite3ext.h
+ sqlite3rbu.h
+ sqliteicu.h
+@@ -400,6 +401,10 @@
+ json1.c
+ fts5.c
+ stmt.c
++ appendvfs.c
++ sqlar.c
++ sqlite3expert.c
++ zipfile.c
+ } {
+ copy_file tsrc/$file
+ }
+--- /tool/sqlite3_analyzer.c.in
++++ /tool/sqlite3_analyzer.c.in
+@@ -14,9 +14,6 @@
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+ #define SQLITE_OMIT_LOAD_EXTENSION 1
+-#ifndef USE_EXTERNAL_SQLITE
+-INCLUDE sqlite3.c
+-#endif
+ INCLUDE $ROOT/src/tclsqlite.c
+
+ const char *sqlite3_analyzer_init_proc(Tcl_Interp *interp){
+--- /tool/sqltclsh.c.in
++++ /tool/sqltclsh.c.in
+@@ -27,19 +27,17 @@
+ #define SQLITE_OMIT_SHARED_CACHE 1
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+-INCLUDE sqlite3.c
+-INCLUDE $ROOT/ext/misc/appendvfs.c
+-#ifdef SQLITE_HAVE_ZLIB
+-INCLUDE $ROOT/ext/misc/zipfile.c
+-INCLUDE $ROOT/ext/misc/sqlar.c
+-#endif
++#include "sqlite3.h"
+ INCLUDE $ROOT/src/tclsqlite.c
+
+ const char *sqlite3_tclapp_init_proc(Tcl_Interp *interp){
+ (void)interp;
++ extern int sqlite3_appendvfs_init(sqlite3 *,char **, const sqlite3_api_routines *);
+ sqlite3_appendvfs_init(0,0,0);
+ #ifdef SQLITE_HAVE_ZLIB
++ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_auto_extension((void(*)(void))sqlite3_sqlar_init);
++ extern int sqlite3_zipfile_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_auto_extension((void(*)(void))sqlite3_zipfile_init);
+ #endif
+
diff --git a/dev-db/sqlite/files/sqlite-3.23.1-full_archive-prohibit_bound_parameters_in_arguments_to_table-valued_functions_within_triggers.patch b/dev-db/sqlite/files/sqlite-3.23.1-full_archive-prohibit_bound_parameters_in_arguments_to_table-valued_functions_within_triggers.patch
new file mode 100644
index 000000000000..c97679daf7d9
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.23.1-full_archive-prohibit_bound_parameters_in_arguments_to_table-valued_functions_within_triggers.patch
@@ -0,0 +1,24 @@
+https://sqlite.org/src/info/b7178209152452e8
+
+--- /src/attach.c
++++ /src/attach.c
+@@ -502,6 +502,9 @@
+ if( sqlite3FixSelect(pFix, pItem->pSelect) ) return 1;
+ if( sqlite3FixExpr(pFix, pItem->pOn) ) return 1;
+ #endif
++ if( pItem->fg.isTabFunc && sqlite3FixExprList(pFix, pItem->u1.pFuncArg) ){
++ return 1;
++ }
+ }
+ return 0;
+ }
+--- /test/triggerE.test
++++ /test/triggerE.test
+@@ -57,6 +57,7 @@
+ 7 { BEFORE DELETE ON t1 BEGIN SELECT * FROM t2 ORDER BY ?; END; }
+ 8 { BEFORE UPDATE ON t1 BEGIN UPDATE t2 SET c = ?; END; }
+ 9 { BEFORE UPDATE ON t1 BEGIN UPDATE t2 SET c = 1 WHERE d = ?; END; }
++ 10 { AFTER INSERT ON t1 BEGIN SELECT * FROM pragma_stats(?); END; }
+ } {
+ catchsql {drop trigger tr1}
+ do_catchsql_test 1.1.$tn "CREATE TRIGGER tr1 $defn" [list 1 $errmsg]
diff --git a/dev-db/sqlite/files/sqlite-3.23.1-full_archive-tests.patch b/dev-db/sqlite/files/sqlite-3.23.1-full_archive-tests.patch
new file mode 100644
index 000000000000..ef813f67e743
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.23.1-full_archive-tests.patch
@@ -0,0 +1,224 @@
+https://sqlite.org/src/info/893e6089c875e947
+https://sqlite.org/src/info/576a8f69ae25883f
+https://sqlite.org/src/info/de508e831a43f02c
+
+--- /ext/fts3/fts3.c
++++ /ext/fts3/fts3.c
+@@ -3963,7 +3963,7 @@
+
+ #ifdef SQLITE_TEST
+ if( rc==SQLITE_OK ){
+- rc = sqlite3Fts3ExprInitTestInterface(db);
++ rc = sqlite3Fts3ExprInitTestInterface(db, pHash);
+ }
+ #endif
+
+--- /ext/fts3/fts3Int.h
++++ /ext/fts3/fts3Int.h
+@@ -584,7 +584,7 @@
+ );
+ void sqlite3Fts3ExprFree(Fts3Expr *);
+ #ifdef SQLITE_TEST
+-int sqlite3Fts3ExprInitTestInterface(sqlite3 *db);
++int sqlite3Fts3ExprInitTestInterface(sqlite3 *db, Fts3Hash*);
+ int sqlite3Fts3InitTerm(sqlite3 *db);
+ #endif
+
+--- /ext/fts3/fts3_expr.c
++++ /ext/fts3/fts3_expr.c
+@@ -1109,34 +1109,6 @@
+ #include <stdio.h>
+
+ /*
+-** Function to query the hash-table of tokenizers (see README.tokenizers).
+-*/
+-static int queryTestTokenizer(
+- sqlite3 *db,
+- const char *zName,
+- const sqlite3_tokenizer_module **pp
+-){
+- int rc;
+- sqlite3_stmt *pStmt;
+- const char zSql[] = "SELECT fts3_tokenizer(?)";
+-
+- *pp = 0;
+- rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0);
+- if( rc!=SQLITE_OK ){
+- return rc;
+- }
+-
+- sqlite3_bind_text(pStmt, 1, zName, -1, SQLITE_STATIC);
+- if( SQLITE_ROW==sqlite3_step(pStmt) ){
+- if( sqlite3_column_type(pStmt, 0)==SQLITE_BLOB ){
+- memcpy((void *)pp, sqlite3_column_blob(pStmt, 0), sizeof(*pp));
+- }
+- }
+-
+- return sqlite3_finalize(pStmt);
+-}
+-
+-/*
+ ** Return a pointer to a buffer containing a text representation of the
+ ** expression passed as the first argument. The buffer is obtained from
+ ** sqlite3_malloc(). It is the responsibility of the caller to use
+@@ -1203,12 +1175,12 @@
+ **
+ ** SELECT fts3_exprtest('simple', 'Bill col2:Bloggs', 'col1', 'col2');
+ */
+-static void fts3ExprTest(
++static void fts3ExprTestCommon(
++ int bRebalance,
+ sqlite3_context *context,
+ int argc,
+ sqlite3_value **argv
+ ){
+- sqlite3_tokenizer_module const *pModule = 0;
+ sqlite3_tokenizer *pTokenizer = 0;
+ int rc;
+ char **azCol = 0;
+@@ -1218,7 +1190,9 @@
+ int ii;
+ Fts3Expr *pExpr;
+ char *zBuf = 0;
+- sqlite3 *db = sqlite3_context_db_handle(context);
++ Fts3Hash *pHash = (Fts3Hash*)sqlite3_user_data(context);
++ const char *zTokenizer = 0;
++ char *zErr = 0;
+
+ if( argc<3 ){
+ sqlite3_result_error(context,
+@@ -1227,23 +1201,17 @@
+ return;
+ }
+
+- rc = queryTestTokenizer(db,
+- (const char *)sqlite3_value_text(argv[0]), &pModule);
+- if( rc==SQLITE_NOMEM ){
+- sqlite3_result_error_nomem(context);
+- goto exprtest_out;
+- }else if( !pModule ){
+- sqlite3_result_error(context, "No such tokenizer module", -1);
+- goto exprtest_out;
+- }
+-
+- rc = pModule->xCreate(0, 0, &pTokenizer);
+- assert( rc==SQLITE_NOMEM || rc==SQLITE_OK );
+- if( rc==SQLITE_NOMEM ){
+- sqlite3_result_error_nomem(context);
+- goto exprtest_out;
++ zTokenizer = (const char*)sqlite3_value_text(argv[0]);
++ rc = sqlite3Fts3InitTokenizer(pHash, zTokenizer, &pTokenizer, &zErr);
++ if( rc!=SQLITE_OK ){
++ if( rc==SQLITE_NOMEM ){
++ sqlite3_result_error_nomem(context);
++ }else{
++ sqlite3_result_error(context, zErr, -1);
++ }
++ sqlite3_free(zErr);
++ return;
+ }
+- pTokenizer->pModule = pModule;
+
+ zExpr = (const char *)sqlite3_value_text(argv[1]);
+ nExpr = sqlite3_value_bytes(argv[1]);
+@@ -1257,7 +1225,7 @@
+ azCol[ii] = (char *)sqlite3_value_text(argv[ii+2]);
+ }
+
+- if( sqlite3_user_data(context) ){
++ if( bRebalance ){
+ char *zDummy = 0;
+ rc = sqlite3Fts3ExprParse(
+ pTokenizer, 0, azCol, 0, nCol, nCol, zExpr, nExpr, &pExpr, &zDummy
+@@ -1283,23 +1251,38 @@
+ sqlite3Fts3ExprFree(pExpr);
+
+ exprtest_out:
+- if( pModule && pTokenizer ){
+- rc = pModule->xDestroy(pTokenizer);
++ if( pTokenizer ){
++ rc = pTokenizer->pModule->xDestroy(pTokenizer);
+ }
+ sqlite3_free(azCol);
+ }
+
++static void fts3ExprTest(
++ sqlite3_context *context,
++ int argc,
++ sqlite3_value **argv
++){
++ fts3ExprTestCommon(0, context, argc, argv);
++}
++static void fts3ExprTestRebalance(
++ sqlite3_context *context,
++ int argc,
++ sqlite3_value **argv
++){
++ fts3ExprTestCommon(1, context, argc, argv);
++}
++
+ /*
+ ** Register the query expression parser test function fts3_exprtest()
+ ** with database connection db.
+ */
+-int sqlite3Fts3ExprInitTestInterface(sqlite3* db){
++int sqlite3Fts3ExprInitTestInterface(sqlite3 *db, Fts3Hash *pHash){
+ int rc = sqlite3_create_function(
+- db, "fts3_exprtest", -1, SQLITE_UTF8, 0, fts3ExprTest, 0, 0
++ db, "fts3_exprtest", -1, SQLITE_UTF8, (void*)pHash, fts3ExprTest, 0, 0
+ );
+ if( rc==SQLITE_OK ){
+ rc = sqlite3_create_function(db, "fts3_exprtest_rebalance",
+- -1, SQLITE_UTF8, (void *)1, fts3ExprTest, 0, 0
++ -1, SQLITE_UTF8, (void*)pHash, fts3ExprTestRebalance, 0, 0
+ );
+ }
+ return rc;
+--- /test/fts3expr.test
++++ /test/fts3expr.test
+@@ -409,7 +409,7 @@
+ } {1 {Usage: fts3_exprtest(tokenizer, expr, col1, ...}}
+ do_test fts3expr-5.2 {
+ catchsql { SELECT fts3_exprtest('doesnotexist', 'a b', 'c') }
+-} {1 {No such tokenizer module}}
++} {1 {unknown tokenizer: doesnotexist}}
+ do_test fts3expr-5.3 {
+ catchsql { SELECT fts3_exprtest('simple', 'a b OR', 'c') }
+ } {1 {Error parsing expression}}
+--- /test/fts3expr4.test
++++ /test/fts3expr4.test
+@@ -29,7 +29,8 @@
+ }
+
+ proc do_icu_expr_test {tn expr res} {
+- uplevel [list do_test $tn [list test_fts3expr icu $expr] [list {*}$res]]
++ set res2 [list {*}$res]
++ uplevel [list do_test $tn [list test_fts3expr "icu en_US" $expr] $res2]
+ }
+
+ proc do_simple_expr_test {tn expr res} {
+--- /test/zipfile2.test
++++ /test/zipfile2.test
+@@ -52,17 +52,15 @@
+ CREATE VIRTUAL TABLE fff USING zipfile('test''zip');
+ }
+
+-if {$::tcl_platform(platform)=="windows"} {
+- set res {1 {cannot open file: testdir}}
+-} else {
+- set res {1 {error in fread()}}
+-}
+ do_test 2.0 {
+ forcedelete testdir
+ file mkdir testdir
+ execsql { CREATE VIRTUAL TABLE hhh USING zipfile('testdir') }
+- catchsql { SELECT * FROM hhh }
+-} $res
++ lindex [catchsql {
++ SELECT * FROM hhh;
++ INSERT INTO hhh(name, data) VALUES('1.txt', 'file data');
++ }] 0
++} 1
+
+
+ set archive {
diff --git a/dev-db/sqlite/files/sqlite-3.23.1-nonfull_archive-prohibit_bound_parameters_in_arguments_to_table-valued_functions_within_triggers.patch b/dev-db/sqlite/files/sqlite-3.23.1-nonfull_archive-prohibit_bound_parameters_in_arguments_to_table-valued_functions_within_triggers.patch
new file mode 100644
index 000000000000..c60cd9c90dcb
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.23.1-nonfull_archive-prohibit_bound_parameters_in_arguments_to_table-valued_functions_within_triggers.patch
@@ -0,0 +1,14 @@
+https://sqlite.org/src/info/b7178209152452e8
+
+--- /sqlite3.c
++++ /sqlite3.c
+@@ -102780,6 +102780,9 @@
+ if( sqlite3FixSelect(pFix, pItem->pSelect) ) return 1;
+ if( sqlite3FixExpr(pFix, pItem->pOn) ) return 1;
+ #endif
++ if( pItem->fg.isTabFunc && sqlite3FixExprList(pFix, pItem->u1.pFuncArg) ){
++ return 1;
++ }
+ }
+ return 0;
+ }
diff --git a/dev-db/sqlite/files/sqlite-3.24.0-full_archive-archive_command_paths_handling.patch b/dev-db/sqlite/files/sqlite-3.24.0-full_archive-archive_command_paths_handling.patch
new file mode 100644
index 000000000000..5c27aa3465b0
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.24.0-full_archive-archive_command_paths_handling.patch
@@ -0,0 +1,14 @@
+https://sqlite.org/src/info/27291f2d7fd4dadf
+
+--- /src/shell.c.in
++++ /src/shell.c.in
+@@ -5284,7 +5284,8 @@
+ "SELECT "
+ " ($dir || name),"
+ " writefile(($dir || name), %s, mode, mtime) "
+- "FROM %s WHERE (%s) AND (data IS NULL OR $dirOnly = 0)";
++ "FROM %s WHERE (%s) AND (data IS NULL OR $dirOnly = 0)"
++ " AND name NOT GLOB '*..[/\\]*'";
+
+ const char *azExtraArg[] = {
+ "sqlar_uncompress(data, sz)",
diff --git a/dev-db/sqlite/files/sqlite-3.24.0-full_archive-build.patch b/dev-db/sqlite/files/sqlite-3.24.0-full_archive-build.patch
new file mode 100644
index 000000000000..072b8049c144
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.24.0-full_archive-build.patch
@@ -0,0 +1,407 @@
+Move some code to libsqlite3.so to avoid duplication.
+Link executables against libsqlite3.so.
+Increase timeout for fuzzcheck.
+Fix building with dlopen() not available.
+
+--- /Makefile.in
++++ /Makefile.in
+@@ -309,6 +309,9 @@
+ # Source code for extensions
+ #
+ SRC += \
++ $(TOP)/ext/expert/sqlite3expert.c \
++ $(TOP)/ext/expert/sqlite3expert.h
++SRC += \
+ $(TOP)/ext/fts1/fts1.c \
+ $(TOP)/ext/fts1/fts1.h \
+ $(TOP)/ext/fts1/fts1_hash.c \
+@@ -357,8 +360,11 @@
+ $(TOP)/ext/rbu/sqlite3rbu.h \
+ $(TOP)/ext/rbu/sqlite3rbu.c
+ SRC += \
++ $(TOP)/ext/misc/appendvfs.c \
+ $(TOP)/ext/misc/json1.c \
+- $(TOP)/ext/misc/stmt.c
++ $(TOP)/ext/misc/sqlar.c \
++ $(TOP)/ext/misc/stmt.c \
++ $(TOP)/ext/misc/zipfile.c
+
+ # Generated source code files
+ #
+@@ -427,7 +433,6 @@
+ # Statically linked extensions
+ #
+ TESTSRC += \
+- $(TOP)/ext/expert/sqlite3expert.c \
+ $(TOP)/ext/expert/test_expert.c \
+ $(TOP)/ext/misc/amatch.c \
+ $(TOP)/ext/misc/carray.c \
+@@ -450,8 +455,7 @@
+ $(TOP)/ext/misc/spellfix.c \
+ $(TOP)/ext/misc/totype.c \
+ $(TOP)/ext/misc/unionvtab.c \
+- $(TOP)/ext/misc/wholenumber.c \
+- $(TOP)/ext/misc/zipfile.c
++ $(TOP)/ext/misc/wholenumber.c
+
+ # Source code to the library files needed by the test fixture
+ #
+@@ -615,25 +619,25 @@
+
+ libtclsqlite3.la: tclsqlite.lo libsqlite3.la
+ $(LTLINK) -no-undefined -o $@ tclsqlite.lo \
+- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
++ libsqlite3.la @TCL_STUB_LIB_SPEC@ \
+ -rpath "$(TCLLIBDIR)" \
+ -version-info "8:6:8" \
+ -avoid-version
+
+-sqlite3$(TEXE): shell.c sqlite3.c
+- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
+- shell.c sqlite3.c \
+- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
++sqlite3$(TEXE): shell.c libsqlite3.la
++ $(LTLINK) $(READLINE_FLAGS) -o $@ \
++ shell.c libsqlite3.la \
++ $(LIBREADLINE)
+
+-sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
++sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
+
+-dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
++dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
+
+-scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
++scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la
+ $(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
+- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
++ $(TOP)/ext/misc/scrub.c libsqlite3.la
+
+ srcck1$(BEXE): $(TOP)/tool/srcck1.c
+ $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
+@@ -712,7 +716,7 @@
+ # Rule to build the amalgamation
+ #
+ sqlite3.lo: sqlite3.c
+- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
++ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
+
+ # Rules to build the LEMON compiler generator
+ #
+@@ -1009,14 +1013,9 @@
+ # Source files that go into making shell.c
+ SHELL_SRC = \
+ $(TOP)/src/shell.c.in \
+- $(TOP)/ext/misc/appendvfs.c \
+ $(TOP)/ext/misc/shathree.c \
+ $(TOP)/ext/misc/fileio.c \
+ $(TOP)/ext/misc/completion.c \
+- $(TOP)/ext/misc/sqlar.c \
+- $(TOP)/ext/expert/sqlite3expert.c \
+- $(TOP)/ext/expert/sqlite3expert.h \
+- $(TOP)/ext/misc/zipfile.c \
+ $(TOP)/src/test_windirent.c
+
+ shell.c: $(SHELL_SRC) $(TOP)/tool/mkshellc.tcl
+@@ -1175,15 +1174,15 @@
+
+ # Fuzz testing
+ fuzztest: fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+- ./fuzzcheck$(TEXE) $(FUZZDATA)
++ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
+ ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+
+ fastfuzztest: fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+- ./fuzzcheck$(TEXE) --limit-mem 100M $(FUZZDATA)
++ ./fuzzcheck$(TEXE) --limit-mem 100M --timeout 3600 $(FUZZDATA)
+ ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+
+ valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
++ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
+ valgrind ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+
+ # The veryquick.test TCL tests.
+@@ -1214,24 +1213,23 @@
+ smoketest: $(TESTPROGS) fuzzcheck$(TEXE)
+ ./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS)
+
+-sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
++sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c
+
+-sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
+- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la
++ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
+
+-sqltclsh.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/ext/misc/appendvfs.c $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
++sqltclsh.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in >sqltclsh.c
+
+-sqltclsh$(TEXE): sqltclsh.c
+- $(LTLINK) sqltclsh.c -o $@ $(LIBTCL) $(TLIBS)
++sqltclsh$(TEXE): sqltclsh.c libsqlite3.la
++ $(LTLINK) sqltclsh.c -o $@ libsqlite3.la $(LIBTCL)
+
+-sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c
+- $(LTLINK) $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c -o sqlite3_expert $(TLIBS)
++sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/expert.c libsqlite3.la
++ $(LTLINK) $(TOP)/ext/expert/expert.c -o sqlite3_expert libsqlite3.la
+
+ CHECKER_DEPS =\
+ $(TOP)/tool/mkccode.tcl \
+- sqlite3.c \
+ $(TOP)/src/tclsqlite.c \
+ $(TOP)/ext/repair/sqlite3_checker.tcl \
+ $(TOP)/ext/repair/checkindex.c \
+@@ -1242,30 +1240,30 @@
+ sqlite3_checker.c: $(CHECKER_DEPS)
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/ext/repair/sqlite3_checker.c.in >$@
+
+-sqlite3_checker$(TEXE): sqlite3_checker.c
+- $(LTLINK) sqlite3_checker.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_checker$(TEXE): sqlite3_checker.c libsqlite3.la
++ $(LTLINK) sqlite3_checker.c -o $@ libsqlite3.la $(LIBTCL)
+
+-dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
++dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c libsqlite3.la
+ $(LTLINK) -DDBDUMP_STANDALONE -o $@ \
+- $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
++ $(TOP)/ext/misc/dbdump.c libsqlite3.la
+
+-showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
++showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
+
+-showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
++showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
+
+-showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
++showjournal$(TEXE): $(TOP)/tool/showjournal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c
+
+-showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
++showwal$(TEXE): $(TOP)/tool/showwal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showwal.c
+
+ showshm$(TEXE): $(TOP)/tool/showshm.c
+ $(LTLINK) -o $@ $(TOP)/tool/showshm.c
+
+-changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
++changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
+
+ rollback-test$(TEXE): $(TOP)/tool/rollback-test.c sqlite3.lo
+ $(LTLINK) -o $@ $(TOP)/tool/rollback-test.c sqlite3.lo $(TLIBS)
+@@ -1284,11 +1282,11 @@
+ kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c
+ $(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
+
+-rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
+- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
++rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la
++ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
+
+-loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
+- $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
++loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
++ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
+
+ # This target will fail if the SQLite amalgamation contains any exported
+ # symbols that do not begin with "sqlite3_". It is run as part of the
+--- /configure.ac
++++ /configure.ac
+@@ -590,6 +590,9 @@
+ if test "${use_loadextension}" = "yes" ; then
+ OPT_FEATURE_FLAGS=""
+ AC_SEARCH_LIBS(dlopen, dl)
++ if test "${ac_cv_search_dlopen}" = "no" ; then
++ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
++ fi
+ else
+ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
+ fi
+--- /ext/misc/sqlar.c
++++ /ext/misc/sqlar.c
+@@ -14,6 +14,8 @@
+ ** for working with sqlar archives and used by the shell tool's built-in
+ ** sqlar support.
+ */
++#ifdef SQLITE_HAVE_ZLIB
++
+ #include "sqlite3ext.h"
+ SQLITE_EXTENSION_INIT1
+ #include <zlib.h>
+@@ -119,3 +121,5 @@
+ }
+ return rc;
+ }
++
++#endif /* SQLITE_HAVE_ZLIB */
+--- /ext/misc/zipfile.c
++++ /ext/misc/zipfile.c
+@@ -24,6 +24,8 @@
+ ** * No support for zip64 extensions
+ ** * Only the "inflate/deflate" (zlib) compression method is supported
+ */
++#ifdef SQLITE_HAVE_ZLIB
++
+ #include "sqlite3ext.h"
+ SQLITE_EXTENSION_INIT1
+ #include <stdio.h>
+@@ -2175,3 +2177,5 @@
+ (void)pzErrMsg; /* Unused parameter */
+ return zipfileRegister(db);
+ }
++
++#endif /* SQLITE_HAVE_ZLIB */
+--- /ext/repair/sqlite3_checker.c.in
++++ /ext/repair/sqlite3_checker.c.in
+@@ -2,6 +2,7 @@
+ ** Read an SQLite database file and analyze its space utilization. Generate
+ ** text on standard output.
+ */
++#define SQLITE_CORE 1
+ #define TCLSH_INIT_PROC sqlite3_checker_init_proc
+ #define SQLITE_ENABLE_DBPAGE_VTAB 1
+ #define SQLITE_ENABLE_JSON1 1
+@@ -14,7 +15,7 @@
+ #define SQLITE_OMIT_SHARED_CACHE 1
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+-INCLUDE sqlite3.c
++#include "sqlite3.h"
+ INCLUDE $ROOT/src/tclsqlite.c
+ INCLUDE $ROOT/ext/misc/btreeinfo.c
+ INCLUDE $ROOT/ext/repair/checkindex.c
+--- /src/shell.c.in
++++ /src/shell.c.in
+@@ -61,6 +61,7 @@
+ #include <stdio.h>
+ #include <assert.h>
+ #include "sqlite3.h"
++#include "ext/expert/sqlite3expert.h"
+ typedef sqlite3_int64 i64;
+ typedef sqlite3_uint64 u64;
+ typedef unsigned char u8;
+@@ -124,6 +125,10 @@
+ # define SHELL_USE_LOCAL_GETLINE 1
+ #endif
+
++#ifdef SQLITE_HAVE_ZLIB
++#include <zlib.h>
++#endif
++
+
+ #if defined(_WIN32) || defined(WIN32)
+ # include <io.h>
+@@ -939,13 +944,6 @@
+ INCLUDE ../ext/misc/shathree.c
+ INCLUDE ../ext/misc/fileio.c
+ INCLUDE ../ext/misc/completion.c
+-INCLUDE ../ext/misc/appendvfs.c
+-#ifdef SQLITE_HAVE_ZLIB
+-INCLUDE ../ext/misc/zipfile.c
+-INCLUDE ../ext/misc/sqlar.c
+-#endif
+-INCLUDE ../ext/expert/sqlite3expert.h
+-INCLUDE ../ext/expert/sqlite3expert.c
+
+ #if defined(SQLITE_ENABLE_SESSION)
+ /*
+@@ -3632,7 +3630,9 @@
+ sqlite3_shathree_init(p->db, 0, 0);
+ sqlite3_completion_init(p->db, 0, 0);
+ #ifdef SQLITE_HAVE_ZLIB
++ extern int sqlite3_zipfile_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_zipfile_init(p->db, 0, 0);
++ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_sqlar_init(p->db, 0, 0);
+ #endif
+ sqlite3_create_function(p->db, "shell_add_schema", 3, SQLITE_UTF8, 0,
+@@ -5523,6 +5523,7 @@
+ goto end_ar_command;
+ }
+ sqlite3_fileio_init(cmd.db, 0, 0);
++ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_sqlar_init(cmd.db, 0, 0);
+ sqlite3_create_function(cmd.db, "shell_putsnl", 1, SQLITE_UTF8, cmd.p,
+ shellPutsFunc, 0, 0);
+@@ -8539,6 +8540,7 @@
+ #endif
+ }
+ data.out = stdout;
++ extern int sqlite3_appendvfs_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_appendvfs_init(0,0,0);
+
+ /* Go ahead and open the database file if it already exists. If the
+--- /tool/mksqlite3c.tcl
++++ /tool/mksqlite3c.tcl
+@@ -116,6 +116,7 @@
+ rtree.h
+ sqlite3session.h
+ sqlite3.h
++ sqlite3expert.h
+ sqlite3ext.h
+ sqlite3rbu.h
+ sqliteicu.h
+@@ -401,6 +402,10 @@
+ json1.c
+ fts5.c
+ stmt.c
++ appendvfs.c
++ sqlar.c
++ sqlite3expert.c
++ zipfile.c
+ } {
+ copy_file tsrc/$file
+ }
+--- /tool/sqlite3_analyzer.c.in
++++ /tool/sqlite3_analyzer.c.in
+@@ -14,9 +14,6 @@
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+ #define SQLITE_OMIT_LOAD_EXTENSION 1
+-#ifndef USE_EXTERNAL_SQLITE
+-INCLUDE sqlite3.c
+-#endif
+ INCLUDE $ROOT/src/tclsqlite.c
+
+ const char *sqlite3_analyzer_init_proc(Tcl_Interp *interp){
+--- /tool/sqltclsh.c.in
++++ /tool/sqltclsh.c.in
+@@ -27,19 +27,17 @@
+ #define SQLITE_OMIT_SHARED_CACHE 1
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+-INCLUDE sqlite3.c
+-INCLUDE $ROOT/ext/misc/appendvfs.c
+-#ifdef SQLITE_HAVE_ZLIB
+-INCLUDE $ROOT/ext/misc/zipfile.c
+-INCLUDE $ROOT/ext/misc/sqlar.c
+-#endif
++#include "sqlite3.h"
+ INCLUDE $ROOT/src/tclsqlite.c
+
+ const char *sqlite3_tclapp_init_proc(Tcl_Interp *interp){
+ (void)interp;
++ extern int sqlite3_appendvfs_init(sqlite3 *,char **, const sqlite3_api_routines *);
+ sqlite3_appendvfs_init(0,0,0);
+ #ifdef SQLITE_HAVE_ZLIB
++ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_auto_extension((void(*)(void))sqlite3_sqlar_init);
++ extern int sqlite3_zipfile_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_auto_extension((void(*)(void))sqlite3_zipfile_init);
+ #endif
+
diff --git a/dev-db/sqlite/files/sqlite-3.24.0-nonfull_archive-archive_command_paths_handling.patch b/dev-db/sqlite/files/sqlite-3.24.0-nonfull_archive-archive_command_paths_handling.patch
new file mode 100644
index 000000000000..69ab04822709
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.24.0-nonfull_archive-archive_command_paths_handling.patch
@@ -0,0 +1,14 @@
+https://sqlite.org/src/info/27291f2d7fd4dadf
+
+--- /shell.c
++++ /shell.c
+@@ -12786,7 +12786,8 @@
+ "SELECT "
+ " ($dir || name),"
+ " writefile(($dir || name), %s, mode, mtime) "
+- "FROM %s WHERE (%s) AND (data IS NULL OR $dirOnly = 0)";
++ "FROM %s WHERE (%s) AND (data IS NULL OR $dirOnly = 0)"
++ " AND name NOT GLOB '*..[/\\]*'";
+
+ const char *azExtraArg[] = {
+ "sqlar_uncompress(data, sz)",
diff --git a/dev-db/sqlite/metadata.xml b/dev-db/sqlite/metadata.xml
new file mode 100644
index 000000000000..ae2540a300e5
--- /dev/null
+++ b/dev-db/sqlite/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>arfrever.fta@gmail.com</email>
+ <name>Arfrever Frehtes Taifersar Arahesis</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <use>
+ <flag name="secure-delete">Enable overwriting of deleted content with zeros by default (http://sqlite.org/pragma.html#pragma_secure_delete), causing some performance penalty</flag>
+ <flag name="tools">Install additional tools</flag>
+ </use>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:sqlite:sqlite</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/sqlite/sqlite-3.23.1.ebuild b/dev-db/sqlite/sqlite-3.23.1.ebuild
new file mode 100644
index 000000000000..058999a1e0ff
--- /dev/null
+++ b/dev-db/sqlite/sqlite-3.23.1.ebuild
@@ -0,0 +1,309 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal toolchain-funcs versionator
+
+SRC_PV="$(printf "%u%02u%02u%02u" $(get_version_components))"
+DOC_PV="${SRC_PV}"
+# DOC_PV="$(printf "%u%02u%02u00" $(get_version_components $(get_version_component_range 1-3)))"
+
+DESCRIPTION="A SQL Database Engine in a C Library"
+HOMEPAGE="https://sqlite.org/"
+SRC_URI="doc? ( https://sqlite.org/2018/${PN}-doc-${DOC_PV}.zip )
+ tcl? ( https://sqlite.org/2018/${PN}-src-${SRC_PV}.zip )
+ test? ( https://sqlite.org/2018/${PN}-src-${SRC_PV}.zip )
+ tools? ( https://sqlite.org/2018/${PN}-src-${SRC_PV}.zip )
+ !tcl? ( !test? ( !tools? ( https://sqlite.org/2018/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
+
+LICENSE="public-domain"
+SLOT="3"
+KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
+
+RDEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}]
+ icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
+ readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
+ tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
+ tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ doc? ( app-arch/unzip )
+ tcl? ( app-arch/unzip )
+ test? (
+ app-arch/unzip
+ >=dev-lang/tcl-8.6:0[${MULTILIB_USEDEP}]
+ )
+ tools? ( app-arch/unzip )"
+
+full_archive() {
+ use tcl || use test || use tools
+}
+
+pkg_setup() {
+ if full_archive; then
+ S="${WORKDIR}/${PN}-src-${SRC_PV}"
+ else
+ S="${WORKDIR}/${PN}-autoconf-${SRC_PV}"
+ fi
+}
+
+src_prepare() {
+ if full_archive; then
+ eapply "${FILESDIR}/${PN}-3.23.0-full_archive-build.patch"
+ eapply "${FILESDIR}/${PN}-3.23.1-full_archive-prohibit_bound_parameters_in_arguments_to_table-valued_functions_within_triggers.patch"
+ eapply "${FILESDIR}/${PN}-3.23.1-full_archive-tests.patch"
+
+ eapply_user
+
+ # Fix AC_CHECK_FUNCS.
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
+ sed -e "s/AC_CHECK_FUNCS(.*)/AC_CHECK_FUNCS([fdatasync fullfsync gmtime_r isnan localtime_r localtime_s malloc_usable_size posix_fallocate pread pread64 pwrite pwrite64 strchrnul usleep utime])/" -i configure.ac || die "sed failed"
+ else
+ eapply "${FILESDIR}/${PN}-3.21.0-nonfull_archive-build.patch"
+ eapply "${FILESDIR}/${PN}-3.23.1-nonfull_archive-prohibit_bound_parameters_in_arguments_to_table-valued_functions_within_triggers.patch"
+
+ eapply_user
+
+ # Fix AC_CHECK_FUNCS.
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
+ sed \
+ -e "s/AC_CHECK_FUNCS(\[fdatasync.*/AC_CHECK_FUNCS([fdatasync fullfsync gmtime_r isnan localtime_r localtime_s malloc_usable_size posix_fallocate pread pread64 pwrite pwrite64 strchrnul usleep utime])/" \
+ -e "/AC_CHECK_FUNCS(posix_fallocate)/d" \
+ -i configure.ac || die "sed failed"
+ fi
+
+ eautoreconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" options=()
+
+ options+=(
+ --enable-$(full_archive && echo load-extension || echo dynamic-extensions)
+ --enable-threadsafe
+ )
+ if ! full_archive; then
+ options+=(--disable-static-shell)
+ fi
+
+ # Support detection of misuse of SQLite API.
+ # https://sqlite.org/compile.html#enable_api_armor
+ append-cppflags -DSQLITE_ENABLE_API_ARMOR
+
+ # Support column metadata functions.
+ # https://sqlite.org/c3ref/column_database_name.html
+ append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
+
+ # Support sqlite_dbpage virtual table.
+ # https://sqlite.org/compile.html#enable_dbpage_vtab
+ append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB
+
+ # Support dbstat virtual table.
+ # https://sqlite.org/dbstat.html
+ append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
+
+ # Support sqlite3_serialize() and sqlite3_deserialize() functions.
+ # https://sqlite.org/compile.html#enable_deserialize
+ # https://sqlite.org/c3ref/serialize.html
+ # https://sqlite.org/c3ref/deserialize.html
+ append-cppflags -DSQLITE_ENABLE_DESERIALIZE
+
+ # Support comments in output of EXPLAIN.
+ # https://sqlite.org/compile.html#enable_explain_comments
+ append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
+
+ # Support Full-Text Search versions 3, 4 and 5.
+ # https://sqlite.org/fts3.html
+ # https://sqlite.org/fts5.html
+ append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
+ options+=(--enable-fts5)
+
+ # Support hidden columns.
+ append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
+
+ # Support JSON1 extension.
+ # https://sqlite.org/json1.html
+ append-cppflags -DSQLITE_ENABLE_JSON1
+
+ # Support memsys5 memory allocator.
+ # https://sqlite.org/malloc.html#memsys5
+ append-cppflags -DSQLITE_ENABLE_MEMSYS5
+
+ # Support sqlite_offset() function.
+ # https://sqlite.org/lang_corefunc.html#sqlite_offset
+ append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC
+
+ # Support pre-update hook functions.
+ # https://sqlite.org/c3ref/preupdate_count.html
+ append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK
+
+ # Support Resumable Bulk Update extension.
+ # https://sqlite.org/rbu.html
+ append-cppflags -DSQLITE_ENABLE_RBU
+
+ # Support R*Trees.
+ # https://sqlite.org/rtree.html
+ append-cppflags -DSQLITE_ENABLE_RTREE
+
+ # Support scan status functions.
+ # https://sqlite.org/c3ref/stmt_scanstatus.html
+ # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
+ append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
+
+ # Support sqlite_stmt virtual table.
+ # https://sqlite.org/stmt.html
+ append-cppflags -DSQLITE_ENABLE_STMTVTAB
+
+ # Support Session extension.
+ # https://sqlite.org/sessionintro.html
+ options+=(--enable-session)
+
+ # Support unknown() function.
+ # https://sqlite.org/compile.html#enable_unknown_sql_function
+ append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
+
+ # Support unlock notification.
+ # https://sqlite.org/unlock_notify.html
+ append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
+
+ # Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements.
+ # https://sqlite.org/compile.html#enable_update_delete_limit
+ append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
+
+ # Support PRAGMA function_list, PRAGMA module_list and PRAGMA pragma_list statements.
+ # https://sqlite.org/pragma.html#pragma_function_list
+ # https://sqlite.org/pragma.html#pragma_module_list
+ # https://sqlite.org/pragma.html#pragma_pragma_list
+ append-cppflags -DSQLITE_INTROSPECTION_PRAGMAS
+
+ # Support soundex() function.
+ # https://sqlite.org/lang_corefunc.html#soundex
+ append-cppflags -DSQLITE_SOUNDEX
+
+ # debug USE flag.
+ if full_archive; then
+ options+=($(use_enable debug))
+ else
+ if use debug; then
+ append-cppflags -DSQLITE_DEBUG
+ else
+ append-cppflags -DNDEBUG
+ fi
+ fi
+
+ # icu USE flag.
+ if use icu; then
+ # Support ICU extension.
+ # https://sqlite.org/compile.html#enable_icu
+ append-cppflags -DSQLITE_ENABLE_ICU
+ if full_archive; then
+ sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ else
+ sed -e "s/^LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ fi
+ fi
+
+ # readline USE flag.
+ options+=(
+ --disable-editline
+ $(use_enable readline)
+ )
+ if full_archive && use readline; then
+ options+=(--with-readline-inc="-I${EPREFIX}/usr/include/readline")
+ fi
+
+ # secure-delete USE flag.
+ if use secure-delete; then
+ # Enable secure_delete pragma by default.
+ # https://sqlite.org/pragma.html#pragma_secure_delete
+ append-cppflags -DSQLITE_SECURE_DELETE
+ fi
+
+ # static-libs USE flag.
+ options+=($(use_enable static-libs static))
+
+ # tcl, test, tools USE flags.
+ if full_archive; then
+ options+=(--enable-tcl)
+ fi
+
+ if [[ "${CHOST}" == *-mint* ]]; then
+ append-cppflags -DSQLITE_OMIT_WAL
+ fi
+
+ if [[ "${ABI}" == "x86" ]]; then
+ if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
+ append-cflags -mfpmath=sse
+ else
+ append-cflags -ffloat-store
+ fi
+ fi
+
+ econf "${options[@]}"
+}
+
+multilib_src_compile() {
+ emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
+
+ if use tools && multilib_is_native_abi; then
+ emake changeset dbdump dbhash rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh
+ fi
+}
+
+multilib_src_test() {
+ if [[ "${EUID}" -eq 0 ]]; then
+ ewarn "Skipping tests due to root permissions"
+ return
+ fi
+
+ emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
+
+ if use tools && multilib_is_native_abi; then
+ install_tool() {
+ if [[ -f ".libs/${1}" ]]; then
+ newbin ".libs/${1}" "${2}"
+ else
+ newbin "${1}" "${2}"
+ fi
+ }
+
+ install_tool changeset sqlite3-changeset
+ install_tool dbdump sqlite3-db-dump
+ install_tool dbhash sqlite3-db-hash
+ install_tool rbu sqlite3-rbu
+ install_tool scrub sqlite3-scrub
+ install_tool showdb sqlite3-show-db
+ install_tool showjournal sqlite3-show-journal
+ install_tool showshm sqlite3-show-shm
+ install_tool showstat4 sqlite3-show-stat4
+ install_tool showwal sqlite3-show-wal
+ install_tool sqldiff sqlite3-diff
+ install_tool sqlite3_analyzer sqlite3-analyzer
+ install_tool sqlite3_checker sqlite3-checker
+ install_tool sqlite3_expert sqlite3-expert
+ install_tool sqltclsh sqlite3-tclsh
+
+ unset -f install_tool
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+
+ doman sqlite3.1
+
+ if use doc; then
+ rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt}
+ (
+ docinto html
+ dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
+ )
+ fi
+}
diff --git a/dev-db/sqlite/sqlite-3.24.0.ebuild b/dev-db/sqlite/sqlite-3.24.0.ebuild
new file mode 100644
index 000000000000..bedd681465ff
--- /dev/null
+++ b/dev-db/sqlite/sqlite-3.24.0.ebuild
@@ -0,0 +1,308 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal toolchain-funcs versionator
+
+SRC_PV="$(printf "%u%02u%02u%02u" $(get_version_components))"
+DOC_PV="${SRC_PV}"
+# DOC_PV="$(printf "%u%02u%02u00" $(get_version_components $(get_version_component_range 1-3)))"
+
+DESCRIPTION="SQL database engine"
+HOMEPAGE="https://sqlite.org/"
+SRC_URI="doc? ( https://sqlite.org/2018/${PN}-doc-${DOC_PV}.zip )
+ tcl? ( https://sqlite.org/2018/${PN}-src-${SRC_PV}.zip )
+ test? ( https://sqlite.org/2018/${PN}-src-${SRC_PV}.zip )
+ tools? ( https://sqlite.org/2018/${PN}-src-${SRC_PV}.zip )
+ !tcl? ( !test? ( !tools? ( https://sqlite.org/2018/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
+
+LICENSE="public-domain"
+SLOT="3"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
+
+RDEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}]
+ icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
+ readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
+ tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
+ tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ doc? ( app-arch/unzip )
+ tcl? ( app-arch/unzip )
+ test? (
+ app-arch/unzip
+ >=dev-lang/tcl-8.6:0[${MULTILIB_USEDEP}]
+ )
+ tools? ( app-arch/unzip )"
+
+full_archive() {
+ use tcl || use test || use tools
+}
+
+pkg_setup() {
+ if full_archive; then
+ S="${WORKDIR}/${PN}-src-${SRC_PV}"
+ else
+ S="${WORKDIR}/${PN}-autoconf-${SRC_PV}"
+ fi
+}
+
+src_prepare() {
+ if full_archive; then
+ eapply "${FILESDIR}/${PN}-3.24.0-full_archive-build.patch"
+ eapply "${FILESDIR}/${PN}-3.24.0-full_archive-archive_command_paths_handling.patch"
+
+ eapply_user
+
+ # Fix AC_CHECK_FUNCS.
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
+ sed -e "s/AC_CHECK_FUNCS(.*)/AC_CHECK_FUNCS([fdatasync fullfsync gmtime_r isnan localtime_r localtime_s malloc_usable_size posix_fallocate pread pread64 pwrite pwrite64 strchrnul usleep utime])/" -i configure.ac || die "sed failed"
+ else
+ eapply "${FILESDIR}/${PN}-3.21.0-nonfull_archive-build.patch"
+ eapply "${FILESDIR}/${PN}-3.24.0-nonfull_archive-archive_command_paths_handling.patch"
+
+ eapply_user
+
+ # Fix AC_CHECK_FUNCS.
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
+ sed \
+ -e "s/AC_CHECK_FUNCS(\[fdatasync.*/AC_CHECK_FUNCS([fdatasync fullfsync gmtime_r isnan localtime_r localtime_s malloc_usable_size posix_fallocate pread pread64 pwrite pwrite64 strchrnul usleep utime])/" \
+ -e "/AC_CHECK_FUNCS(posix_fallocate)/d" \
+ -i configure.ac || die "sed failed"
+ fi
+
+ eautoreconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" options=()
+
+ options+=(
+ --enable-$(full_archive && echo load-extension || echo dynamic-extensions)
+ --enable-threadsafe
+ )
+ if ! full_archive; then
+ options+=(--disable-static-shell)
+ fi
+
+ # Support detection of misuse of SQLite API.
+ # https://sqlite.org/compile.html#enable_api_armor
+ append-cppflags -DSQLITE_ENABLE_API_ARMOR
+
+ # Support column metadata functions.
+ # https://sqlite.org/c3ref/column_database_name.html
+ append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
+
+ # Support sqlite_dbpage virtual table.
+ # https://sqlite.org/compile.html#enable_dbpage_vtab
+ append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB
+
+ # Support dbstat virtual table.
+ # https://sqlite.org/dbstat.html
+ append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
+
+ # Support sqlite3_serialize() and sqlite3_deserialize() functions.
+ # https://sqlite.org/compile.html#enable_deserialize
+ # https://sqlite.org/c3ref/serialize.html
+ # https://sqlite.org/c3ref/deserialize.html
+ append-cppflags -DSQLITE_ENABLE_DESERIALIZE
+
+ # Support comments in output of EXPLAIN.
+ # https://sqlite.org/compile.html#enable_explain_comments
+ append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
+
+ # Support Full-Text Search versions 3, 4 and 5.
+ # https://sqlite.org/fts3.html
+ # https://sqlite.org/fts5.html
+ append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
+ options+=(--enable-fts5)
+
+ # Support hidden columns.
+ append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
+
+ # Support JSON1 extension.
+ # https://sqlite.org/json1.html
+ append-cppflags -DSQLITE_ENABLE_JSON1
+
+ # Support memsys5 memory allocator.
+ # https://sqlite.org/malloc.html#memsys5
+ append-cppflags -DSQLITE_ENABLE_MEMSYS5
+
+ # Support sqlite_offset() function.
+ # https://sqlite.org/lang_corefunc.html#sqlite_offset
+ append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC
+
+ # Support pre-update hook functions.
+ # https://sqlite.org/c3ref/preupdate_count.html
+ append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK
+
+ # Support Resumable Bulk Update extension.
+ # https://sqlite.org/rbu.html
+ append-cppflags -DSQLITE_ENABLE_RBU
+
+ # Support R*Trees.
+ # https://sqlite.org/rtree.html
+ append-cppflags -DSQLITE_ENABLE_RTREE
+
+ # Support scan status functions.
+ # https://sqlite.org/c3ref/stmt_scanstatus.html
+ # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
+ append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
+
+ # Support sqlite_stmt virtual table.
+ # https://sqlite.org/stmt.html
+ append-cppflags -DSQLITE_ENABLE_STMTVTAB
+
+ # Support Session extension.
+ # https://sqlite.org/sessionintro.html
+ options+=(--enable-session)
+
+ # Support unknown() function.
+ # https://sqlite.org/compile.html#enable_unknown_sql_function
+ append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
+
+ # Support unlock notification.
+ # https://sqlite.org/unlock_notify.html
+ append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
+
+ # Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements.
+ # https://sqlite.org/compile.html#enable_update_delete_limit
+ append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
+
+ # Support PRAGMA function_list, PRAGMA module_list and PRAGMA pragma_list statements.
+ # https://sqlite.org/pragma.html#pragma_function_list
+ # https://sqlite.org/pragma.html#pragma_module_list
+ # https://sqlite.org/pragma.html#pragma_pragma_list
+ append-cppflags -DSQLITE_INTROSPECTION_PRAGMAS
+
+ # Support soundex() function.
+ # https://sqlite.org/lang_corefunc.html#soundex
+ append-cppflags -DSQLITE_SOUNDEX
+
+ # debug USE flag.
+ if full_archive; then
+ options+=($(use_enable debug))
+ else
+ if use debug; then
+ append-cppflags -DSQLITE_DEBUG
+ else
+ append-cppflags -DNDEBUG
+ fi
+ fi
+
+ # icu USE flag.
+ if use icu; then
+ # Support ICU extension.
+ # https://sqlite.org/compile.html#enable_icu
+ append-cppflags -DSQLITE_ENABLE_ICU
+ if full_archive; then
+ sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ else
+ sed -e "s/^LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ fi
+ fi
+
+ # readline USE flag.
+ options+=(
+ --disable-editline
+ $(use_enable readline)
+ )
+ if full_archive && use readline; then
+ options+=(--with-readline-inc="-I${EPREFIX}/usr/include/readline")
+ fi
+
+ # secure-delete USE flag.
+ if use secure-delete; then
+ # Enable secure_delete pragma by default.
+ # https://sqlite.org/pragma.html#pragma_secure_delete
+ append-cppflags -DSQLITE_SECURE_DELETE
+ fi
+
+ # static-libs USE flag.
+ options+=($(use_enable static-libs static))
+
+ # tcl, test, tools USE flags.
+ if full_archive; then
+ options+=(--enable-tcl)
+ fi
+
+ if [[ "${CHOST}" == *-mint* ]]; then
+ append-cppflags -DSQLITE_OMIT_WAL
+ fi
+
+ if [[ "${ABI}" == "x86" ]]; then
+ if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
+ append-cflags -mfpmath=sse
+ else
+ append-cflags -ffloat-store
+ fi
+ fi
+
+ econf "${options[@]}"
+}
+
+multilib_src_compile() {
+ emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
+
+ if use tools && multilib_is_native_abi; then
+ emake changeset dbdump dbhash rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh
+ fi
+}
+
+multilib_src_test() {
+ if [[ "${EUID}" -eq 0 ]]; then
+ ewarn "Skipping tests due to root permissions"
+ return
+ fi
+
+ emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
+
+ if use tools && multilib_is_native_abi; then
+ install_tool() {
+ if [[ -f ".libs/${1}" ]]; then
+ newbin ".libs/${1}" "${2}"
+ else
+ newbin "${1}" "${2}"
+ fi
+ }
+
+ install_tool changeset sqlite3-changeset
+ install_tool dbdump sqlite3-db-dump
+ install_tool dbhash sqlite3-db-hash
+ install_tool rbu sqlite3-rbu
+ install_tool scrub sqlite3-scrub
+ install_tool showdb sqlite3-show-db
+ install_tool showjournal sqlite3-show-journal
+ install_tool showshm sqlite3-show-shm
+ install_tool showstat4 sqlite3-show-stat4
+ install_tool showwal sqlite3-show-wal
+ install_tool sqldiff sqlite3-diff
+ install_tool sqlite3_analyzer sqlite3-analyzer
+ install_tool sqlite3_checker sqlite3-checker
+ install_tool sqlite3_expert sqlite3-expert
+ install_tool sqltclsh sqlite3-tclsh
+
+ unset -f install_tool
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+
+ doman sqlite3.1
+
+ if use doc; then
+ rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt}
+ (
+ docinto html
+ dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
+ )
+ fi
+}
diff --git a/dev-db/sqlitebrowser-3.10.1 b/dev-db/sqlitebrowser-3.10.1
deleted file mode 100644
index 1b8b372ab2b8..000000000000
--- a/dev-db/sqlitebrowser-3.10.1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare test
-DEPEND=dev-cpp/antlr-cpp:2 dev-db/sqlite:3 >=dev-libs/qcustomplot-2.0.0[qt5(+)] dev-qt/qtcore:5 dev-qt/qtgui:5 dev-qt/qtnetwork:5 dev-qt/qtwidgets:5 >=x11-libs/qscintilla-2.10.1:=[qt5(+)] dev-qt/linguist-tools:5 test? ( dev-qt/qttest:5 ) sys-devel/make >=dev-util/cmake-3.9.6 >=sys-apps/sed-4
-DESCRIPTION=SQLite Database Browser
-EAPI=6
-HOMEPAGE=http://sqlitebrowser.org
-IUSE=test
-KEYWORDS=amd64 x86
-LICENSE=GPL-3 MPL-2.0
-RDEPEND=dev-cpp/antlr-cpp:2 dev-db/sqlite:3 >=dev-libs/qcustomplot-2.0.0[qt5(+)] dev-qt/qtcore:5 dev-qt/qtgui:5 dev-qt/qtnetwork:5 dev-qt/qtwidgets:5 >=x11-libs/qscintilla-2.10.1:=[qt5(+)]
-SLOT=0
-SRC_URI=https://github.com/sqlitebrowser/sqlitebrowser/archive/v3.10.1.tar.gz -> sqlitebrowser-3.10.1.tar.gz
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 gnome2-utils 29bb8f7881c95139e532a2d5e47ff834 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=07b75203ff8cba04d651eb45b6d59ba8
diff --git a/dev-db/sqlitebrowser-3.9.1-r1 b/dev-db/sqlitebrowser-3.9.1-r1
deleted file mode 100644
index 0d0c8495e3ba..000000000000
--- a/dev-db/sqlitebrowser-3.9.1-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare test
-DEPEND=dev-cpp/antlr-cpp:2 dev-db/sqlite:3 dev-libs/qcustomplot[qt5(+)] dev-qt/qtcore:5 dev-qt/qtgui:5 dev-qt/qtnetwork:5 dev-qt/qtwidgets:5 >=x11-libs/qscintilla-2.9.3-r2:=[qt5(+)] dev-qt/linguist-tools:5 test? ( dev-qt/qttest:5 ) sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=SQLite Database Browser
-EAPI=6
-HOMEPAGE=http://sqlitebrowser.org
-IUSE=test
-KEYWORDS=amd64 x86
-LICENSE=GPL-3 MPL-2.0
-RDEPEND=dev-cpp/antlr-cpp:2 dev-db/sqlite:3 dev-libs/qcustomplot[qt5(+)] dev-qt/qtcore:5 dev-qt/qtgui:5 dev-qt/qtnetwork:5 dev-qt/qtwidgets:5 >=x11-libs/qscintilla-2.9.3-r2:=[qt5(+)]
-SLOT=0
-SRC_URI=https://github.com/sqlitebrowser/sqlitebrowser/archive/v3.9.1.tar.gz -> sqlitebrowser-3.9.1.tar.gz
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=39bc90376145044b227fef2dde4379e5
diff --git a/dev-db/sqlitebrowser/Manifest b/dev-db/sqlitebrowser/Manifest
new file mode 100644
index 000000000000..9cc37817da14
--- /dev/null
+++ b/dev-db/sqlitebrowser/Manifest
@@ -0,0 +1,8 @@
+AUX sqlitebrowser-3.10.1-unbundle.patch 3313 BLAKE2B 91dda803cb2eed55a56568f4d2cc0519b33b59447fcdfee49705aa0bfce84009092b0e73ab0ae79b03fc30f20220b1ca8cebbd83b66d1f8fdd36c47669403019 SHA512 71b758dc1f412b1ed5d778e8ca5fc65eb99276acf5c81fc4812bf31251a0380b8e4fbc84a00718e5959ae7cb504cda06339e24cf070b8a2de1b0fce46cfb595f
+AUX sqlitebrowser-3.7.0-unbundle.patch 475 BLAKE2B 1e2783eec7d7c054d18920fc88617f143220669a5c69c62b024fa33922eff9d13e3c4ba5e453d6b1767defdd8a918156094c1234ed3d6ad632ee4b3d919f6540 SHA512 4f90c4df8ef49943489b239f675a86259536b988585182c8b804f4ed6d38b5aabd83b32b21952329332d8520945304a4f9fea6287631a9a58ce5f311d9242fdb
+AUX sqlitebrowser-3.9.1-cmake.patch 774 BLAKE2B 5773d3f70bc45348a4e3fc35fce57ad7eac416e7cc4d94eceb31ecc5e0ca2ed9dce837c299083e800b1ec7d80bd67d10ee60cf44c5a6915f39c619ef07f048f4 SHA512 f1a64286036d5c05e279fbf430f55400eb8f840564c0d9460424a42f87c4bd8d4f4e2c52c39e07d0bd3a50fa4a1e59bf591c53b1d28d2ef367af2ba25edae299
+DIST sqlitebrowser-3.10.1.tar.gz 1992186 BLAKE2B 105333118a404aab48abe5ecbe83b425109b60adf40d3a3b7766c7036954996539bd133da4b3e3b1e2d819223842d107710b6b24aada6bb298462e062296dabf SHA512 da9650fff6cd7984e8f438b254318b5da46209eb21a375569ec1b4dd898a41d99d61d6682f2979a56d5c39d552ed42f443215900c1cebe95350e4624415f69c4
+DIST sqlitebrowser-3.9.1.tar.gz 1704713 BLAKE2B 447a9e20fe4236feea2684703ac7f38b1c03f0ded352653b41bbec7d6380691776177fee1428fd67ac96190ed6752cedd76a9883cfa12584fec464cbf98707d3 SHA512 c1e88063fac864f60a9802ae378e13d6f3a09e2f4e71e50c6abca4967a941c444a64617bad2dfc743cf9a6be554af9c73e4c61533300ed9a51652234ffdbd225
+EBUILD sqlitebrowser-3.10.1.ebuild 1378 BLAKE2B 9ec28580c7efa201ae7907eed123ba36fdf497e67adcb75ebfa43f1fef3e7956fed44390d02161aba91e8085bb44e872f912c61ff2b6311eb7ddd9f77890bb28 SHA512 5918375456ecfa90e12f8784c3e0e5300f5cd056741a762096f9b65656f3d026015e26f338ba40a48ea1ad7a8649f83067272092ccb7de919ad758bae03e8096
+EBUILD sqlitebrowser-3.9.1-r1.ebuild 1439 BLAKE2B 355dc9a6af52f1879559b7774d93f226e46a9998de3557c0f52d2b8ecde160e9c777bcc7ac4c8d33d74337972d6def9ada5d404b36d456133df000ca552623da SHA512 ad218ab7dc42f42487868aeba8fef1f282369bfc2508e6cbd20f0da1c6101f93ff3b157970e34046be20dfd98a2418763941c679d31dde82940cfc2a480b0cee
+MISC metadata.xml 740 BLAKE2B 43e5727769b3fa3fee9fe4514993988877b08a3a21816031cd21ae497a66801d6ba4993236e656b7de4161d22837975bb6d8e9cf93ebfd416235dd622a0b8758 SHA512 697ae7be911f1ce3a8b0c0f9f8509ac5fd338463b7b692ca320ab41ed7676fcc3d7db59e759cfbe82c6d2a1fa9d85a1eeefeda3bca702f56832f336ee7fd0369
diff --git a/dev-db/sqlitebrowser/files/sqlitebrowser-3.10.1-unbundle.patch b/dev-db/sqlitebrowser/files/sqlitebrowser-3.10.1-unbundle.patch
new file mode 100644
index 000000000000..b774e41ecd83
--- /dev/null
+++ b/dev-db/sqlitebrowser/files/sqlitebrowser-3.10.1-unbundle.patch
@@ -0,0 +1,105 @@
+diff --git a/cmake/FindQScintilla.cmake b/cmake/FindQScintilla.cmake
+index f469637..92c2d37 100644
+--- a/cmake/FindQScintilla.cmake
++++ b/cmake/FindQScintilla.cmake
+@@ -43,9 +43,12 @@
+ #=============================================================================
+
+
++SET (QT_MIN_VERSION "5.6.2")
++FIND_PACKAGE( Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Network Widgets )
++
+ find_path ( QSCINTILLA_INCLUDE_DIR
+ NAMES qsciscintilla.h
+- HINTS ${QT_INCLUDE_DIR}
++ HINTS ${Qt5Core_INCLUDE_DIRS}
+ PATH_SUFFIXES Qsci
+ )
+
+@@ -81,6 +84,6 @@ endif ()
+
+ find_library ( QSCINTILLA_LIBRARY
+- NAMES qscintilla qscintilla2 libqscintilla2
+- HINTS ${QT_LIBRARY_DIR}
++ NAMES qscintilla2 libqscintilla2 qscintilla2_qt5 libqscintilla2_qt5
++ HINTS ${Qt5Core_LIBRARIES}
+ )
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index fdf5b4c..ffba6d7 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -47,26 +47,20 @@ if(WIN32 AND MSVC)
+ endif()
+
+ if(NOT FORCE_INTERNAL_ANTLR)
+- find_package(Antlr2)
++ find_package(Antlr2 REQUIRED)
+ endif()
+ if(NOT FORCE_INTERNAL_QSCINTILLA)
+ find_package(QScintilla)
+ endif()
+
+ set(QHEXEDIT_DIR libs/qhexedit)
+-set(QCUSTOMPLOT_DIR libs/qcustomplot-source)
+
+-if(NOT ANTLR2_FOUND)
+- set(ANTLR_DIR libs/antlr-2.7.7)
+- add_subdirectory(${ANTLR_DIR})
+-endif()
+ if(NOT QSCINTILLA_FOUND)
+ set(QSCINTILLA_DIR libs/qscintilla/Qt4Qt5)
+ add_subdirectory(${QSCINTILLA_DIR})
+ endif()
+ add_subdirectory(${QHEXEDIT_DIR})
+-add_subdirectory(${QCUSTOMPLOT_DIR})
+
+ find_package(Qt5Widgets REQUIRED)
+ find_package(Qt5LinguistTools REQUIRED)
+
+--- sqlitebrowser-3.10.1/src/tests/CMakeLists.txt
++++ sqlitebrowser-3.10.1/src/tests/CMakeLists.txt
+@@ -49,9 +49,6 @@
+ else()
+ target_link_libraries(test-sqlobjects antlr)
+ endif()
+-link_directories("${CMAKE_CURRENT_BINARY_DIR}/${QSCINTILLA_DIR}")
+-add_dependencies(test-sqlobjects qscintilla2)
+-target_link_libraries(test-sqlobjects qscintilla2)
+ add_test(test-sqlobjects test-sqlobjects)
+
+ # test-import
+@@ -118,7 +118,4 @@
+ else()
+ target_link_libraries(test-regex antlr)
+ endif()
+-link_directories("${CMAKE_CURRENT_BINARY_DIR}/${QSCINTILLA_DIR}")
+-add_dependencies(test-regex qscintilla2)
+-target_link_libraries(test-regex qscintilla2)
+ add_test(test-regex test-regex)
+--- sqlitebrowser-3.10.1/src/src.pro
++++ sqlitebrowser-3.10.1/src/src.pro
+@@ -153,10 +150,7 @@
+ }
+ }
+
+ LIBPATH_QHEXEDIT=$$OUT_PWD/../libs/qhexedit
+-LIBPATH_ANTLR=$$OUT_PWD/../libs/antlr-2.7.7
+-LIBPATH_QCUSTOMPLOT=$$OUT_PWD/../libs/qcustomplot-source
+-LIBPATH_QSCINTILLA=$$OUT_PWD/../libs/qscintilla/Qt4Qt5
+ unix {
+ LIBS += -ldl
+ }
+@@ -197,9 +193,9 @@
+ }
+
+ UI_DIR = .ui
+-INCLUDEPATH += $$PWD/../libs/antlr-2.7.7 $$PWD/../libs/qhexedit $$PWD/../libs/qcustomplot-source $$PWD/../libs/qscintilla/Qt4Qt5 $$PWD/..
+-LIBS += -L$$LIBPATH_QHEXEDIT -L$$LIBPATH_ANTLR -L$$LIBPATH_QCUSTOMPLOT -L$$LIBPATH_QSCINTILLA -lantlr -lqhexedit -lqcustomplot -lqscintilla2
+-DEPENDPATH += $$PWD/../libs/antlr-2.7.7 $$PWD/../libs/qhexedit $$PWD/../libs/qcustomplot-source $$PWD/../libs/qscintilla/Qt4Qt5
++INCLUDEPATH += $$PWD/../libs/qhexedit $$PWD/..
++LIBS += -L$$LIBPATH_QHEXEDIT -L$$LIBPATH_ANTLR -L$$LIBPATH_QCUSTOMPLOT -L$$LIBPATH_QSCINTILLA -lantlr -lqhexedit -lqcustomplot -lqscintilla2_qt5
++DEPENDPATH += $$PWD/../libs/qhexedit
+
+ unix {
+ # The executable
diff --git a/dev-db/sqlitebrowser/files/sqlitebrowser-3.7.0-unbundle.patch b/dev-db/sqlitebrowser/files/sqlitebrowser-3.7.0-unbundle.patch
new file mode 100644
index 000000000000..8dbe870f2e87
--- /dev/null
+++ b/dev-db/sqlitebrowser/files/sqlitebrowser-3.7.0-unbundle.patch
@@ -0,0 +1,18 @@
+--- sqlitebrowser-3.7.0/CMakeLists.txt
++++ sqlitebrowser-3.7.0/CMakeLists.txt
+@@ -29,15 +29,9 @@
+ find_package(Antlr2)
+
+ set(QHEXEDIT_DIR libs/qhexedit)
+-set(QCUSTOMPLOT_DIR libs/qcustomplot-source)
+ set(QSCINTILLA_DIR libs/qscintilla/Qt4Qt5)
+
+-if(NOT ANTLR2_FOUND)
+- set(ANTLR_DIR libs/antlr-2.7.7)
+- add_subdirectory(${ANTLR_DIR})
+-endif()
+ add_subdirectory(${QHEXEDIT_DIR})
+-add_subdirectory(${QCUSTOMPLOT_DIR})
+ add_subdirectory(${QSCINTILLA_DIR})
+
+ if(USE_QT5)
diff --git a/dev-db/sqlitebrowser/files/sqlitebrowser-3.9.1-cmake.patch b/dev-db/sqlitebrowser/files/sqlitebrowser-3.9.1-cmake.patch
new file mode 100644
index 000000000000..cf1cde6c9197
--- /dev/null
+++ b/dev-db/sqlitebrowser/files/sqlitebrowser-3.9.1-cmake.patch
@@ -0,0 +1,24 @@
+From 2563d678681fa6972674b47617015cb2515bd414 Mon Sep 17 00:00:00 2001
+From: Martin Kleusberg <mkleusberg@gmail.com>
+Date: Wed, 12 Oct 2016 23:26:56 +0200
+Subject: [PATCH] Fix cmake file
+
+---
+ CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 998c2f4..4c5debd 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -3,8 +3,8 @@ cmake_minimum_required(VERSION 2.8.7)
+
+ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}")
+
+-OPTION(USE_QT5 FALSE "Build with qt5")
+-OPTION(ENABLE_TESTING FALSE "Enable the unit tests")
++OPTION(USE_QT5 "Build with qt5" OFF)
++OPTION(ENABLE_TESTING "Enable the unit tests" OFF)
+
+ if(NOT CMAKE_BUILD_TYPE)
+ set(CMAKE_BUILD_TYPE "Release")
diff --git a/dev-db/sqlitebrowser/metadata.xml b/dev-db/sqlitebrowser/metadata.xml
new file mode 100644
index 000000000000..778d9bfc7286
--- /dev/null
+++ b/dev-db/sqlitebrowser/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+ </maintainer>
+ <longdescription lang="en">
+SQLite Database Browser is a freeware, public domain, open source visual tool
+used to create, design and edit database files compatible with SQLite. It is
+meant to be used for users and developers that want to create databases, edit
+and search data using a familiar spreadsheet-like interface, without the need to
+learn complicated SQL commands.
+</longdescription>
+ <upstream>
+ <remote-id type="github">sqlitebrowser/sqlitebrowser</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/sqlitebrowser/sqlitebrowser-3.10.1.ebuild b/dev-db/sqlitebrowser/sqlitebrowser-3.10.1.ebuild
new file mode 100644
index 000000000000..fb9278c28228
--- /dev/null
+++ b/dev-db/sqlitebrowser/sqlitebrowser-3.10.1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils eutils gnome2-utils xdg-utils
+
+DESCRIPTION="SQLite Database Browser"
+HOMEPAGE="http://sqlitebrowser.org"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3 MPL-2.0"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="test"
+
+RDEPEND="
+ dev-cpp/antlr-cpp:2
+ dev-db/sqlite:3
+ >=dev-libs/qcustomplot-2.0.0[qt5(+)]
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtwidgets:5
+ >=x11-libs/qscintilla-2.10.1:=[qt5(+)]
+"
+DEPEND="${RDEPEND}
+ dev-qt/linguist-tools:5
+ test? ( dev-qt/qttest:5 )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.10.1-unbundle.patch
+)
+
+src_prepare() {
+ cmake-utils_src_prepare
+ # https://github.com/qingfengxia/qhexedit still bundled
+ find libs/{antlr-2.7.7,qcustomplot-source,qscintilla} -delete || die
+
+ sed -e "/^project/ s/\".*\"/sqlitebrowser/" -i CMakeLists.txt || die
+
+ if ! use test; then
+ sed -e "/qt5_use_modules/ s/ Test//" -i CMakeLists.txt || die
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_TESTING=$(usex test)
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ doicon images/sqlitebrowser.svg
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ xdg_desktop_database_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ xdg_desktop_database_update
+}
diff --git a/dev-db/sqlitebrowser/sqlitebrowser-3.9.1-r1.ebuild b/dev-db/sqlitebrowser/sqlitebrowser-3.9.1-r1.ebuild
new file mode 100644
index 000000000000..9e91c60df05b
--- /dev/null
+++ b/dev-db/sqlitebrowser/sqlitebrowser-3.9.1-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils eutils
+
+DESCRIPTION="SQLite Database Browser"
+HOMEPAGE="http://sqlitebrowser.org"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3 MPL-2.0"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="test"
+
+RDEPEND="
+ dev-cpp/antlr-cpp:2
+ dev-db/sqlite:3
+ dev-libs/qcustomplot[qt5(+)]
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtwidgets:5
+ >=x11-libs/qscintilla-2.9.3-r2:=[qt5(+)]
+"
+DEPEND="${RDEPEND}
+ dev-qt/linguist-tools:5
+ test? ( dev-qt/qttest:5 )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.7.0-unbundle.patch
+ "${FILESDIR}"/${PN}-3.9.1-cmake.patch
+)
+
+src_prepare() {
+ cmake-utils_src_prepare
+ # https://github.com/qingfengxia/qhexedit still bundled
+ # x11-libs/qscintilla[qt4?,qt5?] still bundled
+ find libs/{antlr-2.7.7,qcustomplot-source} -delete || die
+
+ sed -e "/^project/ s/\".*\"/sqlitebrowser/" -i CMakeLists.txt || die
+
+ if ! use test; then
+ sed -e "/qt5_use_modules/ s/ Test//" -i CMakeLists.txt || die
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DUSE_QT5=ON
+ -DENABLE_TESTING=$(usex test)
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ doicon images/sqlitebrowser.svg
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ xdg_desktop_database_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ xdg_desktop_database_update
+}
diff --git a/dev-db/sqliteman-1.2.2-r4 b/dev-db/sqliteman-1.2.2-r4
deleted file mode 100644
index 9966ded70dbc..000000000000
--- a/dev-db/sqliteman-1.2.2-r4
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare test
-DEPEND=>=dev-qt/qtcore-5.7.1:5 >=dev-qt/qtgui-5.7.1:5 >=dev-qt/qtsql-5.7.1:5[sqlite] >=dev-qt/qtwidgets-5.7.1:5 >=x11-libs/qscintilla-2.9.4:=[qt5(+)] sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=Powerful GUI manager for the Sqlite3 database
-EAPI=6
-HOMEPAGE=https://sourceforge.net/projects/sqliteman/
-KEYWORDS=amd64 ~arm x86
-LICENSE=GPL-2
-RDEPEND=>=dev-qt/qtcore-5.7.1:5 >=dev-qt/qtgui-5.7.1:5 >=dev-qt/qtsql-5.7.1:5[sqlite] >=dev-qt/qtwidgets-5.7.1:5 >=x11-libs/qscintilla-2.9.4:=[qt5(+)]
-SLOT=0
-SRC_URI=mirror://sourceforge/sqliteman/sqliteman-1.2.2.tar.gz
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=fde3bfa7961308ec299762a190e25250
diff --git a/dev-db/sqliteman/Manifest b/dev-db/sqliteman/Manifest
new file mode 100644
index 000000000000..67001f890d70
--- /dev/null
+++ b/dev-db/sqliteman/Manifest
@@ -0,0 +1,5 @@
+AUX sqliteman-1.2.2-lpthread.patch 486 BLAKE2B 4918962f3369880750e366fdfd8ae2a4a7750bcda76dd86476c8cfbf7bcada4fd46fe9da7156724fbc198abe616bc7687dc7016f89c192ef2aa722567dcb7292 SHA512 e4598b7f74da7c046571a5b6744d172a9d5d8d35c28ff0bd11b0db68a3fa8ba291ab9634a3622ea5aa383fe6aff75318350665a0a75f68224b6ba97cbc8f3855
+AUX sqliteman-1.2.2-qt5.patch 11317 BLAKE2B 0fb2f1afca7d4c2cc443a29c7f5c4b1babdeea2025bb4811052d98bfb26f5ee241e58c99830fa820d07ed5a03d2cc264ebab532c872cbb622f4ed65e6e99174f SHA512 5169991a0b764fe02782dcc94befe1479bcae631f815c268c9e2a3f02c8efbaceb78ecb87d04eea240623fdfcc475b6b91149a4461974f648f4dea62ba07e309
+DIST sqliteman-1.2.2.tar.gz 1579855 BLAKE2B 9415ac36c56ddf3ea53ace0a6441ef45514b9bffc1a95a652f71c53c802f0f78f77701520c76abade149db55476155472a71cf19f845ee096d96888e111daebd SHA512 ada8315247723c6cbb9a4c235ce427aed3fcbe6f4edaa3ee2f9c31c1729d71a4bfc874bb7ca561f2a2c9afad092e2f90c7871646eccecb3e71bcd50d1164faf4
+EBUILD sqliteman-1.2.2-r4.ebuild 894 BLAKE2B 0e8af0bf8b9a3e1fea44197371f181116905fe20428c86196fe00fc34bca752e9942fb6e568f08d9da3e524859706afcc3e32facaf9d1ad760c74dfdc8f6c67a SHA512 a13fc0d37d1bdc2598b3a2cc8cc9c00f71ad720c71c6406259904120e162f9ace760a4fbf4c15b0bb0eab73a0ce4a73620bf43e07315c4169893b6140a8fe539
+MISC metadata.xml 326 BLAKE2B 3222161899430f7576736aadb193fad5e74ac0a0223ecc14a4b062b882192ecd24e2695314a85d4b416009798887c3a2c969c7f2021835ac7bdf390c2d24b46b SHA512 28cfd089b3652e0bc89c32cffa6bc3c6a10dc84ac786db5de65155ef2752982fd167f5a916f1738848e1bce5ed86d335f463187ad532db06e90d5ce6492f4d53
diff --git a/dev-db/sqliteman/files/sqliteman-1.2.2-lpthread.patch b/dev-db/sqliteman/files/sqliteman-1.2.2-lpthread.patch
new file mode 100644
index 000000000000..a9bf4f4f9528
--- /dev/null
+++ b/dev-db/sqliteman/files/sqliteman-1.2.2-lpthread.patch
@@ -0,0 +1,19 @@
+Resolves underlinking issue causing build failure on uclibc.
+
+Author: René Rhéaume <rene.rheaume@gmail.com>
+Gentoo-bug: 587076
+
+--- a/sqliteman/CMakeLists.txt
++++ b/sqliteman/CMakeLists.txt
+@@ -183,7 +183,10 @@ IF (WIN32)
+ # don't use console subsystem
+ IF (MINGW)
+ TARGET_LINK_LIBRARIES(${EXE_NAME} "-mwindows")
+- ENDIF (MINGW)
++ ENDIF (MINGW)
++ELSE (WIN32)
++ FIND_PACKAGE(Threads)
++ TARGET_LINK_LIBRARIES(${EXE_NAME} ${CMAKE_THREAD_LIBS_INIT})
+ ENDIF (WIN32)
+
+
diff --git a/dev-db/sqliteman/files/sqliteman-1.2.2-qt5.patch b/dev-db/sqliteman/files/sqliteman-1.2.2-qt5.patch
new file mode 100644
index 000000000000..ebc571a33981
--- /dev/null
+++ b/dev-db/sqliteman/files/sqliteman-1.2.2-qt5.patch
@@ -0,0 +1,346 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d9fd041..f589bfe 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -101,28 +101,7 @@
+
+
+-SET (QT_MT_REQUIRED true)
+-SET (QT_MIN_VERSION "4.2.0")
++SET (QT_MIN_VERSION "5.7.1")
+-SET( QT_USE_QTSQL TRUE )
+-SET( QT_USE_QTXML TRUE )
+-FIND_PACKAGE( Qt4 REQUIRED )
+-MESSAGE(STATUS Qt4 version: ${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH})
+-# suggest Qt upgrade
+-if (QT_VERSION_MINOR LESS 3)
+- MESSAGE(STATUS "")
+- MESSAGE(STATUS "__ BIG FAT WARNING! _______________________________")
+- MESSAGE(STATUS "Your Qt version seems older than it should be.")
+- MESSAGE(STATUS "Althought will be Sqliteman compilled successfully,")
+- MESSAGE(STATUS "it will be limited in its features.")
+- MESSAGE(STATUS "There are some important bugs in older Qt versions.")
+- MESSAGE(STATUS "Please upgrade to the current Qt version.")
+- MESSAGE(STATUS "___________________________________________________")
+- MESSAGE(STATUS "")
+-endif (QT_VERSION_MINOR LESS 3)
+-MESSAGE(STATUS Qt4 includes: ${QT_INCLUDES})
+-MESSAGE(STATUS Qt4 libs: ${QT_LIBRARY_DIR})
+-
+-INCLUDE( ${QT_USE_FILE} )
+-
++FIND_PACKAGE( Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Sql Widgets )
+
+ IF (WANT_INTERNAL_QSCINTILLA)
+ MESSAGE(STATUS "QSci: Building with internal copy of QScintilla.")
+diff --git a/cmake/modules/FindQScintilla.cmake b/cmake/modules/FindQScintilla.cmake
+index c4592d0..92754b4 100644
+--- a/cmake/modules/FindQScintilla.cmake
++++ b/cmake/modules/FindQScintilla.cmake
+@@ -10,22 +10,19 @@
+ #
+ # Redistribution and use is allowed according to the terms of the FreeBSD license.
+
+-IF(NOT QT4_FOUND)
+- INCLUDE(FindQt4)
+-ENDIF(NOT QT4_FOUND)
+-
+ SET(QSCINTILLA_FOUND FALSE)
+
+-IF(QT4_FOUND)
+- FIND_PATH(QSCINTILLA_INCLUDE_DIR qsciglobal.h
+- "${QT_INCLUDE_DIR}/Qsci" /usr/include /usr/include/Qsci
++IF(Qt5_FOUND)
++ FIND_PATH(QSCINTILLA_INCLUDE_DIR qsciglobal.h
++ HINTS ${Qt5Core_INCLUDE_DIRS}
++ PATH_SUFFIXES Qsci
+ )
+
+- SET(QSCINTILLA_NAMES ${QSCINTILLA_NAMES} qscintilla2 libqscintilla2)
+- FIND_LIBRARY(QSCINTILLA_LIBRARY
+- NAMES ${QSCINTILLA_NAMES}
+- PATHS ${QT_LIBRARY_DIR}
+- )
++ SET(QSCINTILLA_NAMES ${QSCINTILLA_NAMES} qscintilla2 libqscintilla2 qscintilla2_qt5 libqscintilla2_qt5)
++ FIND_LIBRARY(QSCINTILLA_LIBRARY
++ NAMES ${QSCINTILLA_NAMES}
++ HINTS ${Qt5Core_LIBRARIES}
++ )
+
+ IF (QSCINTILLA_LIBRARY AND QSCINTILLA_INCLUDE_DIR)
+
+@@ -41,7 +34,7 @@ IF(QT4_FOUND)
+ ENDIF (CYGWIN)
+
+ ENDIF (QSCINTILLA_LIBRARY AND QSCINTILLA_INCLUDE_DIR)
+-ENDIF(QT4_FOUND)
++ENDIF(Qt5_FOUND)
+
+ IF (QSCINTILLA_FOUND)
+ IF (NOT QScintilla_FIND_QUIETLY)
+diff --git a/sqliteman/CMakeLists.txt b/sqliteman/CMakeLists.txt
+index c9154a7..13397ee 100644
+--- a/sqliteman/CMakeLists.txt
++++ b/sqliteman/CMakeLists.txt
+@@ -139,12 +139,12 @@ IF (WANT_RESOURCES)
+ )
+ ENDIF (WANT_RESOURCES)
+ SET (SQLITEMAN_RCS ${SQLITEMAN_RCS} api/api.qrc)
+-QT4_ADD_RESOURCES( SQLITEMAN_RC_RCS ${SQLITEMAN_RCS} )
++QT5_ADD_RESOURCES( SQLITEMAN_RC_RCS ${SQLITEMAN_RCS} )
+
+
+-QT4_WRAP_UI( SQLITEMAN_UI_HDRS ${SQLITEMAN_UI} )
++QT5_WRAP_UI( SQLITEMAN_UI_HDRS ${SQLITEMAN_UI} )
+
+-QT4_WRAP_CPP( SQLITEMAN_MOC_SRC ${SQLITEMAN_MOC} )
++QT5_WRAP_CPP( SQLITEMAN_MOC_SRC ${SQLITEMAN_MOC} )
+
+ INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR} )
+ INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR}/sqliteman )
+@@ -157,10 +157,13 @@ IF (WANT_INTERNAL_QSCINTILLA)
+ ${CMAKE_SOURCE_DIR}/sqliteman/qscintilla2/Qt4/Qsci
+ )
+ ELSE (WANT_INTERNAL_QSCINTILLA)
+- INCLUDE_DIRECTORIES( ${QSCINTILLA_INCLUDE_DIR} )
++ INCLUDE_DIRECTORIES(
++ ${QSCINTILLA_INCLUDE_DIR}
++ ${Qt5Widgets_INCLUDE_DIRS}
++ ${Qt5Sql_INCLUDE_DIRS}
++ )
+ ENDIF (WANT_INTERNAL_QSCINTILLA)
+
+-
+ IF (MSVC)
+ # this is a must to switch off subsystem:console (console window poping up)
+ # WinMain wrapper from QT_QTMAIN_LIBRARY is used and liner must be modified
+@@ -178,6 +181,6 @@ ADD_EXECUTABLE( ${EXE_NAME} ${WIN32_SUBSYSTEM}
+ )
+
+-TARGET_LINK_LIBRARIES( ${EXE_NAME} ${QT_LIBRARIES}) # ${POPULATOR_LIB})
++TARGET_LINK_LIBRARIES( ${EXE_NAME} Qt5::Widgets Qt5::Sql )
+
+ IF (WIN32)
+ # don't use console subsystem
+diff --git a/sqliteman/alterviewdialog.h b/sqliteman/alterviewdialog.h
+index 31407f9..b014473 100644
+--- a/sqliteman/alterviewdialog.h
++++ b/sqliteman/alterviewdialog.h
+@@ -8,11 +8,8 @@ for which a new license (GPL+exception) is in place.
+ #ifndef ALTERVIEWDIALOG_H
+ #define ALTERVIEWDIALOG_H
+
+-#include <qwidget.h>
+-
+ #include "ui_createviewdialog.h"
+
+-
+ /*! \brief GUI for view altering
+ \author Petr Vanek <petr@scribus.info>
+ */
+@@ -22,10 +19,10 @@ class AlterViewDialog : public QDialog
+
+ public:
+ AlterViewDialog(const QString & name, const QString & schema, QWidget * parent = 0);
+- ~AlterViewDialog(){};
++ ~AlterViewDialog(){}
+
+ bool update;
+- void setText(const QString & text) { ui.sqlEdit->setText(text); };
++ void setText(const QString & text) { ui.sqlEdit->setText(text); }
+
+ private:
+ Ui::CreateViewDialog ui;
+diff --git a/sqliteman/analyzedialog.h b/sqliteman/analyzedialog.h
+index 4b871cf..3f4302e 100644
+--- a/sqliteman/analyzedialog.h
++++ b/sqliteman/analyzedialog.h
+@@ -8,8 +8,6 @@ for which a new license (GPL+exception) is in place.
+ #ifndef ANALYZEDIALOG_H
+ #define ANALYZEDIALOG_H
+
+-#include <qdialog.h>
+-
+ #include "ui_analyzedialog.h"
+
+
+@@ -23,7 +21,7 @@ class AnalyzeDialog : public QDialog
+
+ public:
+ AnalyzeDialog(QWidget * parent = 0);
+- ~AnalyzeDialog(){};
++ ~AnalyzeDialog(){}
+
+ private:
+ Ui::AnalyzeDialog ui;
+diff --git a/sqliteman/constraintsdialog.h b/sqliteman/constraintsdialog.h
+index 6ab19c7..61485bb 100644
+--- a/sqliteman/constraintsdialog.h
++++ b/sqliteman/constraintsdialog.h
+@@ -8,8 +8,6 @@ for which a new license (GPL+exception) is in place.
+ #ifndef CONSTRAINTSDIALOG_H
+ #define CONSTRAINTSDIALOG_H
+
+-#include <qdialog.h>
+-
+ #include "ui_constraintsdialog.h"
+
+
+@@ -23,7 +21,7 @@ class ConstraintsDialog : public QDialog
+
+ public:
+ ConstraintsDialog(const QString & tabName, const QString & schema, QWidget * parent = 0);
+- ~ConstraintsDialog(){};
++ ~ConstraintsDialog(){}
+
+ bool update;
+
+diff --git a/sqliteman/createindexdialog.h b/sqliteman/createindexdialog.h
+index 9c75b35..186a46a 100644
+--- a/sqliteman/createindexdialog.h
++++ b/sqliteman/createindexdialog.h
+@@ -8,8 +8,6 @@ for which a new license (GPL+exception) is in place.
+ #ifndef INDEXDIALOG_H
+ #define INDEXDIALOG_H
+
+-#include <qwidget.h>
+-
+ #include "ui_createindexdialog.h"
+
+
+@@ -27,7 +25,7 @@ class CreateIndexDialog : public QDialog
+ \param parent standard Qt parent
+ */
+ CreateIndexDialog(const QString & tabName, const QString & schema, QWidget * parent = 0);
+- ~CreateIndexDialog(){};
++ ~CreateIndexDialog(){}
+
+ bool update;
+
+diff --git a/sqliteman/dataexportdialog.cpp b/sqliteman/dataexportdialog.cpp
+index 7ad5d03..ee77b25 100644
+--- a/sqliteman/dataexportdialog.cpp
++++ b/sqliteman/dataexportdialog.cpp
+@@ -223,7 +223,7 @@ bool DataExportDialog::exportHTML()
+ {
+ out << "<tr>";
+ for (int i = 0; i < m_header.size(); ++i)
+- out << "<th>" << m_header.at(i) << "</th>";
++ out << "<th>" << m_header.at(i).toHtmlEscaped() << "</th>";
+ out << "</tr>" << endl();
+ }
+
+@@ -234,7 +234,7 @@ bool DataExportDialog::exportHTML()
+ out << "<tr>";
+ QSqlRecord r = m_data->record(i);
+ for (int j = 0; j < m_header.size(); ++j)
+- out << "<td>" << r.value(j).toString() << "</td>";
++ out << "<td>" << r.value(j).toString().toHtmlEscaped() << "</td>";
+ out << "</tr>" << endl();
+ }
+ out << "</table>" << endl() << "</body>" << endl() << "</html>";
+@@ -256,7 +256,7 @@ bool DataExportDialog::exportExcelXML()
+ {
+ out << "<ss:Row ss:StyleID=\"1\">" << endl();
+ for (int i = 0; i < m_header.size(); ++i)
+- out << "<ss:Cell><ss:Data ss:Type=\"String\">" << m_header.at(i) << "</ss:Data></ss:Cell>" << endl();
++ out << "<ss:Cell><ss:Data ss:Type=\"String\">" << m_header.at(i).toHtmlEscaped() << "</ss:Data></ss:Cell>" << endl();
+ out << "</ss:Row>" << endl();
+ }
+
+@@ -267,7 +267,7 @@ bool DataExportDialog::exportExcelXML()
+ out << "<ss:Row>" << endl();
+ QSqlRecord r = m_data->record(i);
+ for (int j = 0; j < m_header.size(); ++j)
+- out << "<ss:Cell><ss:Data ss:Type=\"String\">" << r.value(j).toString() << "</ss:Data></ss:Cell>" << endl();
++ out << "<ss:Cell><ss:Data ss:Type=\"String\">" << r.value(j).toString().toHtmlEscaped() << "</ss:Data></ss:Cell>" << endl();
+ out << "</ss:Row>" << endl();
+ }
+
+diff --git a/sqliteman/populatordialog.cpp b/sqliteman/populatordialog.cpp
+index 1e55f63..8e6e246 100644
+--- a/sqliteman/populatordialog.cpp
++++ b/sqliteman/populatordialog.cpp
+@@ -7,7 +7,7 @@ for which a new license (GPL+exception) is in place.
+ #include <QSqlQuery>
+ #include <QSqlError>
+ #include <QHeaderView>
+-#include <math.h>
++#include <QtMath>
+
+ #include "populatordialog.h"
+ #include "populatorcolumnwidget.h"
+--- a/sqliteman/shortcutmodel.cpp
++++ b/sqliteman/shortcutmodel.cpp
+@@ -45,7 +45,7 @@ QVariant ShortcutModel::data(const QModelIndex & index, int role) const
+ return QVariant(index.column() == 0 ? m_values.at(index.row()).first : m_values.at(index.row()).second);
+ }
+ if (role == Qt::BackgroundRole && index.column() == 0 && m_values.at(index.row()).first.isEmpty())
+- return QVariant(Qt::red);
++ return QVariant(QColor(Qt::red));
+ return QVariant();
+ }
+
+diff --git a/sqliteman/sqlmodels.cpp b/sqliteman/sqlmodels.cpp
+index 178b2e7..82d1f0c 100644
+--- a/sqliteman/sqlmodels.cpp
++++ b/sqliteman/sqlmodels.cpp
+@@ -47,7 +47,7 @@ QVariant SqlTableModel::data(const QModelIndex & item, int role) const
+
+ // mark rows prepared for a deletion in this trasnaction
+ if (role == Qt::BackgroundColorRole && m_deleteCache.contains(item.row()))
+- return QVariant(Qt::red);
++ return QVariant(QColor(Qt::red));
+
+ // nulls
+ if (m_useNull && curr.isNull())
+diff --git a/sqliteman/sqlparser/tosqlparse.h b/sqliteman/sqlparser/tosqlparse.h
+index 3424fa2..678df90 100644
+--- a/sqliteman/sqlparser/tosqlparse.h
++++ b/sqliteman/sqlparser/tosqlparse.h
+@@ -50,7 +50,6 @@ This file is based on the TOra source code. http://tora.sf.net
+
+ #include <list>
+ #include <algorithm>
+-// #include <qstring.h>
+ #include <QString>
+
+ // class toConnection;
+diff --git a/sqliteman/tabletree.cpp b/sqliteman/tabletree.cpp
+index 339e259..f4ab00c 100644
+--- a/sqliteman/tabletree.cpp
++++ b/sqliteman/tabletree.cpp
+@@ -6,6 +6,8 @@ for which a new license (GPL+exception) is in place.
+ */
+ #include <QMouseEvent>
+ #include <QApplication>
++#include <QDrag>
++#include <QMimeData>
+
+ #include "database.h"
+ #include "tabletree.h"
+diff --git a/sqliteman/vacuumdialog.h b/sqliteman/vacuumdialog.h
+index cac27f1..5e25214 100644
+--- a/sqliteman/vacuumdialog.h
++++ b/sqliteman/vacuumdialog.h
+@@ -8,7 +8,7 @@ for which a new license (GPL+exception) is in place.
+ #ifndef VACUUMDIALOG_H
+ #define VACUUMDIALOG_H
+
+-#include <qdialog.h>
++#include <QDialog>
+
+ #include "ui_vacuumdialog.h"
+
+diff --git a/sqliteman/sqliteprocess.h b/sqliteman/sqliteprocess.h
+index aaa60ca..5bec5b0 100644
+--- a/sqliteman/sqliteprocess.h
++++ b/sqliteman/sqliteprocess.h
+@@ -8,6 +8,7 @@ for which a new license (GPL+exception) is in place.
+ #ifndef SQLITEPROCESS_H
+ #define SQLITEPROCESS_H
+
++#include <QObject>
+ #include <QStringList>
+
+
diff --git a/dev-db/sqliteman/metadata.xml b/dev-db/sqliteman/metadata.xml
new file mode 100644
index 000000000000..a8ba84e71fd8
--- /dev/null
+++ b/dev-db/sqliteman/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>qt@gentoo.org</email>
+ <name>Gentoo Qt Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">sqliteman</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/sqliteman/sqliteman-1.2.2-r4.ebuild b/dev-db/sqliteman/sqliteman-1.2.2-r4.ebuild
new file mode 100644
index 000000000000..979ce3516bed
--- /dev/null
+++ b/dev-db/sqliteman/sqliteman-1.2.2-r4.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+QT_VER=5.7.1
+inherit cmake-utils flag-o-matic xdg-utils
+
+DESCRIPTION="Powerful GUI manager for the Sqlite3 database"
+HOMEPAGE="https://sourceforge.net/projects/sqliteman/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE=""
+
+RDEPEND="
+ >=dev-qt/qtcore-${QT_VER}:5
+ >=dev-qt/qtgui-${QT_VER}:5
+ >=dev-qt/qtsql-${QT_VER}:5[sqlite]
+ >=dev-qt/qtwidgets-${QT_VER}:5
+ >=x11-libs/qscintilla-2.9.4:=[qt5(+)]"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${P}-lpthread.patch"
+ "${FILESDIR}/${P}-qt5.patch"
+)
+
+src_prepare() {
+ # remove bundled lib
+ rm -rf "${S}"/${PN}/qscintilla2 || die
+
+ append-flags -fPIC
+ cmake-utils_src_prepare
+}
+
+pkg_postinst() {
+ xdg_desktop_database_update
+}
+
+pkg_postrm() {
+ xdg_desktop_database_update
+}
diff --git a/dev-db/sqliteodbc-0.96 b/dev-db/sqliteodbc-0.96
deleted file mode 100644
index 0089b08353d1..000000000000
--- a/dev-db/sqliteodbc-0.96
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=configure install prepare setup
-DEPEND=>=dev-db/sqlite-3.6 || ( >=dev-db/unixODBC-2.2 >=dev-db/libiodbc-3.5 )
-DESCRIPTION=ODBC driver to access local SQLite database files
-EAPI=4
-HOMEPAGE=http://www.ch-werner.de/sqliteodbc/
-KEYWORDS=amd64 ~arm ppc x86
-LICENSE=BSD
-RDEPEND=>=dev-db/sqlite-3.6 || ( >=dev-db/unixODBC-2.2 >=dev-db/libiodbc-3.5 )
-SLOT=0
-SRC_URI=http://www.ch-werner.de/sqliteodbc/sqliteodbc-0.96.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=573c0895dfd464fd28878bd5a7087be6
diff --git a/dev-db/sqliteodbc-0.99 b/dev-db/sqliteodbc-0.99
deleted file mode 100644
index 85bf79c53523..000000000000
--- a/dev-db/sqliteodbc-0.99
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=configure install prepare setup
-DEPEND=>=dev-db/sqlite-3.6 || ( >=dev-db/unixODBC-2.2 >=dev-db/libiodbc-3.5 )
-DESCRIPTION=ODBC driver to access local SQLite database files
-EAPI=4
-HOMEPAGE=http://www.ch-werner.de/sqliteodbc/
-KEYWORDS=~amd64 ~arm ~ppc ~x86
-LICENSE=BSD
-RDEPEND=>=dev-db/sqlite-3.6 || ( >=dev-db/unixODBC-2.2 >=dev-db/libiodbc-3.5 )
-SLOT=0
-SRC_URI=http://www.ch-werner.de/sqliteodbc/sqliteodbc-0.99.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=ebe26684456ca078dcd08c5d61fe1ced
diff --git a/dev-db/sqliteodbc/Manifest b/dev-db/sqliteodbc/Manifest
new file mode 100644
index 000000000000..bce0760f7fb6
--- /dev/null
+++ b/dev-db/sqliteodbc/Manifest
@@ -0,0 +1,6 @@
+AUX sqliteodbc-0.93-respect_LDFLAGS.patch 1180 BLAKE2B b7f80800269febf41e0693faf55bd4698f56ea37e1f585449626b2571c67bcc9f9b43188ba9575b1dcc07b4cf817d953c196ae9254d8eeeb5540ccef8eada843 SHA512 083a9640d89976097a402483ebc16c1e5328e705fcea92d78a8f56988cc73b6f75143cf7f2f67b6a783f1bc9cd5ae5671aaf8d794c3548f764d6726cd78f6531
+DIST sqliteodbc-0.96.tar.gz 670070 BLAKE2B df33d64522fc4b2f63d169995677ce2437e283bb039e4eae8297816a053879e5c8c34867175f2b92785b7e24cd04892b990fb213bfb473fcf7a694a362ec4f65 SHA512 447798bbc018890a784abc6b75909fbf9ecd285d6ead3ed437727041ba3ff20ef3ceb1dfe4efb713717b7df2431fd52933e6bcafc2405674cf76518dd5b39435
+DIST sqliteodbc-0.99.tar.gz 696992 BLAKE2B ec5f87b7719573ce533d9bc316e840def5e07f3da65dca822068e57eb0e3f5eb8f1593119d704ad007f015cdf35d85c0cc53cdea5d0688faedccf611fc4d2fae SHA512 adf213acee4ee69c299f39582887fd2adba3856ce6d298d250e3a96744d041c720cefb7fd8acd504c41461751b46b8a729c4fbfa7e56832fb6e4c5a1c537955d
+EBUILD sqliteodbc-0.96.ebuild 800 BLAKE2B 27c9e05145d9f791e3e92f9f567ab9b3f2f2e8759d21ad11e997ce10f668e1407e01616de093b6be1330415ec6b261ee843f72b94e5531b6388fd32f404dd03a SHA512 27a9cef0023a198be47f4b4dfdfff8b9d57043d09e35031049cb3520f631f5feec01940ac7a7325e0e478a914c1a53db2298c035acd916d0f1d1d480158a6105
+EBUILD sqliteodbc-0.99.ebuild 823 BLAKE2B b591b24255a379276a094f2a2c200684a44fddc81f7f50c95e23a29c49dafb62ec6a84bb96aa72d0faa2cc7e0b280cfb41fbbf3f17180b2349cd32da20b0074a SHA512 3db5f1cee8919f6bb832c7799f7cc6a3d4b41818bd01bf7060b59bf6df62861ab72357090c9c755f6b811db94798eea93a663bcaf5fd714df1f2c582e93dc811
+MISC metadata.xml 166 BLAKE2B c254f1fb642881aba57637be14fb0a89b10384f91a128feaec3a8c870d76efc2cbacb92caccc0dee2dd19a5ac5eaf8643080dafa05c4e2ac96a68568927e5afd SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84
diff --git a/dev-db/sqliteodbc/files/sqliteodbc-0.93-respect_LDFLAGS.patch b/dev-db/sqliteodbc/files/sqliteodbc-0.93-respect_LDFLAGS.patch
new file mode 100644
index 000000000000..129ce3e65ff3
--- /dev/null
+++ b/dev-db/sqliteodbc/files/sqliteodbc-0.93-respect_LDFLAGS.patch
@@ -0,0 +1,30 @@
+--- Makefile.in.old 2012-03-24 12:57:34.533234122 +0100
++++ Makefile.in 2012-03-24 12:58:06.908198492 +0100
+@@ -37,23 +37,23 @@
+ all: @LIB_TARGETS@
+
+ libsqliteodbc.la: sqliteodbc.lo
+- $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -o libsqliteodbc.la \
++ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o libsqliteodbc.la \
+ sqliteodbc.lo -rpath $(drvdir) $(SQLITE_LIB) \
+ $(ODBC_LIB) -release $(VER_INFO)
+
+ libsqlite3odbc.la: sqlite3odbc.lo $(SQLITE3_A10N_O)
+- $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -o libsqlite3odbc.la \
++ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o libsqlite3odbc.la \
+ sqlite3odbc.lo $(SQLITE3_A10N_O) -rpath $(drvdir) \
+ $(SQLITE3_LIB) $(ODBC_LIB) -release $(VER_INFO) \
+ @DL_INITFINI@
+
+ libsqlite3_mod_blobtoxy.la: blobtoxy.lo
+- $(LIBTOOL) --mode=link $(CC) $(CFLAGS) \
++ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) \
+ -o libsqlite3_mod_blobtoxy.la \
+ blobtoxy.lo -rpath $(drvdir) -release $(VER_INFO)
+
+ libsqlite3_mod_impexp.la: impexp.lo
+- $(LIBTOOL) --mode=link $(CC) $(CFLAGS) \
++ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) \
+ -o libsqlite3_mod_impexp.la \
+ impexp.lo -rpath $(drvdir) -release $(VER_INFO)
+
diff --git a/dev-db/sqliteodbc/metadata.xml b/dev-db/sqliteodbc/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/dev-db/sqliteodbc/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/dev-db/sqliteodbc/sqliteodbc-0.96.ebuild b/dev-db/sqliteodbc/sqliteodbc-0.96.ebuild
new file mode 100644
index 000000000000..79c2e94b6f81
--- /dev/null
+++ b/dev-db/sqliteodbc/sqliteodbc-0.96.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="ODBC driver to access local SQLite database files"
+HOMEPAGE="http://www.ch-werner.de/sqliteodbc/"
+SRC_URI="http://www.ch-werner.de/sqliteodbc/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~arm ppc x86"
+IUSE=""
+
+DEPEND=">=dev-db/sqlite-3.6
+ || (
+ >=dev-db/unixODBC-2.2
+ >=dev-db/libiodbc-3.5
+ )"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ tc-export CC
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-0.93-respect_LDFLAGS.patch"
+}
+
+src_configure() {
+ econf --disable-static
+}
+
+src_install() {
+ dodir "/usr/$(get_libdir)"
+ einstall
+ find "${D}" -name '*.la' -exec rm -f {} + || die "la file removal failed"
+ dodoc ChangeLog README
+}
diff --git a/dev-db/sqliteodbc/sqliteodbc-0.99.ebuild b/dev-db/sqliteodbc/sqliteodbc-0.99.ebuild
new file mode 100644
index 000000000000..b82e0f692fec
--- /dev/null
+++ b/dev-db/sqliteodbc/sqliteodbc-0.99.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="ODBC driver to access local SQLite database files"
+HOMEPAGE="http://www.ch-werner.de/sqliteodbc/"
+SRC_URI="http://www.ch-werner.de/sqliteodbc/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+IUSE=""
+
+DEPEND=">=dev-db/sqlite-3.6
+ || (
+ >=dev-db/unixODBC-2.2
+ >=dev-db/libiodbc-3.5
+ )"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ tc-export CC
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-0.93-respect_LDFLAGS.patch"
+}
+
+src_configure() {
+ econf --disable-static
+}
+
+src_install() {
+ dodir "/usr/$(get_libdir)"
+ emake DESTDIR="${D}" install
+ find "${D}" -name '*.la' -exec rm -f {} + || die "la file removal failed"
+ dodoc ChangeLog README
+}
diff --git a/dev-db/sqlitestudio-3.0.7 b/dev-db/sqlitestudio-3.0.7
deleted file mode 100644
index 227f4d0f49f1..000000000000
--- a/dev-db/sqlitestudio-3.0.7
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst prepare
-DEPEND=dev-db/sqlite:3 >=dev-qt/qtcore-5.9.4:5 >=dev-qt/qtgui-5.9.4:5 >=dev-qt/qtnetwork-5.9.4:5 >=dev-qt/qtscript-5.9.4:5 >=dev-qt/qtsvg-5.9.4:5 >=dev-qt/qtwidgets-5.9.4:5 >=dev-qt/qtxml-5.9.4:5 >=dev-qt/designer-5.9.4:5 cups? ( >=dev-qt/qtprintsupport-5.9.4:5 ) cli? ( sys-libs/readline:= ) tcl? ( dev-lang/tcl:= ) >=dev-qt/qtconcurrent-5.9.4:5 >=sys-devel/gcc-4.8:* test? ( >=dev-qt/qttest-5.9.4:5 )
-DESCRIPTION=SQLiteStudio3 is a powerful cross-platform SQLite database manager
-EAPI=6
-HOMEPAGE=http://sqlitestudio.pl
-IUSE=cli cups tcl test
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-3
-RDEPEND=dev-db/sqlite:3 >=dev-qt/qtcore-5.9.4:5 >=dev-qt/qtgui-5.9.4:5 >=dev-qt/qtnetwork-5.9.4:5 >=dev-qt/qtscript-5.9.4:5 >=dev-qt/qtsvg-5.9.4:5 >=dev-qt/qtwidgets-5.9.4:5 >=dev-qt/qtxml-5.9.4:5 >=dev-qt/designer-5.9.4:5 cups? ( >=dev-qt/qtprintsupport-5.9.4:5 ) cli? ( sys-libs/readline:= ) tcl? ( dev-lang/tcl:= )
-SLOT=0
-SRC_URI=http://sqlitestudio.pl/files/sqlitestudio3/complete/tar/sqlitestudio-3.0.7.tar.gz
-_eclasses_=eapi7-ver d97a56a62c7df8614afddcb25f5ff00f estack 43ddf5aaffa7a8d0482df54d25a66a1f fdo-mime 995b19d3f30e956b4e1bc5a91fdc4ea7 kde5-functions 475002208a2233f4ab555934b2b0ed0b multilib 97f470f374f2e94ccab04a2fb21d811e qmake-utils bdf97e69a34b864d6d545f4ec3143ff7 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=fc2f77dbbe74577381921ae89a30e315
diff --git a/dev-db/sqlitestudio-3.1.1 b/dev-db/sqlitestudio-3.1.1
deleted file mode 100644
index 90aecf70e11f..000000000000
--- a/dev-db/sqlitestudio-3.1.1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare
-DEPEND=dev-db/sqlite:3 dev-qt/qtcore:5 dev-qt/qtgui:5 dev-qt/qtnetwork:5 dev-qt/qtscript:5 dev-qt/qtsvg:5 dev-qt/qtwidgets:5 dev-qt/qtxml:5 cli? ( sys-libs/readline:* ) cups? ( dev-qt/qtprintsupport:5 ) tcl? ( dev-lang/tcl:* ) dev-qt/designer:5 dev-qt/qtconcurrent:5 test? ( dev-qt/qttest:5 ) dev-util/desktop-file-utils x11-misc/shared-mime-info
-DESCRIPTION=Powerful cross-platform SQLite database manager
-EAPI=6
-HOMEPAGE=https://sqlitestudio.pl
-IUSE=cli cups tcl test
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-3
-RDEPEND=dev-db/sqlite:3 dev-qt/qtcore:5 dev-qt/qtgui:5 dev-qt/qtnetwork:5 dev-qt/qtscript:5 dev-qt/qtsvg:5 dev-qt/qtwidgets:5 dev-qt/qtxml:5 cli? ( sys-libs/readline:* ) cups? ( dev-qt/qtprintsupport:5 ) tcl? ( dev-lang/tcl:* )
-SLOT=0
-SRC_URI=https://sqlitestudio.pl/files/sqlitestudio3/complete/tar/sqlitestudio-3.1.1.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc l10n 97f2753e3f1f3753d53d856c7c0bbb0b ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 qmake-utils bdf97e69a34b864d6d545f4ec3143ff7 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg 6cd76cc914c1a759dee032778487b57f xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=681911a1bf9352b97484428f77917a7e
diff --git a/dev-db/sqlitestudio/Manifest b/dev-db/sqlitestudio/Manifest
new file mode 100644
index 000000000000..8de8aa278828
--- /dev/null
+++ b/dev-db/sqlitestudio/Manifest
@@ -0,0 +1,8 @@
+AUX sqlitestudio-3.0.6-portable.patch 313 BLAKE2B abd43b5f413ea0a7dd5a1f72a70cb3c828f764ee8aad4ec787b7d5c6f12c42defb6b39bb542f515123be27ba6585eebf09c9cd5a663b48610db4fc5ed1222aa9 SHA512 85a6c67488196b182ea3dc4df065ab175c0da5140d892fd9cfc7c2a120a2dc91b89878f66d92d7e9f085676f0c0dfff6adbfe5742868e62b1b47332232447f07
+AUX sqlitestudio-3.0.6-qt5_5-QDataStream.patch 912 BLAKE2B d362ec9ca2171be5a137800ada97bae4fc6c184b97ca0566818f1f3e40096249d9bb44a84e97d34393b53babdcfd60aab80aa2c9e185b4e02c93c6bb84958a29 SHA512 217152e6a8cab0ef52de6f7704c1ed7db6f2b3134bd107d49c1c00405922afd0561046123dac53d91827856b6586c8946231643fe369b3775459cd247c46ceaf
+AUX sqlitestudio-3.0.7-paths.patch 735 BLAKE2B 2c3fa18d679e6a214bcb27614f02abcc200e31cbee139709700642d7cfdabeea4eb3b589eccdb9197162a4b0266013dbbbbb27c15b4f6a41c4dfcc020e5d9df3 SHA512 cbe5e66483fa8fcfde80e62f2061d59af002aa3f616e5674f49049c21d0683b3b0668c1793186dc2757c870ce71566ca38283e4f1d34bdecb903ab2eaabeebe2
+DIST sqlitestudio-3.0.7.tar.gz 2551341 BLAKE2B b499aac9d251b9682c241e37c30f52d6fce65bc317ee39022e385d2535e2e62b9213bc72941236fcb355d0f8a56924f9d28d32db9937a0af6e7a0cfb05252763 SHA512 2171fe26754aed2abe24d73e9ccc2ee1abe5e87228096bc5643c5638ad578dc323b810535f41d0206b3d7a7aa75132bfb578972c7945b962dd593543c7da3270
+DIST sqlitestudio-3.1.1.tar.gz 8610037 BLAKE2B 7f0de65a31a8c25da305cb8d73a03f4215a1134c652e6fb68424ae2153afb1e3655ae3360b2c25b863f105a53cd5fb9909d3f8aa5674f25f0e19a080b15dfa97 SHA512 421247730660e8396f692fd8df9366e6ae834633823004ef3cb7c6f3064e66f420f0517df6a8542b800f7f88dacf2fc646b4224b423ab3994c7d8a083e82e143
+EBUILD sqlitestudio-3.0.7.ebuild 3332 BLAKE2B fa184dd1694a0034c9d34827ba257da9097a0fa8b7f1d552718d328cef7ed0ea05b3e7adf7ce9887b20d6753063f196f96e228076e758615772cb1543db57e55 SHA512 d4560ef7865d0c5356ae23cecec834669e4ad17ab96e020bdd9a5d6dcd493fa038793296376538e5460c22a79df579a6ea90eeb3f1afa1d8cd2550de9d291547
+EBUILD sqlitestudio-3.1.1.ebuild 3499 BLAKE2B ac98c485bbb462209ea08e7230e478760442680dbabc0f06a0075ee8c7aed59f2e29e22a895db1f327dd241428918ab3c4c95d774ae403fab556a3d96e14bbcb SHA512 38ac02906a394f8466064c25069ff979dcc8770cfba780fc083ddd11f0d86982a6f8fa57c439936546ca33ff1653ca48905d4c8ad8d47e2a78aeb84c49454e12
+MISC metadata.xml 427 BLAKE2B 937831b3acf561038a945599a81766c4fd1712d889b8bb0ba2c7b8c0d2414c547e270363b6ece7fd7956b66f1eec2e12bb4b83a2adf2718c14d0271d3c0f0155 SHA512 a6948ce576abceb4df085f103e097a720ef5f959c6f4bb79cc1f1d858e43cea625d5af3c5edf47f5e61c0a537368e60abd77ed3fcf39a9526543de315ef125b2
diff --git a/dev-db/sqlitestudio/files/sqlitestudio-3.0.6-portable.patch b/dev-db/sqlitestudio/files/sqlitestudio-3.0.6-portable.patch
new file mode 100644
index 000000000000..558a84231b81
--- /dev/null
+++ b/dev-db/sqlitestudio/files/sqlitestudio-3.0.6-portable.patch
@@ -0,0 +1,11 @@
+--- a/SQLiteStudio3/sqlitestudio/sqlitestudio.pro 2015-11-24 20:09:29.000000000 +0100
++++ b/SQLiteStudio3/sqlitestudio/sqlitestudio.pro 2016-01-20 15:04:46.700926391 +0100
+@@ -25,7 +25,7 @@
+
+ CONFIG += c++11
+ QMAKE_CXXFLAGS += -pedantic
+-linux|portable {
++portable {
+ QMAKE_LFLAGS += -Wl,-rpath,./lib
+ }
+
diff --git a/dev-db/sqlitestudio/files/sqlitestudio-3.0.6-qt5_5-QDataStream.patch b/dev-db/sqlitestudio/files/sqlitestudio-3.0.6-qt5_5-QDataStream.patch
new file mode 100644
index 000000000000..c42160c52f07
--- /dev/null
+++ b/dev-db/sqlitestudio/files/sqlitestudio-3.0.6-qt5_5-QDataStream.patch
@@ -0,0 +1,30 @@
+--- a/SQLiteStudio3/coreSQLiteStudio/db/db.cpp 2015-05-11 23:22:41.000000000 +0200
++++ b/SQLiteStudio3/coreSQLiteStudio/db/db.cpp 2016-01-20 02:21:00.350160645 +0100
+@@ -1,6 +1,7 @@
+ #include "db.h"
+ #include <QMetaEnum>
+ #include <QDebug>
++#include <QDataStream>
+
+ Db::Db()
+ {
+--- a/SQLiteStudio3/coreSQLiteStudio/common/utils.cpp 2015-05-11 23:22:41.000000000 +0200
++++ b/SQLiteStudio3/coreSQLiteStudio/common/utils.cpp 2016-01-20 01:46:22.113263710 +0100
+@@ -11,6 +11,7 @@
+ #include <QDebug>
+ #include <QRegularExpression>
+ #include <QDir>
++#include <QDataStream>
+
+ #ifdef Q_OS_LINUX
+ #include <sys/utsname.h>
+--- a/SQLiteStudio3/sqlitestudiocli/cli_config.h 2015-05-11 23:22:40.000000000 +0200
++++ b/SQLiteStudio3/sqlitestudiocli/cli_config.h 2016-01-20 02:45:11.393819294 +0100
+@@ -2,6 +2,7 @@
+ #define CLI_CONFIG_H
+
+ #include "config_builder.h"
++#include <QDataStream>
+
+ namespace CliResultsDisplay
+ {
diff --git a/dev-db/sqlitestudio/files/sqlitestudio-3.0.7-paths.patch b/dev-db/sqlitestudio/files/sqlitestudio-3.0.7-paths.patch
new file mode 100644
index 000000000000..59d8c0f187aa
--- /dev/null
+++ b/dev-db/sqlitestudio/files/sqlitestudio-3.0.7-paths.patch
@@ -0,0 +1,22 @@
+--- a/Plugins/DbAndroid/DbAndroid.pro 2015-11-24 20:09:41.000000000 +0100
++++ a/Plugins/DbAndroid/DbAndroid.pro 2016-01-20 13:39:02.436869035 +0100
+@@ -6,7 +6,7 @@
+
+ QT += widgets network
+
+-include($$PWD/../../../sqlitestudio/SQLiteStudio3/plugins.pri)
++include($$PWD/../../SQLiteStudio3/plugins.pri)
+
+ TARGET = DbAndroid
+ TEMPLATE = lib
+--- a/Plugins/ScriptingTcl/ScriptingTcl.pro
++++ b/Plugins/ScriptingTcl/ScriptingTcl.pro
+@@ -35,7 +35,7 @@ linux: {
+
+ # Find tclConfig.sh
+ TCL_CONFIG_DIR = $$system(echo "puts [info library]" | tclsh)
+- TCL_CONFIG = $$TCL_CONFIG_DIR/tclConfig.sh
++ TCL_CONFIG = $$TCL_CONFIG_DIR/../tclConfig.sh
+ message("Looking for $$TCL_CONFIG")
+ !exists($$TCL_CONFIG) {
+ # Debian case
diff --git a/dev-db/sqlitestudio/metadata.xml b/dev-db/sqlitestudio/metadata.xml
new file mode 100644
index 000000000000..0e58a49e7265
--- /dev/null
+++ b/dev-db/sqlitestudio/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>reagentoo@gmail.com</email>
+ <name>Dmitry Baranov</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <use>
+ <flag name="cli">Build CLI interface</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-db/sqlitestudio/sqlitestudio-3.0.7.ebuild b/dev-db/sqlitestudio/sqlitestudio-3.0.7.ebuild
new file mode 100644
index 000000000000..21747b2426f6
--- /dev/null
+++ b/dev-db/sqlitestudio/sqlitestudio-3.0.7.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Upstream guide: http://wiki.sqlitestudio.pl/index.php/Compiling_application_from_sources
+
+EAPI=6
+
+inherit qmake-utils fdo-mime kde5-functions
+
+DESCRIPTION="SQLiteStudio3 is a powerful cross-platform SQLite database manager"
+HOMEPAGE="http://sqlitestudio.pl"
+LICENSE="GPL-3"
+SRC_URI="${HOMEPAGE}/files/sqlitestudio3/complete/tar/${P}.tar.gz"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="cli cups tcl test"
+
+RDEPEND="
+ dev-db/sqlite:3
+ $(add_qt_dep qtcore)
+ $(add_qt_dep qtgui)
+ $(add_qt_dep qtnetwork)
+ $(add_qt_dep qtscript)
+ $(add_qt_dep qtsvg)
+ $(add_qt_dep qtwidgets)
+ $(add_qt_dep qtxml)
+ $(add_qt_dep designer)
+ cups? ( $(add_qt_dep qtprintsupport) )
+ cli? ( sys-libs/readline:= )
+ tcl? ( dev-lang/tcl:= )
+"
+DEPEND="${RDEPEND}
+ $(add_qt_dep qtconcurrent)
+ >=sys-devel/gcc-4.8:*
+ test? ( $(add_qt_dep qttest) )
+"
+
+S="${WORKDIR}"
+core_build_dir="${S}/output/build"
+core_src_dir="${S}/SQLiteStudio3"
+plugins_build_dir="${core_build_dir}/Plugins"
+plugins_src_dir="${S}/Plugins"
+
+src_prepare() {
+ PATCHES=(
+ "${FILESDIR}"/${PN}-3.0.6-qt5_5-QDataStream.patch
+ "${FILESDIR}"/${PN}-3.0.6-portable.patch
+ "${FILESDIR}"/${PN}-3.0.7-paths.patch
+ )
+ default
+
+ disable_modules() {
+ [ $# -lt 2 ] && return 0
+ local file="$1"; shift
+
+ edos2unix "${file}"
+
+ local regex=""
+ for m in "$@"; do
+ regex+="\b${m}\b( \\\\|\$)|"
+ done
+ regex="${regex:0:-1}" # last pipe
+
+ elog "Disabling modules: '$*' in '${file#${S}/}'"
+ sed -i -r -e "/${regex}/d" -- "${file}" || return 1
+ }
+
+ ## Core
+ local disabled_modules=(
+ $(usex cli '' 'cli')
+ )
+ disable_modules "${core_src_dir}/SQLiteStudio3.pro" "${disabled_modules[@]}" || die
+
+ ## Plugins
+ local disabled_plugins=(
+ 'DbSqlite2'
+ $(usex tcl '' 'ScriptingTcl')
+ $(usex cups '' 'Printing')
+ )
+ disable_modules "${plugins_src_dir}/Plugins.pro" "${disabled_plugins[@]}" || die
+}
+
+src_configure() {
+ local qmake_args=(
+ "LIBDIR=${EROOT}usr/$(get_libdir)"
+ "BINDIR=${EROOT}usr/bin"
+ "DEFINES+=PLUGINS_DIR=${EROOT}usr/$(get_libdir)/${PN}"
+ "DEFINES+=ICONS_DIR=${EROOT}usr/share/${PN}/icons"
+ "DEFINES+=FORMS_DIR=${EROOT}usr/share/${PN}/forms"
+
+ 'DEFINES+=NO_AUTO_UPDATES' # not strictly needed since 3.0.6, but nevermind
+ $(usex test 'DEFINES+=tests' '')
+ )
+
+ ## Core
+ mkdir -p "${core_build_dir}" && cd "${core_build_dir}" || die
+ eqmake5 "${qmake_args[@]}" "${core_src_dir}"
+
+ ## Plugins
+ mkdir -p "${plugins_build_dir}" && cd "${plugins_build_dir}" || die
+ eqmake5 "${qmake_args[@]}" "${plugins_src_dir}"
+}
+
+src_compile() {
+ cd "${core_build_dir}" || die && emake
+ cd "${plugins_build_dir}" || die && emake
+}
+
+src_install() {
+ cd "${core_build_dir}" || die && emake INSTALL_ROOT="${ED}" install
+ cd "${plugins_build_dir}" || die && emake INSTALL_ROOT="${ED}" install
+
+ dodoc "${core_src_dir}/docs/sqlitestudio3_docs.cfg"
+ doicon -s scalable "${core_src_dir}/guiSQLiteStudio/img/${PN}.svg"
+
+ make_desktop_entry_args=(
+ "${EROOT}usr/bin/${PN} %F" # exec
+ 'SQLiteStudio3' # name
+ "${PN}" # icon
+ 'Development;Utility' # categories
+ )
+ make_desktop_entry_extras=( 'MimeType=application/x-sqlite3;' )
+ make_desktop_entry "${make_desktop_entry_args[@]}" \
+ "$( printf '%s\n' "${make_desktop_entry_extras[@]}" )"
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+}
diff --git a/dev-db/sqlitestudio/sqlitestudio-3.1.1.ebuild b/dev-db/sqlitestudio/sqlitestudio-3.1.1.ebuild
new file mode 100644
index 000000000000..5c183c9c63d5
--- /dev/null
+++ b/dev-db/sqlitestudio/sqlitestudio-3.1.1.ebuild
@@ -0,0 +1,139 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PLOCALES="de es fr it pl pt_BR ru sk zh_CN"
+
+inherit eutils l10n qmake-utils xdg
+
+DESCRIPTION="Powerful cross-platform SQLite database manager"
+HOMEPAGE="https://sqlitestudio.pl"
+SRC_URI="https://sqlitestudio.pl/files/sqlitestudio3/complete/tar/${P}.tar.gz"
+
+KEYWORDS="~amd64 ~x86"
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="cli cups tcl test"
+
+RDEPEND="
+ dev-db/sqlite:3
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtscript:5
+ dev-qt/qtsvg:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtxml:5
+ cli? ( sys-libs/readline:* )
+ cups? ( dev-qt/qtprintsupport:5 )
+ tcl? ( dev-lang/tcl:* )
+"
+DEPEND="${RDEPEND}
+ dev-qt/designer:5
+ dev-qt/qtconcurrent:5
+ test? ( dev-qt/qttest:5 )
+"
+
+S="${WORKDIR}"
+core_build_dir="${S}/output/build"
+plugins_build_dir="${core_build_dir}/Plugins"
+
+src_prepare() {
+ xdg_src_prepare
+
+ sed -i -e 's/linux|portable/portable/' \
+ SQLiteStudio3/sqlitestudio/sqlitestudio.pro || die
+
+ disable_modules() {
+ [[ $# -lt 2 ]] && die "not enough arguments"
+
+ local pro="$1"; shift
+ local modules="${@}"
+
+ sed -r -i \
+ -e 's/('${modules// /|}')[[:space:]]*(\\?)/\2/' \
+ ${pro} || die
+ }
+
+ use cli || disable_modules SQLiteStudio3/SQLiteStudio3.pro cli
+
+ local mod_lst=( DbSqlite2 )
+ use cups || mod_lst+=( Printing )
+ use tcl || mod_lst+=( ScriptingTcl )
+ disable_modules Plugins/Plugins.pro ${mod_lst[@]}
+
+ local mylrelease="$(qt5_get_bindir)"/lrelease
+ local ts_dir_lst=$(find * -type f -name "*.qm" -printf '%h\n' | sort -u)
+ local ts_pro_lst=$(find * -type f -name "*.pro" -exec grep -l 'TRANSLATIONS' {} \;)
+ local ts_qrc_lst=$(find * -type f -name "*.qrc" -exec grep -l '\.qm' {} \;)
+
+ # delete all "*.qm"
+ for ts_dir in ${ts_dir_lst[@]}; do
+ rm "${ts_dir}"/*.qm || die
+ done
+
+ prepare_locale() {
+ for ts_dir in ${ts_dir_lst[@]}; do
+ local ts=$(find "${ts_dir}" -type f -name "*${1}.ts" || continue)
+ "${mylrelease}" "${ts}" || die "preparing ${1} locale failed"
+ done
+ }
+
+ rm_locale() {
+ for ts_pro in ${ts_pro_lst[@]}; do
+ sed -i -r -e 's/[^[:space:]]*'${1}'\.ts//' \
+ ${ts_pro} || die
+ done
+
+ for ts_qrc in ${ts_qrc_lst[@]}; do
+ sed -i -e '/'${1}'\.qm/d' \
+ ${ts_qrc} || die
+ done
+ }
+
+ local ts_dir_main="SQLiteStudio3/sqlitestudio/translations"
+ l10n_find_plocales_changes ${ts_dir_main} "sqlitestudio_" '.ts'
+ l10n_for_each_locale_do prepare_locale
+ l10n_for_each_disabled_locale_do rm_locale
+}
+
+src_configure() {
+ # NOTE: QMAKE_CFLAGS_ISYSTEM option prevents
+ # build error with tcl use enabled (stdlib.h is missing)
+ local myqmakeargs=(
+ "BINDIR=${EPREFIX}/usr/bin"
+ "LIBDIR=${EPREFIX}/usr/$(get_libdir)"
+ "QMAKE_CFLAGS_ISYSTEM=\"\""
+ $(usex test 'DEFINES+=tests' '')
+ )
+
+ ## Core
+ mkdir -p "${core_build_dir}" && cd "${core_build_dir}" || die
+ eqmake5 "${myqmakeargs[@]}" "${S}/SQLiteStudio3"
+
+ ## Plugins
+ mkdir -p "${plugins_build_dir}" && cd "${plugins_build_dir}" || die
+ eqmake5 "${myqmakeargs[@]}" "${S}/Plugins"
+}
+
+src_compile() {
+ emake -C "${core_build_dir}"
+ emake -C "${plugins_build_dir}"
+}
+
+src_install() {
+ emake -C "${core_build_dir}" INSTALL_ROOT="${D}" install
+ emake -C "${plugins_build_dir}" INSTALL_ROOT="${D}" install
+
+ doicon -s scalable "SQLiteStudio3/guiSQLiteStudio/img/${PN}.svg"
+
+ local make_desktop_entry_args=(
+ "${PN} -- %F"
+ 'SQLiteStudio3'
+ "${PN}"
+ 'Development;Database;Utility'
+ )
+ make_desktop_entry "${make_desktop_entry_args[@]}" \
+ "$( printf '%s\n' "MimeType=application/x-sqlite3;" )"
+}
diff --git a/dev-db/textsearch_ja-9.0.0 b/dev-db/textsearch_ja-9.0.0
deleted file mode 100644
index 3fa3788ef4d4..000000000000
--- a/dev-db/textsearch_ja-9.0.0
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile install
-DEPEND=app-text/mecab >=dev-db/postgresql-7.4[server]
-DESCRIPTION=Integrated Full-Text-Search for Japanese language using morphological analyze
-EAPI=4
-HOMEPAGE=http://textsearch-ja.projects.postgresql.org/index.html
-KEYWORDS=~amd64
-LICENSE=BSD
-RDEPEND=app-text/mecab >=dev-db/postgresql-7.4[server]
-SLOT=0
-SRC_URI=http://pgfoundry.org/frs/download.php/2943/textsearch_ja-9.0.0.tar.gz
-_md5_=a797cb54a160bc2a75c33a0c520ecc73
diff --git a/dev-db/textsearch_ja/Manifest b/dev-db/textsearch_ja/Manifest
new file mode 100644
index 000000000000..4e3b010132fc
--- /dev/null
+++ b/dev-db/textsearch_ja/Manifest
@@ -0,0 +1,3 @@
+DIST textsearch_ja-9.0.0.tar.gz 47126 BLAKE2B ac6ed27a2e9686f9a50e3ecddecda39429479095eabfe7749b5d8dfee93be1f04217d255e05046c07744b4be6b2279ebc2474f9157f8f5fba218fff6b202e4cb SHA512 1a516431709f2e9ec14a32c7edf7a6cafd2bd231853ead42d7a6381a964a66df37414f9e99959a3cc1f3b6dd50cce1f8142b300f255ae8eb498f6e3544e0dcd4
+EBUILD textsearch_ja-9.0.0.ebuild 605 BLAKE2B 33bc136afba5e9996b9253428484e47792657d54ed8961c9fa1ad81d1e50323182f57b2d99cadb322ef6b0210bdd52fedfc391d4efadf93046ff38bf6afbc2b5 SHA512 556262040bcbb55c1f5b902742f19788c23430ecd3d8a55fb8a1b121d1fb7d406f0298d462d7468da85eb5241311b95693d29b86c4cf6e3699a350cba4fd17f6
+MISC metadata.xml 230 BLAKE2B 42b2921aa8f0a7ac96ff31ef846311f023469d38da4186c49a365cb7c4a1c63769e54718fb9ab6e8cfd2b532f249b0214cc54929e93d1a9960a6b5be3238b55d SHA512 74065bee639a38ecdef7c32280ed43a8f1627362cd8e97e714a09bcf116ae8bc4c61b2ab13c31bd02a22ae8a5a201263981ee519a0b6ba9df81a4d5f3cd94eb1
diff --git a/dev-db/textsearch_ja/metadata.xml b/dev-db/textsearch_ja/metadata.xml
new file mode 100644
index 000000000000..c921b96adf6c
--- /dev/null
+++ b/dev-db/textsearch_ja/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>cjk@gentoo.org</email>
+ <name>Cjk</name>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-db/textsearch_ja/textsearch_ja-9.0.0.ebuild b/dev-db/textsearch_ja/textsearch_ja-9.0.0.ebuild
new file mode 100644
index 000000000000..2fa5d4ea83b1
--- /dev/null
+++ b/dev-db/textsearch_ja/textsearch_ja-9.0.0.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+DESCRIPTION="Integrated Full-Text-Search for Japanese language using morphological analyze"
+HOMEPAGE="http://textsearch-ja.projects.postgresql.org/index.html"
+SRC_URI="http://pgfoundry.org/frs/download.php/2943/textsearch_ja-${PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND="app-text/mecab
+ >=dev-db/postgresql-7.4[server]" # pgmecab requires PGXS
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ emake USE_PGXS=1
+}
+
+src_install() {
+ emake DESTDIR="${D}" USE_PGXS=1 install
+}
diff --git a/dev-db/tinycdb-0.77-r2 b/dev-db/tinycdb-0.77-r2
deleted file mode 100644
index 21e9de59a37b..000000000000
--- a/dev-db/tinycdb-0.77-r2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install prepare
-DESCRIPTION=A very fast and simple package for creating and reading constant data bases
-EAPI=6
-HOMEPAGE=http://www.corpit.ru/mjt/tinycdb.html
-IUSE=static-libs
-KEYWORDS=amd64 ~arm64 hppa ia64 ~mips ppc x86
-LICENSE=public-domain
-RDEPEND=!dev-db/cdb
-RESTRICT=test
-SLOT=0
-SRC_URI=http://www.corpit.ru/mjt/tinycdb/tinycdb_0.77.tar.gz
-_eclasses_=multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=23f97ebf60e6baefcdf40ff76a62a7b6
diff --git a/dev-db/tinycdb/Manifest b/dev-db/tinycdb/Manifest
new file mode 100644
index 000000000000..873b0ae45285
--- /dev/null
+++ b/dev-db/tinycdb/Manifest
@@ -0,0 +1,6 @@
+AUX tinycdb-gentoo.patch 711 BLAKE2B a1f6a43fb9903784d3cc4dfdbd2b3d1b5b5532801b6de1cbda922b7a318ead7e93696b0722ee3132618f3cd8bb3ec1eb4f4cdfda35c1b428c3988626ff87b91c SHA512 b188db6904ef63a262a88aa79d1488ede1a9917af8e33b97da5d80c34cb00065bb42e84b00e20548a85f5f0b939679f5a3d85336b938318f98d101d880489415
+AUX tinycdb-uclibc.patch 328 BLAKE2B 20dacb9fc08d7e02c0b138c445d91ecbdcb1993d4b6709081bd4f8c81ce92ba5124c8e6dc8e59644bce8823d0fd0a16e3f7ae543d3dc9c093768114f55ec23a6 SHA512 b58656fbcdcd21d46ace85ba50fcbc9a85b3c0d02fe3c7ba048276e6a22e2d8a91dce6fe5f853a3516071e33fc9513216148b0e92ebe13b75b201881e73f127f
+AUX tinycdb-umask.patch 215 BLAKE2B b64bd33a9a47c6a1d2ba0ea0354a79f608d8990b66033ec711790fd93f90471a722d7f0f7a00db7c968fdd644d7d68462690c93f85d911972724e27500ae3d79 SHA512 57eae9200d7ea13ae5d761f0c4575b0d438f24f696bd0c2d29c720f27a706bf5dba94f34fb0c93213ee5c6dbd12af449e2fbcc11ec1872e8ecc4a9a66c9d0905
+DIST tinycdb_0.77.tar.gz 37728 BLAKE2B bebcc6128b253fa9e64438ed2671488153d70cf452bd0686a90ebd5360b725ab784b4537b25fe2ea9de0281cb1bb2fa29beb5f3515aed90fd7e2965f7e5e38bd SHA512 cfc830578a9be49781a1dbade97b64ec13293853093719aeb9a403c128245f157fd1d2d7e6941966bdea00b472127f10f11672583ba06ccc6e49151b22bf4c9a
+EBUILD tinycdb-0.77-r2.ebuild 1074 BLAKE2B fb6c8f0ef3deb516c976ef9f35d97dfcbd6a1567312d6b17a7a25db15ebab5236913b7735e11752f6e4ba3451d695666380cd3a898cb8ea1136c6a5cffc76d47 SHA512 d00b4eb0a1b5b6a881639b0a53b0a34a770a8a366418ad996f9943b52217869010e8c1f2df74201ad2dd45abe16bca9ddc4a091aacbbc36ef99a53fc63ed4dfe
+MISC metadata.xml 221 BLAKE2B 6fb71e3c82061054a0c2d88c1ce8e591d5742628fe53032c9efd2c371ce1e8b0135b00ac91fa1905df39a507d5faa5871fb3a30d167dd46cec581682ba17c8ff SHA512 a11e9bbbabc9ac96985c5dc247e601b065fa762f12bce74224896c27aee34eb908187622bfc849c39c6c722a8ef8ee72b248afc84da1b0eb72f1ff5eeb13bbf0
diff --git a/dev-db/tinycdb/files/tinycdb-gentoo.patch b/dev-db/tinycdb/files/tinycdb-gentoo.patch
new file mode 100644
index 000000000000..e8406b647d4b
--- /dev/null
+++ b/dev-db/tinycdb/files/tinycdb-gentoo.patch
@@ -0,0 +1,28 @@
+--- a/Makefile
++++ b/Makefile
+@@ -34,7 +34,7 @@
+ CDB_USELIB = $(LIB)
+ NSS_USELIB = $(PICLIB)
+ LIBMAP = $(LIBBASE).map
+-INSTALLPROG = cdb
++INSTALLPROG = cdb-shared
+
+ # The following assumes GNU CC/LD -
+ # used for building shared libraries only
+@@ -59,7 +59,7 @@
+ ChangeLog NEWS
+ DEBIANFILES = debian/control debian/rules debian/copyright debian/changelog
+
+-all: static
++all: shared
+ static: staticlib cdb
+ staticlib: $(LIB)
+ nss: $(NSS_CDB)
+@@ -128,6 +128,7 @@
+
+ do_install = \
+ while [ "$$1" ] ; do \
++ if [ ! -f $$1 ]; then shift 4; continue; fi; \
+ if [ .$$4 = .- ]; then f=$$1; else f=$$4; fi; \
+ d=$(DESTDIR)$$3 ; echo installing $$1 to $$d/$$f; \
+ [ -d $$d ] || mkdir -p $$d || exit 1 ; \
diff --git a/dev-db/tinycdb/files/tinycdb-uclibc.patch b/dev-db/tinycdb/files/tinycdb-uclibc.patch
new file mode 100644
index 000000000000..14e56bd7b6fc
--- /dev/null
+++ b/dev-db/tinycdb/files/tinycdb-uclibc.patch
@@ -0,0 +1,15 @@
+--- a/cdb.c
++++ b/cdb.c
+@@ -31,6 +31,12 @@
+ # define HAVE_PROGRAM_INVOCATION_SHORT_NAME
+ #endif
+
++#ifdef __UCLIBC__
++# ifndef __UCLIBC_HAS_PROGRAM_INVOCATION_NAME__
++# undef HAVE_PROGRAM_INVOCATION_SHORT_NAME
++# endif
++#endif
++
+ #ifdef HAVE_PROGRAM_INVOCATION_SHORT_NAME
+ # define progname program_invocation_short_name
+ #else
diff --git a/dev-db/tinycdb/files/tinycdb-umask.patch b/dev-db/tinycdb/files/tinycdb-umask.patch
new file mode 100644
index 000000000000..2a53babb2510
--- /dev/null
+++ b/dev-db/tinycdb/files/tinycdb-umask.patch
@@ -0,0 +1,11 @@
+--- a/cdb.c
++++ b/cdb.c
+@@ -21,6 +21,8 @@
+ #include <stdarg.h>
+ #include <fcntl.h>
+ #include <errno.h>
++#include <sys/types.h> /* umask() */
++#include <sys/stat.h> /* umask() */
+ #include "cdb.h"
+
+ #ifndef EPROTO
diff --git a/dev-db/tinycdb/metadata.xml b/dev-db/tinycdb/metadata.xml
new file mode 100644
index 000000000000..21dc8fdf43ff
--- /dev/null
+++ b/dev-db/tinycdb/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>hattya@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-db/tinycdb/tinycdb-0.77-r2.ebuild b/dev-db/tinycdb/tinycdb-0.77-r2.ebuild
new file mode 100644
index 000000000000..2e942b3bbef4
--- /dev/null
+++ b/dev-db/tinycdb/tinycdb-0.77-r2.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs
+
+DESCRIPTION="A very fast and simple package for creating and reading constant data bases"
+HOMEPAGE="http://www.corpit.ru/mjt/tinycdb.html"
+SRC_URI="http://www.corpit.ru/mjt/${PN}/${P/-/_}.tar.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="amd64 ~arm64 hppa ia64 ~mips ppc x86"
+IUSE="static-libs"
+RESTRICT="test"
+
+RDEPEND="!dev-db/cdb"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-gentoo.patch
+ "${FILESDIR}"/${PN}-umask.patch
+ "${FILESDIR}"/${PN}-uclibc.patch
+)
+
+src_prepare() {
+ default
+
+ sed -i "/^libdir/s:/lib:/$(get_libdir):" Makefile
+}
+
+src_compile() {
+ local targets="shared"
+ use static-libs && targets+=" staticlib piclib"
+
+ emake \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS} ${LDFLAGS}" \
+ ${targets}
+}
+
+src_install() {
+ local targets="install install-sharedlib"
+ use static-libs && targets+=" install-piclib"
+
+ emake \
+ prefix="${EPREFIX}"/usr \
+ mandir="${EPREFIX}"/usr/share/man \
+ DESTDIR="${D}" \
+ ${targets}
+ einstalldocs
+}
diff --git a/dev-db/tokumx-1.5.0-r2 b/dev-db/tokumx-1.5.0-r2
deleted file mode 100644
index b0cab00c46e1..000000000000
--- a/dev-db/tokumx-1.5.0-r2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=!dev-db/mongodb python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] dev-libs/jemalloc >=dev-libs/boost-1.50[threads(+)] >=dev-libs/libpcre-8.30[cxx] net-libs/libpcap sys-libs/ncurses sys-libs/readline pax_kernel? ( sys-apps/paxctl sys-apps/elfix ) sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=An open source, high-performance distribution of MongoDB
-EAPI=6
-HOMEPAGE=http://www.tokutek.com/products/tokumx-for-mongodb/
-IUSE=pax_kernel python_targets_python2_7
-KEYWORDS=~amd64
-LICENSE=AGPL-3 Apache-2.0
-RDEPEND=!dev-db/mongodb python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] dev-libs/jemalloc >=dev-libs/boost-1.50[threads(+)] >=dev-libs/libpcre-8.30[cxx] net-libs/libpcap
-REQUIRED_USE=|| ( python_targets_python2_7 )
-SLOT=0
-SRC_URI=mirror://gentoo/tokumx-git-tag-1.5.0.tar.bz2
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-r1 0b5829eb6369d7af3a834b6eed7b7107 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=9bcde1b23dec61f2e7ddfdecbcbe4539
diff --git a/dev-db/tokumx-2.0.2-r1 b/dev-db/tokumx-2.0.2-r1
deleted file mode 100644
index 5a4c7dfa8625..000000000000
--- a/dev-db/tokumx-2.0.2-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare pretend setup test
-DEPEND=!app-admin/mongo-tools !dev-db/mongodb !dev-libs/mongo-cxx-driver python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] dev-libs/jemalloc >=dev-libs/boost-1.50[threads(+)] >=dev-libs/libpcre-8.30[cxx] net-libs/libpcap dev-util/valgrind sys-libs/ncurses sys-libs/readline pax_kernel? ( sys-apps/paxctl sys-apps/elfix ) sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=An open source, high-performance distribution of MongoDB
-EAPI=6
-HOMEPAGE=https://www.percona.com/software/mongo-database/percona-tokumx
-IUSE=pax_kernel python_targets_python2_7
-KEYWORDS=~amd64
-LICENSE=AGPL-3 Apache-2.0
-RDEPEND=!app-admin/mongo-tools !dev-db/mongodb !dev-libs/mongo-cxx-driver python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] dev-libs/jemalloc >=dev-libs/boost-1.50[threads(+)] >=dev-libs/libpcre-8.30[cxx] net-libs/libpcap
-REQUIRED_USE=|| ( python_targets_python2_7 )
-SLOT=0
-SRC_URI=https://www.percona.com/downloads/percona-tokumx/tokumx-enterprise-2.0.2/source/tarball/tokumx-enterprise-2.0.2.tar.gz
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-r1 0b5829eb6369d7af3a834b6eed7b7107 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=ad499dcc5818b360897951f2fd0ed61e
diff --git a/dev-db/tokumx/Manifest b/dev-db/tokumx/Manifest
new file mode 100644
index 000000000000..4b3c9c7cd63f
--- /dev/null
+++ b/dev-db/tokumx/Manifest
@@ -0,0 +1,12 @@
+AUX 1.5.0-Werror.diff 2195 BLAKE2B c75c8895426765fd5cd765c2319178eb5efc957bc8994b5b789097a3d78faf6f4701c84b9bcd73ae63bc39e174a5e3bfcbdd06be9b7986ba605380636c0d867f SHA512 ac6c2f40e65bc4476a5a9def8c56865675da0099d910ff99e14c3a53df3d5055433ca5d5d4f92e23a1cd4b468555936412ead1a35ae5fd017f232e0afa6c60e6
+AUX 1.5.0-boost-57.diff 419 BLAKE2B a17bc644e54c824353e1e0dfe8807f8c3d0e383536938cffca0a51c1392cff8818a18ecc53ec99115de5897e1e5ac6489b665d954b4306acf8344787c76990d7 SHA512 2ccdf5514ff53af949f81cbea77c425d00454c6a8b73abcfe8c3260d08e3dfb31d92447a151311137536265bf7baf9cdb3eafb227a034b813e250e4e820b45b0
+AUX tokumx-2.0.2-boost-57.patch 969 BLAKE2B 61995b6a952797d2aa3bee1f4da7ef55a979ba50b7348755a47ebbc94e263b3bce1b1ffee28e7dd7d32ce070bea68feeb20aa04cbfe8dc4928390f029b98d4af SHA512 366015bc427022cdb76a8bd65227de0a120ebeebde14b5e403476ef0efeb9e8b1fbb84b037bc46a77e91160cb0670c8f05d64f437cc89b50dd9030123df3ef79
+AUX tokumx-2.0.2-gcc-7.patch 6020 BLAKE2B 93c5daee04a47d2a2d460f8d62605a78075e2023d17940bd7625085a07a6a0efa2a8c074e8e963340ffb1473487e90bf6c643ca7e818854634f3c77c184ad63d SHA512 3d4f46dbbd3a4472bfddac8cc8c19487dc6ad4fa18fe916edbb1c7c597edd2b9d239fac936fbc29ef0087f80f4d264b7f9d7123d82477c7d89fab62e8c9dedb9
+AUX tokumx-2.0.2-no-werror.patch 4372 BLAKE2B f8f4ccaa5bdeba6552aa4edd18f15f31125df0977509db5fef313e9c24248444a0a9aeb51f9eea40f792e09a81049559fad5c0742f586a3f7da8edf1312269c0 SHA512 fdcd3894a9bf8fd3a4301d8f77643f1aaedf1b67da664820114759187555c733eb495a8b28e67a431c4648075af82fe1d2059efa0028f3091b52456b8e185872
+AUX tokumx-2.0.2-undefined-reference.patch 625 BLAKE2B 20c7644a60832431a03b44c89c5628c28536099cc7ff6f0f694da2472c60c267ae5e6456440c4c4447e7e3a4932d5621a2d159434f8376b33e03d98783458f87 SHA512 f8d7b4fb522df36bf3042e824bb826e79af2c633781d1e733b16cc492295362570d88d4593bab8e12899b2eebeb05563ddd0e9259dde9408823c3cdd4162d095
+AUX tokumx-disable-bundled-libs.patch 477 BLAKE2B 3d72b93248645425c8f8e926c124ec4e2d4982341b02d52493c9b47d5bf98bac8f5b4b52da3a3e55900bebb228de558da1d70e6e66cb579297a66d27882900a6 SHA512 acb735167d9753aca5597a81f13696e0c158f837cff8eed703ac777824ef7fef71a339415c0b948f48dc992d0919ef3a0d747f37bb6ff9670e95475f0cf5057f
+DIST tokumx-enterprise-2.0.2.tar.gz 16756175 BLAKE2B 8caaf9f12db713192ab1eaa31284fd390c1a54ffb9e6c12601b9a8c88a101f51868ba548ae8bcb1cd39ea875b6a937c8b5e4b45792f7da88e454d6a02955fe07 SHA512 8d063abcbe16ce50b5b7f99ae6deec348cf60bb8bb57a3b06e478c03af7ded7501ca6ca15ac63ef07bf3fa0da59a30571b9a799fa5c5a9dcbac741c0a674b1f6
+DIST tokumx-git-tag-1.5.0.tar.bz2 13059584 BLAKE2B f662d72c8eb65551c074f11e36dac0fa68f5a0b86fe9654e49160c42511576146e9194c3d3cd607c8fba4272992c35f4268ad3db7032ae9dfb7c9417f954e8c8 SHA512 ba19237db7d3dcbd3ac07b8cc4860549830fa065fa4d26cbae685274524cd5b89f671d5f126ec25bee605c99929ce0436bb2ac32d67efdbb8dd6d7526d3f1c24
+EBUILD tokumx-1.5.0-r2.ebuild 2011 BLAKE2B 35fba61eced8fd15f074896dccd934927182afd5333981aad798630b938fa7e450ce03bfcb25fc43a61e5fb145759513a19efb30adc5a5a0f1aa7d2357dfca69 SHA512 d21efce4a337030babacf95f856148e479717bcad25d247de4105556aaa53780a08af3f121fc85c9c0ccdaa77d6054294b1e66765e5b8c51e27049236121162a
+EBUILD tokumx-2.0.2-r1.ebuild 2144 BLAKE2B aa3407be95dcb738fb83ee6035ff56f0d7a08a181b219d26f589c08e4432be108b6826193b01ba6ed175997c72dbadc301af2ac8d0a7153ac86fad28a474f5b9 SHA512 c4073728ed1f45a1308d2f59ea444b9facf3336aefc59e5737e61a0397a7fb690dbee0d417a71854d400383f83c93254f16b38fbaa017c8d2640415c9df8eb29
+MISC metadata.xml 441 BLAKE2B 900ea406bc2cdac6196b49607274989e6b290d56b6a02f83949cdbb20fbd1960193a48053d3c963a852170ffb11736bda77eb9a843506be89d256fc48a1a97db SHA512 5d2c7f880ced8d3d9d8c8f9daef5d0f975f76d9db58000c0f2cf80ee818b35346973e2bc30f2b39d646845a4045d6389a929e76e1d2a3724f7330e1ab5901277
diff --git a/dev-db/tokumx/files/1.5.0-Werror.diff b/dev-db/tokumx/files/1.5.0-Werror.diff
new file mode 100644
index 000000000000..a865fe074f37
--- /dev/null
+++ b/dev-db/tokumx/files/1.5.0-Werror.diff
@@ -0,0 +1,45 @@
+diff -uNr work.ORIG/mongo/CMakeLists.txt work/mongo/CMakeLists.txt
+--- work.ORIG/mongo/CMakeLists.txt 2014-08-01 11:51:20.832614062 +0100
++++ work/mongo/CMakeLists.txt 2014-08-01 11:51:36.898614862 +0100
+@@ -71,14 +71,13 @@
+ endforeach(flag)
+ endmacro(set_cxxflags_if_supported)
+
+-set(CMAKE_C_FLAGS "-fPIC -fno-strict-aliasing -ggdb -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -Werror -pipe")
++set(CMAKE_C_FLAGS "-fPIC -fno-strict-aliasing -ggdb -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -pipe")
+ set(CMAKE_CXX_FLAGS "-fPIC -fno-strict-aliasing -ggdb")
+ set_cxxflags_if_supported(
+ -Wall
+ -Wsign-compare
+ -Wno-unknown-pragmas
+ -Winvalid-pch
+- -Werror
+ -pipe
+ -Wnon-virtual-dtor
+ -Woverloaded-virtual
+diff -uNr work.ORIG/mongo/src/third_party/ft-index/cmake_modules/TokuSetupCompiler.cmake work/mongo/src/third_party/ft-index/cmake_modules/TokuSetupCompiler.cmake
+--- work.ORIG/mongo/src/third_party/ft-index/cmake_modules/TokuSetupCompiler.cmake 2014-08-01 11:51:20.696614056 +0100
++++ work/mongo/src/third_party/ft-index/cmake_modules/TokuSetupCompiler.cmake 2014-08-01 11:51:36.898614862 +0100
+@@ -174,8 +174,8 @@
+ endif ()
+
+ ## always want these
+-set(CMAKE_C_FLAGS "-Wall -Werror ${CMAKE_C_FLAGS}")
+-set(CMAKE_CXX_FLAGS "-Wall -Werror ${CMAKE_CXX_FLAGS}")
++set(CMAKE_C_FLAGS "-Wall ${CMAKE_C_FLAGS}")
++set(CMAKE_CXX_FLAGS "-Wall ${CMAKE_CXX_FLAGS}")
+
+ ## need to set -stdlib=libc++ to get real c++11 support on darwin
+ if (APPLE)
+diff -uNr work.ORIG/mongo/src/third_party/ft-index/examples/Makefile work/mongo/src/third_party/ft-index/examples/Makefile
+--- work.ORIG/mongo/src/third_party/ft-index/examples/Makefile 2014-08-01 11:51:20.676614055 +0100
++++ work/mongo/src/third_party/ft-index/examples/Makefile 2014-08-01 11:51:36.898614862 +0100
+@@ -1,7 +1,7 @@
+ SRCS = $(wildcard *.c)
+ TARGETS = $(patsubst %.c,%,$(SRCS)) $(patsubst %.c,%-bdb,$(SRCS))
+ CPPFLAGS = -I../include -D_GNU_SOURCE
+-CFLAGS = -g -std=c99 -Wall -Wextra -Werror -Wno-missing-field-initializers
++CFLAGS = -g -std=c99 -Wall -Wextra -Wno-missing-field-initializers
+ ifeq ($(USE_STATIC_LIBS),1)
+ LIBTOKUDB = tokufractaltree_static
+ LIBTOKUPORTABILITY = tokuportability_static
diff --git a/dev-db/tokumx/files/1.5.0-boost-57.diff b/dev-db/tokumx/files/1.5.0-boost-57.diff
new file mode 100644
index 000000000000..e66aec168712
--- /dev/null
+++ b/dev-db/tokumx/files/1.5.0-boost-57.diff
@@ -0,0 +1,11 @@
+diff -uNr work.ORIG/mongo/src/mongo/shell/linenoise_utf8.h work/mongo/src/mongo/shell/linenoise_utf8.h
+--- work.ORIG/mongo/src/mongo/shell/linenoise_utf8.h 2017-03-30 15:20:51.880842717 +0100
++++ work/mongo/src/mongo/shell/linenoise_utf8.h 2017-03-30 15:21:26.002844416 +0100
+@@ -16,6 +16,7 @@
+ */
+
+ #include <boost/smart_ptr/scoped_array.hpp>
++#include <algorithm>
+ #include <string.h>
+
+ namespace linenoise_utf8 {
diff --git a/dev-db/tokumx/files/tokumx-2.0.2-boost-57.patch b/dev-db/tokumx/files/tokumx-2.0.2-boost-57.patch
new file mode 100644
index 000000000000..52b3b9f12064
--- /dev/null
+++ b/dev-db/tokumx/files/tokumx-2.0.2-boost-57.patch
@@ -0,0 +1,22 @@
+diff -uNr tokumx-enterprise-2.0.2.ORIG/src/mongo/shell/linenoise.cpp tokumx-enterprise-2.0.2/src/mongo/shell/linenoise.cpp
+--- tokumx-enterprise-2.0.2.ORIG/src/mongo/shell/linenoise.cpp 2016-11-21 11:52:54.883542356 +0000
++++ tokumx-enterprise-2.0.2/src/mongo/shell/linenoise.cpp 2016-11-21 11:53:11.995543208 +0000
+@@ -117,6 +117,7 @@
+ #include "mk_wcwidth.h"
+ #include <string>
+ #include <vector>
++#include <algorithm>
+ #include <boost/smart_ptr/scoped_array.hpp>
+
+ using std::string;
+diff -uNr tokumx-enterprise-2.0.2.ORIG/src/mongo/shell/linenoise_utf8.h tokumx-enterprise-2.0.2/src/mongo/shell/linenoise_utf8.h
+--- tokumx-enterprise-2.0.2.ORIG/src/mongo/shell/linenoise_utf8.h 2016-11-21 11:52:54.883542356 +0000
++++ tokumx-enterprise-2.0.2/src/mongo/shell/linenoise_utf8.h 2016-11-21 11:53:31.610544185 +0000
+@@ -15,6 +15,7 @@
+ * limitations under the License.
+ */
+
++#include <algorithm>
+ #include <boost/smart_ptr/scoped_array.hpp>
+ #include <string.h>
+
diff --git a/dev-db/tokumx/files/tokumx-2.0.2-gcc-7.patch b/dev-db/tokumx/files/tokumx-2.0.2-gcc-7.patch
new file mode 100644
index 000000000000..1203d1fc8098
--- /dev/null
+++ b/dev-db/tokumx/files/tokumx-2.0.2-gcc-7.patch
@@ -0,0 +1,102 @@
+diff -uNr tokumx-enterprise-2.0.2.ORIG/src/mongo/db/client_load.cpp tokumx-enterprise-2.0.2/src/mongo/db/client_load.cpp
+--- tokumx-enterprise-2.0.2.ORIG/src/mongo/db/client_load.cpp 2018-07-03 15:57:40.709360944 +0100
++++ tokumx-enterprise-2.0.2/src/mongo/db/client_load.cpp 2018-07-03 15:57:48.127361253 +0100
+@@ -74,7 +74,7 @@
+ }
+
+ bool Client::loadInProgress() const {
+- return _loadInfo;
++ return bool(_loadInfo);
+ }
+
+ } // namespace mongo
+diff -uNr tokumx-enterprise-2.0.2.ORIG/src/mongo/db/collection_map.h tokumx-enterprise-2.0.2/src/mongo/db/collection_map.h
+--- tokumx-enterprise-2.0.2.ORIG/src/mongo/db/collection_map.h 2018-07-03 15:57:40.709360944 +0100
++++ tokumx-enterprise-2.0.2/src/mongo/db/collection_map.h 2018-07-03 15:57:48.127361253 +0100
+@@ -66,7 +66,7 @@
+ // which must succeed, by the first invariant.
+ Collection *getCollection(const StringData &ns);
+
+- bool allocated() const { return _metadb; }
++ bool allocated() const { return bool(_metadb); }
+
+ void getNamespaces( list<string>& tofill );
+
+diff -uNr tokumx-enterprise-2.0.2.ORIG/src/mongo/db/ops/query.cpp tokumx-enterprise-2.0.2/src/mongo/db/ops/query.cpp
+--- tokumx-enterprise-2.0.2.ORIG/src/mongo/db/ops/query.cpp 2018-07-03 15:57:40.703360944 +0100
++++ tokumx-enterprise-2.0.2/src/mongo/db/ops/query.cpp 2018-07-03 15:58:08.348362094 +0100
+@@ -635,7 +635,7 @@
+ shared_ptr<ExplainRecordingStrategy> ret
+ ( new SimpleCursorExplainStrategy( ancillaryInfo, _cursor ) );
+ ret->notePlan( queryPlan.valid() && queryPlan.scanAndOrderRequired,
+- queryPlan.keyFieldsOnly );
++ bool(queryPlan.keyFieldsOnly) );
+ return ret;
+ }
+
+diff -uNr tokumx-enterprise-2.0.2.ORIG/src/mongo/db/pipeline/document_source_sort.cpp tokumx-enterprise-2.0.2/src/mongo/db/pipeline/document_source_sort.cpp
+--- tokumx-enterprise-2.0.2.ORIG/src/mongo/db/pipeline/document_source_sort.cpp 2018-07-03 15:57:40.707360944 +0100
++++ tokumx-enterprise-2.0.2/src/mongo/db/pipeline/document_source_sort.cpp 2018-07-03 15:57:48.128361253 +0100
+@@ -106,7 +106,7 @@
+ bool DocumentSourceSort::coalesce(const intrusive_ptr<DocumentSource> &pNextSource) {
+ if (!limitSrc) {
+ limitSrc = dynamic_cast<DocumentSourceLimit*>(pNextSource.get());
+- return limitSrc; // false if next is not a $limit
++ return bool(limitSrc); // false if next is not a $limit
+ }
+ else {
+ return limitSrc->coalesce(pNextSource);
+diff -uNr tokumx-enterprise-2.0.2.ORIG/src/mongo/db/queryoptimizercursorimpl.cpp tokumx-enterprise-2.0.2/src/mongo/db/queryoptimizercursorimpl.cpp
+--- tokumx-enterprise-2.0.2.ORIG/src/mongo/db/queryoptimizercursorimpl.cpp 2018-07-03 15:57:40.702360944 +0100
++++ tokumx-enterprise-2.0.2/src/mongo/db/queryoptimizercursorimpl.cpp 2018-07-03 15:57:48.128361253 +0100
+@@ -370,7 +370,7 @@
+
+ // The query plan must have a matcher. The matcher's constructor performs some aspects
+ // of query validation that should occur before a cursor is returned.
+- fassert( 16449, singlePlan->matcher() );
++ fassert( 16449, bool(singlePlan->matcher()) );
+
+ if ( needMatcher ) {
+ single->setMatcher( singlePlan->matcher() );
+diff -uNr tokumx-enterprise-2.0.2.ORIG/src/mongo/db/query_optimizer_internal.cpp tokumx-enterprise-2.0.2/src/mongo/db/query_optimizer_internal.cpp
+--- tokumx-enterprise-2.0.2.ORIG/src/mongo/db/query_optimizer_internal.cpp 2018-07-03 15:57:40.707360944 +0100
++++ tokumx-enterprise-2.0.2/src/mongo/db/query_optimizer_internal.cpp 2018-07-03 15:57:48.129361253 +0100
+@@ -234,7 +234,7 @@
+ // The query plan must have a matcher. The matcher's constructor performs some aspects
+ // of query validation that should occur as part of this class's init() if not handled
+ // already.
+- fassert( 16249, queryPlan().matcher() );
++ fassert( 16249, bool(queryPlan().matcher()) );
+
+ // TODO This violates the current Cursor interface abstraction, but for now it's simpler to keep our own set of
+ // dups rather than avoid poisoning the cursor's dup set with unreturned documents. Deduping documents
+@@ -257,7 +257,7 @@
+ _explainPlanInfo.reset( new ExplainPlanInfo() );
+ _explainPlanInfo->notePlan( *_c,
+ queryPlan().scanAndOrderRequired(),
+- queryPlan().keyFieldsOnly() );
++ bool(queryPlan().keyFieldsOnly()) );
+ return _explainPlanInfo;
+ }
+
+@@ -1226,7 +1226,7 @@
+ _explainPlanInfo.reset( new ExplainPlanInfo() );
+ _explainPlanInfo->notePlan( *_c,
+ _queryPlan->scanAndOrderRequired(),
+- _queryPlan->keyFieldsOnly() );
++ bool(_queryPlan->keyFieldsOnly()) );
+ shared_ptr<ExplainClauseInfo> clauseInfo( new ExplainClauseInfo() );
+ clauseInfo->addPlanInfo( _explainPlanInfo );
+ _mps->addClauseInfo( clauseInfo );
+diff -uNr tokumx-enterprise-2.0.2.ORIG/src/mongo/db/query_plan_summary.h tokumx-enterprise-2.0.2/src/mongo/db/query_plan_summary.h
+--- tokumx-enterprise-2.0.2.ORIG/src/mongo/db/query_plan_summary.h 2018-07-03 15:57:40.705360944 +0100
++++ tokumx-enterprise-2.0.2/src/mongo/db/query_plan_summary.h 2018-07-03 15:57:48.129361253 +0100
+@@ -35,7 +35,7 @@
+ * The 'fieldRangeMulti' attribute is required, and its presence indicates the object has
+ * been configured with a query plan.
+ */
+- bool valid() const { return fieldRangeSetMulti; }
++ bool valid() const { return bool(fieldRangeSetMulti); }
+
+ // A description of the valid values for the fields of a query, in the context of a multikey
+ // index or in memory sort.
diff --git a/dev-db/tokumx/files/tokumx-2.0.2-no-werror.patch b/dev-db/tokumx/files/tokumx-2.0.2-no-werror.patch
new file mode 100644
index 000000000000..5a0c160e8866
--- /dev/null
+++ b/dev-db/tokumx/files/tokumx-2.0.2-no-werror.patch
@@ -0,0 +1,88 @@
+diff -uNr tokumx-enterprise-2.0.2.ORIG/CMakeLists.txt tokumx-enterprise-2.0.2/CMakeLists.txt
+--- tokumx-enterprise-2.0.2.ORIG/CMakeLists.txt 2016-11-21 11:15:27.517430430 +0000
++++ tokumx-enterprise-2.0.2/CMakeLists.txt 2016-11-21 11:16:27.874433436 +0000
+@@ -82,14 +82,13 @@
+ endforeach(flag)
+ endmacro(set_cxxflags_if_supported)
+
+-set(CMAKE_C_FLAGS "-fPIC -fno-strict-aliasing -ggdb -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -Werror -pipe")
++set(CMAKE_C_FLAGS "-fPIC -fno-strict-aliasing -ggdb -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -pipe")
+ set(CMAKE_CXX_FLAGS "-fPIC -fno-strict-aliasing -ggdb")
+ set_cxxflags_if_supported(
+ -Wall
+ -Wsign-compare
+ -Wno-unknown-pragmas
+ -Winvalid-pch
+- -Werror
+ -pipe
+ -Wnon-virtual-dtor
+ -Woverloaded-virtual
+diff -uNr tokumx-enterprise-2.0.2.ORIG/SConstruct tokumx-enterprise-2.0.2/SConstruct
+--- tokumx-enterprise-2.0.2.ORIG/SConstruct 2016-11-21 11:15:27.517430430 +0000
++++ tokumx-enterprise-2.0.2/SConstruct 2016-11-21 11:16:27.875433436 +0000
+@@ -710,7 +710,7 @@
+ "-Winvalid-pch"] )
+ # env.Append( " -Wconversion" ) TODO: this doesn't really work yet
+ if linux:
+- env.Append( CCFLAGS=["-Werror", "-pipe"] )
++ env.Append( CCFLAGS=["-pipe"] )
+ if not has_option('clang'):
+ env.Append( CCFLAGS=["-fno-builtin-memcmp"] ) # glibc's memcmp is faster than gcc's
+
+diff -uNr tokumx-enterprise-2.0.2.ORIG/src/third_party/backup/CMakeLists.txt tokumx-enterprise-2.0.2/src/third_party/backup/CMakeLists.txt
+--- tokumx-enterprise-2.0.2.ORIG/src/third_party/backup/CMakeLists.txt 2016-11-21 11:15:27.392430424 +0000
++++ tokumx-enterprise-2.0.2/src/third_party/backup/CMakeLists.txt 2016-11-21 11:17:22.576436161 +0000
+@@ -10,7 +10,7 @@
+ _FILE_OFFSET_BITS=64
+ _LARGEFILE64_SOURCE)
+
+-set(CMAKE_CXX_FLAGS "-Werror -W -Wall -Wshadow ${CMAKE_CXX_FLAGS}")
++set(CMAKE_CXX_FLAGS "-W -Wall -Wshadow ${CMAKE_CXX_FLAGS}")
+
+ set(USE_VALGRIND ON CACHE BOOL "whether to use valgrind headers")
+ if (USE_VALGRIND)
+diff -uNr tokumx-enterprise-2.0.2.ORIG/src/third_party/backup/remote/Makefile tokumx-enterprise-2.0.2/src/third_party/backup/remote/Makefile
+--- tokumx-enterprise-2.0.2.ORIG/src/third_party/backup/remote/Makefile 2016-11-21 11:15:27.393430424 +0000
++++ tokumx-enterprise-2.0.2/src/third_party/backup/remote/Makefile 2016-11-21 11:17:38.840436971 +0000
+@@ -1,4 +1,4 @@
+ backup.pb.o: backup.pb.h
+-CXXFLAGS = -W -Wall -Werror -O1
++CXXFLAGS = -W -Wall -O1
+ backup.pb.cc backup.bp.h: backup.proto
+ protoc -I=. --cpp_out=. backup.proto
+diff -uNr tokumx-enterprise-2.0.2.ORIG/src/third_party/ft-index/cmake_modules/TokuSetupCompiler.cmake tokumx-enterprise-2.0.2/src/third_party/ft-index/cmake_modules/TokuSetupCompiler.cmake
+--- tokumx-enterprise-2.0.2.ORIG/src/third_party/ft-index/cmake_modules/TokuSetupCompiler.cmake 2016-11-21 11:15:27.422430426 +0000
++++ tokumx-enterprise-2.0.2/src/third_party/ft-index/cmake_modules/TokuSetupCompiler.cmake 2016-11-21 11:16:54.312434753 +0000
+@@ -181,8 +181,8 @@
+ endif ()
+
+ ## always want these
+-set(CMAKE_C_FLAGS "-Wall -Werror ${CMAKE_C_FLAGS}")
+-set(CMAKE_CXX_FLAGS "-Wall -Werror ${CMAKE_CXX_FLAGS}")
++set(CMAKE_C_FLAGS "-Wall ${CMAKE_C_FLAGS}")
++set(CMAKE_CXX_FLAGS "-Wall ${CMAKE_CXX_FLAGS}")
+
+ ## need to set -stdlib=libc++ to get real c++11 support on darwin
+ if (APPLE)
+diff -uNr tokumx-enterprise-2.0.2.ORIG/src/third_party/v8/CMakeLists.txt tokumx-enterprise-2.0.2/src/third_party/v8/CMakeLists.txt
+--- tokumx-enterprise-2.0.2.ORIG/src/third_party/v8/CMakeLists.txt 2016-11-21 11:15:27.452430427 +0000
++++ tokumx-enterprise-2.0.2/src/third_party/v8/CMakeLists.txt 2016-11-21 11:16:27.876433437 +0000
+@@ -126,7 +126,6 @@
+
+ set(V8_CXX_FLAGS
+ -Wall
+- -Werror
+ -W
+ -Wno-unused-parameter
+ -Woverloaded-virtual
+diff -uNr tokumx-enterprise-2.0.2.ORIG/src/third_party/v8/SConscript tokumx-enterprise-2.0.2/src/third_party/v8/SConscript
+--- tokumx-enterprise-2.0.2.ORIG/src/third_party/v8/SConscript 2016-11-21 11:15:27.452430427 +0000
++++ tokumx-enterprise-2.0.2/src/third_party/v8/SConscript 2016-11-21 11:16:27.876433437 +0000
+@@ -47,7 +47,6 @@
+ 'gcc': {
+ 'all': {
+ 'CCFLAGS': ['-Wall',
+- '-Werror',
+ '-W',
+ '-Wno-unused-parameter',
+ '-Woverloaded-virtual',
diff --git a/dev-db/tokumx/files/tokumx-2.0.2-undefined-reference.patch b/dev-db/tokumx/files/tokumx-2.0.2-undefined-reference.patch
new file mode 100644
index 000000000000..d56f7745d1e9
--- /dev/null
+++ b/dev-db/tokumx/files/tokumx-2.0.2-undefined-reference.patch
@@ -0,0 +1,15 @@
+diff -uNr a/src/third_party/backup/CMakeLists.txt b/src/third_party/backup/CMakeLists.txt
+--- a/src/third_party/backup/CMakeLists.txt 2018-07-06 20:36:58.242767167 +0200
++++ b/src/third_party/backup/CMakeLists.txt 2018-07-06 20:37:31.575390786 +0200
+@@ -1,11 +1,6 @@
+ cmake_minimum_required(VERSION 2.8.8)
+ project(HotBackup)
+
+-# No implicit templates, since that's how mysql compiles.
+-if (NOT CMAKE_CXX_COMPILER_ID MATCHES Clang)
+- set(CMAKE_CXX_FLAGS "-fno-implicit-templates ${CMAKE_CXX_FLAGS}")
+-endif ()
+-
+ set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS
+ _FILE_OFFSET_BITS=64
+ _LARGEFILE64_SOURCE)
diff --git a/dev-db/tokumx/files/tokumx-disable-bundled-libs.patch b/dev-db/tokumx/files/tokumx-disable-bundled-libs.patch
new file mode 100644
index 000000000000..66d8db3980fa
--- /dev/null
+++ b/dev-db/tokumx/files/tokumx-disable-bundled-libs.patch
@@ -0,0 +1,11 @@
+diff -auwrN a/src/third_party/ft-index/CMakeLists.txt b/src/third_party/ft-index/CMakeLists.txt
+--- a/src/third_party/ft-index/CMakeLists.txt 2014-08-01 04:37:33.000000000 -0400
++++ b/src/third_party/ft-index/CMakeLists.txt 2014-08-01 10:38:28.134869689 -0400
+@@ -35,7 +35,6 @@
+ include(TokuFeatureDetection)
+ include(TokuSetupCompiler)
+ include(TokuSetupCTest)
+-include(TokuThirdParty)
+
+ set(TOKU_CMAKE_SCRIPT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
+ include(TokuMergeLibs)
diff --git a/dev-db/tokumx/metadata.xml b/dev-db/tokumx/metadata.xml
new file mode 100644
index 000000000000..ffbb5d9f2c31
--- /dev/null
+++ b/dev-db/tokumx/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>chainsaw@gentoo.org</email>
+ <name>Tony Vroon</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>ultrabug@gentoo.org</email>
+ <name>Alexys Jacob</name>
+ </maintainer>
+ <use>
+ <flag name="pax_kernel">Apply patch needed for hardened kernels</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-db/tokumx/tokumx-1.5.0-r2.ebuild b/dev-db/tokumx/tokumx-1.5.0-r2.ebuild
new file mode 100644
index 000000000000..ef1062ab8695
--- /dev/null
+++ b/dev-db/tokumx/tokumx-1.5.0-r2.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+CMAKE_BUILD_TYPE=Release
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-r1 pax-utils cmake-utils
+
+MY_P=${PN}-git-tag-${PV}
+
+DESCRIPTION="An open source, high-performance distribution of MongoDB"
+HOMEPAGE="http://www.tokutek.com/products/tokumx-for-mongodb/"
+SRC_URI="mirror://gentoo/${MY_P}.tar.bz2"
+
+LICENSE="AGPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="pax_kernel"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="!dev-db/mongodb
+ ${PYTHON_DEPS}
+ dev-libs/jemalloc
+ >=dev-libs/boost-1.50[threads(+)]
+ >=dev-libs/libpcre-8.30[cxx]
+ net-libs/libpcap"
+DEPEND="${RDEPEND}
+ sys-libs/ncurses
+ sys-libs/readline
+ pax_kernel? ( sys-apps/paxctl sys-apps/elfix )"
+
+S="${WORKDIR}/mongo"
+BUILD_DIR="${WORKDIR}/mongo/build"
+QA_PRESTRIPPED="/usr/lib64/libHotBackup.so"
+
+src_prepare() {
+ cd "${WORKDIR}"
+ epatch "${FILESDIR}/${PV}-Werror.diff"
+ epatch "${FILESDIR}/${PV}-boost-57.diff"
+ epatch "${FILESDIR}/${PN}-disable-bundled-libs.patch"
+ cd "${S}"
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -D TOKU_DEBUG_PARANOID=OFF
+ -D USE_VALGRIND=OFF
+ -D USE_BDB=OFF
+ -D BUILD_TESTING=OFF
+ -D TOKUMX_DISTNAME=${PV}
+ -D LIBJEMALLOC="jemalloc"
+ -D TOKUMX_STRIP_BINARIES=0
+ -D USE_SYSTEM_PCRE=1
+ -D USE_SYSTEM_BOOST=1
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ pax-mark -m "${D}"/usr/bin/mongo
+
+ # Remove unnecessary files
+ rm -r "${D}usr/buildscripts" "${D}usr/scripts" "${D}usr/src" "${D}usr/include/db.h" || die
+
+ # Correctly install this python script
+ python_foreach_impl python_doscript scripts/tokumxstat.py
+
+ # Clean up documentation installed to /usr
+ pushd "${D}usr/" || die
+ rm GNU-AGPL-3.0 LICENSE.txt NEWS README README.md README-TOKUDB README-TOKUKV SConstruct THIRD-PARTY-NOTICES || die
+ popd || die
+ dodoc README.md distsrc/NEWS distsrc/README distsrc/THIRD-PARTY-NOTICES
+ newdoc src/third_party/ft-index/README-TOKUDB README-TOKUKV
+}
diff --git a/dev-db/tokumx/tokumx-2.0.2-r1.ebuild b/dev-db/tokumx/tokumx-2.0.2-r1.ebuild
new file mode 100644
index 000000000000..866bdec8d243
--- /dev/null
+++ b/dev-db/tokumx/tokumx-2.0.2-r1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+CMAKE_BUILD_TYPE=Release
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-r1 cmake-utils pax-utils check-reqs
+
+MY_P=${PN}-enterprise-${PV}
+
+DESCRIPTION="An open source, high-performance distribution of MongoDB"
+HOMEPAGE="https://www.percona.com/software/mongo-database/percona-tokumx"
+SRC_URI="https://www.percona.com/downloads/percona-tokumx/${MY_P}/source/tarball/${MY_P}.tar.gz"
+
+LICENSE="AGPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="pax_kernel"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="!app-admin/mongo-tools
+ !dev-db/mongodb
+ !dev-libs/mongo-cxx-driver
+ ${PYTHON_DEPS}
+ dev-libs/jemalloc
+ >=dev-libs/boost-1.50[threads(+)]
+ >=dev-libs/libpcre-8.30[cxx]
+ net-libs/libpcap"
+DEPEND="${RDEPEND}
+ dev-util/valgrind
+ sys-libs/ncurses
+ sys-libs/readline
+ pax_kernel? ( sys-apps/paxctl sys-apps/elfix )
+"
+
+S="${WORKDIR}/${MY_P}"
+QA_PRESTRIPPED="/usr/lib64/libHotBackup.so"
+CHECKREQS_DISK_BUILD="13G"
+
+src_prepare() {
+ eapply "${FILESDIR}/${P}-no-werror.patch"
+ eapply "${FILESDIR}/${P}-boost-57.patch"
+ eapply "${FILESDIR}/${P}-gcc-7.patch"
+ eapply "${FILESDIR}/${P}-undefined-reference.patch"
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DTOKU_DEBUG_PARANOID=OFF
+ -DUSE_VALGRIND=OFF
+ -DBUILD_TESTING=OFF
+ -DTOKUMX_DISTNAME=${PV}
+ -DLIBJEMALLOC="jemalloc"
+ -DTOKUMX_STRIP_BINARIES=0
+ -DUSE_SYSTEM_PCRE=1
+ -DUSE_SYSTEM_BOOST=1
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ pax-mark -m "${D}"/usr/bin/mongo
+
+ # Remove unnecessary files
+ rm -r "${D}usr/buildscripts" "${D}usr/scripts" "${D}usr/src" "${D}usr/include/db.h" || die
+
+ # Correctly install this python script
+ python_foreach_impl python_doscript scripts/tokumxstat.py
+
+ # Clean up documentation installed to /usr
+ pushd "${D}usr/" || die
+ rm GNU-AGPL-3.0 LICENSE.txt NEWS README README.md README-TOKUDB README-TOKUKV SConstruct THIRD-PARTY-NOTICES || die
+ popd || die
+ dodoc README.md distsrc/NEWS distsrc/README distsrc/THIRD-PARTY-NOTICES
+ newdoc src/third_party/ft-index/README-TOKUDB README-TOKUKV
+}
diff --git a/dev-db/tokyocabinet-1.4.48-r1 b/dev-db/tokyocabinet-1.4.48-r1
deleted file mode 100644
index 157fa533934f..000000000000
--- a/dev-db/tokyocabinet-1.4.48-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=configure install prepare test
-DEPEND=bzip2? ( app-arch/bzip2 ) zlib? ( sys-libs/zlib ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=A library of routines for managing a database
-EAPI=5
-HOMEPAGE=http://fallabs.com/tokyocabinet/
-IUSE=bzip2 debug doc examples threads zlib
-KEYWORDS=alpha amd64 arm ~arm64 hppa ~mips ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris
-LICENSE=LGPL-2.1
-RDEPEND=bzip2? ( app-arch/bzip2 ) zlib? ( sys-libs/zlib )
-SLOT=0
-SRC_URI=http://fallabs.com/tokyocabinet/tokyocabinet-1.4.48.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=2c7c2e8875f16aba9d9b1f2e20ab02f5
diff --git a/dev-db/tokyocabinet/Manifest b/dev-db/tokyocabinet/Manifest
new file mode 100644
index 000000000000..f37229258b1d
--- /dev/null
+++ b/dev-db/tokyocabinet/Manifest
@@ -0,0 +1,4 @@
+AUX fix_rpath.patch 2111 BLAKE2B 3aa9797555e0eb02a3d63e4e117e8aff5c7c0a09922cf6b0344777cd95b2480623f05fe68cfe63750ba00ff954bd6bb3e1a587c4e8af31086c94b2b3344cc08e SHA512 c0ee076d048d8ec4a77b036d0503776c4e3ca7a97c30cd8ba41cb0d99707ad5021613e1d308f6e73cc3432e0f71f7b38429ca0edcbc4edfe0d96955fc56b3504
+DIST tokyocabinet-1.4.48.tar.gz 1000485 BLAKE2B 4da2659a90dcee1cc99be286fe0e286ee75bd8179b75a944f229a3cc04169b8007220e36400d4934a7b5fde554bbc1783c4813fdf44b4a3530882ea0a8ef258e SHA512 b9995c838e713c13f781ab41062caefeb5c613f696dab08039f992f6860413d60a513114b83468cafdf7fc5b5e51ab880226972465d532f873f2a55f615e1440
+EBUILD tokyocabinet-1.4.48-r1.ebuild 1599 BLAKE2B 08249be70486a06bc673d08cd8adcdb71b3159482a6a352221884ed42b13acbb0e4dbd39db5ad0243d0bae045fc7eca793441e1ff3f6cfb2f1fc1626bf1e91db SHA512 efd1780638777bc10b4625bc8d3270722771bdef029a3a01882d13c73e2450df2190723ae28c6faa3cebd45abcd3019b92cd23625594737bdf94e48335cd35c8
+MISC metadata.xml 247 BLAKE2B 5a20af3c9732ef7dba68131a08988652f5c93a6d186a82c4deb1bb9c06dc3ae73152a0d241cc346637f7b11caf4676da43301ba596c67b66669535e71db0b03e SHA512 29cf52c16b0cce69899d9c2da8acd9144b7d760442aa323b854dceadb42459e009545193b1df7911ac2241b59f4819b4a6bb1d206d6f57953f770031433bb6b7
diff --git a/dev-db/tokyocabinet/files/fix_rpath.patch b/dev-db/tokyocabinet/files/fix_rpath.patch
new file mode 100644
index 000000000000..e1cba0a0370f
--- /dev/null
+++ b/dev-db/tokyocabinet/files/fix_rpath.patch
@@ -0,0 +1,56 @@
+diff -ur Makefile.in Makefile.in
+--- Makefile.in 2009-08-04 09:37:52.000000000 +0200
++++ Makefile.in 2009-09-30 23:45:28.000000000 +0200
+@@ -54,8 +54,8 @@
+ LDFLAGS = @MYLDFLAGS@
+ CMDLDFLAGS = @MYCMDLDFLAGS@
+ LIBS = @LIBS@
+-LDENV = LD_RUN_PATH=/lib:/usr/lib:$(LIBDIR):$(HOME)/lib:/usr/local/lib:@MYRUNPATH@:.
+-RUNENV = @MYLDLIBPATHENV@=.:/lib:/usr/lib:$(LIBDIR):$(HOME)/lib:/usr/local/lib:@MYRUNPATH@
++LDENV =
++RUNENV = @MYLDLIBPATHENV@=.:$(LIBDIR)
+ POSTCMD = @MYPOSTCMD@
+
+
+diff -ur configure.in configure.in
+--- configure.in 2009-08-31 11:36:58.000000000 +0200
++++ configure.in 2009-09-30 23:45:28.000000000 +0200
+@@ -31,25 +31,15 @@
+ MYPCFILES="tokyocabinet.pc"
+
+ # Building flags
+-MYCFLAGS="-std=c99 -Wall -fPIC -fsigned-char -O2"
++MYCFLAGS="-std=c99 -Wall -fPIC -fsigned-char"
+-MYCPPFLAGS="-I. -I\$(INCLUDEDIR) -I$HOME/include -I/usr/local/include"
++MYCPPFLAGS="-I. -I\$(INCLUDEDIR)"
+ MYCPPFLAGS="$MYCPPFLAGS -DNDEBUG -D_GNU_SOURCE=1 -D_REENTRANT -D__EXTENSIONS__"
+-MYLDFLAGS="-L. -L\$(LIBDIR) -L$HOME/lib -L/usr/local/lib"
++MYLDFLAGS="-L. -L\$(LIBDIR)"
+ MYCMDLDFLAGS=""
+ MYRUNPATH="\$(LIBDIR)"
+ MYLDLIBPATHENV="LD_LIBRARY_PATH"
+ MYPOSTCMD="true"
+
+-# Building paths
+-PATH="$PATH:$HOME/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin"
+-PATH="$PATH:/opt/SUNWspro/bin:/usr/ccs/bin:/usr/xpg4/bin:/usr/xpg6/bin:/usr/ucb"
+-CPATH="$HOME/include:/usr/local/include:$CPATH"
+-LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LIBRARY_PATH"
+-LD_LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH"
+-PKG_CONFIG_PATH="$HOME/lib/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
+-export PATH CPATH LIBRARY_PATH LD_LIBRARY_PATH PKG_CONFIG_PATH
+-
+-
+
+ #================================================================
+ # Options
+diff -ur tokyocabinet.pc.in tokyocabinet.pc.in
+--- tokyocabinet.pc.in 2008-02-18 08:25:18.000000000 +0100
++++ tokyocabinet.pc.in 2009-09-30 23:45:28.000000000 +0200
+@@ -10,5 +10,5 @@
+ Name: Tokyo Cabinet
+ Description: a modern implementation of DBM
+ Version: @PACKAGE_VERSION@
+-Libs: -L${libdir} -ltokyocabinet @LIBS@
++Libs: -L${libdir} -ltokyocabinet
+ Cflags: -I${includedir}
diff --git a/dev-db/tokyocabinet/metadata.xml b/dev-db/tokyocabinet/metadata.xml
new file mode 100644
index 000000000000..40aa45df2b01
--- /dev/null
+++ b/dev-db/tokyocabinet/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-db/tokyocabinet/tokyocabinet-1.4.48-r1.ebuild b/dev-db/tokyocabinet/tokyocabinet-1.4.48-r1.ebuild
new file mode 100644
index 000000000000..38c4b9494938
--- /dev/null
+++ b/dev-db/tokyocabinet/tokyocabinet-1.4.48-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils autotools
+
+DESCRIPTION="A library of routines for managing a database"
+HOMEPAGE="http://fallabs.com/tokyocabinet/"
+SRC_URI="${HOMEPAGE}${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ~mips ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
+IUSE="bzip2 debug doc examples threads zlib"
+
+DEPEND="bzip2? ( app-arch/bzip2 )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}/fix_rpath.patch"
+ sed -i \
+ -e "/ldconfig/d" \
+ -e "/DATADIR/d" Makefile.in || die
+ # cflags fix - remove -O2 at end of line and -fomit-frame-pointer
+ sed -i -e 's/-O3"$/"/' configure.in || die
+ sed -i -e 's/-fomit-frame-pointer//' configure.in || die
+ # flag only works on x86 derivatives, remove everywhere else
+ if ! use x86 && ! use amd64; then sed -i -e 's/ -minline-all-stringops//' configure.in; fi
+ eautoreconf
+}
+
+src_configure() {
+ # we use the "fastest" target without the -O3
+ econf \
+ $(use_enable debug) \
+ $(use_enable bzip2 bzip) \
+ $(use_enable zlib) \
+ $(use_enable threads pthread) \
+ --enable-off64 --enable-fastest
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "Install failed"
+
+ if use examples; then
+ insinto /usr/share/${PF}/example
+ doins example/* || die "Install failed"
+ fi
+
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ doins -r doc/* || die "Install failed"
+ fi
+}
+
+src_test() {
+ emake -j1 check || die "Tests failed"
+}
diff --git a/dev-db/tora-3.2-r1 b/dev-db/tora-3.2-r1
deleted file mode 100644
index 58702271ad48..000000000000
--- a/dev-db/tora-3.2-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare test
-DEPEND=dev-libs/ferrisloki dev-qt/qtcore:5 dev-qt/qtgui:5 dev-qt/qtnetwork:5 dev-qt/qtprintsupport:5 dev-qt/qtsql:5[mysql?,postgres?] dev-qt/qtwidgets:5 >=x11-libs/qscintilla-2.10.1:=[qt5(+)] oracle? ( || ( =dev-db/oracle-instantclient-basic-11* dev-db/oracle-instantclient ) ) postgres? ( dev-db/postgresql:* ) dev-qt/linguist:5 virtual/pkgconfig doc? ( app-doc/doxygen ) sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=SQL IDE for Oracle, MySQL and PostgreSQL dbs
-EAPI=6
-HOMEPAGE=https://github.com/tora-tool/tora/wiki
-IUSE=doc mysql oracle +postgres
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=dev-libs/ferrisloki dev-qt/qtcore:5 dev-qt/qtgui:5 dev-qt/qtnetwork:5 dev-qt/qtprintsupport:5 dev-qt/qtsql:5[mysql?,postgres?] dev-qt/qtwidgets:5 >=x11-libs/qscintilla-2.10.1:=[qt5(+)] oracle? ( || ( =dev-db/oracle-instantclient-basic-11* dev-db/oracle-instantclient ) ) postgres? ( dev-db/postgresql:* )
-REQUIRED_USE=|| ( mysql oracle postgres )
-SLOT=0
-SRC_URI=https://github.com/tora-tool/tora/archive/v3.2.tar.gz -> tora-3.2.tar.gz
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=ca337005d021bde3d800a62a448b4947
diff --git a/dev-db/tora-9999 b/dev-db/tora-9999
deleted file mode 100644
index 964e6f234d07..000000000000
--- a/dev-db/tora-9999
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare test unpack
-DEPEND=dev-libs/ferrisloki dev-qt/qtcore:5 dev-qt/qtgui:5 dev-qt/qtnetwork:5 dev-qt/qtprintsupport:5 dev-qt/qtsql:5[mysql?,postgres?] dev-qt/qtwidgets:5 >=x11-libs/qscintilla-2.10.1:=[qt5(+)] oracle? ( || ( =dev-db/oracle-instantclient-basic-11* dev-db/oracle-instantclient ) ) postgres? ( dev-db/postgresql:* ) dev-qt/linguist:5 virtual/pkgconfig doc? ( app-doc/doxygen ) sys-devel/make >=dev-util/cmake-3.9.6 >=dev-vcs/git-1.8.2.1[curl]
-DESCRIPTION=SQL IDE for Oracle, MySQL and PostgreSQL dbs
-EAPI=6
-HOMEPAGE=https://github.com/tora-tool/tora/wiki
-IUSE=doc mysql oracle pch +postgres
-LICENSE=GPL-2
-RDEPEND=dev-libs/ferrisloki dev-qt/qtcore:5 dev-qt/qtgui:5 dev-qt/qtnetwork:5 dev-qt/qtprintsupport:5 dev-qt/qtsql:5[mysql?,postgres?] dev-qt/qtwidgets:5 >=x11-libs/qscintilla-2.10.1:=[qt5(+)] oracle? ( || ( =dev-db/oracle-instantclient-basic-11* dev-db/oracle-instantclient ) ) postgres? ( dev-db/postgresql:* )
-REQUIRED_USE=|| ( mysql oracle postgres )
-SLOT=0
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 git-r3 8f6de46b0aa318aea0e8cac62ece098b ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=c9b53e6e80a1ede6463f2c06fa1b8b0f
diff --git a/dev-db/tora/Manifest b/dev-db/tora/Manifest
new file mode 100644
index 000000000000..d09ac099b053
--- /dev/null
+++ b/dev-db/tora/Manifest
@@ -0,0 +1,6 @@
+AUX tora-3.2-missing-header.patch 547 BLAKE2B 6f3ce8bb09de2bc3793fe6c76c166d0b8d0c1da389d9c0132b83ca2af70623b5f72b6fa0e05d098d03a1e2547af9d2585c4e53c3b4a281c87f67782abe2c3211 SHA512 f3f11c336a2c139a46495f75009762b8bba0d20a1bed3c2f710ed6e94a421e0d3b17241e16919349430a761bc7ddde460af06cdd357741166328fe2b5e4216ec
+AUX tora-3.2-qt-5.11.0.patch 1891 BLAKE2B 4617847e8ede3cbb25dfb3a5121f7664bf36bbe7ec46088565769ef7548b163f31b98a20c850b638ddc5a01d6d42346745c29ef38268e5f34e589a6323433288 SHA512 e03be4fc995020abe63dc9c7b4a24a5e9e9b8e9f3c70355bfebe3696e0dcc4cf88643ac58cf263580873838cfe77f2f594be89e7a475e98b434a88bf9c390eb3
+DIST tora-3.2.tar.gz 12762547 BLAKE2B 9e52013cc4122a8c6278392fd2251bad941fa48dbbc6e3c72a98bb2bad173d0262877afc44eca689c3110f69883c246441844f7884e309e000f1068b23c6b918 SHA512 005f9bc42a7c7ee9676ad60cdcb7b8fb9862a8ff0be9ffeb7911d96da7f233553b68e4089d23161871b479702ae8a8dc8bc63bd8d9aa75677bdd6c166ce86f7a
+EBUILD tora-3.2-r1.ebuild 2368 BLAKE2B f08d87c795d850f8c5961d59066bb7c256a862f68ef3f8bc4e8365fdb9e068f3e10815e5157af73a972e5b54486a3999a3b81f23ce1b6d034832b7d154d3923d SHA512 d8380bcebb90abf463a1f80cf315d34c94dccbe6e247c31035c8512931cfdbfa2979bed44a950d463844190e6f3261524c0ff314ac0ddc820d054f682589481c
+EBUILD tora-9999.ebuild 2290 BLAKE2B d7a7c82ee7aa1838d8abc3281cd972299816f117258bf4747ef34ab73af3bbeecf2915bfc33ef1bca70d15af240b65fcc5b0386f1f89e494f84b0ab258d4cc98 SHA512 d4d9481e14d53aac151e1d64119d971b822896930153a363945097e5cb4f39f048e8baa465da7d6ebf2cafbfd8d34b9e7d3de9ebeb433929e40ab10046fbb10c
+MISC metadata.xml 843 BLAKE2B 483349f54edd1d61c459d689e4f4a65a427bfdc49a05244b8b9ef26f0d49460f3f04a995bca0e9e2becfb335cda699992bf62c4a1d26b264d5469741c01f9bf5 SHA512 fb6b7e2966d2cb74576f2558d44e64a5cf8aa79f78c5eeff58fcf433369b4efd32edb103ad4174bdd7d878466e4db720d81e4b1ff637d7c1193d37d944708247
diff --git a/dev-db/tora/files/tora-3.2-missing-header.patch b/dev-db/tora/files/tora-3.2-missing-header.patch
new file mode 100644
index 000000000000..272054b77793
--- /dev/null
+++ b/dev-db/tora/files/tora-3.2-missing-header.patch
@@ -0,0 +1,21 @@
+From 503fb876bd5664b455d234ba21294735a8972c91 Mon Sep 17 00:00:00 2001
+From: Ivan Brezina <ibrezina@ibrezina.net>
+Date: Wed, 5 Jul 2017 10:07:14 +0200
+Subject: [PATCH] linux fix
+
+---
+ src/editor/tosqltext.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/editor/tosqltext.cpp b/src/editor/tosqltext.cpp
+index c329daf0..60935c12 100644
+--- a/src/editor/tosqltext.cpp
++++ b/src/editor/tosqltext.cpp
+@@ -50,6 +50,7 @@
+ #include <QToolTip>
+ #endif
+
++#include <QMenu>
+ #include <QListWidget>
+ #include <QVBoxLayout>
+ #include <QApplication>
diff --git a/dev-db/tora/files/tora-3.2-qt-5.11.0.patch b/dev-db/tora/files/tora-3.2-qt-5.11.0.patch
new file mode 100644
index 000000000000..d9e50eeaf5b8
--- /dev/null
+++ b/dev-db/tora/files/tora-3.2-qt-5.11.0.patch
@@ -0,0 +1,69 @@
+From afbff9ec3b93f0e90f02953d1bdd859a0f9a72ab Mon Sep 17 00:00:00 2001
+From: ibre5041 <ibre5041@ibrezina.net>
+Date: Wed, 30 May 2018 23:22:05 +0200
+Subject: [PATCH] fix for bug #96 - missing #include <QButtonGroup>
+
+---
+ src/tools/tobrowser.cpp | 1 +
+ src/tools/toscript.cpp | 1 +
+ src/tools/tosecurity.cpp | 1 +
+ 3 files changed, 3 insertions(+)
+
+diff --git a/src/tools/tobrowser.cpp b/src/tools/tobrowser.cpp
+index 895be336..69a4c6b6 100644
+--- a/src/tools/tobrowser.cpp
++++ b/src/tools/tobrowser.cpp
+@@ -65,6 +65,7 @@
+ #include <QInputDialog>
+ #include <QSplitter>
+ #include <QToolBar>
++#include <QButtonGroup>
+
+ #include "icons/addindex.xpm"
+ #include "icons/addtable.xpm"
+diff --git a/src/tools/toscript.cpp b/src/tools/toscript.cpp
+index bc74fc8c..aff26158 100644
+--- a/src/tools/toscript.cpp
++++ b/src/tools/toscript.cpp
+@@ -56,6 +56,7 @@
+ #include <QSplitter>
+ #include <QtCore/QTextStream>
+ #include <QToolBar>
++#include <QButtonGroup>
+
+ #include "icons/execute.xpm"
+ #include "icons/toscript.xpm"
+diff --git a/src/tools/tosecurity.cpp b/src/tools/tosecurity.cpp
+index 17f5c3b0..b2694928 100644
+--- a/src/tools/tosecurity.cpp
++++ b/src/tools/tosecurity.cpp
+@@ -46,6 +46,7 @@
+
+ #include <QSplitter>
+ #include <QToolBar>
++#include <QButtonGroup>
+
+ #include "icons/addrole.xpm"
+ #include "icons/adduser.xpm"
+
+From 1852446c42c36d71b856fe09e1444b52052ca86d Mon Sep 17 00:00:00 2001
+From: Ivan Brezina <ibrezina@ibrezina.net>
+Date: Wed, 27 Jun 2018 19:11:09 +0200
+Subject: [PATCH] fix for bug #101
+
+---
+ src/widgets/tohelp.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/widgets/tohelp.cpp b/src/widgets/tohelp.cpp
+index 69e3c6a1..4ffd6cea 100644
+--- a/src/widgets/tohelp.cpp
++++ b/src/widgets/tohelp.cpp
+@@ -43,6 +43,7 @@
+ #include "core/toconfiguration.h"
+ #include "ts_log/ts_log_utils.h"
+
++#include <QAction>
+ #include <QMessageBox>
+ #include <QtCore/QSettings>
+
diff --git a/dev-db/tora/metadata.xml b/dev-db/tora/metadata.xml
new file mode 100644
index 000000000000..ac37be91b865
--- /dev/null
+++ b/dev-db/tora/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>ikonta@yandex.ru</email>
+ <name>Sergey Starikoff</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>haubi@gentoo.org</email>
+ <name>Michael Haubenwallner</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription>
+ TOra is a Toolkit for Oracle which aims to help the DBA or developer of
+ database application. Features PL/SQL debugger, SQL worksheet with syntax
+ highlighting, DB browser and a comprehensive set of DBA tools. Also works
+ with mySQL and postgreSQL.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">tora</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/tora/tora-3.2-r1.ebuild b/dev-db/tora/tora-3.2-r1.ebuild
new file mode 100644
index 000000000000..57c06026bfa5
--- /dev/null
+++ b/dev-db/tora/tora-3.2-r1.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils desktop xdg-utils
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://github.com/tora-tool/tora"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/tora-tool/tora/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="SQL IDE for Oracle, MySQL and PostgreSQL dbs"
+HOMEPAGE="https://github.com/tora-tool/tora/wiki"
+IUSE="doc mysql oracle +postgres"
+REQUIRED_USE="|| ( mysql oracle postgres )"
+
+SLOT="0"
+LICENSE="GPL-2"
+
+RDEPEND="
+ dev-libs/ferrisloki
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtprintsupport:5
+ dev-qt/qtsql:5[mysql?,postgres?]
+ dev-qt/qtwidgets:5
+ >=x11-libs/qscintilla-2.10.1:=[qt5(+)]
+ oracle? ( || ( =dev-db/oracle-instantclient-basic-11* dev-db/oracle-instantclient ) )
+ postgres? ( dev-db/postgresql:* )
+"
+DEPEND="${RDEPEND}
+ dev-qt/linguist:5
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}-missing-header.patch"
+ "${FILESDIR}/${P}-qt-5.11.0.patch"
+)
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ # fixed in master, only care about recent qscintilla lib name:
+ sed -e "/FIND_LIBRARY(QSCINTILLA_LIBRARY/s/qt5scintilla2/qscintilla2_qt5/" \
+ -i cmake/modules/FindQScintilla.cmake || die "Failed to fix FindQScintilla.cmake"
+
+ rm -r extlibs/{loki,qscintilla2} || die # ferrisloki, bug #383109
+
+ sed -e "/COPYING/ d" \
+ -i CMakeLists.txt || die "Removal of COPYING file failed"
+
+ # bug 547520
+ grep -rlZ '$$ORIGIN' . | xargs -0 sed -i 's|:$$ORIGIN[^:"]*||' || \
+ die 'Removal of $$ORIGIN failed'
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_DB2=OFF
+ -DQT5_BUILD=ON
+ -DWANT_INTERNAL_LOKI=OFF
+ -DWANT_INTERNAL_QSCINTILLA=OFF
+ -DWANT_RPM=OFF
+ -DLOKI_LIBRARY="$(pkg-config --variable=libdir ferrisloki)/libferrisloki.so"
+ -DLOKI_INCLUDE_DIR="$(pkg-config --variable=includedir ferrisloki)/FerrisLoki"
+ $(cmake-utils_use_find_package doc Doxygen)
+ -DENABLE_ORACLE=$(usex oracle)
+ -DUSE_PCH=OFF
+ -DENABLE_PGSQL=$(usex postgres)
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ doicon src/icons/${PN}.xpm || die
+ domenu src/${PN}.desktop || die
+}
+
+pkg_postinst() {
+ xdg_mimeinfo_database_update
+ xdg_desktop_database_update
+}
+
+pkg_postrm() {
+ xdg_mimeinfo_database_update
+ xdg_desktop_database_update
+}
diff --git a/dev-db/tora/tora-9999.ebuild b/dev-db/tora/tora-9999.ebuild
new file mode 100644
index 000000000000..1733252f6d51
--- /dev/null
+++ b/dev-db/tora/tora-9999.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils desktop xdg-utils
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://github.com/tora-tool/tora"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/tora-tool/tora/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="SQL IDE for Oracle, MySQL and PostgreSQL dbs"
+HOMEPAGE="https://github.com/tora-tool/tora/wiki"
+IUSE="doc mysql oracle pch +postgres"
+REQUIRED_USE="|| ( mysql oracle postgres )"
+
+SLOT="0"
+LICENSE="GPL-2"
+
+RDEPEND="
+ dev-libs/ferrisloki
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtprintsupport:5
+ dev-qt/qtsql:5[mysql?,postgres?]
+ dev-qt/qtwidgets:5
+ >=x11-libs/qscintilla-2.10.1:=[qt5(+)]
+ oracle? ( || ( =dev-db/oracle-instantclient-basic-11* dev-db/oracle-instantclient ) )
+ postgres? ( dev-db/postgresql:* )
+"
+DEPEND="${RDEPEND}
+ dev-qt/linguist:5
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+"
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ # fixed in master, only care about recent qscintilla lib name:
+ sed -e "/FIND_LIBRARY(QSCINTILLA_LIBRARY/s/qt5scintilla2/qscintilla2_qt5/" \
+ -i cmake/modules/FindQScintilla.cmake || die "Failed to fix FindQScintilla.cmake"
+
+ rm -r extlibs/{loki,qscintilla2} || die # ferrisloki, bug #383109
+
+ sed -e "/COPYING/ d" \
+ -i CMakeLists.txt || die "Removal of COPYING file failed"
+
+ # bug 547520
+ grep -rlZ '$$ORIGIN' . | xargs -0 sed -i 's|:$$ORIGIN[^:"]*||' || \
+ die 'Removal of $$ORIGIN failed'
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_DB2=OFF
+ -DQT5_BUILD=ON
+ -DWANT_INTERNAL_LOKI=OFF
+ -DWANT_INTERNAL_QSCINTILLA=OFF
+ -DWANT_RPM=OFF
+ -DLOKI_LIBRARY="$(pkg-config --variable=libdir ferrisloki)/libferrisloki.so"
+ -DLOKI_INCLUDE_DIR="$(pkg-config --variable=includedir ferrisloki)/FerrisLoki"
+ $(cmake-utils_use_find_package doc Doxygen)
+ -DENABLE_ORACLE=$(usex oracle)
+ -DUSE_PCH=$(usex pch)
+ -DENABLE_PGSQL=$(usex postgres)
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ doicon src/icons/${PN}.xpm || die
+ domenu src/${PN}.desktop || die
+}
+
+pkg_postinst() {
+ xdg_mimeinfo_database_update
+ xdg_desktop_database_update
+}
+
+pkg_postrm() {
+ xdg_mimeinfo_database_update
+ xdg_desktop_database_update
+}
diff --git a/dev-db/unixODBC-2.3.5-r1 b/dev-db/unixODBC-2.3.5-r1
deleted file mode 100644
index 74aadc2cb262..000000000000
--- a/dev-db/unixODBC-2.3.5-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install test
-DEPEND=|| ( dev-libs/libltdl:0[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=sys-devel/libtool-2.4.2-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) >=sys-libs/readline-6.2_p5-r1:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=sys-libs/ncurses-5.9-r3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=virtual/libiconv-0-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] sys-devel/flex >=app-portage/elt-patches-20170422
-DESCRIPTION=A complete ODBC driver manager
-EAPI=6
-HOMEPAGE=http://www.unixodbc.org/
-IUSE=+minimal odbcmanual static-libs unicode abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris
-LICENSE=GPL-2 LGPL-2.1
-RDEPEND=|| ( dev-libs/libltdl:0[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=sys-devel/libtool-2.4.2-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) >=sys-libs/readline-6.2_p5-r1:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=sys-libs/ncurses-5.9-r3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=virtual/libiconv-0-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?]
-SLOT=0
-SRC_URI=ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.5.tar.gz
-_eclasses_=libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=eac4f767361d9ed74aad34d40700f225
diff --git a/dev-db/unixODBC-2.3.6 b/dev-db/unixODBC-2.3.6
deleted file mode 100644
index 4a9af6016828..000000000000
--- a/dev-db/unixODBC-2.3.6
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install test
-DEPEND=|| ( dev-libs/libltdl:0[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=sys-devel/libtool-2.4.2-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) >=sys-libs/readline-6.2_p5-r1:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=sys-libs/ncurses-5.9-r3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=virtual/libiconv-0-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] sys-devel/flex >=app-portage/elt-patches-20170422
-DESCRIPTION=A complete ODBC driver manager
-EAPI=6
-HOMEPAGE=http://www.unixodbc.org/
-IUSE=+minimal odbcmanual static-libs unicode abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris
-LICENSE=GPL-2 LGPL-2.1
-RDEPEND=|| ( dev-libs/libltdl:0[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=sys-devel/libtool-2.4.2-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) >=sys-libs/readline-6.2_p5-r1:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=sys-libs/ncurses-5.9-r3:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=virtual/libiconv-0-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?]
-SLOT=0
-SRC_URI=ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.6.tar.gz
-_eclasses_=libtool 0081a71a261724730ec4c248494f044d multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=550b7f7fdc361ae27a399101722c5de1
diff --git a/dev-db/unixODBC/Manifest b/dev-db/unixODBC/Manifest
new file mode 100644
index 000000000000..29fde14cffc0
--- /dev/null
+++ b/dev-db/unixODBC/Manifest
@@ -0,0 +1,6 @@
+AUX unixODBC-2.3.5-CVE-2018-7485.patch 5224 BLAKE2B a21d659f75f9ae11a6d78a4a74b0591786800e14f22d7fb4c7ef5005e0630b95453a319d9254bf3f5e423e74ae36c6a7bd097f3193869757b2bea34f8974e358 SHA512 a4d5dfafe75ea0e85feed76cf18474a89fcf6719ee58d0b56d57959526db2511df2df691bf9af2e1a34c716d2d90f6d274b48a11cfb7add74df799d1f1f67387
+DIST unixODBC-2.3.5.tar.gz 1633390 BLAKE2B f7c70740471b0c6ff298f2377a3895efbf160764adc4f607dfb65de2873ea3a39a2852399feaca50fc389875e20a10b3cd0389ba9e9f02d0548312d8063f5af5 SHA512 94b5ebb887571f4fa801ae4305cd6cb4eb0d03682fac1eb0422cdd13b046b077e60bff8286c578b0b5e291cfbc0bc8695495e39c3713858d2eeb7b38459397d5
+DIST unixODBC-2.3.6.tar.gz 1661914 BLAKE2B 75162344e2b2713ae056dae0a2c1be31994ef350b4aa3ee7ae924b17527f35e0b7c9bb5a23763ab71553ef67a025d2a6549e564507b95991d6a193e165f1e774 SHA512 6518a4169946e847dd710d54724a44d268b98954d30064eadadb703edbbeafac05bd1f42a6845c2fdcdab7ae8987800acd1a5f6b4b96de5f3c8c3e4bc370fe30
+EBUILD unixODBC-2.3.5-r1.ebuild 1822 BLAKE2B d1a30ee371f5e71d3ed6e093a941783b2299497898ba3499792808914a65165f48e30a0562350cb427f2bdd5f1bd3a53c674449620e21ffcd3d8eb0486928698 SHA512 ce2d7fc36381d9c4cdda53198b4159332d257e9d63de7e16a51c7d8a1f9bf4932269813ad645985f3cc0f2df1ca5cebd3fa4e29484b07793106d220c02220279
+EBUILD unixODBC-2.3.6.ebuild 1785 BLAKE2B aa3ba92f38344e7a48517ecc302ea184dd9eb67831c19c34825266f7f75c71eec9c49b681d5278d72807a210d748764d260044f54f5e2ecea965729dfd387be2 SHA512 e4fd0ecdd6c81b331e4ff4f6a8e9aafb483712c8dab16c2334a04b29764eb500764c258969636696594db40af820b0421f91388c3627c7d7108e8a15169b6a3f
+MISC metadata.xml 366 BLAKE2B 9832224237ae18987939d9c0f657c6666114a5ce41af09a3a5a423d666ec70d9c5cd4fec1d82134b68e2e96b1a3e390977a0cd95001d325465d75b2b9b311d64 SHA512 e47157f178b585272b5c11682cef0c7b7dec227ded178d3427e91632f754db869deb72a6c1b258dfc90f6760028d3045d1e703874ae24111f8deb9db629b8c29
diff --git a/dev-db/unixODBC/files/unixODBC-2.3.5-CVE-2018-7485.patch b/dev-db/unixODBC/files/unixODBC-2.3.5-CVE-2018-7485.patch
new file mode 100644
index 000000000000..2c4178cda48f
--- /dev/null
+++ b/dev-db/unixODBC/files/unixODBC-2.3.5-CVE-2018-7485.patch
@@ -0,0 +1,135 @@
+From 45ef78e037f578b15fc58938a3a3251655e71d6f Mon Sep 17 00:00:00 2001
+From: Nick Gorham <nick@lurcher.ink.org>
+Date: Mon, 8 Jan 2018 11:12:39 +0000
+Subject: [PATCH] New Pre Source
+
+diff --git a/DriverManager/SQLGetDiagRecW.c b/DriverManager/SQLGetDiagRecW.c
+index a6368d7..be89120 100644
+--- a/DriverManager/SQLGetDiagRecW.c
++++ b/DriverManager/SQLGetDiagRecW.c
+@@ -98,6 +98,8 @@
+
+ static char const rcsid[]= "$RCSfile: SQLGetDiagRecW.c,v $";
+
++extern int __is_env( EHEAD * head ); /* in SQLGetDiagRec.c */
++
+ static SQLRETURN extract_sql_error_rec_w( EHEAD *head,
+ SQLWCHAR *sqlstate,
+ SQLINTEGER rec_number,
+diff --git a/DriverManager/SQLSetDescField.c b/DriverManager/SQLSetDescField.c
+index 333d786..0e2f67c 100644
+--- a/DriverManager/SQLSetDescField.c
++++ b/DriverManager/SQLSetDescField.c
+@@ -306,7 +306,7 @@ SQLRETURN SQLSetDescField( SQLHDESC descriptor_handle,
+ return function_return_nodrv( SQL_HANDLE_DESC, descriptor, SQL_ERROR );
+ }
+
+- if ( field_identifier == SQL_DESC_COUNT && (SQLINTEGER)value < 0 )
++ if ( field_identifier == SQL_DESC_COUNT && (intptr_t)value < 0 )
+ {
+ __post_internal_error( &descriptor -> error,
+ ERROR_07009, NULL,
+@@ -315,9 +315,9 @@ SQLRETURN SQLSetDescField( SQLHDESC descriptor_handle,
+ return function_return_nodrv( SQL_HANDLE_DESC, descriptor, SQL_ERROR );
+ }
+
+- if ( field_identifier == SQL_DESC_PARAMETER_TYPE && value != SQL_PARAM_INPUT
+- && value != SQL_PARAM_OUTPUT && value != SQL_PARAM_INPUT_OUTPUT &&
+- value != SQL_PARAM_INPUT_OUTPUT_STREAM && value != SQL_PARAM_OUTPUT_STREAM )
++ if ( field_identifier == SQL_DESC_PARAMETER_TYPE && (intptr_t)value != SQL_PARAM_INPUT
++ && (intptr_t)value != SQL_PARAM_OUTPUT && (intptr_t)value != SQL_PARAM_INPUT_OUTPUT &&
++ (intptr_t)value != SQL_PARAM_INPUT_OUTPUT_STREAM && (intptr_t)value != SQL_PARAM_OUTPUT_STREAM )
+ {
+ __post_internal_error( &descriptor -> error,
+ ERROR_HY105, NULL,
+diff --git a/DriverManager/SQLSetDescFieldW.c b/DriverManager/SQLSetDescFieldW.c
+index 5e066ac..45125ff 100644
+--- a/DriverManager/SQLSetDescFieldW.c
++++ b/DriverManager/SQLSetDescFieldW.c
+@@ -288,7 +288,7 @@ SQLRETURN SQLSetDescFieldW( SQLHDESC descriptor_handle,
+ return function_return_nodrv( SQL_HANDLE_DESC, descriptor, SQL_ERROR );
+ }
+
+- if ( field_identifier == SQL_DESC_COUNT && (SQLINTEGER)value < 0 )
++ if ( field_identifier == SQL_DESC_COUNT && (intptr_t)value < 0 )
+ {
+ __post_internal_error( &descriptor -> error,
+ ERROR_07009, NULL,
+@@ -297,9 +297,9 @@ SQLRETURN SQLSetDescFieldW( SQLHDESC descriptor_handle,
+ return function_return_nodrv( SQL_HANDLE_DESC, descriptor, SQL_ERROR );
+ }
+
+- if ( field_identifier == SQL_DESC_PARAMETER_TYPE && value != SQL_PARAM_INPUT
+- && value != SQL_PARAM_OUTPUT && value != SQL_PARAM_INPUT_OUTPUT &&
+- value != SQL_PARAM_INPUT_OUTPUT_STREAM && value != SQL_PARAM_OUTPUT_STREAM )
++ if ( field_identifier == SQL_DESC_PARAMETER_TYPE && (intptr_t)value != SQL_PARAM_INPUT
++ && (intptr_t)value != SQL_PARAM_OUTPUT && (intptr_t)value != SQL_PARAM_INPUT_OUTPUT &&
++ (intptr_t)value != SQL_PARAM_INPUT_OUTPUT_STREAM && (intptr_t)value != SQL_PARAM_OUTPUT_STREAM )
+ {
+ __post_internal_error( &descriptor -> error,
+ ERROR_HY105, NULL,
+diff --git a/exe/iusql.c b/exe/iusql.c
+index aac5329..484a889 100644
+--- a/exe/iusql.c
++++ b/exe/iusql.c
+@@ -413,7 +413,6 @@ static int ExecuteSQL( SQLHDBC hDbc, char *szSQL, char cDelimiter, int bColumnNa
+ if ( bVerbose ) DumpODBCLog( hEnv, hDbc, hStmt );
+ fprintf( stderr, "[ISQL]ERROR: Could not SQLExecDirect\n" );
+ SQLFreeStmt( hStmt, SQL_DROP );
+- free(szSepLine);
+ return 0;
+ }
+ }
+diff --git a/odbcinst/SQLCreateDataSource.c b/odbcinst/SQLCreateDataSource.c
+index a9fa735..83a1e9e 100644
+--- a/odbcinst/SQLCreateDataSource.c
++++ b/odbcinst/SQLCreateDataSource.c
+@@ -26,7 +26,7 @@ char* _multi_string_alloc_and_copy( LPCWSTR in )
+
+ if ( !in )
+ {
+- return in;
++ return NULL;
+ }
+
+ while ( in[ len ] != 0 || in[ len + 1 ] != 0 )
+@@ -55,7 +55,7 @@ char* _single_string_alloc_and_copy( LPCWSTR in )
+
+ if ( !in )
+ {
+- return in;
++ return NULL;
+ }
+
+ while ( in[ len ] != 0 )
+@@ -83,7 +83,7 @@ SQLWCHAR* _multi_string_alloc_and_expand( LPCSTR in )
+
+ if ( !in )
+ {
+- return in;
++ return NULL;
+ }
+
+ while ( in[ len ] != 0 || in[ len + 1 ] != 0 )
+@@ -112,7 +112,7 @@ SQLWCHAR* _single_string_alloc_and_expand( LPCSTR in )
+
+ if ( !in )
+ {
+- return in;
++ return NULL;
+ }
+
+ while ( in[ len ] != 0 )
+diff --git a/odbcinst/SQLWriteFileDSN.c b/odbcinst/SQLWriteFileDSN.c
+index c2f987b..e225796 100644
+--- a/odbcinst/SQLWriteFileDSN.c
++++ b/odbcinst/SQLWriteFileDSN.c
+@@ -21,7 +21,7 @@ BOOL SQLWriteFileDSN( LPCSTR pszFileName,
+
+ if ( pszFileName[0] == '/' )
+ {
+- strncpy( szFileName, sizeof(szFileName) - 5, pszFileName );
++ strncpy( szFileName, pszFileName, sizeof(szFileName) - 5 );
+ }
+ else
+ {
diff --git a/dev-db/unixODBC/metadata.xml b/dev-db/unixODBC/metadata.xml
new file mode 100644
index 000000000000..4ebc84f52877
--- /dev/null
+++ b/dev-db/unixODBC/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <use>
+ <flag name="minimal">Disable bundled drivers and extra libraries (most users don't need these)</flag>
+ <flag name="odbcmanual">Administrator, Internal Structure, Programmer and User documentation</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-db/unixODBC/unixODBC-2.3.5-r1.ebuild b/dev-db/unixODBC/unixODBC-2.3.5-r1.ebuild
new file mode 100644
index 000000000000..89b4a5c3aa39
--- /dev/null
+++ b/dev-db/unixODBC/unixODBC-2.3.5-r1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit libtool ltprune multilib-minimal
+
+DESCRIPTION="A complete ODBC driver manager"
+HOMEPAGE="http://www.unixodbc.org/"
+SRC_URI="ftp://ftp.unixodbc.org/pub/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="+minimal odbcmanual static-libs unicode"
+
+RDEPEND="
+ || (
+ dev-libs/libltdl:0[${MULTILIB_USEDEP}]
+ >=sys-devel/libtool-2.4.2-r1[${MULTILIB_USEDEP}]
+ )
+ >=sys-libs/readline-6.2_p5-r1:0=[${MULTILIB_USEDEP}]
+ >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}]
+ >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
+"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+"
+
+MULTILIB_CHOST_TOOLS=( /usr/bin/odbc_config )
+MULTILIB_WRAPPED_HEADERS=( /usr/include/unixodbc_conf.h )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.3.5-CVE-2018-7485.patch"
+)
+
+multilib_src_configure() {
+ # --enable-driver-conf is --enable-driverc as per configure.in
+ myeconfargs=(
+ --sysconfdir="${EPREFIX}"/etc/${PN}
+ --disable-static
+ --enable-iconv
+ --enable-shared
+ $(use_enable static-libs static)
+ $(use_enable !minimal drivers)
+ $(use_enable !minimal driverc)
+ $(use_with unicode iconv-char-enc UTF8)
+ $(use_with unicode iconv-ucode-enc UTF16LE)
+ )
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_install_all() {
+ einstalldocs
+
+ if use odbcmanual ; then
+ # We could simply run "make install-html" if we'd not had
+ # out-of-source builds here.
+ docinto html
+ dodoc -r doc/.
+ find "${ED%/}/usr/share/doc/${PF}/html" -name "Makefile*" -delete || die
+ fi
+
+ use prefix && dodoc README*
+ prune_libtool_files
+}
diff --git a/dev-db/unixODBC/unixODBC-2.3.6.ebuild b/dev-db/unixODBC/unixODBC-2.3.6.ebuild
new file mode 100644
index 000000000000..50b7a38b6389
--- /dev/null
+++ b/dev-db/unixODBC/unixODBC-2.3.6.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit libtool multilib-minimal
+
+DESCRIPTION="A complete ODBC driver manager"
+HOMEPAGE="http://www.unixodbc.org/"
+SRC_URI="ftp://ftp.unixodbc.org/pub/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="+minimal odbcmanual static-libs unicode"
+
+RDEPEND="
+ || (
+ dev-libs/libltdl:0[${MULTILIB_USEDEP}]
+ >=sys-devel/libtool-2.4.2-r1[${MULTILIB_USEDEP}]
+ )
+ >=sys-libs/readline-6.2_p5-r1:0=[${MULTILIB_USEDEP}]
+ >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}]
+ >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
+"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+"
+
+MULTILIB_CHOST_TOOLS=( /usr/bin/odbc_config )
+MULTILIB_WRAPPED_HEADERS=( /usr/include/unixodbc_conf.h )
+
+multilib_src_configure() {
+ # --enable-driver-conf is --enable-driverc as per configure.in
+ myeconfargs=(
+ --sysconfdir="${EPREFIX}"/etc/${PN}
+ --disable-static
+ --enable-iconv
+ --enable-shared
+ $(use_enable static-libs static)
+ $(use_enable !minimal drivers)
+ $(use_enable !minimal driverc)
+ $(use_with unicode iconv-char-enc UTF8)
+ $(use_with unicode iconv-ucode-enc UTF16LE)
+ )
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_install_all() {
+ einstalldocs
+
+ if use odbcmanual ; then
+ # We could simply run "make install-html" if we'd not had
+ # out-of-source builds here.
+ docinto html
+ dodoc -r doc/.
+ find "${ED%/}/usr/share/doc/${PF}/html" -name "Makefile*" -delete || die
+ fi
+
+ use prefix && dodoc README*
+ find "${ED}" -name '*.la' -delete || die
+}
diff --git a/dev-db/vbisam-2.0 b/dev-db/vbisam-2.0
deleted file mode 100644
index 8f71dff6ef74..000000000000
--- a/dev-db/vbisam-2.0
+++ /dev/null
@@ -1,9 +0,0 @@
-DEFINED_PHASES=install
-DESCRIPTION=replacement for IBM's C-ISAM
-EAPI=0
-HOMEPAGE=https://sourceforge.net/projects/vbisam
-KEYWORDS=ppc x86
-LICENSE=GPL-2 LGPL-2
-SLOT=0
-SRC_URI=mirror://sourceforge/tiny-cobol/isam/vbisam-2.0.tar.bz2
-_md5_=f51c56718193f25feef923bc9ee3728e
diff --git a/dev-db/vbisam/Manifest b/dev-db/vbisam/Manifest
new file mode 100644
index 000000000000..6284d57c0949
--- /dev/null
+++ b/dev-db/vbisam/Manifest
@@ -0,0 +1,3 @@
+DIST vbisam-2.0.tar.bz2 342184 BLAKE2B 64bf3dd3e44dd0ef19345d39605d09129e9d084f4d291ed8b6c94a04cbcd2fc69a94b2a5c58df88f61a5c5b1d843208cfdd4b354e22fcc056fb2be5a185e5ca4 SHA512 f329b9e35a8d912776342414cd02bb144c359ae316b5851b6fc49e0e13cbf4870ce2a445207fcdd8c1141ea7e0d5dff74f92f19e9b42597c16625a399c75c00c
+EBUILD vbisam-2.0.ebuild 478 BLAKE2B 35a6a924bbcd39a8717931b4fab1377948160d3bf4bc0f1edbfe993a0ef414c40a62839689e9ac91f48db3f74f52e3f4db7992fbb6ccba6b9b9b45b09c8bce7c SHA512 2374c88be40e1d7552b110215ba63a991cdbaa7eb2a2c1aad144e333e73e82ebb802f30e7743a5ff8937a777dedc5880b5c90ed355e8d39f42e4e97083cfb6ce
+MISC metadata.xml 247 BLAKE2B a5c4e16111aae168c06471594df9b2901bb70e48f1475657825b40cbb2445b72230c6f4b004e9bd0e5b061bc6e546ea9270451498098dd2bf1ee4291781809b4 SHA512 2649cac2764f9196000ccca028398ee0db1f992d8e2b35a3368a84a5e01f9b9fc95d5a2c8f05d57784e873a3b53b457a7520673353e8999d0d8892315c6385c1
diff --git a/dev-db/vbisam/metadata.xml b/dev-db/vbisam/metadata.xml
new file mode 100644
index 000000000000..929c96f25579
--- /dev/null
+++ b/dev-db/vbisam/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="sourceforge">tiny-cobol</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/vbisam/vbisam-2.0.ebuild b/dev-db/vbisam/vbisam-2.0.ebuild
new file mode 100644
index 000000000000..d852fc27c4bf
--- /dev/null
+++ b/dev-db/vbisam/vbisam-2.0.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=0
+
+KEYWORDS="ppc x86"
+
+DESCRIPTION="replacement for IBM's C-ISAM"
+HOMEPAGE="https://sourceforge.net/projects/vbisam"
+SRC_URI="mirror://sourceforge/tiny-cobol/isam/${P}.tar.bz2"
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+src_install()
+{
+ emake install DESTDIR="${D}" || die "emake install failed."
+ dodoc ChangeLog README NEWS AUTHORS
+}
diff --git a/dev-db/vsqlite++-0.3.13-r1 b/dev-db/vsqlite++-0.3.13-r1
deleted file mode 100644
index eb82009969be..000000000000
--- a/dev-db/vsqlite++-0.3.13-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=>=dev-libs/boost-1.33.1 >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=VSQLite++ - A welldesigned and portable SQLite3 Wrapper for C++
-EAPI=5
-HOMEPAGE=http://evilissimo.fedorapeople.org/releases/vsqlite--/
-IUSE=static-libs
-KEYWORDS=amd64 ppc x86
-LICENSE=BSD
-RDEPEND=>=dev-libs/boost-1.33.1 dev-db/sqlite:3
-SLOT=0
-SRC_URI=https://github.com/vinzenz/vsqlite--/archive/0.3.13.tar.gz -> vsqlite++-0.3.13.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 autotools-utils 5a4611dfba155b1659528663fad4cd5e desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=6f0908cbada8c30288f3e9b722f73e14
diff --git a/dev-db/vsqlite++/Manifest b/dev-db/vsqlite++/Manifest
new file mode 100644
index 000000000000..330148e0e754
--- /dev/null
+++ b/dev-db/vsqlite++/Manifest
@@ -0,0 +1,3 @@
+DIST vsqlite++-0.3.13.tar.gz 28195 BLAKE2B bd66a1592d4044f6735b063b72e3ac12fce32ea67c1af92e435d9db475264ca4234021ea7c6b997cad03e296b0ff66e90cb781707b18ca4048e23f21b47d61ca SHA512 70fcd16348e3b2a0854b1d496c68fda7e354068aefbd6a5ad21d7a42afebd2bd746f604240475acfeebe00898ab156f9dfd687346fdf5c77d775262db3a5666e
+EBUILD vsqlite++-0.3.13-r1.ebuild 911 BLAKE2B 88226a1fe11c99e119b18d5ffe3971863ede877c8cdd279ab123d9abee6e68d8df0f52a2edf6ea4f1e979a5c829006b7d4ea51d72f2116a44ab62f403049eaa4 SHA512 5b7357ae383da99fb8b09e9f4579cd1a45f4c0504739b75be7c77b49fb77b394fafbace6f683e3c25ff4b58ece8f8ec607876bd487856429bdb1c2c25b9556f5
+MISC metadata.xml 307 BLAKE2B dded10764ef95d964bc1d0685a8d54daa17d56eab31a36121b6b0a47937f8e59f199cb4a74ee1e1d7b457749b870db08e6ce15efb435f8850cbedc775dd463a8 SHA512 9c6a1b9a9d1ad7b9c5e8235145bfda70198cab067695215ac9a1844f8e292338c136abf1ba68e28d82de3d2f2884ee47ec4401355cece233534c73a3451476fe
diff --git a/dev-db/vsqlite++/metadata.xml b/dev-db/vsqlite++/metadata.xml
new file mode 100644
index 000000000000..56d616cc62a4
--- /dev/null
+++ b/dev-db/vsqlite++/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>graaff@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">vinzenz/vsqlite--</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/vsqlite++/vsqlite++-0.3.13-r1.ebuild b/dev-db/vsqlite++/vsqlite++-0.3.13-r1.ebuild
new file mode 100644
index 000000000000..0024ad1032b1
--- /dev/null
+++ b/dev-db/vsqlite++/vsqlite++-0.3.13-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+AUTOTOOLS_IN_SOURCE_BUILD=1
+AUTOTOOLS_AUTORECONF=1
+
+inherit autotools-utils
+
+DESCRIPTION="VSQLite++ - A welldesigned and portable SQLite3 Wrapper for C++"
+HOMEPAGE="http://evilissimo.fedorapeople.org/releases/vsqlite--/"
+SRC_URI="https://github.com/vinzenz/vsqlite--/archive/${PV}.tar.gz -> ${P}.tar.gz"
+IUSE="static-libs"
+
+LICENSE="BSD"
+
+SLOT="0"
+
+KEYWORDS="amd64 ppc x86"
+
+DEPEND=">=dev-libs/boost-1.33.1"
+
+RDEPEND="${DEPEND}
+ dev-db/sqlite:3"
+
+DOCS=(AUTHORS COPYING ChangeLog INSTALL NEWS README.md TODO VERSION)
+
+# package name is vsqlite++, but github / homepage name is vsqlite--
+S="${WORKDIR}/vsqlite---${PV}"
+
+src_prepare() {
+ ## remove O3 in AM_CXXFLAGS
+ sed -i -e 's/-O3//' Makefile.am || die
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
diff --git a/dev-db/wxsqlite3-3.2.1-r1 b/dev-db/wxsqlite3-3.2.1-r1
deleted file mode 100644
index d4fbf96e4205..000000000000
--- a/dev-db/wxsqlite3-3.2.1-r1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=configure install prepare
-DEPEND=x11-libs/wxGTK:3.0[X] dev-db/sqlite:3
-DESCRIPTION=C++ wrapper around the public domain SQLite 3.x database
-EAPI=5
-HOMEPAGE=http://wxcode.sourceforge.net/components/wxsqlite3/
-KEYWORDS=amd64 x86
-LICENSE=wxWinLL-3
-RDEPEND=x11-libs/wxGTK:3.0[X] dev-db/sqlite:3
-SLOT=0
-SRC_URI=mirror://sourceforge/wxcode/wxsqlite3-3.2.1.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf wxwidgets 04e063b0eff26daaea83d859dd9d6e05
-_md5_=1b0a62133de66b9f9d49d5943d0e0908
diff --git a/dev-db/wxsqlite3/Manifest b/dev-db/wxsqlite3/Manifest
new file mode 100644
index 000000000000..52712279277d
--- /dev/null
+++ b/dev-db/wxsqlite3/Manifest
@@ -0,0 +1,4 @@
+AUX wxsqlite3-3.2.1.pc.in 381 BLAKE2B f73eb165dc6ddaa6998f09d269cebc385ecc8b2352fc082a1c43e412e19a83d6ec941173e6f68e3912bb52692acbf0054b1f9e979b180c564c7676bac21586cb SHA512 4afa87e5eaafc6e21d1f9f6c60716cd783f2286a805a35bdffb391a1c54839baf0651bedbf28ef6e7c9e5d0835beaf0b6d055f919c7169d293bd12a6375bfcfc
+DIST wxsqlite3-3.2.1.tar.gz 2810940 BLAKE2B 777bccebffb68e2d87fdfc27177738c90a18af1a7870ca21965e351e5ea6a21ac7ac710f760a46aad588d8baadcb136945f4cea9b1eabc1ddb5587ebd549b140 SHA512 c62380815d881e9f08727cf28047d81acabf791429ee1a5df4db4a6e101a5c7c5fe6e314b18e83eda9c330fb62c996db7a560163d25dc8b948a04a970e7be3d6
+EBUILD wxsqlite3-3.2.1-r1.ebuild 1068 BLAKE2B 9b4d4962bf051de8e28a782723fc6528f4851e0870520bf071fac638945b082d9176b433a526c444dd1b7b717ea6958fad58034f499ba4e2762b9c87226d59a3 SHA512 9b54fd5b074bea8539f9fc433f1eb3d4a22ad3ce5d9f502be02a8001612b14e50ebfa1095f2c6ae44c0678d05338b5b49cf5c21f376d2f80d962fd58e57bfeac
+MISC metadata.xml 337 BLAKE2B d0534e162c32ec1b624896abd8b22f90987ed1b3ff7fdb9066a7f6e4180f6defae36da5b1ecd880ec0f4d3d6263643d685ac1e6169c09066f5890db348b9d12e SHA512 94da0a35e480782ff302bee5b75957d202a48835b1b158c9f3c28af08e5c29ddc53129b89c72286776adbc84b37a1fc8516312410c09096d88390d952fa92ff4
diff --git a/dev-db/wxsqlite3/files/wxsqlite3-3.2.1.pc.in b/dev-db/wxsqlite3/files/wxsqlite3-3.2.1.pc.in
new file mode 100644
index 000000000000..112fa14432c3
--- /dev/null
+++ b/dev-db/wxsqlite3/files/wxsqlite3-3.2.1.pc.in
@@ -0,0 +1,14 @@
+# Package Information for pkg-config
+
+prefix=/usr
+wxver=@WXVERSION@
+includedir=${prefix}/include/wx-${wxver}/
+libdir=${prefix}/@LIBDIR@
+
+Name: wxsqlite3-@WXVERSION@
+Description: SQLite3 C++ wrapper for use in programs based on the wxWidgets
+Version: @VERSION@
+#Requires: sqlite3
+Libs: -L${libdir} -lwxcode_gtk2_wxsqlite3-@WXVERSION@
+Libs.private: -lpthread
+Cflags: -I${includedir}
diff --git a/dev-db/wxsqlite3/metadata.xml b/dev-db/wxsqlite3/metadata.xml
new file mode 100644
index 000000000000..9d94ef24a06b
--- /dev/null
+++ b/dev-db/wxsqlite3/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>wxwidgets@gentoo.org</email>
+ <name>Gentoo wxWidgets Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">wxcode</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/wxsqlite3/wxsqlite3-3.2.1-r1.ebuild b/dev-db/wxsqlite3/wxsqlite3-3.2.1-r1.ebuild
new file mode 100644
index 000000000000..5287794cfeba
--- /dev/null
+++ b/dev-db/wxsqlite3/wxsqlite3-3.2.1-r1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+WX_GTK_VER="3.0"
+
+inherit eutils multilib wxwidgets
+
+DESCRIPTION="C++ wrapper around the public domain SQLite 3.x database"
+HOMEPAGE="http://wxcode.sourceforge.net/components/wxsqlite3/"
+SRC_URI="mirror://sourceforge/wxcode/${P}.tar.gz"
+
+LICENSE="wxWinLL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="
+ x11-libs/wxGTK:3.0[X]
+ dev-db/sqlite:3"
+RDEPEND="${DEPEND}"
+
+#S="${WORKDIR}/${P%.1}"
+
+src_prepare() {
+ rm -rf sqlite3 || die
+ cp configure30 configure || die
+ sed \
+ -e "s:@WXVERSION@:${WX_GTK_VER}:g" \
+ -e "s:@LIBDIR@:$(get_libdir):g" \
+ -e "s:@VERSION@:${PV}:g" \
+ "${FILESDIR}"/${P}.pc.in > ${PN}.pc || die
+}
+
+src_configure() {
+ econf \
+ --enable-shared \
+ --enable-unicode \
+ --with-wx-config="${WX_CONFIG}" \
+ --with-wxshared \
+ --with-sqlite3-prefix="${PREFIX}/usr"
+}
+
+src_install() {
+ default
+
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins ${PN}.pc
+
+ dodoc Readme.txt
+ dohtml -r docs/html/*
+ docinto samples
+ dodoc -r samples/*
+}
diff --git a/dev-db/xbase-3.1.2 b/dev-db/xbase-3.1.2
deleted file mode 100644
index a01bb1fc8a10..000000000000
--- a/dev-db/xbase-3.1.2
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=configure install prepare
-DEPEND=>=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=xbase (i.e. dBase, FoxPro, etc.) compatible C++ class library
-EAPI=6
-HOMEPAGE=https://sourceforge.net/projects/xdb/ http://linux.techass.com/projects/xdb/
-IUSE=doc static-libs
-KEYWORDS=amd64 ~arm hppa ppc ppc64 x86 ~x86-fbsd
-LICENSE=GPL-2
-SLOT=0
-SRC_URI=mirror://sourceforge/xdb/xbase64-3.1.2.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 libtool 0081a71a261724730ec4c248494f044d multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=79cbc53b95984758983ce0fd37f9acc4
diff --git a/dev-db/xbase/Manifest b/dev-db/xbase/Manifest
new file mode 100644
index 000000000000..2235801b8d7c
--- /dev/null
+++ b/dev-db/xbase/Manifest
@@ -0,0 +1,13 @@
+AUX xbase-2.0.0-ppc.patch 679 BLAKE2B fa2d305e57c6e99a703c0d5458d81c8d2b47adcba57e5926afeb3dfe024bac7dfe02e6cb2fab1e7a9f5e5d37eef2d1b5b812659d6b8936be324bf84828e761b8 SHA512 3a91e2ba27cfcb8f31172db7d381a81ebb2a49b984ae7d4f108839ef43c520d5d577b3393a3d520e4d95bf808fc50f738f54abc0172aa25f045267349dd00fe8
+AUX xbase-3.1.2-fixconfig.patch 467 BLAKE2B 031c2a4a22f5587be8819e2fa8536df7c6512719533cc7bb3298195541aff00f8f9c85408aecb664f5330c183817769e6659f646405a14c7ccbd28d4b5765a47 SHA512 15acffe25b7bb0eb495ad480deb9e2c349fee10b938a8cc9fd295ea9c745b7e1c1c94f544513a9839f577ac5a9af892c72c83f42e79601a244ecf84c99eeafb8
+AUX xbase-3.1.2-gcc-version.patch 441 BLAKE2B 3e925e759334fa20c5ae4013b56b05d52ff33ba80777a0f998075080e18226de17b52d7550f22ada09f8ac208eed2c996fc2bb995a8838d95fe0ea0ba61afe3c SHA512 2104f0c2d186a753bfb8d55d8234e3f2dc53e3b1ee375fbad47654ca5f814d62133606829e8a7884d147d1a213269394a88e9ca356dfb24fd0c8f6f73ec5b878
+AUX xbase-3.1.2-gcc44.patch 700 BLAKE2B 15b8805fe985f4a3597177143e968780aecce6609f2ae81bd72c2b563bf4ff018216a5a873609f85f3ce08783e3f0698be3c081f40833487672fab4716d06175 SHA512 b38415eced0ead8455bc443424ede47f110fb5d3d2673ccd74fbd438bb08a1fcdabf071bbece3ff3af2fe285b57ea3f2553f8797ccff03a33f7c38dd5c665a4c
+AUX xbase-3.1.2-gcc47.patch 572 BLAKE2B e656c3343746650a455e187257b0deae5a5908a074ce1ac24d15a6c3ba953b3e70cc083a3d05165d73e24f7789e61c45205b8923d5cd83c5c7eec7e83e07fabb SHA512 765502e91df57876bc641c0eaae27a0531e9cca10d67f5811b0b93f0c79a8610d684f16a3fc0bfe2f7dc0c1862fa11658a869a2b561762e7697877117f4203fb
+AUX xbase-3.1.2-gcc6.patch 2299 BLAKE2B 1eba4035ae9aeeee8aec0f1a833997f122444e8928d6246326d08324ab04a4d660b8ebbfd1f22b2349f9b86e6249a0f04c3a8f83715f71dcac773bdd0a9c4f8e SHA512 e8c3e5a4577a652bbd4582dbca57a1be0c9273ea60b105308258f35431e450fd18031ecac0a61ab934825533d5f07170bdeb88130ece6ca50e3164f82a947eb5
+AUX xbase-3.1.2-gcc7.patch 1282 BLAKE2B 98a6b04c828a4498d452f2f8a4b297a0a170e1c47a6bd4dddc913025cfb3b9bd4c534b459772260374f59811d2f91d53622b126c60ef961be967b748ea9f5c13 SHA512 1430ed552aed048c27b37ddc88eab2241b7c1632e884ebf35f333ad1adacbe60eccdcd4b81d869db004e2bec70622f950fecd4beea3f82f8c60a398a4c52b1b7
+AUX xbase-3.1.2-lesserg.patch 9096 BLAKE2B 1ae8e5d2a8fcf7d77519eaab5b49740b4dbd02b577daf2d68795eb7fb162cda88641c12c450a4f0870e3194da146429db2d49336e12b59e434ef885381ac29fb SHA512 5be7a701922a31e37c570dc054a9fa3f7833ce6733ad776311675dcd615400ec1cb0794c19f4eca110b857d68405391bf5801063224284d7d55fe3fe8dee09ad
+AUX xbase-3.1.2-outofsource.patch 1290 BLAKE2B 08a151121f0270da996bcbce5885b1e5d7e5ce6e119d7a0fba32edf23942ad323df6af1554d62ea2a969ec68ac22d201b77198f8341158053e68ac9095a0560a SHA512 76164108abd4f50c4fe3d13a4c868936ad6a1d11ae8dd1e82487280bd4bdb70e5f751efda826ba4debc0112c67628b0c78fbdecbf556c18626d5afd378184270
+AUX xbase-3.1.2-xbnode.patch 341 BLAKE2B 4e69abe195b1918a0521eae1b14be43f29f23b12a56d5da515d50f63c5909ddce66315adcca93f0764de1299f4d0924e0e11c1e05a12fc6ac6e211c5619c2484 SHA512 795a6b06990d1399924007a7ad4e674f65131f5ef7ed339ed0f53445f6939c373d375603ae3aa8dee697335327fd1ae0b89fc31d68a253cc5a12380faddba524
+DIST xbase64-3.1.2.tar.gz 425650 BLAKE2B d99a15fa9642887e7f303344030eff351f764e7057beede2941016f4f8ee813c2196f20764f5e7e8a52a285d0a2d23dfe4ef49de3c0ba4c45e71d2ae2ffe2ef1 SHA512 bd9e27e250ad1035aa7c692cba668b2e9cf678c398f2ee9fdb9a08374a77f3920c059edd8c72fbd172e488d6169b256526acb47b7685e3dbbecd6cbca859ce87
+EBUILD xbase-3.1.2.ebuild 1430 BLAKE2B c486059238134bee42ed7be2b1953c026af131a737c50be54c2e4e762fbfc05bcf0af592634a934d818c728199c17dd03335198cc1ef42d59245f49ef7f35c01 SHA512 a42c6d2b970d63456c91e46b41596b6ccde90c0bd8f448de7af997ed0c07488bb4be87475a90bf4b02052f79eb2876c5f65fe141be35ddb28c45d6fd82cada8d
+MISC metadata.xml 240 BLAKE2B e63e77abbce61350b20e1b35e8a0950da40467f2ba51cff0ea6ed21955fa7ffc78ab218eaab4ca0696d780a8f75e17ad40c375ad449f7c15ad0ca4b556dbb96b SHA512 7d73f296795e371ae182b184072c8ed76389fa4eea31e75eb6df2eaa735597465b8f0a913483ec6e12f8ab28133eb93a1292566668c59e9b0e8ebece704ad09e
diff --git a/dev-db/xbase/files/xbase-2.0.0-ppc.patch b/dev-db/xbase/files/xbase-2.0.0-ppc.patch
new file mode 100644
index 000000000000..3b743a9fd0ae
--- /dev/null
+++ b/dev-db/xbase/files/xbase-2.0.0-ppc.patch
@@ -0,0 +1,20 @@
+--- xbase-2.0.0/ltconfig.foo 2007-05-04 18:14:42.000000000 -0400
++++ xbase-2.0.0/ltconfig 2007-05-04 18:15:39.000000000 -0400
+@@ -1664,16 +1664,7 @@ linux-gnu*)
+ shlibpath_var=LD_LIBRARY_PATH
+ check_shared_deplibs_method='file_magic ELF 32-bit LSB shared object'
+ sys_lib_search_path="/lib /usr/lib /usr/local/lib `echo $LD_LIBRARY_PATH | sed -e 's/:/ /g'`"
+-
+- if test -f /lib/ld.so.1; then
+- dynamic_linker='GNU ld.so'
+- else
+- # Only the GNU ld.so supports shared libraries on MkLinux.
+- case "$host_cpu" in
+- powerpc*) dynamic_linker=no ;;
+- *) dynamic_linker='Linux ld.so' ;;
+- esac
+- fi
++ dynamic_linker='GNU ld.so'
+ ;;
+
+ netbsd* | openbsd*)
diff --git a/dev-db/xbase/files/xbase-3.1.2-fixconfig.patch b/dev-db/xbase/files/xbase-3.1.2-fixconfig.patch
new file mode 100644
index 000000000000..2bfe92f8239a
--- /dev/null
+++ b/dev-db/xbase/files/xbase-3.1.2-fixconfig.patch
@@ -0,0 +1,12 @@
+diff -up xbase64-3.1.2/xbase64-config.in.BAD xbase64-3.1.2/xbase64-config.in
+--- xbase64-3.1.2/xbase64-config.in.BAD 2009-08-19 22:58:42.081087534 -0400
++++ xbase64-3.1.2/xbase64-config.in 2009-08-19 22:58:45.604090002 -0400
+@@ -5,7 +5,7 @@ exec_prefix=@exec_prefix@
+ exec_prefix_set=no
+ CC="@CC@"
+ CXX="@CXX@"
+-LD="@SHARED_LD@"
++LD="@LD@"
+
+ usage="\
+ Usage: xbase-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags] [--cc] [--cxx] [--ld]"
diff --git a/dev-db/xbase/files/xbase-3.1.2-gcc-version.patch b/dev-db/xbase/files/xbase-3.1.2-gcc-version.patch
new file mode 100644
index 000000000000..3f0d209eec47
--- /dev/null
+++ b/dev-db/xbase/files/xbase-3.1.2-gcc-version.patch
@@ -0,0 +1,16 @@
+ configure.in | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 3110c70..5850231 100755
+--- a/configure.in
++++ b/configure.in
+@@ -74,7 +74,7 @@ AC_SUBST(RHREL)
+
+ # get G++ version
+ if test "$GXX" = "yes"; then
+- GXXVER=`${CXX} -v 2>&1 | grep version | cut -d " " -f 3 -`
++ GXXVER=`${CXX} -v 2>&1 | grep " version " | cut -d " " -f 3 -`
+ GXXVER="gcc${GXXVER}"
+ else
+ GXXVER=""
diff --git a/dev-db/xbase/files/xbase-3.1.2-gcc44.patch b/dev-db/xbase/files/xbase-3.1.2-gcc44.patch
new file mode 100644
index 000000000000..d23c9f23d08f
--- /dev/null
+++ b/dev-db/xbase/files/xbase-3.1.2-gcc44.patch
@@ -0,0 +1,24 @@
+diff -up xbase64-3.1.2/xbase64/xbase64.cpp.gcc44 xbase64-3.1.2/xbase64/xbase64.cpp
+--- xbase64-3.1.2/xbase64/xbase64.cpp.gcc44 2006-07-17 12:54:42.000000000 -0400
++++ xbase64-3.1.2/xbase64/xbase64.cpp 2009-08-19 23:08:14.724079392 -0400
+@@ -66,6 +66,8 @@
+ #include <dos.h>
+ #endif
+
++#include <cerrno>
++
+
+ /*! \file xbase64.cpp
+ */
+diff -up xbase64-3.1.2/xbase64/xblock.cpp.gcc44 xbase64-3.1.2/xbase64/xblock.cpp
+--- xbase64-3.1.2/xbase64/xblock.cpp.gcc44 2009-08-19 23:08:59.408186578 -0400
++++ xbase64-3.1.2/xbase64/xblock.cpp 2009-08-19 23:09:11.416184844 -0400
+@@ -65,6 +65,8 @@
+ //#include <stdio.h>
+ //#include <stdlib.h>
+
++#include <cerrno>
++
+ /*! \file xblock.cpp
+ */
+ #ifdef XB_LOCKING_ON
diff --git a/dev-db/xbase/files/xbase-3.1.2-gcc47.patch b/dev-db/xbase/files/xbase-3.1.2-gcc47.patch
new file mode 100644
index 000000000000..7774251ed68d
--- /dev/null
+++ b/dev-db/xbase/files/xbase-3.1.2-gcc47.patch
@@ -0,0 +1,21 @@
+diff -up xbase64-3.1.2/bin/dumprecs.cpp.gcc47 xbase64-3.1.2/bin/dumprecs.cpp
+--- xbase64-3.1.2/bin/dumprecs.cpp.gcc47 2012-01-05 15:36:00.377536998 -0500
++++ xbase64-3.1.2/bin/dumprecs.cpp 2012-01-05 15:36:15.198399295 -0500
+@@ -70,7 +70,7 @@ int main(int ac,char** av)
+ return 1;
+ }
+
+- for(int i=1; i<ac; ++i){
++ for(int i=1; i<ac; ++i){{
+ char* filename = av[i];
+
+ xbDbf MyFile( &x );
+@@ -91,7 +91,7 @@ int main(int ac,char** av)
+ x.DisplayError( rc );
+ }
+ MyFile.CloseDatabase(); /* close database */
+- }
++ }}
+ return 0;
+ }
+
diff --git a/dev-db/xbase/files/xbase-3.1.2-gcc6.patch b/dev-db/xbase/files/xbase-3.1.2-gcc6.patch
new file mode 100644
index 000000000000..8dd4cdaef971
--- /dev/null
+++ b/dev-db/xbase/files/xbase-3.1.2-gcc6.patch
@@ -0,0 +1,49 @@
+diff -up xbase64-3.1.2/xbase64/xblock.cpp.gcc6 xbase64-3.1.2/xbase64/xblock.cpp
+--- xbase64-3.1.2/xbase64/xblock.cpp.gcc6 2016-02-16 16:06:40.146864585 -0500
++++ xbase64-3.1.2/xbase64/xblock.cpp 2016-02-16 16:07:51.137342339 -0500
+@@ -84,7 +84,7 @@ xbLock::xbLock(xbDbf * pdbf)
+ TableLockCnt = 0;
+ MemoLockCnt = 0;
+ IndexLockCnt = 0;
+- std::cout << "xbLock constructor" << std::cout;
++ std::cout << "xbLock constructor";
+ }
+ /*************************************************************************/
+ xbLock::~xbLock()
+@@ -169,7 +169,7 @@ else if( LockType == XB_LOCK || LockType
+ /*************************************************************************/
+ xbaseLock::xbaseLock( xbDbf * pdbf ) : xbLock( pdbf )
+ {
+- std::cout << "xbaseLock constructor" << std::cout;
++ std::cout << "xbaseLock constructor";
+ }
+ /*************************************************************************/
+ xbShort xbaseLock::LockTableHeader( xbShort LockType )
+@@ -336,7 +336,7 @@ xbShort xbaseLock::LockInit()
+ /*************************************************************************/
+ dbaseLock::dbaseLock( xbDbf * pdbf ) : xbLock( pdbf )
+ {
+- std::cout << "dbaseLock constructor" << std::cout;
++ std::cout << "dbaseLock constructor";
+ }
+ /*************************************************************************/
+ xbShort dbaseLock::LockTableHeader( xbShort LockType )
+@@ -460,7 +460,7 @@ xbShort dbaseLock::UnlockAll()
+ /*************************************************************************/
+ clipperLock::clipperLock( xbDbf * pdbf ) : xbLock( pdbf )
+ {
+- std::cout << "clipperLock constructor" << std::cout;
++ std::cout << "clipperLock constructor";
+ }
+ /*************************************************************************/
+ xbShort clipperLock::LockTableHeader( xbShort LockType )
+@@ -523,7 +523,7 @@ xbShort clipperLock::UnlockAll()
+ /*************************************************************************/
+ foxproLock::foxproLock( xbDbf * pdbf ) : xbLock( pdbf )
+ {
+- std::cout << "foxproLock constructor" << std::cout;
++ std::cout << "foxproLock constructor";
+ }
+ /*************************************************************************/
+ xbShort foxproLock::LockTableHeader( xbShort LockType )
+diff -up xbase64-3.1.2/xbase64/xblock.h.gcc6 xbase64-3.1.2/xbase64/xblock.h
diff --git a/dev-db/xbase/files/xbase-3.1.2-gcc7.patch b/dev-db/xbase/files/xbase-3.1.2-gcc7.patch
new file mode 100644
index 000000000000..119fb59e1681
--- /dev/null
+++ b/dev-db/xbase/files/xbase-3.1.2-gcc7.patch
@@ -0,0 +1,34 @@
+diff -up xbase64-3.1.2/bin/dbfutil1.cpp.gcc7 xbase64-3.1.2/bin/dbfutil1.cpp
+--- xbase64-3.1.2/bin/dbfutil1.cpp.gcc7 2017-02-20 09:59:36.135561103 -0500
++++ xbase64-3.1.2/bin/dbfutil1.cpp 2017-02-20 10:00:32.743218194 -0500
+@@ -157,7 +157,8 @@ void MyClass::SetFilter()
+ memset( Expression, 0x00, 512 );
+ while( !strlen( Expression )){
+ std::cout << "Enter filter expression (like AMOUNT<5)" << std::endl;
+- gets( Expression );
++ fgets( Expression, sizeof(Expression), stdin );
++ strtok( Expression, "\n" );
+ }
+ if( xbf )
+ delete xbf;
+@@ -247,7 +248,8 @@ void MyClass::ProcessExpression()
+ while( !strstr( exprsn, "QUIT" ) && !strstr( exprsn, "quit" )){
+
+ std::cout << ">";
+- gets( exprsn );
++ fgets( exprsn, sizeof(exprsn), stdin );
++ strtok( exprsn, "\n" );
+
+ if( strstr( exprsn, "HELP" ) || strstr( exprsn, "help" )){
+ std::cout << "** Command Help ***" << std::endl << std::endl;
+diff -up xbase64-3.1.2/xbase64/xbase64.h.gcc7 xbase64-3.1.2/xbase64/xbase64.h
+--- xbase64-3.1.2/xbase64/xbase64.h.gcc7 2017-02-20 09:49:07.063609482 -0500
++++ xbase64-3.1.2/xbase64/xbase64.h 2017-02-20 09:57:36.586618723 -0500
+@@ -53,6 +53,7 @@
+ #endif
+
+ #include <string.h>
++#include <cstdio>
+
+ #if defined(__WIN32__)
+ #include "windows.h"
diff --git a/dev-db/xbase/files/xbase-3.1.2-lesserg.patch b/dev-db/xbase/files/xbase-3.1.2-lesserg.patch
new file mode 100644
index 000000000000..b6eb71e0b618
--- /dev/null
+++ b/dev-db/xbase/files/xbase-3.1.2-lesserg.patch
@@ -0,0 +1,294 @@
+diff -up xbase64-3.1.2/xbase64/xbase64.cpp.lesserg xbase64-3.1.2/xbase64/xbase64.cpp
+--- xbase64-3.1.2/xbase64/xbase64.cpp.lesserg 2012-01-05 15:31:01.695312436 -0500
++++ xbase64-3.1.2/xbase64/xbase64.cpp 2012-01-05 15:31:01.717312232 -0500
+@@ -38,7 +38,7 @@
+
+ */
+
+-#ifdef __GNU LesserG__
++#ifdef __GNU_LesserG__
+ #pragma implementation "xbase64.h"
+ #endif
+
+diff -up xbase64-3.1.2/xbase64/xbase64.h.lesserg xbase64-3.1.2/xbase64/xbase64.h
+--- xbase64-3.1.2/xbase64/xbase64.h.lesserg 2006-07-17 12:54:50.000000000 -0400
++++ xbase64-3.1.2/xbase64/xbase64.h 2012-01-05 15:31:01.718312223 -0500
+@@ -42,7 +42,7 @@
+ #ifndef __XB_XBASE_H__
+ #define __XB_XBASE_H__
+
+-#ifdef __GNU LesserG__
++#ifdef __GNU_LesserG__
+ #pragma interface
+ #endif
+
+@@ -60,7 +60,7 @@
+ // ripped from wxWindows
+
+ // _declspec works in BC++ 5 and later, as well as VC++
+-#if defined(__VISUALC__) || defined(__BORLANDC__) || defined(__GNU LesserC__)
++#if defined(__VISUALC__) || defined(__BORLANDC__) || defined(__GNU_LesserC__)
+ # ifdef XBMAKINGDLL
+ # define XBDLLEXPORT __declspec( dllexport )
+ # define XBDLLEXPORT_DATA(type) __declspec( dllexport ) type
+diff -up xbase64-3.1.2/xbase64/xbcdx.h.lesserg xbase64-3.1.2/xbase64/xbcdx.h
+--- xbase64-3.1.2/xbase64/xbcdx.h.lesserg 2012-01-05 15:32:17.398608985 -0500
++++ xbase64-3.1.2/xbase64/xbcdx.h 2012-01-05 15:32:43.051370614 -0500
+@@ -50,7 +50,7 @@ struct CdxInnerNode: public CdxNode
+ {
+ char keys[500];
+ }
+-#ifdef __GNU LesserC__
++#ifdef __GNU_LesserC__
+ __attribute__((packed))
+ #endif
+ ;
+@@ -67,7 +67,7 @@ struct CdxLeafNode: public CdxNode
+ char byteCount;
+ char keys[488];
+ }
+-#ifdef __GNU LesserC__
++#ifdef __GNU_LesserC__
+ __attribute__((packed))
+ #endif
+ ;
+diff -up xbase64-3.1.2/xbase64/xbdate.cpp.lesserg xbase64-3.1.2/xbase64/xbdate.cpp
+--- xbase64-3.1.2/xbase64/xbdate.cpp.lesserg 2006-07-17 12:54:42.000000000 -0400
++++ xbase64-3.1.2/xbase64/xbdate.cpp 2012-01-05 15:31:01.719312213 -0500
+@@ -40,7 +40,7 @@
+
+ */
+
+-#ifdef __GNU LesserG__
++#ifdef __GNU_LesserG__
+ #pragma implementation "xbdate.h"
+ #endif
+
+diff -up xbase64-3.1.2/xbase64/xbdate.h.lesserg xbase64-3.1.2/xbase64/xbdate.h
+--- xbase64-3.1.2/xbase64/xbdate.h.lesserg 2006-07-17 12:54:50.000000000 -0400
++++ xbase64-3.1.2/xbase64/xbdate.h 2012-01-05 15:31:01.721312195 -0500
+@@ -45,7 +45,7 @@
+ #ifndef __XB_XBDATE_H__
+ #define __XB_XBDATE_H__
+
+-#ifdef __GNU LesserG__
++#ifdef __GNU_LesserG__
+ #pragma interface
+ #endif
+
+diff -up xbase64-3.1.2/xbase64/xbdbf.cpp.lesserg xbase64-3.1.2/xbase64/xbdbf.cpp
+--- xbase64-3.1.2/xbase64/xbdbf.cpp.lesserg 2006-07-17 12:54:42.000000000 -0400
++++ xbase64-3.1.2/xbase64/xbdbf.cpp 2012-01-05 15:31:01.722312185 -0500
+@@ -39,7 +39,7 @@
+
+ */
+
+-#ifdef __GNU LesserG__
++#ifdef __GNU_LesserG__
+ #pragma implementation "xbdbf.h"
+ #endif
+
+diff -up xbase64-3.1.2/xbase64/xbdbf.h.lesserg xbase64-3.1.2/xbase64/xbdbf.h
+--- xbase64-3.1.2/xbase64/xbdbf.h.lesserg 2006-07-17 12:54:50.000000000 -0400
++++ xbase64-3.1.2/xbase64/xbdbf.h 2012-01-05 15:31:01.723312175 -0500
+@@ -41,7 +41,7 @@
+ #ifndef __XB_DBF_H__
+ #define __XB_DBF_H__
+
+-#ifdef __GNU LesserG__
++#ifdef __GNU_LesserG__
+ #pragma interface
+ #endif
+
+diff -up xbase64-3.1.2/xbase64/xbexp.cpp.lesserg xbase64-3.1.2/xbase64/xbexp.cpp
+--- xbase64-3.1.2/xbase64/xbexp.cpp.lesserg 2006-07-17 12:54:42.000000000 -0400
++++ xbase64-3.1.2/xbase64/xbexp.cpp 2012-01-05 15:31:01.725312157 -0500
+@@ -38,7 +38,7 @@
+
+ */
+
+-#ifdef __GNU LesserG__
++#ifdef __GNU_LesserG__
+ #pragma implementation "xbexp.h"
+ #endif
+
+diff -up xbase64-3.1.2/xbase64/xbexp.h.lesserg xbase64-3.1.2/xbase64/xbexp.h
+--- xbase64-3.1.2/xbase64/xbexp.h.lesserg 2006-07-17 12:54:50.000000000 -0400
++++ xbase64-3.1.2/xbase64/xbexp.h 2012-01-05 15:31:01.726312148 -0500
+@@ -42,7 +42,7 @@
+ #ifndef __XB_EXP_H__
+ #define __XB_EXP_H__
+
+-#ifdef __GNU LesserG__
++#ifdef __GNU_LesserG__
+ #pragma interface
+ #endif
+
+diff -up xbase64-3.1.2/xbase64/xbfile.cpp.lesserg xbase64-3.1.2/xbase64/xbfile.cpp
+--- xbase64-3.1.2/xbase64/xbfile.cpp.lesserg 2006-07-17 12:54:42.000000000 -0400
++++ xbase64-3.1.2/xbase64/xbfile.cpp 2012-01-05 15:31:01.727312139 -0500
+@@ -39,7 +39,7 @@
+
+ */
+
+-#ifdef __GNU LesserG__
++#ifdef __GNU_LesserG__
+ #pragma implementation "xbfile.h"
+ #endif
+
+diff -up xbase64-3.1.2/xbase64/xbfile.h.lesserg xbase64-3.1.2/xbase64/xbfile.h
+--- xbase64-3.1.2/xbase64/xbfile.h.lesserg 2006-07-17 12:54:50.000000000 -0400
++++ xbase64-3.1.2/xbase64/xbfile.h 2012-01-05 15:31:01.728312130 -0500
+@@ -45,7 +45,7 @@
+ #ifndef __XB_FILE_H__
+ #define __XB_FILE_H__
+
+-#ifdef __GNU LesserG__
++#ifdef __GNU_LesserG__
+ #pragma interface
+ #endif
+
+diff -up xbase64-3.1.2/xbase64/xbfilter.cpp.lesserg xbase64-3.1.2/xbase64/xbfilter.cpp
+--- xbase64-3.1.2/xbase64/xbfilter.cpp.lesserg 2006-07-17 12:54:42.000000000 -0400
++++ xbase64-3.1.2/xbase64/xbfilter.cpp 2012-01-05 15:31:01.729312120 -0500
+@@ -38,7 +38,7 @@
+
+ */
+
+-#ifdef __GNU LesserG__
++#ifdef __GNU_LesserG__
+ #pragma implementation "xbfilter.h"
+ #endif
+
+diff -up xbase64-3.1.2/xbase64/xbfilter.h.lesserg xbase64-3.1.2/xbase64/xbfilter.h
+--- xbase64-3.1.2/xbase64/xbfilter.h.lesserg 2006-07-17 12:54:50.000000000 -0400
++++ xbase64-3.1.2/xbase64/xbfilter.h 2012-01-05 15:31:01.731312101 -0500
+@@ -44,7 +44,7 @@
+ #ifndef __XB_FILTER_H__
+ #define __XB_FILTER_H__
+
+-#ifdef __GNU LesserG__
++#ifdef __GNU_LesserG__
+ #pragma interface
+ #endif
+
+diff -up xbase64-3.1.2/xbase64/xbindex.cpp.lesserg xbase64-3.1.2/xbase64/xbindex.cpp
+--- xbase64-3.1.2/xbase64/xbindex.cpp.lesserg 2006-07-17 12:54:42.000000000 -0400
++++ xbase64-3.1.2/xbase64/xbindex.cpp 2012-01-05 15:31:01.732312092 -0500
+@@ -37,7 +37,7 @@
+ USA
+ */
+
+-#ifdef __GNU LesserG__
++#ifdef __GNU_LesserG__
+ #pragma implementation "xbindex.h"
+ #endif
+
+diff -up xbase64-3.1.2/xbase64/xbindex.h.lesserg xbase64-3.1.2/xbase64/xbindex.h
+--- xbase64-3.1.2/xbase64/xbindex.h.lesserg 2006-07-17 12:54:50.000000000 -0400
++++ xbase64-3.1.2/xbase64/xbindex.h 2012-01-05 15:31:01.733312083 -0500
+@@ -43,7 +43,7 @@
+ #ifndef __XB_INDEX_H__
+ #define __XB_INDEX_H__
+
+-#ifdef __GNU LesserG__
++#ifdef __GNU_LesserG__
+ #pragma interface
+ #endif
+
+diff -up xbase64-3.1.2/xbase64/xblock.cpp.lesserg xbase64-3.1.2/xbase64/xblock.cpp
+--- xbase64-3.1.2/xbase64/xblock.cpp.lesserg 2012-01-05 15:31:01.696312427 -0500
++++ xbase64-3.1.2/xbase64/xblock.cpp 2012-01-05 15:31:01.734312074 -0500
+@@ -42,7 +42,7 @@
+ USA
+ */
+
+-#ifdef __GNU LesserG__
++#ifdef __GNU_LesserG__
+ #pragma implementation "xblock.h"
+ #endif
+
+diff -up xbase64-3.1.2/xbase64/xblock.h.lesserg xbase64-3.1.2/xbase64/xblock.h
+--- xbase64-3.1.2/xbase64/xblock.h.lesserg 2006-07-17 12:54:50.000000000 -0400
++++ xbase64-3.1.2/xbase64/xblock.h 2012-01-05 15:31:01.735312065 -0500
+@@ -44,7 +44,7 @@
+ #ifndef __XB_XBLOCK_H__
+ #define __XB_XBLOCK_H__
+
+-#ifdef __GNU LesserG__
++#ifdef __GNU_LesserG__
+ #pragma interface
+ #endif
+
+diff -up xbase64-3.1.2/xbase64/xbndx.cpp.lesserg xbase64-3.1.2/xbase64/xbndx.cpp
+--- xbase64-3.1.2/xbase64/xbndx.cpp.lesserg 2006-07-17 12:54:42.000000000 -0400
++++ xbase64-3.1.2/xbase64/xbndx.cpp 2012-01-05 15:31:01.737312045 -0500
+@@ -36,7 +36,7 @@
+
+ */
+
+-#ifdef __GNU LesserG__
++#ifdef __GNU_LesserG__
+ #pragma implementation "xbndx.h"
+ #endif
+
+diff -up xbase64-3.1.2/xbase64/xbndx.h.lesserg xbase64-3.1.2/xbase64/xbndx.h
+--- xbase64-3.1.2/xbase64/xbndx.h.lesserg 2006-07-17 12:54:50.000000000 -0400
++++ xbase64-3.1.2/xbase64/xbndx.h 2012-01-05 15:31:01.738312036 -0500
+@@ -41,7 +41,7 @@
+ #ifndef __XB_NDX_H__
+ #define __XB_NDX_H__
+
+-#ifdef __GNU LesserG__
++#ifdef __GNU_LesserG__
+ #pragma interface
+ #endif
+
+diff -up xbase64-3.1.2/xbase64/xbntx.cpp.lesserg xbase64-3.1.2/xbase64/xbntx.cpp
+--- xbase64-3.1.2/xbase64/xbntx.cpp.lesserg 2006-07-17 12:54:42.000000000 -0400
++++ xbase64-3.1.2/xbase64/xbntx.cpp 2012-01-05 15:31:01.740312018 -0500
+@@ -40,7 +40,7 @@
+ USA
+ */
+
+-#ifdef __GNU LesserG__
++#ifdef __GNU_LesserG__
+ #pragma implementation "xbntx.h"
+ #endif
+
+diff -up xbase64-3.1.2/xbase64/xbntx.h.lesserg xbase64-3.1.2/xbase64/xbntx.h
+--- xbase64-3.1.2/xbase64/xbntx.h.lesserg 2006-07-17 12:54:50.000000000 -0400
++++ xbase64-3.1.2/xbase64/xbntx.h 2012-01-05 15:31:01.741312009 -0500
+@@ -42,7 +42,7 @@
+ #ifndef __XB_NTX_H__
+ #define __XB_NTX_H__
+
+-#ifdef __GNU LesserG__
++#ifdef __GNU_LesserG__
+ #pragma interface
+ #endif
+
+diff -up xbase64-3.1.2/xbase64/xbstring.cpp.lesserg xbase64-3.1.2/xbase64/xbstring.cpp
+--- xbase64-3.1.2/xbase64/xbstring.cpp.lesserg 2006-07-17 12:54:42.000000000 -0400
++++ xbase64-3.1.2/xbase64/xbstring.cpp 2012-01-05 15:31:01.742312000 -0500
+@@ -38,7 +38,7 @@
+
+ */
+
+-#ifdef __GNU LesserG__
++#ifdef __GNU_LesserG__
+ #pragma implementation "xbstring.h"
+ #endif
+
+diff -up xbase64-3.1.2/xbase64/xbstring.h.lesserg xbase64-3.1.2/xbase64/xbstring.h
+--- xbase64-3.1.2/xbase64/xbstring.h.lesserg 2006-07-17 12:54:50.000000000 -0400
++++ xbase64-3.1.2/xbase64/xbstring.h 2012-01-05 15:31:01.743311990 -0500
+@@ -41,7 +41,7 @@
+ #ifndef __XBSTRING_H__
+ #define __XBSTRING_H__
+
+-#ifdef __GNU LesserG__
++#ifdef __GNU_LesserG__
+ #pragma interface
+ #endif
+
diff --git a/dev-db/xbase/files/xbase-3.1.2-outofsource.patch b/dev-db/xbase/files/xbase-3.1.2-outofsource.patch
new file mode 100644
index 000000000000..87094a8b429a
--- /dev/null
+++ b/dev-db/xbase/files/xbase-3.1.2-outofsource.patch
@@ -0,0 +1,52 @@
+ bin/Makefile.am | 2 +-
+ examples/Makefile.am | 2 +-
+ libtest/Makefile.am | 2 +-
+ xbase64/Makefile.am | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/bin/Makefile.am b/bin/Makefile.am
+index 43c8333..ca49ca1 100755
+--- a/bin/Makefile.am
++++ b/bin/Makefile.am
+@@ -1,5 +1,5 @@
+
+-INCLUDES= -I$(topdir)
++INCLUDES= -I$(top_srcdir)
+ LDADD = -L$(topdir)/xbase64 -lxbase64
+
+ INSTALL_PROGRAM = @INSTALL@
+diff --git a/examples/Makefile.am b/examples/Makefile.am
+index 248b1ec..85adbf3 100755
+--- a/examples/Makefile.am
++++ b/examples/Makefile.am
+@@ -1,5 +1,5 @@
+
+-INCLUDES= -I$(topdir) $(all_includes)
++INCLUDES= -I$(top_srcdir) $(all_includes)
+ LDADD = -L$(topdir)/xbase64 -lxbase64
+
+ # for shadow passwords override the value
+diff --git a/libtest/Makefile.am b/libtest/Makefile.am
+index 9e84830..1b73af1 100755
+--- a/libtest/Makefile.am
++++ b/libtest/Makefile.am
+@@ -1,5 +1,5 @@
+
+-INCLUDES= -I$(topdir)
++INCLUDES= -I$(top_srcdir)
+ LDADD = -L$(topdir)/xbase64 -lxbase64
+
+ INSTALL_PROGRAM = @INSTALL@
+diff --git a/xbase64/Makefile.am b/xbase64/Makefile.am
+index b0dff24..857aa82 100755
+--- a/xbase64/Makefile.am
++++ b/xbase64/Makefile.am
+@@ -25,7 +25,7 @@
+ #
+ #
+
+-INCLUDES = -I$(topdir)
++INCLUDES = -I$(top_srcdir)
+
+ lib_LTLIBRARIES = libxbase64.la
+
diff --git a/dev-db/xbase/files/xbase-3.1.2-xbnode.patch b/dev-db/xbase/files/xbase-3.1.2-xbnode.patch
new file mode 100644
index 000000000000..98488453cc84
--- /dev/null
+++ b/dev-db/xbase/files/xbase-3.1.2-xbnode.patch
@@ -0,0 +1,9 @@
+diff -up xbase64-3.1.2/xbase64/xbnode.cpp.BAD xbase64-3.1.2/xbase64/xbnode.cpp
+--- xbase64-3.1.2/xbase64/xbnode.cpp.BAD 2009-08-19 23:10:38.444059289 -0400
++++ xbase64-3.1.2/xbase64/xbnode.cpp 2009-08-19 23:10:47.348202984 -0400
+@@ -1,4 +1,4 @@
+-#include "xbNode.h"
++#include "xbnode.h"
+
+ void xbNodeLink::AddNode(xbNodeLink* node)
+ {
diff --git a/dev-db/xbase/metadata.xml b/dev-db/xbase/metadata.xml
new file mode 100644
index 000000000000..40a7cde10e6d
--- /dev/null
+++ b/dev-db/xbase/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="sourceforge">xdb</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-db/xbase/xbase-3.1.2.ebuild b/dev-db/xbase/xbase-3.1.2.ebuild
new file mode 100644
index 000000000000..c38abe5a5f24
--- /dev/null
+++ b/dev-db/xbase/xbase-3.1.2.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools
+
+DESCRIPTION="xbase (i.e. dBase, FoxPro, etc.) compatible C++ class library"
+HOMEPAGE="https://sourceforge.net/projects/xdb/ http://linux.techass.com/projects/xdb/"
+SRC_URI="mirror://sourceforge/xdb/${PN}64-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm hppa ppc ppc64 x86 ~x86-fbsd"
+IUSE="doc static-libs"
+
+S="${WORKDIR}"/${PN}64-${PV}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-fixconfig.patch
+ "${FILESDIR}"/${P}-gcc44.patch
+ "${FILESDIR}"/${PN}-2.0.0-ppc.patch
+ "${FILESDIR}"/${P}-xbnode.patch
+ "${FILESDIR}"/${P}-lesserg.patch
+ "${FILESDIR}"/${P}-outofsource.patch
+ "${FILESDIR}"/${P}-gcc47.patch
+ "${FILESDIR}"/${P}-gcc-version.patch
+ "${FILESDIR}"/${P}-gcc6.patch
+ "${FILESDIR}"/${P}-gcc7.patch
+)
+
+src_prepare() {
+ default
+ mv configure.in configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ if use doc; then
+ HTML_DOCS+=( html/. )
+ if [[ -e examples/.libs ]] ; then
+ rm -r examples/.libs || die
+ fi
+ dodoc -r examples
+ fi
+
+ default
+ find "${D}" -name '*.la' -delete || die
+
+ if use doc; then
+ rm "${ED%/}"/usr/share/doc/${PF}/html/copying.lib || die
+ rm "${ED%/}"/usr/share/doc/${PF}/html/Makefile{,.in,.am} || die
+ fi
+
+ # media-tv/linuxtv-dvb-apps collision, bug #208596
+ mv "${ED%/}"/usr/bin/{,${PN}-}zap || die
+}
diff --git a/dev-db/xbsql-0.11-r2 b/dev-db/xbsql-0.11-r2
deleted file mode 100644
index a9c5e910e796..000000000000
--- a/dev-db/xbsql-0.11-r2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=>=dev-db/xbase-3.1.2 sys-libs/readline sys-devel/automake sys-devel/libtool >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=An SQL Wrapper for the XBase library
-EAPI=4
-HOMEPAGE=http://www.rekallrevealed.org/
-IUSE=doc static-libs
-KEYWORDS=amd64 ppc x86
-LICENSE=GPL-2
-RDEPEND=>=dev-db/xbase-3.1.2 sys-libs/readline
-SLOT=0
-SRC_URI=http://www.rekallrevealed.org/packages/xbsql-0.11.tgz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 autotools-utils 5a4611dfba155b1659528663fad4cd5e desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=d7aa52c11504199386868466aaba4404
diff --git a/dev-db/xbsql/Manifest b/dev-db/xbsql/Manifest
new file mode 100644
index 000000000000..205736fe8cb8
--- /dev/null
+++ b/dev-db/xbsql/Manifest
@@ -0,0 +1,7 @@
+AUX xbsql-0.11-autotools.patch 495 BLAKE2B cf8c5a035783f9f742e8b491d1311870eb24f6da82cbafe18ffa1a7809b1f1e54c5330a3dbe09a00c3116c91af66f4d04c4f1038695e844ae44359b6c7e11b5a SHA512 fd5ecfbf5a63393147e305bfa1704848f807f97f0af4c03bdae7ad6be9085a4bd97724fa59aeec903d3020a01f42cd29440b619705d7678d153e8c4a3e59f450
+AUX xbsql-0.11-bfr-overflow.patch 3015 BLAKE2B 936dd846ef6b9781ea29357bc920f9a29e2aeb4aa5e63034d610d41caa1746afda777207f49fd7e8806e8c809a405aa889c07150d278bb3e695548ef073f9c27 SHA512 37d4f541fa7e85a9297e19d3793f97d80acef07a9131e35ed7dfa5e277aa646463aafe731c47885251171318edca141bfc2b8304a971db7804f3f0a1eb66d329
+AUX xbsql-0.11-ncurses64.patch 542 BLAKE2B 9ca86a1e805f0ac001259d738057d90ee4cd7a082577d1581a4668888b75af7db8507d330fd72e8aca062078d2d147a77a586d6b9fa6887d1ef3c2226b8d7f1a SHA512 64148cab80c3d5bc0209e31c0885ea69d3124dc8ad11c57706b71aafe926451928610aeb5dab6639b5a405bcba07d1a3e4588224293d3e4343f76eb194d3aec8
+AUX xbsql-0.11-xbase64.patch 2076 BLAKE2B 011809c0c8594fd49174608fd57709fa1f7bdb98acd4981823683e8d7b6decfa008fe32104fec462c4ebaa884a49ab9727e643031961ec217ef4b74a92c67a06 SHA512 9b1848156f0629a486510a87077c55548b338206331dbf2b7011487ba04bf7986f73b160505defe319b0144cbf617882da760de8f355b81c757166a603931ef3
+DIST xbsql-0.11.tgz 307392 BLAKE2B 1be4352208d95f9f451c59cba6494db2399ed93c937d2494f0877ee6866d1d679732eddd244d467118b70e303380b7eb212bf3fad0a5180e04ab62746d7e4ac3 SHA512 caf8a6d8191f7de860008e5ac2628e388097b05999887ec52b91684f6577dd3152dfa164b71a37d84ef70f43ab868dd02b30bc76c88208d4daa85d8e111ea3a4
+EBUILD xbsql-0.11-r2.ebuild 821 BLAKE2B bedeeb865930696b3b20a88d395ba53bc1afcaf3ebebb541ce2e0f351808979078f097a047343ea6fb46f8a7d1068c69b2fad049b2923394035c92f7b9122db9 SHA512 74b5d612ace30243ab726c2f424d940d4d4e4f00226a0d926aa58e875b2b5fef6bc3a463da6bb3cc2ba61b7398d3507598ad96352e27fb27cb06e70fab92ece1
+MISC metadata.xml 166 BLAKE2B c254f1fb642881aba57637be14fb0a89b10384f91a128feaec3a8c870d76efc2cbacb92caccc0dee2dd19a5ac5eaf8643080dafa05c4e2ac96a68568927e5afd SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84
diff --git a/dev-db/xbsql/files/xbsql-0.11-autotools.patch b/dev-db/xbsql/files/xbsql-0.11-autotools.patch
new file mode 100644
index 000000000000..b1e72562b397
--- /dev/null
+++ b/dev-db/xbsql/files/xbsql-0.11-autotools.patch
@@ -0,0 +1,18 @@
+ xbsql/Makefile.am | 7 +------
+ 1 files changed, 1 insertions(+), 6 deletions(-)
+
+diff --git a/xbsql/Makefile.am b/xbsql/Makefile.am
+index c281358..5a09198 100644
+--- a/xbsql/Makefile.am
++++ b/xbsql/Makefile.am
+@@ -1,9 +1,4 @@
+-DEBUG = -g
+-CC = g++
+-CFLAGS = -UNO_READLINE -I/usr/local/include $(DEBUG)
+-CXXFLAGS = -UNO_READLINE -I/usr/local/include $(DEBUG)
+-LDFLAGS = $(DEBUG)
+-INCLUDE = -I/usr/local/include
++CC = $(CXX)
+
+ lib_LTLIBRARIES = libxbsql.la
+ bin_PROGRAMS = xql
diff --git a/dev-db/xbsql/files/xbsql-0.11-bfr-overflow.patch b/dev-db/xbsql/files/xbsql-0.11-bfr-overflow.patch
new file mode 100644
index 000000000000..1615fb4d4389
--- /dev/null
+++ b/dev-db/xbsql/files/xbsql-0.11-bfr-overflow.patch
@@ -0,0 +1,79 @@
+ xbsql/xb_fieldset.cpp | 6 +++---
+ xbsql/xbsql.cpp | 20 ++++++++++----------
+ 2 files changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/xbsql/xb_fieldset.cpp b/xbsql/xb_fieldset.cpp
+index ea9e726..f922ed3 100644
+--- a/xbsql/xb_fieldset.cpp
++++ b/xbsql/xb_fieldset.cpp
+@@ -58,10 +58,10 @@ XBSQL::Index
+ if ((fldno < 0) || (fldno >= fieldSet.getNumFields()))
+ return XBSQL::IndexNone ;
+
+- char buff[255] ;
+- strncpy (buff, tabname, sizeof(buff)) ;
++ char buff[256] ;
++ strncpy (buff, tabname, sizeof(buff) - 1) ;
+ strncat (buff, "_", sizeof(buff)) ;
+- strncat (buff, getFieldName(fldno), sizeof(buff)) ;
++ strncat (buff, getFieldName(fldno), sizeof(buff) - strlen(tabname) - 1) ;
+
+ const char *path = xbase->getPath (buff, "ndx") ;
+ int fd = open (path, O_RDONLY) ;
+diff --git a/xbsql/xbsql.cpp b/xbsql/xbsql.cpp
+index 9d07f88..96304c4 100644
+--- a/xbsql/xbsql.cpp
++++ b/xbsql/xbsql.cpp
+@@ -376,9 +376,9 @@ bool XBaseSQL::createTable
+ char name [256] ;
+ xbNdx ndxFile (&dbfFile) ;
+
+- strncpy (name, table, sizeof(name)) ;
++ strncpy (name, table, sizeof(name) - 1) ;
+ strncat (name, "_", sizeof(name)) ;
+- strncat (name, schema[idx].FieldName, sizeof(name)) ;
++ strncat (name, schema[idx].FieldName, sizeof(name) - strlen(table) - 1) ;
+
+ path = getPath (name, "ndx") ;
+ idxflag = index[idx] == XBSQL::IndexUnique ?
+@@ -467,9 +467,9 @@ XBSQLTable *XBaseSQL::openTable
+ {
+ char name[256] ;
+
+- strncpy (name, table, sizeof(name)) ;
++ strncpy (name, table, sizeof(name) - 1) ;
+ strncat (name, "_", sizeof(name)) ;
+- strncat (name, fSet.getFieldName (idx), sizeof(name)) ;
++ strncat (name, fSet.getFieldName (idx), sizeof(name) - strlen(table) - 1) ;
+
+ path = getPath (name, "ndx") ;
+ #ifndef _WIN32
+@@ -873,12 +873,12 @@ bool XBaseSQL::renameTable
+ char _newName[256] ;
+ const char *fname = fSet.getFieldName (idx) ;
+
+- strncpy (_oldName, oldName, sizeof(_oldName)) ;
++ strncpy (_oldName, oldName, sizeof(_oldName) - 1) ;
+ strncat (_oldName, "_", sizeof(_oldName)) ;
+- strncat (_oldName, fname, sizeof(_oldName)) ;
+- strncpy (_newName, newName, sizeof(_newName)) ;
++ strncat (_oldName, fname, sizeof(_oldName) - strlen(oldName) - 1) ;
++ strncpy (_newName, newName, sizeof(_newName) - 1) ;
+ strncat (_newName, "_", sizeof(_newName)) ;
+- strncat (_newName, fname, sizeof(_newName)) ;
++ strncat (_newName, fname, sizeof(_newName) - strlen(newName) - 1) ;
+
+ oldAnon = getPath (_oldName, "ndx") ;
+ newAnon = getPath (_newName, "ndx") ;
+@@ -956,9 +956,9 @@ bool XBaseSQL::dropTable
+ char _idxName[256] ;
+ const char *fname = fSet.getFieldName (idx) ;
+
+- strncpy (_idxName, table, sizeof(_idxName)) ;
++ strncpy (_idxName, table, sizeof(_idxName) - 1) ;
+ strncat (_idxName, "_", sizeof(_idxName)) ;
+- strncat (_idxName, fname, sizeof(_idxName)) ;
++ strncat (_idxName, fname, sizeof(_idxName) - strlen(table) - 1) ;
+
+ tabAnon = getPath (_idxName, "ndx") ;
+
diff --git a/dev-db/xbsql/files/xbsql-0.11-ncurses64.patch b/dev-db/xbsql/files/xbsql-0.11-ncurses64.patch
new file mode 100644
index 000000000000..4c04d2736b0b
--- /dev/null
+++ b/dev-db/xbsql/files/xbsql-0.11-ncurses64.patch
@@ -0,0 +1,19 @@
+--- xbsql-0.11/configure.BAD 2005-08-18 10:34:49.000000000 -0500
++++ xbsql-0.11/configure 2005-08-18 10:36:22.000000000 -0500
+@@ -6977,10 +6977,15 @@
+ if test -f /usr/lib/libncurses.so
+ then
+ curses=ncurses
+-
++ elif test -f /usr/lib64/libncurses.so
++ then
++ curses=ncurses
+ elif test -f /usr/lib/libcurses.so
+ then
+ curses=curses
++ elif test -f /usr/lib64/libcurses.so
++ then
++ curses=curses
+ else
+ { { echo "$as_me:6985: error: No (n)curses installation" >&5
+ echo "$as_me: error: No (n)curses installation" >&2;}
diff --git a/dev-db/xbsql/files/xbsql-0.11-xbase64.patch b/dev-db/xbsql/files/xbsql-0.11-xbase64.patch
new file mode 100644
index 000000000000..6d51cbaf06fc
--- /dev/null
+++ b/dev-db/xbsql/files/xbsql-0.11-xbase64.patch
@@ -0,0 +1,66 @@
+diff -up xbsql-0.11/xbsql/Makefile.am.BAD xbsql-0.11/xbsql/Makefile.am
+--- xbsql-0.11/xbsql/Makefile.am.BAD 2009-08-19 23:32:27.481185284 -0400
++++ xbsql-0.11/xbsql/Makefile.am 2009-08-19 23:32:47.157206308 -0400
+@@ -17,10 +17,10 @@ libxbsql_la_SOURCES = xb_value.cpp xb_el
+ xb_assignlist.cpp xb_create.cpp \
+ xbsql.tab.c xb_datetime.cpp
+
+-libxbsql_la_LDFLAGS = -lxbase $(DEBUG)
++libxbsql_la_LIBADD = -lxbase64
+
+ xql_SOURCES = xql.cpp
+-xql_LDADD = -lxbase -lreadline -l$(CURSES) ./libxbsql.la
++xql_LDADD = -lxbase64 -lreadline -l$(CURSES) ./libxbsql.la
+
+ #
+ #
+diff -up xbsql-0.11/xbsql/Makefile.in.BAD xbsql-0.11/xbsql/Makefile.in
+--- xbsql-0.11/xbsql/Makefile.in.BAD 2009-08-19 23:32:54.384058775 -0400
++++ xbsql-0.11/xbsql/Makefile.in 2009-08-19 23:33:03.928059382 -0400
+@@ -108,10 +108,10 @@ libxbsql_la_SOURCES = xb_value.cpp xb_el
+ xbsql.tab.c xb_datetime.cpp
+
+
+-libxbsql_la_LDFLAGS = -lxbase $(DEBUG)
++libxbsql_la_LIBADD = -lxbase64
+
+ xql_SOURCES = xql.cpp
+-xql_LDADD = -lxbase -lreadline -l$(CURSES) ./libxbsql.la
++xql_LDADD = -lxbase64 -lreadline -l$(CURSES) ./libxbsql.la
+
+
+ #install-data-hook:
+diff -up xbsql-0.11/xbsql/xbsql.cpp.BAD xbsql-0.11/xbsql/xbsql.cpp
+--- xbsql-0.11/xbsql/xbsql.cpp.BAD 2009-08-19 23:34:23.880063863 -0400
++++ xbsql-0.11/xbsql/xbsql.cpp 2009-08-19 23:34:47.393184432 -0400
+@@ -207,7 +207,7 @@ void XBaseSQL::setError
+ break ;
+
+ default :
+- e = xbStrError (rc) ;
++ e = GetErrorMessage (rc) ;
+ break ;
+ }
+
+@@ -230,7 +230,7 @@ void XBaseSQL::setError
+ char t[1024] ;
+ va_list aptr ;
+
+- strcpy (t, xbStrError (rc)) ;
++ strcpy (t, GetErrorMessage (rc)) ;
+ strcat (t, ": ") ;
+ int l = strlen(t) ;
+
+diff -up xbsql-0.11/xbsql/xbsql.h.BAD xbsql-0.11/xbsql/xbsql.h
+--- xbsql-0.11/xbsql/xbsql.h.BAD 2009-08-19 23:35:45.087088919 -0400
++++ xbsql-0.11/xbsql/xbsql.h 2009-08-19 23:34:06.949184421 -0400
+@@ -43,8 +43,7 @@ XBSQL_API int strncasecmp (const char *s
+
+ #endif
+
+-#include <xbase/xbase.h>
+-#include <xbase/xbexcept.h>
++#include <xbase64/xbase64.h>
+
+ class XBaseSQL ;
+ class XBSQLTable ;
diff --git a/dev-db/xbsql/metadata.xml b/dev-db/xbsql/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/dev-db/xbsql/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/dev-db/xbsql/xbsql-0.11-r2.ebuild b/dev-db/xbsql/xbsql-0.11-r2.ebuild
new file mode 100644
index 000000000000..53f79773ed13
--- /dev/null
+++ b/dev-db/xbsql/xbsql-0.11-r2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+AUTOTOOLS_AUTORECONF=yes
+
+inherit autotools-utils
+
+DESCRIPTION="An SQL Wrapper for the XBase library"
+HOMEPAGE="http://www.rekallrevealed.org/"
+SRC_URI="http://www.rekallrevealed.org/packages/${P}.tgz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 ppc x86"
+IUSE="doc static-libs"
+
+RDEPEND="
+ >=dev-db/xbase-3.1.2
+ sys-libs/readline"
+DEPEND="${RDEPEND}
+ sys-devel/automake
+ sys-devel/libtool"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-ncurses64.patch
+ "${FILESDIR}"/${P}-xbase64.patch
+ "${FILESDIR}"/${P}-autotools.patch
+ "${FILESDIR}"/${P}-bfr-overflow.patch
+)
+
+DOCS=( AUTHORS Announce ChangeLog INSTALL README TODO )
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+src_install() {
+ autotools-utils_src_install
+ use doc && dohtml doc/*
+}