summaryrefslogtreecommitdiff
path: root/sys-libs/db
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-libs/db
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-libs/db')
-rw-r--r--sys-libs/db/Manifest88
-rw-r--r--sys-libs/db/db-1.85-r3.ebuild50
-rw-r--r--sys-libs/db/db-3.2.9_p2.ebuild182
-rw-r--r--sys-libs/db/db-4.2.52_p5-r1.ebuild165
-rw-r--r--sys-libs/db/db-4.3.29_p1-r1.ebuild168
-rw-r--r--sys-libs/db/db-4.4.20_p4-r1.ebuild162
-rw-r--r--sys-libs/db/db-4.5.20_p2-r1.ebuild175
-rw-r--r--sys-libs/db/db-4.6.21_p4.ebuild168
-rw-r--r--sys-libs/db/db-4.7.25_p4.ebuild159
-rw-r--r--sys-libs/db/db-4.8.30-r2.ebuild180
-rw-r--r--sys-libs/db/db-5.1.29-r1.ebuild203
-rw-r--r--sys-libs/db/db-5.3.28-r2.ebuild232
-rw-r--r--sys-libs/db/db-5.3.28-r3.ebuild234
-rw-r--r--sys-libs/db/db-6.0.35-r1.ebuild232
-rw-r--r--sys-libs/db/db-6.0.35.ebuild230
-rw-r--r--sys-libs/db/db-6.1.29-r1.ebuild232
-rw-r--r--sys-libs/db/db-6.1.29.ebuild230
-rw-r--r--sys-libs/db/db-6.2.23-r1.ebuild237
-rw-r--r--sys-libs/db/db-6.2.23.ebuild235
-rw-r--r--sys-libs/db/db-6.2.32-r1.ebuild237
-rw-r--r--sys-libs/db/db-6.2.32.ebuild235
-rw-r--r--sys-libs/db/files/db-1.85-gentoo-paths.patch29
-rw-r--r--sys-libs/db/files/db-3.2.9-fix-dep-link.patch26
-rw-r--r--sys-libs/db/files/db-3.2.9-gcc43.patch16
-rw-r--r--sys-libs/db/files/db-4.0.14-fix-dep-link.patch38
-rw-r--r--sys-libs/db/files/db-4.2-jni-check-prefix-first.patch30
-rw-r--r--sys-libs/db/files/db-4.2-libtool.patch20
-rw-r--r--sys-libs/db/files/db-4.2-listen-to-java-options.patch10
-rw-r--r--sys-libs/db/files/db-4.2.52_p2-TXN.patch68
-rw-r--r--sys-libs/db/files/db-4.3-jni-check-prefix-first.patch30
-rw-r--r--sys-libs/db/files/db-4.3-libtool.patch47
-rw-r--r--sys-libs/db/files/db-4.3-listen-to-java-options.patch10
-rw-r--r--sys-libs/db/files/db-4.3.27-fix-dep-link.patch38
-rw-r--r--sys-libs/db/files/db-4.4-libtool.patch47
-rw-r--r--sys-libs/db/files/db-4.5-libtool.patch47
-rw-r--r--sys-libs/db/files/db-4.6-jni-check-prefix-first.patch30
-rw-r--r--sys-libs/db/files/db-4.6-libtool.patch47
-rw-r--r--sys-libs/db/files/db-4.8-libtool.patch65
-rw-r--r--sys-libs/db/files/db-4.8.24-java-manifest-location.patch12
-rw-r--r--sys-libs/db/files/db-4.8.30-rename-atomic-compare-exchange.patch22
-rw-r--r--sys-libs/db/files/db-5.1.29-rename-atomic-compare-exchange.patch22
-rw-r--r--sys-libs/db/files/db-5.2.28-sqlite-configure-path.patch12
-rw-r--r--sys-libs/db/files/db-6.0.20-test-link.patch38
-rw-r--r--sys-libs/db/files/db-6.0.35-sqlite-configure-path.patch11
-rw-r--r--sys-libs/db/files/db-6.1.19-sqlite-configure-path.patch10
-rw-r--r--sys-libs/db/files/db-6.2-jni-check-prefix-first.patch38
-rw-r--r--sys-libs/db/files/db-6.2.32-jni-check-prefix-first.patch44
-rw-r--r--sys-libs/db/metadata.xml29
48 files changed, 4870 insertions, 0 deletions
diff --git a/sys-libs/db/Manifest b/sys-libs/db/Manifest
new file mode 100644
index 000000000000..1c63b89b0e10
--- /dev/null
+++ b/sys-libs/db/Manifest
@@ -0,0 +1,88 @@
+AUX db-1.85-gentoo-paths.patch 684 SHA256 049052c74c544ac1c1f3b1b91c3e43df76b135c610148212679dfd324470cf2f SHA512 d7e2075a1683c7a04337830730e429c4bf2b5f0bdb49cdc3b625bda83be7cf579f4039204a355f5854c2981b6bd3234767e02bc6a7914e2bcde2a73d698fb914 WHIRLPOOL 272d1acc842c83f9b189deaaf9c38cabc67a0428a21f6b0ff6647899ffb6db7fb4944d18e76884f816baa02ec842d393f5b8c341ef41b820c74adf02d6e86d3a
+AUX db-3.2.9-fix-dep-link.patch 1005 SHA256 57e6f13170db99ba7f2f43aa0c7606085d25094127c63a48b76333c1289f6382 SHA512 42f8a6e495266209d7c9bf35bfba801abddffb10488b7b156a790bacdf8fe2d3d3113d8d0a1afddeca238736f64cf8a881141d181fd4a211e4b04da9ed010587 WHIRLPOOL d01855996c76b18793a6cb68ddfab8f3e9a439a13267c41299be13a294469f56d3842a418600475861181b97e90472e800696745068ffb3f47ccbccd74578513
+AUX db-3.2.9-gcc43.patch 441 SHA256 102ac694f32719deabbefdcfbecd96a255b8a6cdc312095fb537cf99ca6b9d77 SHA512 17d44ae357337d938bbe296b519efc03b914792ce4440936c1178b09dbb21783034e16f4fb2ff03443b00e8af530afc0fce778a937b06f0ba8c598b02cbc989c WHIRLPOOL 89f49f22f7c89d8989b002dc1f9469216666d2e79aaf724f4849b30a05eb108e1c1e4a286b60e2331e6fad7139b74c28eb6eaa93fe16358bf7d29928907c990e
+AUX db-4.0.14-fix-dep-link.patch 1119 SHA256 ea2324490dcc36199e0b441f183e05768965c358ba2e5e963753e0aaf29525c1 SHA512 5c7895d8c284c5b9c2305319e20afb8b98a43974bb2ff16012ab322abf131e0d050632fd7c67a0dad47df719da2c53316c6a36f5b6686196cd1b27ced3dae7c4 WHIRLPOOL b394d0bc636b86fae921cc4825d99b8cd11634b3d1590fd8c58af2d9fd2e8db82c108370523c592280638427dc69e529ec728df5c5e3d7b6fed3340d911c839e
+AUX db-4.2-jni-check-prefix-first.patch 1172 SHA256 609eb9d59954effdd229df7622627c639c6a784e8da8131297321a54e808fbe1 SHA512 ab81f0a924f3a763f76ef39dff12035570462e0bbed41d1c58ca41a37a0f647e4348238ea5cebda7e639645f0e160292348e16469ac0be88edfb453158ff3e9c WHIRLPOOL 189349cd3773c73d8e3aafece96c169b5f5531c0a6309a3de6cb5935d7ca0ebbd29ad26d4a65a5016bd2c9265eb9d674d1cbefbf01b602e03b2475bc206e066b
+AUX db-4.2-libtool.patch 665 SHA256 d8584986fd711c736b453fbab9488a0cd535b908035e77554d53e84d316129f4 SHA512 6a0c6fb1a8cb76f84763c2925ad05dc06c521356f02ada61bf627fe855556da61c1c721063181720e300fe7e012b11bb7a85dd55a4c02083d26f21115aacfbfd WHIRLPOOL e0b06269a53717d3079a166b5fd862a9af320f82c8060e698d04e28aff1fc18a66c824c2d6373bba008bcc62c6dab83a3138a388b2039f1bfe2727828e2dc8f4
+AUX db-4.2-listen-to-java-options.patch 312 SHA256 407f9a9d601137cf40824165ac9f2861c450f90dbf263db929d8d2637e67a851 SHA512 04a962a9999f331a97928a580494351b15e4ab2b545aefb0c5351dd4f476a522fd84f108b5161e92ed47ac121e10b1184b4b8d7b682d7b4597d7c425a475ee03 WHIRLPOOL 3dcfc7692b9490c6b723332c4d82ddc6862e510304f574c07819b4909cb89925ceb3db59b46af5dcecf4dd9b43b27e9faec542354b0b573eb169fb3ebb7be91b
+AUX db-4.2.52_p2-TXN.patch 2328 SHA256 acce757ff83adf10853095714a7087047b3f5b6ab1af479baea45fd69a05a681 SHA512 528d85cfa1ec2d803c87f8cc50c00606b4b69eda1460056a548f4f18f3a1667c06eeaaa8672a3192747ca68a6fdde451cd9c45fce625e71161f9855ed92d286d WHIRLPOOL dc33de1cd44c1ba488425b2eaf009257fa8c049cda62e68578940781b5a68786abe3c70fa825c91809ac58f6b88c34f92d6a6dc1a781d8eba8b80e38f4a27c69
+AUX db-4.3-jni-check-prefix-first.patch 1172 SHA256 609eb9d59954effdd229df7622627c639c6a784e8da8131297321a54e808fbe1 SHA512 ab81f0a924f3a763f76ef39dff12035570462e0bbed41d1c58ca41a37a0f647e4348238ea5cebda7e639645f0e160292348e16469ac0be88edfb453158ff3e9c WHIRLPOOL 189349cd3773c73d8e3aafece96c169b5f5531c0a6309a3de6cb5935d7ca0ebbd29ad26d4a65a5016bd2c9265eb9d674d1cbefbf01b602e03b2475bc206e066b
+AUX db-4.3-libtool.patch 2161 SHA256 2ec92f53f9ae5431acfbe4fdaddc5406730b98f3bf372d58f0ad69c69fa16df4 SHA512 52beef4ea2c3e6742efc0331649b53686f052cddf0b8b809a34c9ffc5cd977dd71bfd3bf035708b5174f677d8390065e62807a20b3a3b7c918dd6d336a0541ab WHIRLPOOL a864225d67a9939b2b3d9ecbade53c3386994a8907ad91520421ac45759ba30768ab65ffe61b9633669e690e2c98946e818242235c0c2810e4dce9773bc69b52
+AUX db-4.3-listen-to-java-options.patch 312 SHA256 407f9a9d601137cf40824165ac9f2861c450f90dbf263db929d8d2637e67a851 SHA512 04a962a9999f331a97928a580494351b15e4ab2b545aefb0c5351dd4f476a522fd84f108b5161e92ed47ac121e10b1184b4b8d7b682d7b4597d7c425a475ee03 WHIRLPOOL 3dcfc7692b9490c6b723332c4d82ddc6862e510304f574c07819b4909cb89925ceb3db59b46af5dcecf4dd9b43b27e9faec542354b0b573eb169fb3ebb7be91b
+AUX db-4.3.27-fix-dep-link.patch 1179 SHA256 fc5c59311dadd11dde7ba6b6e975069a52e1ded76fcebe1b76927b79899fe425 SHA512 05f9eb53f01db8e4d36ff3527a5757611def974d2c2a4cc97cdd48ce7bd5e8bd22030cd8d4493374a5ee226a98f4873bf8f75e196897f6c0c9c4e9bdc368d05f WHIRLPOOL 9cd94aa4122be7a420ee6b8be95f5eb3f89ea4dbc77096e3cba69773d5081b198853c58ecd4cc1a4a12004a6faa9eefc853694f13caa80a66159d6d84f6b440b
+AUX db-4.4-libtool.patch 1817 SHA256 7b47ab059b5e9a775e024f6f2562eea136e870a32748675664e5a5315b871b21 SHA512 e22cc040c20f0f52b3a57d0795604b6d469a45a124d3892963c817e533e2d85810630ab286f839bd77c9dc66cc13633fdc57979dd005ec74cc8c6d17ea3d5d3d WHIRLPOOL 6df7ab992e45da4eaf1ecac0c699b9c52cbd405c553f14056f316c1de109e96a688dddfcc1150eaf92619f5d37ef095f66012aa65eae44c9290c525a691839db
+AUX db-4.5-libtool.patch 1817 SHA256 7b47ab059b5e9a775e024f6f2562eea136e870a32748675664e5a5315b871b21 SHA512 e22cc040c20f0f52b3a57d0795604b6d469a45a124d3892963c817e533e2d85810630ab286f839bd77c9dc66cc13633fdc57979dd005ec74cc8c6d17ea3d5d3d WHIRLPOOL 6df7ab992e45da4eaf1ecac0c699b9c52cbd405c553f14056f316c1de109e96a688dddfcc1150eaf92619f5d37ef095f66012aa65eae44c9290c525a691839db
+AUX db-4.6-jni-check-prefix-first.patch 1172 SHA256 bc32845c7da201a4ce7af280a8e734e3fa0267a44657aecb52877f67e29c5c3e SHA512 4cb3a313c1523608003bc58583c07bd7ac4a69e822e21943d9d0968db821058ebfd9984a41e728befb90f781dd64d09413b402ca21ba8c95e5fb22c35bfd4cd6 WHIRLPOOL 269779e645ef7e4d8e8f1a494e054fbbcf8dba63cf2d06f003fb0ee1457647f7cc6ced0346cb5cc41535487223cfc819e7d0383b6c4a77cbf58ba2e7b7ed4935
+AUX db-4.6-libtool.patch 1817 SHA256 7b47ab059b5e9a775e024f6f2562eea136e870a32748675664e5a5315b871b21 SHA512 e22cc040c20f0f52b3a57d0795604b6d469a45a124d3892963c817e533e2d85810630ab286f839bd77c9dc66cc13633fdc57979dd005ec74cc8c6d17ea3d5d3d WHIRLPOOL 6df7ab992e45da4eaf1ecac0c699b9c52cbd405c553f14056f316c1de109e96a688dddfcc1150eaf92619f5d37ef095f66012aa65eae44c9290c525a691839db
+AUX db-4.8-libtool.patch 2076 SHA256 b337c02ffc540e2d692ec57fe093d182f0054a673e5267eabd2db24121486312 SHA512 c2d8c544edefa902d70d762675367da993c48c39566d84ec26ca7ffcba8441414f0cbd6a07bef982c5fa58bd4481cb1e279070552da6d724f644a301543a7199 WHIRLPOOL 1991e449cf2cdb6906f31c0d826cecd0570415c852c9e8321a50e54d5d2a3fc41fc5cf1f740f77e57643be0cee7fcb2d92dd965c048b7f9cae16902e7eb42c3e
+AUX db-4.8.24-java-manifest-location.patch 592 SHA256 1589885b89ff465fe752c3062e322638a39ccf1a96c392473c5424cfcc628aea SHA512 306503befbc76b1b0775adb94185407fbff23f467d474e0ad3b28190edfdb485942d14c3a53a7cde71213f49bc548a7d271fedd95286920ae5c21778e139fec2 WHIRLPOOL 47401345e32fbcb5a221e5c041502f8c58d7de2e0c79723b4a515aba1e5bbb625d9a796b75a6a49cf239e2eae5c3ca8e3dbe2fafac35122e3913e61137facb77
+AUX db-4.8.30-rename-atomic-compare-exchange.patch 836 SHA256 8efa8b37d4dbcbeb73592472be493f23c999616469dda88c6832b9d25f00b813 SHA512 1a4be944b1d41483fb4429a9454a3e9446b41720ff829c0b90b09bc3f9838c798dc3f9e0c918332d0933d6bc62b9b13b3f8251463f1fbddfddbdb341adbaf5ed WHIRLPOOL 58777a9588937dc669e82d541309e571da2ed81515e69b1678aca87cee06fa40a398bcb16a02b29ef182f5b97121e2181b7897b71e33fc93d4b24b9c341be8f9
+AUX db-5.1.29-rename-atomic-compare-exchange.patch 852 SHA256 a9f9e73018a275079e70d5eb9819d09c7c64356b813992a824aef04b268b1be2 SHA512 8ba96cfc3e484a839b8651214f0769b35273c6235de7e53d5118eb0347f5a477f75e3336a12f1399b7748c6b6ab95aec39c8b813d7b227dd61f37ed4ab52f7d5 WHIRLPOOL 1b2745a6b0897f05071e6e2a938655f0e6d575e5877686e67716d79eb9cc26397c57ef517ad59721dfd2534e29f7143eefb3d352b68610bc6d3e863e64adc47b
+AUX db-5.2.28-sqlite-configure-path.patch 906 SHA256 94e36064e3414d644cc1a157c011a80fdf28df66b0da4b7df69d078735d152fe SHA512 ed0e683313f780975b3aec60018b08569ebdd38e4cdf60de170ef0bc4fc63d602e7a5572792f2634f3680e763b74ffdb0a5b484562a10a4b82b28b19c3acc565 WHIRLPOOL d557e9040e05b1543cc1cf8b9a2ab4d033498004924115be37ad781a1765acc740abd230cf44a196aa1072ab63c57044f7fb84e651436d03cbe0cd8055819e6c
+AUX db-6.0.20-test-link.patch 1568 SHA256 cbfa6444aea5927328f1dc8942d082582dbfc0b39b5a93406a310aedfe9b6c3b SHA512 0e091949a071e76439cae4bb37cfdd6c4e4f586c15adbaa6d5d1c9cca5a4982f8e5960d968b41c4368d99556a95b172a6ef1331daf90fb87a77567fc7343f980 WHIRLPOOL e3c66e554c0ae78208508847e90aa922f6b9c30a797049511bfe76da8cec368d5bf3e32369556d2df5a93b40e724da58dac3713ad59ccc8d03adde847beeb116
+AUX db-6.0.35-sqlite-configure-path.patch 764 SHA256 b25282ad2599a980b7e2f7a0a4394af52edf1808dbe4c312f18dc49ce2f92757 SHA512 acb6aa901d62a5c5f4ae22e9d2e0bb89101038a3e91c2d65845cd514cdb0e38c3aa15645701024dc5ed39372850362a24b47faa96a0a81f8149958d8ebabdf17 WHIRLPOOL 69cbe3cfec3f53e5c98a127e765dfc0d6f4885d51df99560b6ee0aac2c7cf181ac3b2a479eb13c2ca338b94e4f75f230542870d5a7d99ff62c0bf365f0560b30
+AUX db-6.1.19-sqlite-configure-path.patch 727 SHA256 638611333e1620b3acae20e0b0ffedb786fcc42065becea0edb0494d0e74e55c SHA512 6d15c1ec5726998001a6dfa6679bd6f55fe70dc16b1cc531709ba49ee962531e3b4e4bd91ac3a5ea0d1b0736632e66269638651e42a3bbf7697785cecb87aff7 WHIRLPOOL 9ca94a1ad48617259096d3d94936b864a1a44744c1638ea5b2f86ae45ddef4487e3c6624048ff3f7659fae5ecd7bcaacf6f9891d2232ff5c7cc6205817e059fe
+AUX db-6.2-jni-check-prefix-first.patch 1302 SHA256 86f6a4498051640c734f3bf76bfb858909a3afb002e25197e09405e31ac3ac5f SHA512 662fb5e1b292dd87b11db7cd071b280863d2cb7c5e1e8ec7149e6ecc5d0db0c40a0b3995503c27ff0dd0d3d5fb274a7f72736058edd2e5b52521048e11253a30 WHIRLPOOL 41b180c4bb9246ced91c6e089b97baa7460ad66b1c24e908a4fdfa2952d52e0a4969da4ba45b3b03bd9acdde87213bc77efc84c63c3b1675302ae47df2f17c98
+AUX db-6.2.32-jni-check-prefix-first.patch 1575 SHA256 e048a375c01bee490e8c45d29e5c7bc2fd205abd6f46b5115ed7fd5066d81b1d SHA512 eb0739c46f88ad9538e4a467e8547f97404747633942ec6b05eabcfb7ba427ff66c00aa5dc95cb9518056b861c240898db4745dd3626ed95e7cb01c54b47dccd WHIRLPOOL 0a3211a5dff586892c6650c836dca42f9b66cfaf3fd52c164d8189442a907c6c3435b1c8a451778adcf1fcfbd4e74f238ef84865029358ec3db9a090035a4fef
+DIST db-1.85-r3.1.patch.bz2 14641 SHA256 88e3095b191fe425d0192d052595ab838ad4ef6324aac0a9e338fd6df7ae40d4 SHA512 32b1810515476758ece7415f241378460a4051bf5ee23fb464748f84a90a56ff2c5119ed93028114d64f1b1691b1c694c2301ff825edd89cdee90a870a68b6f4 WHIRLPOOL 3c3437cd4a6294c2ca6db3b6522c4999d5efd9c1807b499b72bba7534c658349bd7f889912b0dbc4bc017fcc5f6d2062ec112ebf044673802bc0d9476ee26dfb
+DIST db-3.2.9.tar.gz 2085238 SHA256 3eccaec87bca4ca0f5728cf4579650da9d12e331187f1e98321e5c9e9e04b108 SHA512 5f07b27ae0cbd2832e5db9473cd4f2d4aebeee25ed8245ebd2c297a576571635ca5cf75e63e0967b1e90978128a5b6f5d8112559c56927d5bc5eb0d9fd3a2e95 WHIRLPOOL 248641e75420fc353d3ace86b3c65ee8354b073e2dddc7d71c1d2ea4681d81306255077dd7ed322a2b5ad8b87d356fa5aba864e5f24dc956133d563e2bba96bd
+DIST db-4.2.52.tar.gz 4073147 SHA256 72f581d8b91da900434629886d1d1c6ea8b9d2a9329368c3b875e7cd556b6a0e SHA512 47a4e1353fe4f5c2160952a8f7a09b73fdf2dfcd222a8214e12630cec3139a624907bba83a06f10f8492b4dce328a979e9155ee049b9a88798edaca62cfe60d1 WHIRLPOOL 409df946378054ccca9e5f27980f28da410f9dad9ffa7acaf092725779897fe89a2ac7a4add4a7974271e1d82bc9255681fb1b6cde94782feae86b7f73f8e8f7
+DIST db-4.3.29.tar.gz 6103264 SHA256 db3e762d819f9a31bc4ebf5ecada53e9787aeb26fc92fa6064b2ba57df806af4 SHA512 93d36c040b25739b92c52504e117a9c7f4b671463d61d00029e70d0bc8171311f5d04211f7d966b8a9ef8c2a85a5ebe8cc55e4469c3c7c0e468caa4221f691fc WHIRLPOOL 39bdfd19561d676b4feebf8ccc64dea29c783601613e2cf470e050fd3a15b626937243538fe109b1816c936a792ed0014eb5dd5a410699b39413f671dc04f741
+DIST db-4.4.20-20060110-rpc_server-java.tar.gz 158976 SHA256 a1bbc35c4ac3ce1c13de695dd2870cf8bd0f5030a19d4531c1fbf9c95e5fcc78 SHA512 d1f04fe512baa0e5c8a11d765cb9040943ab70258f7d07fbaf579b3442c43ca0dfee56267db7543a71abbbd2f056b80fb5f9d2d8bb83b0f5e5ccebf273280e6f WHIRLPOOL 2e895dd68df9a9ef35a448754d1d49b12a782c53eb7ad7bf7f4f13e42ea7a09676ddeada67bebedd0ae673b454c530d4cbb3ba234ee96bd0df5e11e201df32de
+DIST db-4.4.20.tar.gz 7952742 SHA256 298ab78801f7502016aa2db033b65fab46f323533bdc08610d3dabd910d63b79 SHA512 dea85d0aa3cea0539de2f9819e1ebc8a8aba887614bbbd1710a69dbf2cef3fe262414b8b03deb7325c8bfeb3bbbdc3d5ba35377a73aac5e3c63aa1082d3a579e WHIRLPOOL cf597b0fd688422b0a7828cf101518e5e3bb197e7a8f42e28056745a549da820a9d921b179a2afe6bc698ee0e5166771d636eee2949d62eb649f581e430866dc
+DIST db-4.5.20.tar.gz 9281894 SHA256 f52cd5cea899823dd200d56556f70b33c55e48a33bb7b65ee128968dc10ca82d SHA512 c34907a53323158627971f464c32b9a5b00aff0fa779c67117826ebeea86a4731e272a5dc6dc5ae32f16284ff15c79d93050273795381acaaefd48e18dc2d612 WHIRLPOOL b0fbf20befbcaa1dc4c6c8fa1f190f17cce9d8034d8a3c96c296ec3212e37aaa11ce6d35cdf9dbb64d266b443453d967eb9da530d6c6c9ae8b9bd0ee08c3d352
+DIST db-4.6.21.tar.gz 11881885 SHA256 53ea9c9f03746a0aa415e6706e9c6da18ca18148f20ad1465b182411a7985e21 SHA512 8118218e2eaf9d22e445e551ef184f4610406b81f9257794d14f637d9d12a51a007166b48bf820140c5be287ef61d22a62a16f7702f0d29f385108c40b11ce43 WHIRLPOOL f6011aa40be091a8bbd52981d99d1e41e336bc64b6b89ca69ce0e9d97a6650c2e10d363ea738d3d47b656f290fdaeb8f1a2ed016967182228eb6509253f561b3
+DIST db-4.7.25.tar.gz 13124129 SHA256 f14fd96dd38915a1d63dcb94a63fbb8092334ceba6b5060760427096f631263e SHA512 3a0b2bcb210192c7a37b082fab47a8a32da5e7e91058e18be8fb844c8780088cbd4de6234257750505d5a05864517be03afdad95cb1c549f9743386d6129554b WHIRLPOOL 71ef3aefab84d1ccd782aa948c03bf814eef45b8352837b5d797f781a94652c72f45adf2a114014a78693d27f8ad87c6cd22237b154dc4a8452eba72ee5b2c16
+DIST db-4.8.30.tar.gz 22887305 SHA256 e0491a07cdb21fb9aa82773bbbedaeb7639cbd0e7f96147ab46141e0045db72a SHA512 d1a3c52b0ab54ae3fd6792e6396c9f74d25f36b2eb9e853b67ef9c872508a58c784c7818108d06d184f59601b70cc877916e67dfea6f0ee1ca2b07468c1041f1 WHIRLPOOL 4a9c8b4ca4ff3c94d2c01001911ea7aff824ddff971f99c802eee642bd78882456dca1347bb1ce7add42f402b9bdc3b099775f8b74e81496d1c0ee2bd131eaf3
+DIST db-5.1.29.tar.gz 32188074 SHA256 a943cb4920e62df71de1069ddca486d408f6d7a09ddbbb5637afe7a229389182 SHA512 b3487161cc09dd0aee6117d685d0bc0a58854cf5e96f9e778969a51d3a61b66f8e007b76e584e4ef73f84e07d4418b89c2f6697e34c1ad4072609b11b7b4c5b0 WHIRLPOOL c2c5e335a8ed85f9dd947eb8225148c9633d21f5e17d321a6938b50d4bf061e735563cdbefb8c8aa457923ef80e778f95ad80aba4a92a381432ecf52c2a25353
+DIST db-5.3.28.tar.gz 35090431 SHA256 e0a992d740709892e81f9d93f06daf305cf73fb81b545afe72478043172c3628 SHA512 e91bbe550fc147a8be7e69ade86fdb7066453814971b2b0223f7d17712bd029a8eff5b2b6b238042ff6ec1ffa6879d44cb95c5645a922fee305c26c3eeaee090 WHIRLPOOL ad9042c4509ece1cae42ade4734f69d59a9ec946a85bd486063a7e8f9fa1ae3f925b71f0475fef05a27d33f695ef82ffd06fbaadbd7dc5bfaa77a8caacf9d1dc
+DIST db-6.0.35.tar.gz 36532251 SHA256 24421affa8ae436fe427ae4f5f2d1634da83d3d55a5ad6354a98eeedb825de55 SHA512 002db1553def44efa715095b04b2bac2de7450cdc7142586d1d8b5d8ce79ee5e98f824b3bd276cd586ca932dc51ed35a9ffbed95b2b9847264f262cfa092479d WHIRLPOOL ebbbe7dd0969a36d06c8cc5618a0f61334396b38671b9b1c2523e3d1d3ba687903242acd23999be3efec45e1ea6b9c7f0f9f5acbb54d8d1dc48bba51d196c487
+DIST db-6.1.29.tar.gz 37521943 SHA256 b3c18180e4160d97dd197ba1d37c19f6ea2ec91d31bbfaf8972d99ba097af17d SHA512 ced40e357acd1214f8b5800ddcf084c65c0ab77ca045a4504ac1a4c864035bd50aa8993cd1232174ff81071a36806314807330aa53dcb18de548c886c2a99e73 WHIRLPOOL cf18bd00ff203c5b2ccb39fe87ad307fc9e1cdf45a1db96753c50eaf555b571b3ab77dc52b32c09122956505f366dbdbdcdff094486d7ded21512a3cb873aa42
+DIST db-6.2.23.tar.gz 44305964 SHA256 47612c8991aa9ac2f6be721267c8d3cdccf5ac83105df8e50809daea24e95dc7 SHA512 0aac380673ff4f97a2a6230f135f8151b8d2896a12710f708cd983b5fb95075b55fc2c67af577365e8ec7a32e43357a4f3118e37713d00b227f05eb11b1d12f5 WHIRLPOOL 8a0537da75a5d0d4e0f335a9b27c3767ccab75d0a0f8b2b8b6ccb7483c2f6da02c55b1c14fcda9bdc5bc57fedad6a3c2b81e5d04775cba6d3b42ddcf8266a86e
+DIST db-6.2.32.tar.gz 45342417 SHA256 a9c5e2b004a5777aa03510cfe5cd766a4a3b777713406b02809c17c8e0e7a8fb SHA512 83bdbf18a7b9782409cf4563f8d5f11322d5e564a39946c890604a60440a6ea6361e0236bbc30bd4e8e1de1fa9196b8e815fd126baa035f55c5826c2c6aa3401 WHIRLPOOL 66b2f2ba2e86800b837b9093f3ebf0caeec71ae29b3614aa6b0f908af933539cb6113980049f6c68f63dbfad808fdd530b4f2435bd8ca32611662e384b38885e
+DIST db.1.85.tar.gz 270953 SHA256 4220d4ddeb77fb57ba2f37c1aa105d561d3ef85a6fb89c79c3edd735d0e193c6 SHA512 03bf3a2b0947efdca4e38719542e96378b5eeb57da64d5030dd23ab710773c1826f1c867032d0bea658b7fdd8272db253e97bbc490d198b9437025ffdf9e880e WHIRLPOOL 802346b9fc133f6c9316e987352e8bd8e12792b30b0eae9b4e2b3629c9bc8385ab12244dead428bb824945aab383cd4801de3fc705667797bdf6159066ed1352
+DIST patch.3.2.9.1 2139 SHA256 6d89a42ee0be9e47b3e8a42981c65266a556de84bc6281edcf0f977f52547798 SHA512 f410c43ea4af28a39d8ea47f774d38b53bf1183a34abfcf1f27e253eb61b42f4b5e9f0a3a500e174eb796ea342e6dd50a8bb95ff3eb8ee188461489cc994b8f9 WHIRLPOOL 3a879d5306403739465550ade1fbf53ac62b832fbdf507a204fef13949bc7be9c35ddd972834d3ca74bf17c421791011200556dffd95265eb64849f1d7b647ec
+DIST patch.3.2.9.2 495 SHA256 61db874796fe8789b0045f456285b27c5b8b7b8902a5e342a115456015716d0e SHA512 cc75fef11a641d480beaa2b62201177c72d10c4eb20376b5f15769db6e9e1a0da41c0365d79772af19b4cacdaa9f91dad049c735de9f95b98dcfc4f0b611b557 WHIRLPOOL 1362c32dc16875a97b451ff52415fe4b9e9d37b256a92c7e86c14a52431937352ae55ecee4361459e9036b9bea238c205a8f0d4406ac7e47387a8cda22906879
+DIST patch.4.2.52.1 988 SHA256 98b7580916459ee931b9c7e06dcb9da980732672fe0811714933f366ad97dfa5 SHA512 67b894678503dc394e50b7c6a875ebbd996d6f78acd21858c04ba2cc4aba118f527aa3aae0793cff4e44bcb17b13fb1eb6a3d895e94cb97270d9759be1bb4bdb WHIRLPOOL eb0f038e0be19473ae938afec57aab061ff2e6ef1a5bd55891ab50000889a5e7b8e20220168427fb5edea550e3d852460dfc90ecac0b9c4ca3cb7c95d49621df
+DIST patch.4.2.52.2 1433 SHA256 c9b132bcc8f1c12e03baaf47abd3801f2adf24ffbd56f35a27617fec12654f32 SHA512 93c9463e2a795049473a2799186642185b7e2f94c51efa0412031d134088d129ebcf07e6a5f309d6cb37d9d282d8168276305d7420fb4cff6d7acc38a6ba4f00 WHIRLPOOL 093aba1ce3ecdc72fae6e2050fe1436a8da49ed59aedf17e4f6e5e3a87c860ce6728967a32b0281c703ded4769e1f888a14b6a8806ec48b4fb787155ee68364a
+DIST patch.4.2.52.3 8672 SHA256 ca5245d2e1c7a40df5ec57cbabee8bf0106292c69a37eb0ca275d1aa59061907 SHA512 234bd96b93aec826c97314b41c8b9231c55598213ee8437a6df7efea44e6c1e8e4844db8214a9468d27bae9a588b028c765747493b5d169235e3d06d0cf107b4 WHIRLPOOL c52417393f47e4028472bbf64ac20d799f2d5651077ed2252459ef6aed80a8d04bf2262d4fd35fe8ebf80d7a8604b44214516375800662ca17d6148bb339def0
+DIST patch.4.2.52.4 1311 SHA256 c15c82071c02ce1a10024c572e2e9fd72006089007141a01fdd37b889411b973 SHA512 e2632944d82f5b6dcbbdfc237bdc37d5db736acd0284edfdb51fc0f3a9ca4fc6bcdb412bab325e62fc30d690f6963dfe53e6120cdda65dc403eff89d3a931287 WHIRLPOOL ac6cebc2a007bced6140519bdc2091335f1a824845310b7bc5c8a965d672818ca7d31894ddc6357b40c016b73a14f19d22b583a9b912e1b7a3b000f652ee1d36
+DIST patch.4.2.52.5 839 SHA256 242f1a9c3efdd61a2b738c12617175849dbc73df6a2bf7cff61c814b13905e06 SHA512 5457bc4e433c8f12f34a764fcec1dfc9e832f960f518b21bd9116ec1b1130d9ad12373553e224d844e2b2de254470daf142120ff6d3125683a57f14a42a8e879 WHIRLPOOL ce7c6e3c85182d8eac99468d6a05e0ea0aa09927b7d0a3522706c5806eb8f5e7dfdd5b8724307163861160682e3e9bcf390e547f8a14e15663410997142721b1
+DIST patch.4.3.29.1 835 SHA256 6fbda9c0554cfe3d281161b288f779e7cf2c814f311c69e1c6309b6f97d75931 SHA512 c3dda4de68bff744dac5c96d1533032b2c8e8e0945f1a126b8aacdda322e05d1ec2e364eb7432ea1fb7366424ce155a9e58f84b9bee8e1ab4dd05a3313bcd8f7 WHIRLPOOL e05c4e52c56299a434c8e7259386c84f33f07dca0286c07e8df95cdf5a612df55055c8607ee5e624b59d76c7d988ce01ea03c1b6fb554119eab4f9faeb27cc80
+DIST patch.4.4.20.1 867 SHA256 4eeb18450b88703282251c386405bf7c9efa053a42d1dda97603ee8039ee5869 SHA512 0fd501d219eb3de94c59e7b526c5031bba5dcc7dea4174545db5d688f33a5b4324aadd71e0e4eca3781592da0e90c1481c3b2d8f74612dfdff651c18d10eb2d7 WHIRLPOOL db6c05c1ab2582a55cd6c08dbdb2729ff539b71ac96728509ab58d749ed36dd8dd8f38ab3d15ef8409d66935811d1fb1caf7050856d2d1d1c554191aea7ca2cc
+DIST patch.4.4.20.2 721 SHA256 45949e288482736bbc27bd62c854a99fad4b3e55103897eafd62bce1d5629bbc SHA512 4c497ce01c740c9c32b3a74946638c21b619cf057bbc8acaef24cb9f8d55d0d020d4cbc7775cb0cf07113c44981f076316cea14573fa08b49bc6352770bf5de6 WHIRLPOOL 92fbd4744b769af310a1aa03f932e40e51e0da1a9331a7d60fab565e54388a1e639e8587cbf28897ebe9307b21f4c5d01da07e6a5510a73efa5249e38bc58fad
+DIST patch.4.4.20.3 1366 SHA256 ae54bb752a31655a1a945f12900b740fad397c3e2ddab792ecfd4660d3e6e236 SHA512 2b00acd823342083f0eaaf3b9659c811d05eebba67b39d9a9dbfa4a8fb56cded322e3f9028c57d83c75cb949a79f705cd8584df1630dd8cd3ad22a54c83baa91 WHIRLPOOL f346d372f91ec2ba948f4ceea02aa88c1ea63285963f7681d4f83097336f106d24562092941f67d13ea53a2f4667471e275d12b3a174100a3e61ad81a5dd2846
+DIST patch.4.4.20.4 837 SHA256 7018f74e5184451809f6864172132472e91d95e2bec97ce6124afb67f0d65e59 SHA512 9aa464580cc1b402e594da56cdfc5e4d7c465f125b5f0cb312abbcdf72753bbf9ff14248657e0d354c93d7f1f89c7189e08060242c9a061033bb1016db640ceb WHIRLPOOL b0a2ef5f9fcb642accad061c9c0b8ae3b6713a63266ade97d851c3a84dd07642d80b91c4c601d4d6549697a83d1f02f42b30425221bb68a2a99ed42082f562ae
+DIST patch.4.5.20.1 984 SHA256 f0749a6780cd260fed20b6e961a0d354889ffe84505129d5c81925a4a4dcf6cb SHA512 a8aff6f594e5413436a7ae5afe48286b0d397a247b2cd466f192eb6b4870fc68353c1ec1d0209cdd06640e09090b3d84ddb0fb709f8478ff3823e244c7f6cd3e WHIRLPOOL 6fdb09551a04593af15c18530f0d984e5bc96e09b284525cab23c608c368067642fb7939ba81189c4150f12dcd054af91c097cd5fa779d1ee8166e5eb9031af7
+DIST patch.4.5.20.2 1752 SHA256 232a93565ab1bf34db10f7513b612867bb61e0c012def7f63715800a05d07e6a SHA512 b6af4b73e03b290595b6823e4d5c27da1b1bb5e66721ed5f0c6ecfec6595bcc56281340ec77fe6fb9432397adec0e292b31a5ee9d01870fb2955b8519017ffb7 WHIRLPOOL f99ea354e1ad91579057c1a4f82f3cf8c9c6ef38afc35dd47d7540358d13c5fe94c5f9d735501d909c501e9762cce18667b3534923feddca3f7f0dfabb2ddead
+DIST patch.4.6.21.1 2475 SHA256 d28c0723c465a2cf3ff2ddc5ed3c643b40c955c4e64d56580961f2fd799cbb53 SHA512 9fe4991a59e409cb7df5b507efed7e443c05199b41646ea2d5d52de29513c8d27c2f3bf154a0170f04e12eaee6a622b945ae0f9789c3faaeb2ccea55f7a1ca2d WHIRLPOOL 3110a7172e2596805b1527ff9b9aad37eccd761c8d46e78097c9c058c2f06438851e879dad1f169b207f65a50a3cce225db66e4da638c6b6dca685cda33bc641
+DIST patch.4.6.21.2 892 SHA256 9496a6cad44377ad1fab8c617f17c6f541e3423814663bfa81c3abb4001622d9 SHA512 e8570c0bee7522056f74cea73379fc13dae02258cffa78e540ee1c0433f368b3f856a21dc83017798120b3db7987c09e23af448153f0c024217df41a3e027347 WHIRLPOOL 370b636f0d1299ced97f70ba4d2f8ab8ab9a7e48106a5ce51fa48994bf4774b3f492d08d35369e128dc7975a07999af36b23ffbc741052071aa92162c4c8e93b
+DIST patch.4.6.21.3 1517 SHA256 3f531b18d88ce68ff080761cd62ef621444e675593aa23045d69121cd2c7c638 SHA512 4da65c9414bd04d2efddd7d7855235f1276d827258971bf3ae175c73ab9c1b57a4f089b27e22928d1ed869e4e14cfde2f5e7c6a31ddf63c8dc582d0a2384cfcf WHIRLPOOL 2bc3e1f8a70b9ff743f7007736798e23efbaf3fc0a65089325a02331d2eaa5f3ccec36327f2224a3cc22961304ba7c471af980b49cf756fa5f69cc9e39850872
+DIST patch.4.6.21.4 41501 SHA256 98bb4499dc7408c27a8a855330972a69abd3b29d0ff3820d6e1da790593a5bb7 SHA512 cb7819d7b1742f09af352e7563344abef27f1db1bbf04be049710abd26fb12eda142a08ff3cd3449b0a4a406141e39bbb0535f08bff051efbd261e7fbe5b53be WHIRLPOOL 58edfc65dce80bf2cc985c494ef635a65f70d96b1fc8ed3b62f01ae6bb4c283ab50035fc4dcf7b8925a3b85fafd2ad8f800f12c8f2678ecea21acfae52b37b51
+DIST patch.4.7.25.1 2072 SHA256 e91590af872705efc34414afb702abc630a75c55ba61570dca2216c783e0a83a SHA512 6f8618a3acc7ebc2839d2786d66c85904b8a9805319178175298239a9441550f1c61dda544d7994931e2aa412cdf5c209d8bb2f38207cebca341c556b97b9191 WHIRLPOOL 6723452283c9a487f86793d3580324736083d40424a81e7c5981cb125b44de23ea04e660a6336ff2b376c6fa85dfe97f49bef444b3333aade7232001deae7434
+DIST patch.4.7.25.2 2210 SHA256 05d6cde0ab1bfdb80394a7a88ff7233d0407f0b09103b0dd3791ebfccbbcca31 SHA512 d57746a527574966606955a8ad6b97742ff3979e85a0d087ae0c33b64b4fc2fd854f3ac145e2efc061b3479de5ee8172a02183cf54ada91fce3e331ab948ff18 WHIRLPOOL 63976fafb5a207f732534b501ccffbcd1d552e876b6379f3a1d3559c144c34d77eb5dea5dfb4ffa399a8bbc2f7cd66f2cd04a39cd3cf860f1ed1014083250383
+DIST patch.4.7.25.3 8442 SHA256 e5393cbfc8538cc21cc939d26ceca3e5782b4a4259a644884d91790e18ed39f3 SHA512 815560c45c9c8491fd58d881a0bc1d23a82a13298d4757ed7d2ae4df4b88b278b8e4d6063eb46349a8f6f11ca9aa5b8555f3ce01df025715c2579dfa36241238 WHIRLPOOL 30ffb9d93269543bf4463ac401f41b257c15dd19d301b8703a972d0a29973ccc86a155ac020f753d726c8998891ae349e47620fadc2cecd92cf36cfa09bff54c
+DIST patch.4.7.25.4 5647 SHA256 f55ea01a7905f8439d617717892e03d026c0ac34434c8fa16798fec75e5ba798 SHA512 df9810034773a9d0556cbd174e4f131f0461402bf3f476ae5da1deb92f3e2e9ef789687c5cc5c2df6385f6b14251e893be225ffacd895d71dfb305b9de32567e WHIRLPOOL 4cd00af410e23efbe43b6a8e8734294d829f19522e747c4f502fedc8c3c47adf821c6b9632149ee19ccf082f8067a3cbf20235e513558c397165ee25f2b5283a
+EBUILD db-1.85-r3.ebuild 1317 SHA256 a4eb2b1d973394a0db15c3dcdb7963cbebcd7b05e1f59b52b7d9ce1ea4ee4c43 SHA512 86f94dfcb55449d961e3b25f139ab968ac1091db313b7906a0e3de941cd5da22e86546426dfbae39d4b25c328ad7991b2feaa1d013ac016ede4bbea8f302b2ba WHIRLPOOL 9f5ca60b94c5c3b060d22abe37f117617410ffb8b3ab7f1f0860d414ffe7b62f70ba6f759e38d13f33f673dff9b4bad67b587581fc6a583c406c09dd1eac1c33
+EBUILD db-3.2.9_p2.ebuild 4947 SHA256 e9c04a75c90c264c3953f9069f57a9eec8e3ec96491b0074def6f9098de834c1 SHA512 435dd3a6743369e373b99cca0ed926aad98c91d2d79bce8af3ab97868c1624afd8a9ffc46cc5f1d035289211ceb222bc38fce214df1f358bf62d35cc4b1ec0af WHIRLPOOL f123f21748fbd4754059d4a0b77da3b0714a6fbc546d312e8fcdce411ee90a857511b19b083438579f7030cdcf7d577c191efca4dc7da6277bf84dfb1e992020
+EBUILD db-4.2.52_p5-r1.ebuild 4994 SHA256 a38cc6a1d83c5c84ef1c5acbc6ad0d7daa431cbdab72e3934eb42dadc33bc829 SHA512 facc045c230d6c69dc821b308ad50acea7c64a16438d1d1eb8e09d95fefbb2f03f658f9eb8ca59eb538f66e4eabbedc6899ae94fbe3b4cd37cc69cc2dce54209 WHIRLPOOL 8fec1558863366a5201814eb3b4b366c58abf3becded92f06f28e67faee8663e96ce62b216e9e9d14592cf9bfea1039c1fa122793448a383e792c76f0621a5de
+EBUILD db-4.3.29_p1-r1.ebuild 4953 SHA256 aed78717c2f1b8dd908215ea94a5488bf39443bc933a7d8fedac683b4f17772d SHA512 edbe670abc1da1e80b4375d7c9e6c7f565b44e9b27fa5c1eca525eaadcf266c1c95d6f448fa30403d3f61420fa2d68d2d0966dd3bb95df8069652ad228004d41 WHIRLPOOL a5ed8e895cc1d95e9eb96b3bc1c26ea6b8d63f0032d5693db4f4fa8e070b1321d76a440a851ee6ddb48d83df42c135ff62060089c1e04137083b8f56935fcb28
+EBUILD db-4.4.20_p4-r1.ebuild 4833 SHA256 5d7c2bd0b279ca729ebdc10fb187ccf7cb419d4d506e41f76b7821fbef319320 SHA512 dc4d0d17ae2470cbf294a4e1dfaa2e0d5b3c7eb12131b59bc47eaba11347810a055deeb77e869471529bb31dd442eafeedce7c751386db8ee54a2e0217075531 WHIRLPOOL 3b7acf2b29d4d065e81d874e55d551f9bac71cc0324eb81f0e4df5782ba506857263454551baafeb29940992d291d697b77f1a4a011c1e2e979600f8773bd859
+EBUILD db-4.5.20_p2-r1.ebuild 5112 SHA256 557d822a147891d38e9c4dae48216bfa2a25ebb46945337f574bd569bd4cea07 SHA512 66e0db87939fd8a4d6bf62067b5a4a183086334e617bb479427574b9a99a765b966e3656333db3e2996ad8cec7c47a0f8ca1670927aed5601ab233eb0ea0f854 WHIRLPOOL 88e8a4d973f307b242a3be8c85f070a2ed3c5f9a1637ad980a5aee2c69de7c7860fa45fcf79366678daed058d1076d3b64589ddc3e5b967763b583f51dc4bb1d
+EBUILD db-4.6.21_p4.ebuild 4841 SHA256 db7254fcb936f15d9af00d4b382c8b9eab188ce04be21f651394369c1460fde6 SHA512 4f20a6137342af997730d6d0dc980785b1263fa5b406d4d680c98eddf41d6c520cc83613561f5fe35025bacc6536cd530de48f7da41e4f05bd294a2697ce255c WHIRLPOOL 4f87a6e35d4844c8816c1d13b43e72f705ad7c13904949e119e3adb83ab87c7893b74430a5d12a95072f33a9c6edebf954a0690162a8366387fdfd54f496af58
+EBUILD db-4.7.25_p4.ebuild 4291 SHA256 a3ebe3dd4d854dd924ba87c2801e3082d96f5c33eec4ba88489f52f2a22c9a7e SHA512 7b71c66c36ba09417ea6cf4160a122dbab880a7c09ba008670d5b1c243f4add4537b12df2f21df16ee0de9a175ddd3108bd2b4f333afa489415a8dfe82974dcf WHIRLPOOL 6b2e212679fbea765fa9be6f04bcd747c9fa57a3e58375b9404db4b6596424b38dae1994084a6aea374e61379ebca857e00172836b62a6582adfe048622ed513
+EBUILD db-4.8.30-r2.ebuild 5057 SHA256 fc1844db2f97b13e3655144e272da8c74069766338188609b28ccc44345b173f SHA512 feed5105861a88475d9fca3f3fa2ab0134d1c8dac830d39340754d14178f833c652800b31e729854b186ab106ce3a4eab75982ee48693dbd2ca3fb91a0c66bfe WHIRLPOOL 282e5c710c1a642d667c6951ce601eabb7a80c25d73d33a965eb0e988f3349bd7cfc0a5707c20fcb0c02067fdec5829d2228f4c2ae55efe88c0b4349107afbe5
+EBUILD db-5.1.29-r1.ebuild 5467 SHA256 ba6f9a90643d6d0377309ab363a0bff663921e55a867b49bce9edccfcc4e4919 SHA512 86ed6cf561152f39cb59a76fb547e8f676ef068c564941ea3c675097911d0b5663013d1912be05e6e30c9d1664ebddf11b6c88e24f2cacb5362dedb44c1e4e44 WHIRLPOOL c2b6b53f0a02bd832fb069af4921001501b3f823a0745ee937d6fd4fbb13a8a0e7841928151d71744af8111fbc250f54fafcc823cfa4e26fd7db732a43611257
+EBUILD db-5.3.28-r2.ebuild 6625 SHA256 eab245745d8d042aa4ef96192c23fba34548e0e2be7d03f5129563f80e38134c SHA512 b576eb9cd538faee9056bf40720981a1e0cb6c327f557ab90650386ee688c39014da2d52893dda4943731517d26b18ff5ce9c6514a20225090b4a0c4b5710f8a WHIRLPOOL b6eb0f8a75ada0f94aff9b3364c90573e9d912e6a6e649b63ab58653802f343600050a970b8e8e2dbd9029decdd7718bf0c3b5dd0c1d13db98a25498b216158c
+EBUILD db-5.3.28-r3.ebuild 6730 SHA256 0a312000842790e262eae983fc05be2b332201ae567e666e7a1b035b675d7bd5 SHA512 018f21342ef835a000c9db7fdb19eefbb51e666896b21ac5f390f0c350345711e98459711dd1be6d7f1dfe6be7ccb342acfb4b38f2aefa3d328728553f5ba451 WHIRLPOOL ab4b68ca446f4302763becbee068a896c5fa504e4ef023d4d7aa42bb788541dbdc6492e830ef6d6027418b5364a1795efbd31576bf39baf48a1ff531e33ee69c
+EBUILD db-6.0.35-r1.ebuild 6735 SHA256 da19ac538600a261dc0bc2832a3ad77709e46ab788f9d5b4036f3bf43366408e SHA512 aa6fdd88f9c417c861dfddfdac478cab7198daab0cf3f5e83c691a3e74cf53e87862698ad7901d5d03ce1ca8fc0815dbd8e23d2ca8b7fcffce56b24afdf9e2d2 WHIRLPOOL c899fac75d41ccb4e3fd70a32b34ae7cb687af41afc0c82f2a53ee89bddf02871e806423475f727bc47cd924d2859aeafbee1fa65bf76e2462db7a3dcbabe6aa
+EBUILD db-6.0.35.ebuild 6639 SHA256 654933d0c81961ec1438c9a679361c97647f5c66c9fedd2fa4f27d8b182d7763 SHA512 01be1372da86a8f0fa2d17be22172677c2f36664e12e3febc1c21c1e393cb663116253b348d9eae7490b0e47edf3e0592b007edefa15ae57ad30314dc16807b9 WHIRLPOOL 493642da658ae00437be3e7a4e842e47d278ea72c84f8130101133664af489bf63aed1b251dd7918e858d2040c2de5ed901867f30400973bdc3f65fab05fa92d
+EBUILD db-6.1.29-r1.ebuild 6735 SHA256 c566cc75ac513f93e5cb7248a8746f7f8fd035a93b69bd0b84f255aa6f7618a3 SHA512 0c8379370b4e3ae62020fbd6243ab32e359621c0efe335ed7bd123fcaa1755089d5d29672c9c532a4a163441131a1c97528a49e76287c018ce5428d50bc7fa8f WHIRLPOOL 1fb0d167d15ef01805297a405ce3e3953a662d24621e659cd817834094534db6c2be9123e009772665f2a296a7bd0b2e0ad3c9529c543037c302f1ea522c51d8
+EBUILD db-6.1.29.ebuild 6639 SHA256 88bac910a15d60f3f8e6b7833d213773423076903d2728efee8ee48453a33ee0 SHA512 7d852633a7281ce2f0587f777d8fdeaf5cbbf7dee09784d3a7adc8121c10b336521f5ffe66ba825cd356e83d1274790db4d1c5905ffbdad594254d4a365e81b3 WHIRLPOOL a723adecf804105d7fe93490d4e3ac35e68ccf3bbcf90a792ea31d002a3837c478f1d18bda9417a0206e1d1c0882c3587693f8f93d49e0bf761721dec5924863
+EBUILD db-6.2.23-r1.ebuild 6750 SHA256 454b6e95352c16228d0d3360795deae1a84b93eb0714d143a9739f57f7dbf936 SHA512 dcb8e66457d243ff6a15f08372d2bed5d3e5203a1badae55b275119bcf6168b25cc4f6b3b13d38134343d2a2009dbfd88c70b7ea4e44da6705996033f9ffe42b WHIRLPOOL 03bfef7a48cdd50860c775fcf147eed66f16d712e3ed4b9feb90ddc4e22c26156b6659666091101f9a633c7b8ef64ea5fd4c296b6012687df4a26086e80e3dd9
+EBUILD db-6.2.23.ebuild 6654 SHA256 1c2369d7dba452b59ab9297a687835752ba7b157d8d3d88e3c35a477bf48855a SHA512 dafc35d5d2f996b951d5fb6f4e852001cb3af0c73a966673b8aa5929a44483bb24711d0a3afae93dda45b6161dc9eedee9b752f691bc312f95d99b244586a0cd WHIRLPOOL 00104ddc227df50b2cad23b70abfbc1336c34ec945623876461fafbad8f6422d8928cd807b0478fce5ada477ddd60d455d6a340028322214f6475d71242d6b7e
+EBUILD db-6.2.32-r1.ebuild 6753 SHA256 dfeb11a54b09fd00f45bb81bc301c0e0479fcffa9ba0856b3a6c44cae07eadcd SHA512 44f34a5f04146aed5de7f71d4dd057da93a8c6e3b344e1cc5ace9b99148a906d9c2077bc9437173c6335b33129a8f36b86403879a1007fcf36aeb5738e901252 WHIRLPOOL 5737390c83443b700f7d2d664593ebe184c5560f23499dc9eb3595722e7713fe03d74c78ed92e4f601f8e4d145459dd7695a14e08fd3913b99e2faef9b23d751
+EBUILD db-6.2.32.ebuild 6657 SHA256 65f535b016b332673838aa2d01f5b2224638090303517477e0c821abda6a5a68 SHA512 5e894dbea0ea1f092fd2857a8b5eea9401fe4f6165b061224c47a4ab498a00643ce9d98d7b0b33168e6f64aa0391485a19d2c3ba75186ae722170b0feab31fe9 WHIRLPOOL 61e32261f51c051296dcd6389f36843419bf3b9175069f0200c5835acc8e0f4ca89cfb365e3361e40c49422dc39871160ab7d9b6030c5c8526306c1a1de49738
+MISC ChangeLog 8233 SHA256 d3c2284ec6e4770335e1471b6d7cc61b8df21b82c08991b524b7337ae2fb1cb5 SHA512 d7aed1e70182c3eb2d4884a83d27771752c77001d815d26c323a5166c06fe86b1c52e0993404ef702de9c676d2ef27d8b0d53d1ebcf752fc99a6fcb4b123903c WHIRLPOOL f277ac5a4d197c72830a1fc2d98a13f3618e61031bef5250e5c5501432f3ca9742f320878968aa645ac9f21fa06cc890abc8d0ef0b45d10e83381666e8f318d1
+MISC ChangeLog-2015 61376 SHA256 85e97ee07d139d8984e3b24777b1391f02a723ba9ca8a9f2871d005a963d9378 SHA512 416e427409a130f10b11ad303e5cdd0cb853ddc7a332044e7ff6dbbfe0ed014ba7c283816cdd2d808e7b51b930f8f722223e9379a3444a8d4d18fdfcc0b31991 WHIRLPOOL a872aa1481510417a229c4d44915cefc5ba2b35ca3b92b6566c492d9b733fdb4ff5e45be366b17191bbdda102ddb6bd6c4a94a43ae3cad1c406ac09fcaa26210
+MISC metadata.xml 1323 SHA256 1fc5c9111864abc6567a60798a6dc9428ebf11924d5d3b31e0b5743c1ccb9179 SHA512 36f8b6db241ef960b2ac0f7bd19738066e3daadd90efbf7edc54a4774e491506d69a2207738f53643a3e52f1f35a900e4717747744bd30ca682265f50cb8884c WHIRLPOOL cc923c760d53bf42fd2c90f246ec0ba212852d5a6fab576578becb9a3a1e7133713547edd072b167de3a9f6213fb80d37ebb26e798e2f09b6d00fe467b760744
diff --git a/sys-libs/db/db-1.85-r3.ebuild b/sys-libs/db/db-1.85-r3.ebuild
new file mode 100644
index 000000000000..1b325ae84774
--- /dev/null
+++ b/sys-libs/db/db-1.85-r3.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils toolchain-funcs multilib multilib
+
+DESCRIPTION="old berk db kept around for really old packages"
+HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
+SRC_URI="http://download.oracle.com/berkeley-db/db.${PV}.tar.gz
+ mirror://gentoo/${PF}.1.patch.bz2"
+# The patch used by Gentoo is from Fedora, and includes all 5 patches found on
+# the Oracle page, plus others.
+
+LICENSE="Sleepycat"
+SLOT="1"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
+IUSE=""
+
+DEPEND=""
+
+S=${WORKDIR}/db.${PV}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${WORKDIR}"/${PF}.1.patch
+ epatch "${FILESDIR}"/${P}-gentoo-paths.patch
+ sed -i \
+ -e "s:@GENTOO_LIBDIR@:$(get_libdir):" \
+ PORT/linux/Makefile || die
+}
+
+src_compile() {
+ tc-export CC AR RANLIB
+ emake -C PORT/linux OORG="${CFLAGS}" || die
+}
+
+src_install() {
+ make -C PORT/linux install DESTDIR="${ED}" || die
+
+ # binary compat symlink
+ dosym libdb1.so.2 /usr/$(get_libdir)/libdb.so.2 || die
+
+ dosed "s:<db.h>:<db1/db.h>:" /usr/include/db1/ndbm.h
+ dosym db1/ndbm.h /usr/include/ndbm.h
+
+ dodoc changelog README
+ newdoc hash/README README.hash
+ docinto ps
+ dodoc docs/*.ps
+}
diff --git a/sys-libs/db/db-3.2.9_p2.ebuild b/sys-libs/db/db-3.2.9_p2.ebuild
new file mode 100644
index 000000000000..07e9f6567c3c
--- /dev/null
+++ b/sys-libs/db/db-3.2.9_p2.ebuild
@@ -0,0 +1,182 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils db multilib
+
+#Number of official patches
+#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
+PATCHNO=${PV/*.*.*_p}
+if [[ ${PATCHNO} == "${PV}" ]] ; then
+ MY_PV=${PV}
+ MY_P=${P}
+ PATCHNO=0
+else
+ MY_PV=${PV/_p${PATCHNO}}
+ MY_P=${PN}-${MY_PV}
+fi
+
+DESCRIPTION="Berkeley DB for transaction support in MySQL"
+HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
+SRC_URI="http://download.oracle.com/berkeley-db/${MY_P}.tar.gz"
+for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
+ export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
+done
+
+LICENSE="Sleepycat"
+SLOT="3"
+# This ebuild is to be the compatibility ebuild for when db4 is put
+# in the tree.
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
+IUSE="doc"
+
+DEPEND="${RDEPEND}
+ =sys-libs/db-1.85*"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ # This doesn't build without exceptions
+ export CXXFLAGS="${CXXFLAGS/-fno-exceptions/-fexceptions}"
+
+ unpack "${MY_P}".tar.gz
+
+ chmod -R ug+w *
+
+ cd "${WORKDIR}"/"${MY_P}"
+ for (( i=1 ; i<=${PATCHNO} ; i++ ))
+ do
+ epatch "${DISTDIR}"/patch."${MY_PV}"."${i}"
+ done
+
+ # Get db to link libdb* to correct dependencies ... for example if we use
+ # NPTL or NGPT, db detects usable mutexes, and should link against
+ # libpthread, but does not do so ...
+ # <azarah@gentoo.org> (23 Feb 2003)
+ epatch "${FILESDIR}"/${MY_P}-fix-dep-link.patch
+
+ # We should get dump185 to link against system db1 ..
+ # <azarah@gentoo.org> (23 Feb 2003)
+ mv "${S}"/dist/Makefile.in "${S}"/dist/Makefile.in.orig
+ sed -e 's:DB185INC=:DB185INC= -I/usr/include/db1:' \
+ -e 's:DB185LIB=:DB185LIB= -ldb1:' \
+ "${S}"/dist/Makefile.in.orig > "${S}"/dist/Makefile.in || die "Failed to sed"
+
+ epatch "${FILESDIR}"/${MY_P}-gcc43.patch
+
+ # Fix invalid .la files
+ cd "${WORKDIR}"/${MY_P}/dist
+ rm -f ltversion.sh
+ # remove config.guess else we have problems with gcc-3.2
+ rm -f config.guess
+ sed -i "s,\(-D_GNU_SOURCE\),\1 ${CFLAGS}," configure
+
+}
+
+src_compile() {
+ local conf=
+ local conf_shared=
+ local conf_static=
+
+ conf="${conf}
+ --host=${CHOST} \
+ --build=${CHOST} \
+ --enable-cxx \
+ --enable-compat185 \
+ --enable-dump185 \
+ --prefix=${EPREFIX}/usr"
+
+ # --enable-rpc DOES NOT BUILD
+ # Robin H. Johnson <robbat2@gentoo.org> (18 Oct 2003)
+
+ conf_shared="${conf_shared}
+ --enable-dynamic"
+
+ # TCL support is also broken
+ # Robin H. Johnson <robbat2@gentoo.org> (18 Oct 2003)
+ # conf_shared="${conf_shared}
+ # `use_enable tcl tcl`
+ # `use_with tcl tcl /usr/$(get_libdir)`"
+
+ # NOTE: we should not build both shared and static versions
+ # of the libraries in the same build root!
+
+ einfo "Configuring ${P} (static)..."
+ mkdir -p "${S}"/build-static
+ cd "${S}"/build-static
+ strip=/bin/true \
+ ECONF_SOURCE="${S}"/dist econf \
+ ${conf} ${conf_static} \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --disable-shared \
+ --enable-static || die
+
+ einfo "Configuring ${P} (shared)..."
+ mkdir -p "${S}"/build-shared
+ cd "${S}"/build-shared
+ strip="${ED}"/bin/true \
+ ECONF_SOURCE="${S}"/dist econf \
+ ${conf} ${conf_shared} \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --disable-static \
+ --enable-shared || die
+
+ # Parallel make does not work
+ MAKEOPTS="${MAKEOPTS} -j1"
+ einfo "Building ${P} (static)..."
+ cd "${S}"/build-static
+ emake strip="${EPREFIX}"/bin/true || die "Static build failed"
+ einfo "Building ${P} (shared)..."
+ cd "${S}"/build-shared
+ emake strip="${EPREFIX}"/bin/true || die "Shared build failed"
+}
+
+src_install () {
+ cd "${S}"/build-shared
+ make libdb=libdb-3.2.a \
+ libcxx=libcxx_3.2.a \
+ prefix="${EPREFIX}"/usr \
+ libdir="${EPREFIX}"/usr/$(get_libdir) \
+ strip="${EPREFIX}"/bin/true \
+ install || die
+
+ cd "${S}"/build-static
+ newlib.a libdb.a libdb-3.2.a || die "failed to package static libraries!"
+ newlib.a libdb_cxx.a libdb_cxx-3.2.a || die "failed to package static libraries!"
+
+ db_src_install_headerslot || die "db_src_install_headerslot failed!"
+
+ # this is now done in the db eclass, function db_fix_so and db_src_install_usrlibcleanup
+ #cd "${D}"/usr/lib
+ #ln -s libdb-3.2.so libdb.so.3
+
+ # For some reason, db.so's are *not* readable by group or others,
+ # resulting in no one but root being able to use them!!!
+ # This fixes it -- DR 15 Jun 2001
+ cd "${ED}"/usr/$(get_libdir)
+ chmod go+rx *.so
+ # The .la's aren't readable either
+ chmod go+r *.la
+
+ cd "${S}"
+ dodoc README
+
+ db_src_install_doc || die "db_src_install_doc failed!"
+
+ db_src_install_usrbinslot || die "db_src_install_usrbinslot failed!"
+
+ db_src_install_usrlibcleanup || die "db_src_install_usrlibcleanup failed!"
+}
+
+pkg_postinst () {
+ db_fix_so
+}
+
+pkg_postrm () {
+ db_fix_so
+}
+
+src_test() {
+ if use test; then
+ eerror "We'd love to be able to test, but the testsuite is broken in the 3.2.9 series"
+ fi
+}
diff --git a/sys-libs/db/db-4.2.52_p5-r1.ebuild b/sys-libs/db/db-4.2.52_p5-r1.ebuild
new file mode 100644
index 000000000000..a68275844a24
--- /dev/null
+++ b/sys-libs/db/db-4.2.52_p5-r1.ebuild
@@ -0,0 +1,165 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils db flag-o-matic java-pkg-opt-2 autotools multilib
+
+#Number of official patches
+#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
+PATCHNO=${PV/*.*.*_p}
+if [[ ${PATCHNO} == "${PV}" ]] ; then
+ MY_PV=${PV}
+ MY_P=${P}
+ PATCHNO=0
+else
+ MY_PV=${PV/_p${PATCHNO}}
+ MY_P=${PN}-${MY_PV}
+fi
+
+S="${WORKDIR}/${MY_P}/build_unix"
+DESCRIPTION="Oracle Berkeley DB"
+HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
+SRC_URI="http://download.oracle.com/berkeley-db/${MY_P}.tar.gz"
+for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
+ export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
+done
+
+LICENSE="Sleepycat"
+SLOT="4.2"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
+IUSE="tcl java doc cxx rpc"
+
+DEPEND="tcl? ( >=dev-lang/tcl-8.4 )
+ java? ( >=virtual/jdk-1.4 )"
+RDEPEND="tcl? ( dev-lang/tcl )
+ java? ( >=virtual/jre-1.4 )"
+
+src_unpack() {
+ unpack "${MY_P}".tar.gz
+ cd "${WORKDIR}"/"${MY_P}"
+ for (( i=1 ; i<=${PATCHNO} ; i++ ))
+ do
+ epatch "${DISTDIR}"/patch."${MY_PV}"."${i}"
+ done
+ epatch "${FILESDIR}"/"${PN}"-4.2.52_p2-TXN.patch
+ epatch "${FILESDIR}"/"${PN}"-"${SLOT}"-libtool.patch
+
+ # use the includes from the prefix
+ epatch "${FILESDIR}"/"${PN}"-"${SLOT}"-jni-check-prefix-first.patch
+ epatch "${FILESDIR}"/"${PN}"-"${SLOT}"-listen-to-java-options.patch
+ epatch "${FILESDIR}"/"${PN}"-4.0.14-fix-dep-link.patch
+
+ sed -e "/^DB_RELEASE_DATE=/s/%B %e, %Y/%Y-%m-%d/" -i dist/RELEASE
+
+ # Include the SLOT for Java JAR files
+ # This supersedes the unused jarlocation patches.
+ sed -r -i \
+ -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
+ "${S}"/../dist/Makefile.in
+
+ # START of 4.5+earlier specific
+ # Upstream sucks, they normally concat these
+ cd "${S}"/../dist/aclocal
+ for i in *; do ln -s $i ${i%.ac}.m4 ; done ;
+ cd "${S}"/../dist/aclocal_java
+ for i in *; do ln -s $i ${i%.ac}.m4 ; done ;
+ # END of 4.5+earlier specific
+ cd "${S}"/../dist
+ rm -f aclocal/libtool.{m4,ac} aclocal.m4
+ sed -i \
+ -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
+ configure.ac
+ sed -i \
+ -e '/^AC_PATH_TOOL/s/ sh, missing_sh/ bash, missing_sh/' \
+ aclocal/programs.m4
+ AT_M4DIR="aclocal aclocal_java" eautoreconf
+ # Upstream sucks - they do autoconf and THEN replace the version variables.
+ . ./RELEASE
+ sed -i \
+ -e "s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" \
+ -e "s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" \
+ -e "s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" \
+ -e "s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" \
+ -e "s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" \
+ -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" configure
+}
+
+src_compile() {
+ local myconf=""
+
+ use amd64 && myconf="${myconf} --with-mutex=x86/gcc-assembly"
+
+ myconf="${myconf} $(use_enable cxx)"
+
+ use tcl \
+ && myconf="${myconf} --enable-tcl --with-tcl=${EPREFIX}/usr/$(get_libdir)" \
+ || myconf="${myconf} --disable-tcl"
+
+ myconf="${myconf} $(use_enable java)"
+ if use java; then
+ myconf="${myconf} --with-java-prefix=${JAVA_HOME}"
+ # Can't get this working any other way, since it returns spaces, and
+ # bash doesn't seem to want to pass correctly in any way i try
+ local javaconf="-with-javac-flags=$(java-pkg_javac-args)"
+ fi
+
+ [[ -n ${CBUILD} ]] && myconf="${myconf} --build=${CBUILD}"
+
+ # the entire testsuite needs the TCL functionality
+ if use tcl && use test; then
+ myconf="${myconf} --enable-test"
+ else
+ myconf="${myconf} --disable-test"
+ fi
+
+ cd "${S}" && ECONF_SOURCE="${S}"/../dist econf \
+ --prefix="${EPREFIX}"/usr \
+ --mandir="${EPREFIX}"/usr/share/man \
+ --infodir="${EPREFIX}"/usr/share/info \
+ --datadir="${EPREFIX}"/usr/share \
+ --sysconfdir="${EPREFIX}"/etc \
+ --localstatedir="${EPREFIX}"/var/lib \
+ --libdir="${EPREFIX}"/usr/"$(get_libdir)" \
+ --enable-compat185 \
+ --with-uniquename \
+ $(use_enable rpc) \
+ --host="${CHOST}" \
+ ${myconf} "${javaconf}" || die "configure failed"
+
+ # This isn't safe for prefix (Darwin should be .jnilib), but I can't get the
+ # build system to behave itself, it generates libtool too late.
+ sed -i \
+ -e 's/-shrext $(SOFLAGS)/-shrext .so $(SOFLAGS)/g' \
+ Makefile
+ emake || die "make failed"
+}
+
+src_install() {
+ einstall libdir="${ED}/usr/$(get_libdir)" strip="${ED}/bin/strip" || die
+
+ db_src_install_usrbinslot
+
+ db_src_install_headerslot
+
+ db_src_install_doc
+
+ db_src_install_usrlibcleanup
+
+ dodir /usr/sbin
+ # This file is not always built, and no longer exists as of db-4.8
+ [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] && \
+ mv "${ED}"/usr/bin/berkeley_db_svc "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc
+
+ if use java; then
+ java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.so
+ java-pkg_dojar "${ED}"/usr/"$(get_libdir)"/*.jar
+ rm -f "${ED}"/usr/"$(get_libdir)"/*.jar
+ fi
+}
+
+pkg_postinst() {
+ db_fix_so
+}
+
+pkg_postrm() {
+ db_fix_so
+}
diff --git a/sys-libs/db/db-4.3.29_p1-r1.ebuild b/sys-libs/db/db-4.3.29_p1-r1.ebuild
new file mode 100644
index 000000000000..fa709ec48a83
--- /dev/null
+++ b/sys-libs/db/db-4.3.29_p1-r1.ebuild
@@ -0,0 +1,168 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils db flag-o-matic java-pkg-opt-2 autotools multilib
+
+#Number of official patches
+#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
+PATCHNO=${PV/*.*.*_p}
+if [[ ${PATCHNO} == "${PV}" ]] ; then
+ MY_PV=${PV}
+ MY_P=${P}
+ PATCHNO=0
+else
+ MY_PV=${PV/_p${PATCHNO}}
+ MY_P=${PN}-${MY_PV}
+fi
+
+S="${WORKDIR}/${MY_P}/build_unix"
+DESCRIPTION="Oracle Berkeley DB"
+HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
+SRC_URI="http://download.oracle.com/berkeley-db/${MY_P}.tar.gz"
+for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
+ export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
+done
+
+LICENSE="Sleepycat"
+SLOT="4.3"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="tcl java doc cxx rpc"
+
+DEPEND="tcl? ( >=dev-lang/tcl-8.4 )
+ java? ( >=virtual/jdk-1.4 )
+ >=sys-devel/binutils-2.16.1"
+RDEPEND="tcl? ( dev-lang/tcl )
+ java? ( >=virtual/jre-1.4 )"
+
+src_unpack() {
+ unpack "${MY_P}".tar.gz
+ cd "${WORKDIR}"/"${MY_P}"
+ for (( i=1 ; i<=${PATCHNO} ; i++ ))
+ do
+ epatch "${DISTDIR}"/patch."${MY_PV}"."${i}"
+ done
+ epatch "${FILESDIR}"/"${PN}"-"${SLOT}"-libtool.patch
+
+ # use the includes from the prefix
+ epatch "${FILESDIR}"/"${PN}"-"${SLOT}"-jni-check-prefix-first.patch
+ epatch "${FILESDIR}"/"${PN}"-"${SLOT}"-listen-to-java-options.patch
+
+ epatch "${FILESDIR}"/"${PN}"-4.3.27-fix-dep-link.patch
+
+ sed -e "/^DB_RELEASE_DATE=/s/%B %e, %Y/%Y-%m-%d/" -i dist/RELEASE
+
+ # Include the SLOT for Java JAR files
+ # This supersedes the unused jarlocation patches.
+ sed -r -i \
+ -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
+ "${S}"/../dist/Makefile.in
+
+ # START of 4.5+earlier specific
+ # Upstream sucks, they normally concat these
+ cd "${S}"/../dist/aclocal
+ for i in *; do ln -s $i ${i%.ac}.m4 ; done ;
+ cd "${S}"/../dist/aclocal_java
+ for i in *; do ln -s $i ${i%.ac}.m4 ; done ;
+ # END of 4.5+earlier specific
+ cd "${S}"/../dist
+ rm -f aclocal/libtool.{m4,ac} aclocal.m4
+ sed -i \
+ -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
+ configure.ac
+ sed -i \
+ -e '/^AC_PATH_TOOL/s/ sh, missing_sh/ bash, missing_sh/' \
+ aclocal/programs.m4
+ AT_M4DIR="aclocal aclocal_java" eautoreconf
+ # Upstream sucks - they do autoconf and THEN replace the version variables.
+ . ./RELEASE
+ sed -i \
+ -e "s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" \
+ -e "s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" \
+ -e "s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" \
+ -e "s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" \
+ -e "s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" \
+ -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" configure
+}
+
+src_compile() {
+ local myconf=""
+
+ use amd64 && myconf="${myconf} --with-mutex=x86/gcc-assembly"
+
+ myconf="${myconf} $(use_enable cxx)"
+
+ use tcl \
+ && myconf="${myconf} --enable-tcl --with-tcl=${EPREFIX}/usr/$(get_libdir)" \
+ || myconf="${myconf} --disable-tcl"
+
+ myconf="${myconf} $(use_enable java)"
+ if use java; then
+ myconf="${myconf} --with-java-prefix=${JAVA_HOME}"
+ # Can't get this working any other way, since it returns spaces, and
+ # bash doesn't seem to want to pass correctly in any way i try
+ local javaconf="-with-javac-flags=$(java-pkg_javac-args)"
+ fi
+
+ [[ -n ${CBUILD} ]] && myconf="${myconf} --build=${CBUILD}"
+
+ # the entire testsuite needs the TCL functionality
+ if use tcl && use test ; then
+ myconf="${myconf} --enable-test"
+ else
+ myconf="${myconf} --disable-test"
+ fi
+
+ # Add linker versions to the symbols. Easier to do, and safer than header
+ # file mumbo jumbo.
+ if use userland_GNU; then
+ append-ldflags -Wl,--default-symver
+ fi
+
+ cd "${S}" && ECONF_SOURCE="${S}"/../dist econf \
+ --prefix="${EPREFIX}"/usr \
+ --mandir="${EPREFIX}"/usr/share/man \
+ --infodir="${EPREFIX}"/usr/share/info \
+ --datadir="${EPREFIX}"/usr/share \
+ --sysconfdir="${EPREFIX}"/etc \
+ --localstatedir="${EPREFIX}"/var/lib \
+ --libdir="${EPREFIX}"/usr/"$(get_libdir)" \
+ --enable-compat185 \
+ --enable-o_direct \
+ --without-uniquename \
+ $(use_enable rpc) \
+ --host="${CHOST}" \
+ ${myconf} "${javaconf}" || die "configure failed"
+
+ emake || die "make failed"
+}
+
+src_install() {
+ einstall libdir="${ED}/usr/$(get_libdir)" strip="${ED}/bin/strip" || die
+
+ db_src_install_usrbinslot
+
+ db_src_install_headerslot
+
+ db_src_install_doc
+
+ db_src_install_usrlibcleanup
+
+ dodir /usr/sbin
+ # This file is not always built, and no longer exists as of db-4.8
+ [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] && \
+ mv "${ED}"/usr/bin/berkeley_db_svc "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc
+
+ if use java; then
+ java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.so
+ java-pkg_dojar "${ED}"/usr/"$(get_libdir)"/*.jar
+ rm -f "${ED}"/usr/"$(get_libdir)"/*.jar
+ fi
+}
+
+pkg_postinst() {
+ db_fix_so
+}
+
+pkg_postrm() {
+ db_fix_so
+}
diff --git a/sys-libs/db/db-4.4.20_p4-r1.ebuild b/sys-libs/db/db-4.4.20_p4-r1.ebuild
new file mode 100644
index 000000000000..296dcc89ef9e
--- /dev/null
+++ b/sys-libs/db/db-4.4.20_p4-r1.ebuild
@@ -0,0 +1,162 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils db flag-o-matic java-pkg-opt-2 autotools multilib
+
+#Number of official patches
+#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
+PATCHNO=${PV/*.*.*_p}
+if [[ ${PATCHNO} == "${PV}" ]] ; then
+ MY_PV=${PV}
+ MY_P=${P}
+ PATCHNO=0
+else
+ MY_PV=${PV/_p${PATCHNO}}
+ MY_P=${PN}-${MY_PV}
+fi
+
+S="${WORKDIR}/${MY_P}/build_unix"
+DESCRIPTION="Oracle Berkeley DB"
+HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
+SRC_URI="http://download.oracle.com/berkeley-db/${MY_P}.tar.gz
+ mirror://gentoo/${MY_P}-20060110-rpc_server-java.tar.gz"
+for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
+ export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
+done
+
+LICENSE="Sleepycat BSD"
+SLOT="4.4"
+KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="tcl java doc cxx rpc"
+
+DEPEND="tcl? ( >=dev-lang/tcl-8.4 )
+ java? ( >=virtual/jdk-1.4 )
+ >=sys-devel/binutils-2.16.1"
+RDEPEND="tcl? ( dev-lang/tcl )
+ java? ( >=virtual/jre-1.4 )"
+
+src_unpack() {
+ unpack "${MY_P}".tar.gz
+ unpack "${MY_P}-20060110-rpc_server-java".tar.gz
+ cd "${WORKDIR}"/"${MY_P}"
+ for (( i=1 ; i<=${PATCHNO} ; i++ ))
+ do
+ epatch "${DISTDIR}"/patch."${MY_PV}"."${i}"
+ done
+ epatch "${FILESDIR}"/"${PN}"-"${SLOT}"-libtool.patch
+
+ # use the includes from the prefix
+ epatch "${FILESDIR}"/"${PN}"-4.3-jni-check-prefix-first.patch
+ epatch "${FILESDIR}"/"${PN}"-4.3-listen-to-java-options.patch
+
+ sed -e "/^DB_RELEASE_DATE=/s/%B %e, %Y/%Y-%m-%d/" -i dist/RELEASE
+
+ # Include the SLOT for Java JAR files
+ # This supersedes the unused jarlocation patches.
+ sed -r -i \
+ -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
+ "${S}"/../dist/Makefile.in
+
+ # START of 4.5+earlier specific
+ # Upstream sucks, they normally concat these
+ cd "${S}"/../dist/aclocal
+ for i in *; do ln -s $i ${i%.ac}.m4 ; done ;
+ cd "${S}"/../dist/aclocal_java
+ for i in *; do ln -s $i ${i%.ac}.m4 ; done ;
+ # END of 4.5+earlier specific
+ cd "${S}"/../dist
+ rm -f aclocal/libtool.{m4,ac} aclocal.m4
+ AT_M4DIR="aclocal aclocal_java" eautoreconf
+ # Upstream sucks - they do autoconf and THEN replace the version variables.
+ . ./RELEASE
+ sed -i \
+ -e "s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" \
+ -e "s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" \
+ -e "s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" \
+ -e "s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" \
+ -e "s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" \
+ -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" configure
+}
+
+src_compile() {
+ local myconf=""
+
+ use amd64 && myconf="${myconf} --with-mutex=x86/gcc-assembly"
+
+ myconf="${myconf} $(use_enable cxx)"
+
+ use tcl \
+ && myconf="${myconf} --enable-tcl --with-tcl=${EPREFIX}/usr/$(get_libdir)" \
+ || myconf="${myconf} --disable-tcl"
+
+ myconf="${myconf} $(use_enable java)"
+ if use java; then
+ myconf="${myconf} --with-java-prefix=${JAVA_HOME}"
+ # Can't get this working any other way, since it returns spaces, and
+ # bash doesn't seem to want to pass correctly in any way i try
+ local javaconf="-with-javac-flags=$(java-pkg_javac-args)"
+ fi
+
+ [[ -n ${CBUILD} ]] && myconf="${myconf} --build=${CBUILD}"
+
+ # the entire testsuite needs the TCL functionality
+ if use tcl && use test ; then
+ myconf="${myconf} --enable-test"
+ else
+ myconf="${myconf} --disable-test"
+ fi
+
+ # Add linker versions to the symbols. Easier to do, and safer than header file
+ # mumbo jumbo.
+ if use userland_GNU; then
+ append-ldflags -Wl,--default-symver
+ fi
+
+ cd "${S}" && ECONF_SOURCE="${S}"/../dist econf \
+ --prefix="${EPREFIX}"/usr \
+ --mandir="${EPREFIX}"/usr/share/man \
+ --infodir="${EPREFIX}"/usr/share/info \
+ --datadir="${EPREFIX}"/usr/share \
+ --sysconfdir="${EPREFIX}"/etc \
+ --localstatedir="${EPREFIX}"/var/lib \
+ --libdir="${EPREFIX}"/usr/"$(get_libdir)" \
+ --enable-compat185 \
+ --enable-o_direct \
+ --without-uniquename \
+ $(use_enable rpc) \
+ --host="${CHOST}" \
+ ${myconf} "${javaconf}" || die "configure failed"
+
+ emake -j1 || die "make failed"
+}
+
+src_install() {
+ einstall libdir="${ED}/usr/$(get_libdir)" strip="${ED}/bin/strip" || die
+
+ db_src_install_usrbinslot
+
+ db_src_install_headerslot
+
+ db_src_install_doc
+
+ db_src_install_usrlibcleanup
+
+ dodir /usr/sbin
+ # This file is not always built, and no longer exists as of db-4.8
+ [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] && \
+ mv "${ED}"/usr/bin/berkeley_db_svc "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc
+
+ if use java; then
+ java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.so
+ java-pkg_dojar "${ED}"/usr/"$(get_libdir)"/*.jar
+ rm -f "${ED}"/usr/"$(get_libdir)"/*.jar
+ fi
+}
+
+pkg_postinst() {
+ db_fix_so
+}
+
+pkg_postrm() {
+ db_fix_so
+}
diff --git a/sys-libs/db/db-4.5.20_p2-r1.ebuild b/sys-libs/db/db-4.5.20_p2-r1.ebuild
new file mode 100644
index 000000000000..178d0bf58c64
--- /dev/null
+++ b/sys-libs/db/db-4.5.20_p2-r1.ebuild
@@ -0,0 +1,175 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils db flag-o-matic java-pkg-opt-2 autotools multilib
+
+#Number of official patches
+#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
+PATCHNO=${PV/*.*.*_p}
+if [[ ${PATCHNO} == "${PV}" ]] ; then
+ MY_PV=${PV}
+ MY_P=${P}
+ PATCHNO=0
+else
+ MY_PV=${PV/_p${PATCHNO}}
+ MY_P=${PN}-${MY_PV}
+fi
+
+S="${WORKDIR}/${MY_P}/build_unix"
+DESCRIPTION="Oracle Berkeley DB"
+HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
+SRC_URI="http://download.oracle.com/berkeley-db/${MY_P}.tar.gz"
+for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
+ export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
+done
+
+LICENSE="Sleepycat"
+SLOT="4.5"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="tcl java doc cxx rpc"
+
+DEPEND="tcl? ( >=dev-lang/tcl-8.4 )
+ java? ( >=virtual/jdk-1.4 )
+ >=sys-devel/binutils-2.16.1"
+RDEPEND="tcl? ( dev-lang/tcl )
+ java? ( >=virtual/jre-1.4 )"
+
+src_unpack() {
+ unpack "${MY_P}".tar.gz
+ cd "${WORKDIR}"/"${MY_P}"
+ for (( i=1 ; i<=${PATCHNO} ; i++ ))
+ do
+ epatch "${DISTDIR}"/patch."${MY_PV}"."${i}"
+ done
+ epatch "${FILESDIR}"/"${PN}"-"${SLOT}"-libtool.patch
+
+ # use the includes from the prefix
+ epatch "${FILESDIR}"/"${PN}"-4.3-jni-check-prefix-first.patch
+ epatch "${FILESDIR}"/"${PN}"-4.3-listen-to-java-options.patch
+
+ sed -e "/^DB_RELEASE_DATE=/s/%B %e, %Y/%Y-%m-%d/" -i dist/RELEASE
+
+ # Include the SLOT for Java JAR files
+ # This supersedes the unused jarlocation patches.
+ sed -r -i \
+ -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
+ "${S}"/../dist/Makefile.in
+
+ # START of 4.5+earlier specific
+ # Upstream sucks, they normally concat these
+ cd "${S}"/../dist/aclocal
+ for i in *; do ln -s $i ${i%.ac}.m4 ; done ;
+ cd "${S}"/../dist/aclocal_java
+ for i in *; do ln -s $i ${i%.ac}.m4 ; done ;
+ # END of 4.5+earlier specific
+ cd "${S}"/../dist
+ rm -f aclocal/libtool.{m4,ac} aclocal.m4
+ sed -i \
+ -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
+ configure.ac
+ sed -i \
+ -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
+ aclocal/programs.m4
+ AT_M4DIR="aclocal aclocal_java" eautoreconf
+ # Upstream sucks - they do autoconf and THEN replace the version variables.
+ . ./RELEASE
+ sed -i \
+ -e "s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" \
+ -e "s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" \
+ -e "s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" \
+ -e "s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" \
+ -e "s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" \
+ -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" configure
+}
+
+src_compile() {
+ # compilation with -O0 fails on amd64, see bug #171231
+ if use amd64; then
+ replace-flags -O0 -O2
+ is-flagq -O[s123] || append-flags -O2
+ fi
+
+ local myconf=""
+
+ use amd64 && myconf="${myconf} --with-mutex=x86/gcc-assembly"
+
+ myconf="${myconf} $(use_enable cxx)"
+
+ use tcl \
+ && myconf="${myconf} --enable-tcl --with-tcl=${EPREFIX}/usr/$(get_libdir)" \
+ || myconf="${myconf} --disable-tcl"
+
+ myconf="${myconf} $(use_enable java)"
+ if use java; then
+ myconf="${myconf} --with-java-prefix=${JAVA_HOME}"
+ # Can't get this working any other way, since it returns spaces, and
+ # bash doesn't seem to want to pass correctly in any way i try
+ local javaconf="-with-javac-flags=$(java-pkg_javac-args)"
+ fi
+
+ [[ -n ${CBUILD} ]] && myconf="${myconf} --build=${CBUILD}"
+
+ # the entire testsuite needs the TCL functionality
+ if use tcl && use test ; then
+ myconf="${myconf} --enable-test"
+ else
+ myconf="${myconf} --disable-test"
+ fi
+
+ # Add linker versions to the symbols. Easier to do, and safer than header file
+ # mumbo jumbo.
+ if use userland_GNU; then
+ append-ldflags -Wl,--default-symver
+ fi
+
+ cd "${S}" && ECONF_SOURCE="${S}"/../dist econf \
+ --prefix="${EPREFIX}"/usr \
+ --mandir="${EPREFIX}"/usr/share/man \
+ --infodir="${EPREFIX}"/usr/share/info \
+ --datadir="${EPREFIX}"/usr/share \
+ --sysconfdir="${EPREFIX}"/etc \
+ --localstatedir="${EPREFIX}"/var/lib \
+ --libdir="${EPREFIX}"/usr/"$(get_libdir)" \
+ --enable-compat185 \
+ --enable-o_direct \
+ --without-uniquename \
+ $(use_enable rpc) \
+ --host="${CHOST}" \
+ ${myconf} "${javaconf}" || die "configure failed"
+
+ sed -e "s,\(^STRIP *=\).*,\1\"true\"," Makefile > Makefile.cpy \
+ && mv Makefile.cpy Makefile
+
+ emake || die "make failed"
+}
+
+src_install() {
+ einstall libdir="${ED}/usr/$(get_libdir)" STRIP="true" || die
+
+ db_src_install_usrbinslot
+
+ db_src_install_headerslot
+
+ db_src_install_doc
+
+ db_src_install_usrlibcleanup
+
+ dodir /usr/sbin
+ # This file is not always built, and no longer exists as of db-4.8
+ [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] && \
+ mv "${ED}"/usr/bin/berkeley_db_svc "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc
+
+ if use java; then
+ java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.so
+ java-pkg_dojar "${ED}"/usr/"$(get_libdir)"/*.jar
+ rm -f "${ED}"/usr/"$(get_libdir)"/*.jar
+ fi
+}
+
+pkg_postinst() {
+ db_fix_so
+}
+
+pkg_postrm() {
+ db_fix_so
+}
diff --git a/sys-libs/db/db-4.6.21_p4.ebuild b/sys-libs/db/db-4.6.21_p4.ebuild
new file mode 100644
index 000000000000..7f32087a5edd
--- /dev/null
+++ b/sys-libs/db/db-4.6.21_p4.ebuild
@@ -0,0 +1,168 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils db flag-o-matic java-pkg-opt-2 autotools multilib
+
+#Number of official patches
+#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
+PATCHNO=${PV/*.*.*_p}
+if [[ ${PATCHNO} == "${PV}" ]] ; then
+ MY_PV=${PV}
+ MY_P=${P}
+ PATCHNO=0
+else
+ MY_PV=${PV/_p${PATCHNO}}
+ MY_P=${PN}-${MY_PV}
+fi
+
+S="${WORKDIR}/${MY_P}/build_unix"
+DESCRIPTION="Oracle Berkeley DB"
+HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
+SRC_URI="http://download.oracle.com/berkeley-db/${MY_P}.tar.gz"
+for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
+ export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
+done
+
+LICENSE="Sleepycat"
+SLOT="4.6"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="tcl java doc cxx rpc"
+
+DEPEND="tcl? ( >=dev-lang/tcl-8.4 )
+ java? ( >=virtual/jdk-1.4 )
+ >=sys-devel/binutils-2.16.1"
+RDEPEND="tcl? ( dev-lang/tcl )
+ java? ( >=virtual/jre-1.4 )"
+
+src_unpack() {
+ unpack "${MY_P}".tar.gz
+ cd "${WORKDIR}"/"${MY_P}"
+ for (( i=1 ; i<=${PATCHNO} ; i++ ))
+ do
+ epatch "${DISTDIR}"/patch."${MY_PV}"."${i}"
+ done
+ epatch "${FILESDIR}"/"${PN}"-"${SLOT}"-libtool.patch
+
+ # use the includes from the prefix
+ epatch "${FILESDIR}"/"${PN}"-"${SLOT}"-jni-check-prefix-first.patch
+ epatch "${FILESDIR}"/"${PN}"-4.3-listen-to-java-options.patch
+
+ sed -e "/^DB_RELEASE_DATE=/s/%B %e, %Y/%Y-%m-%d/" -i dist/RELEASE
+
+ # Include the SLOT for Java JAR files
+ # This supersedes the unused jarlocation patches.
+ sed -r -i \
+ -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
+ "${S}"/../dist/Makefile.in
+
+ cd "${S}"/../dist
+ rm -f aclocal/libtool.m4
+ sed -i \
+ -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
+ configure.ac
+ sed -i \
+ -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
+ aclocal/programs.m4
+ AT_M4DIR="aclocal aclocal_java" eautoreconf
+ # Upstream sucks - they do autoconf and THEN replace the version variables.
+ . ./RELEASE
+ sed -i \
+ -e "s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" \
+ -e "s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" \
+ -e "s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" \
+ -e "s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" \
+ -e "s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" \
+ -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" configure
+}
+
+src_compile() {
+ # compilation with -O0 fails on amd64, see bug #171231
+ if use amd64; then
+ replace-flags -O0 -O2
+ is-flagq -O[s123] || append-flags -O2
+ fi
+
+ local myconf=""
+
+ use amd64 && myconf="${myconf} --with-mutex=x86/gcc-assembly"
+
+ myconf="${myconf} $(use_enable cxx)"
+
+ use tcl \
+ && myconf="${myconf} --enable-tcl --with-tcl=${EPREFIX}/usr/$(get_libdir)" \
+ || myconf="${myconf} --disable-tcl"
+
+ myconf="${myconf} $(use_enable java)"
+ if use java; then
+ myconf="${myconf} --with-java-prefix=${JAVA_HOME}"
+ # Can't get this working any other way, since it returns spaces, and
+ # bash doesn't seem to want to pass correctly in any way i try
+ local javaconf="-with-javac-flags=$(java-pkg_javac-args)"
+ fi
+
+ [[ -n ${CBUILD} ]] && myconf="${myconf} --build=${CBUILD}"
+
+ # the entire testsuite needs the TCL functionality
+ if use tcl && use test ; then
+ myconf="${myconf} --enable-test"
+ else
+ myconf="${myconf} --disable-test"
+ fi
+
+ # Add linker versions to the symbols. Easier to do, and safer than header file
+ # mumbo jumbo.
+ if use userland_GNU; then
+ append-ldflags -Wl,--default-symver
+ fi
+
+ cd "${S}" && ECONF_SOURCE="${S}"/../dist econf \
+ --prefix="${EPREFIX}"/usr \
+ --mandir="${EPREFIX}"/usr/share/man \
+ --infodir="${EPREFIX}"/usr/share/info \
+ --datadir="${EPREFIX}"/usr/share \
+ --sysconfdir="${EPREFIX}"/etc \
+ --localstatedir="${EPREFIX}"/var/lib \
+ --libdir="${EPREFIX}"/usr/"$(get_libdir)" \
+ --enable-compat185 \
+ --enable-o_direct \
+ --without-uniquename \
+ $(use_enable rpc) \
+ --host="${CHOST}" \
+ ${myconf} "${javaconf}" || die "configure failed"
+
+ sed -e "s,\(^STRIP *=\).*,\1\"true\"," Makefile > Makefile.cpy \
+ && mv Makefile.cpy Makefile
+
+ emake || die "make failed"
+}
+
+src_install() {
+ einstall libdir="${ED}/usr/$(get_libdir)" STRIP="true" || die
+
+ db_src_install_usrbinslot
+
+ db_src_install_headerslot
+
+ db_src_install_doc
+
+ db_src_install_usrlibcleanup
+
+ dodir /usr/sbin
+ # This file is not always built, and no longer exists as of db-4.8
+ [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] && \
+ mv "${ED}"/usr/bin/berkeley_db_svc "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc
+
+ if use java; then
+ java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.so
+ java-pkg_dojar "${ED}"/usr/"$(get_libdir)"/*.jar
+ rm -f "${ED}"/usr/"$(get_libdir)"/*.jar
+ fi
+}
+
+pkg_postinst() {
+ db_fix_so
+}
+
+pkg_postrm() {
+ db_fix_so
+}
diff --git a/sys-libs/db/db-4.7.25_p4.ebuild b/sys-libs/db/db-4.7.25_p4.ebuild
new file mode 100644
index 000000000000..828747ac824c
--- /dev/null
+++ b/sys-libs/db/db-4.7.25_p4.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils db flag-o-matic java-pkg-opt-2 autotools multilib
+
+#Number of official patches
+#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
+PATCHNO=${PV/*.*.*_p}
+if [[ ${PATCHNO} == "${PV}" ]] ; then
+ MY_PV=${PV}
+ MY_P=${P}
+ PATCHNO=0
+else
+ MY_PV=${PV/_p${PATCHNO}}
+ MY_P=${PN}-${MY_PV}
+fi
+
+S="${WORKDIR}/${MY_P}/build_unix"
+DESCRIPTION="Oracle Berkeley DB"
+HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
+SRC_URI="http://download.oracle.com/berkeley-db/${MY_P}.tar.gz"
+for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
+ export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
+done
+
+LICENSE="Sleepycat"
+SLOT="4.7"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="doc java cxx tcl test rpc"
+
+# the entire testsuite needs the TCL functionality
+DEPEND="tcl? ( >=dev-lang/tcl-8.4 )
+ test? ( >=dev-lang/tcl-8.4 )
+ java? ( >=virtual/jdk-1.5 )
+ >=sys-devel/binutils-2.16.1"
+RDEPEND="tcl? ( dev-lang/tcl )
+ java? ( >=virtual/jre-1.5 )"
+
+src_unpack() {
+ unpack "${MY_P}".tar.gz
+ cd "${WORKDIR}"/"${MY_P}"
+ for (( i=1 ; i<=${PATCHNO} ; i++ ))
+ do
+ epatch "${DISTDIR}"/patch."${MY_PV}"."${i}"
+ done
+ epatch "${FILESDIR}"/"${PN}"-4.6-libtool.patch
+
+ # use the includes from the prefix
+ epatch "${FILESDIR}"/"${PN}"-4.6-jni-check-prefix-first.patch
+ epatch "${FILESDIR}"/"${PN}"-4.3-listen-to-java-options.patch
+
+ sed -e "/^DB_RELEASE_DATE=/s/%B %e, %Y/%Y-%m-%d/" -i dist/RELEASE
+
+ # Include the SLOT for Java JAR files
+ # This supersedes the unused jarlocation patches.
+ sed -r -i \
+ -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
+ "${S}"/../dist/Makefile.in
+
+ cd "${S}"/../dist
+ rm -f aclocal/libtool.m4
+ sed -i \
+ -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
+ configure.ac
+ sed -i \
+ -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
+ aclocal/programs.m4
+ AT_M4DIR="aclocal aclocal_java" eautoreconf
+ # Upstream sucks - they do autoconf and THEN replace the version variables.
+ . ./RELEASE
+ sed -i \
+ -e "s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" \
+ -e "s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" \
+ -e "s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" \
+ -e "s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" \
+ -e "s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" \
+ -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" configure
+}
+
+src_compile() {
+ local myconf=''
+
+ # compilation with -O0 fails on amd64, see bug #171231
+ if use amd64; then
+ replace-flags -O0 -O2
+ is-flagq -O[s123] || append-flags -O2
+ fi
+
+ # use `set` here since the java opts will contain whitespace
+ set --
+ if use java ; then
+ set -- "$@" \
+ --with-java-prefix="${JAVA_HOME}" \
+ --with-javac-flags="$(java-pkg_javac-args)"
+ fi
+
+ # Add linker versions to the symbols. Easier to do, and safer than header file
+ # mumbo jumbo.
+ if use userland_GNU ; then
+ append-ldflags -Wl,--default-symver
+ fi
+
+ # Bug #270851: test needs TCL support
+ if use tcl || use test ; then
+ myconf="${myconf} --enable-tcl"
+ myconf="${myconf} --with-tcl=${EPREFIX}/usr/$(get_libdir)"
+ else
+ myconf="${myconf} --disable-tcl"
+ fi
+
+ cd "${S}"
+ ECONF_SOURCE="${S}"/../dist \
+ STRIP="true" \
+ econf \
+ --enable-compat185 \
+ --enable-o_direct \
+ --without-uniquename \
+ $(use_enable rpc) \
+ $(use arm && echo --with-mutex=ARM/gcc-assembly) \
+ $(use amd64 && echo --with-mutex=x86/gcc-assembly) \
+ $(use_enable cxx) \
+ $(use_enable java) \
+ ${myconf} \
+ $(use_enable test) \
+ "$@"
+
+ emake || die "make failed"
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+
+ db_src_install_usrbinslot
+
+ db_src_install_headerslot
+
+ db_src_install_doc
+
+ db_src_install_usrlibcleanup
+
+ dodir /usr/sbin
+ # This file is not always built, and no longer exists as of db-4.8
+ [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] && \
+ mv "${ED}"/usr/bin/berkeley_db_svc "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc
+
+ if use java; then
+ java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.so
+ java-pkg_dojar "${ED}"/usr/"$(get_libdir)"/*.jar
+ rm -f "${ED}"/usr/"$(get_libdir)"/*.jar
+ fi
+}
+
+pkg_postinst() {
+ db_fix_so
+}
+
+pkg_postrm() {
+ db_fix_so
+}
diff --git a/sys-libs/db/db-4.8.30-r2.ebuild b/sys-libs/db/db-4.8.30-r2.ebuild
new file mode 100644
index 000000000000..5584a2c115ad
--- /dev/null
+++ b/sys-libs/db/db-4.8.30-r2.ebuild
@@ -0,0 +1,180 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils db flag-o-matic java-pkg-opt-2 autotools multilib multilib-minimal toolchain-funcs
+
+#Number of official patches
+#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
+PATCHNO=${PV/*.*.*_p}
+if [[ ${PATCHNO} == "${PV}" ]] ; then
+ MY_PV=${PV}
+ MY_P=${P}
+ PATCHNO=0
+else
+ MY_PV=${PV/_p${PATCHNO}}
+ MY_P=${PN}-${MY_PV}
+fi
+
+S="${WORKDIR}/${MY_P}/build_unix"
+DESCRIPTION="Oracle Berkeley DB"
+HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
+SRC_URI="http://download.oracle.com/berkeley-db/${MY_P}.tar.gz"
+for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
+ export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
+done
+
+LICENSE="Sleepycat"
+SLOT="4.8"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="doc java cxx tcl test"
+
+REQUIRED_USE="test? ( tcl )"
+
+# the entire testsuite needs the TCL functionality
+DEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ test? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jdk-1.5 )
+ >=sys-devel/binutils-2.16.1"
+RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jre-1.5 )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140508-r2
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )"
+
+src_prepare() {
+ cd "${WORKDIR}"/"${MY_P}" || die
+ for (( i=1 ; i<=${PATCHNO} ; i++ ))
+ do
+ epatch "${DISTDIR}"/patch."${MY_PV}"."${i}"
+ done
+ epatch "${FILESDIR}"/${PN}-4.8-libtool.patch
+ epatch "${FILESDIR}"/${PN}-4.8.24-java-manifest-location.patch
+ epatch "${FILESDIR}"/${PN}-4.8.30-rename-atomic-compare-exchange.patch
+
+ # use the includes from the prefix
+ epatch "${FILESDIR}"/${PN}-4.6-jni-check-prefix-first.patch
+ epatch "${FILESDIR}"/${PN}-4.3-listen-to-java-options.patch
+
+ sed -e "/^DB_RELEASE_DATE=/s/%B %e, %Y/%Y-%m-%d/" -i dist/RELEASE \
+ || die
+
+ # Include the SLOT for Java JAR files
+ # This supersedes the unused jarlocation patches.
+ sed -r -i \
+ -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
+ "${S}"/../dist/Makefile.in || die
+
+ cd "${S}"/../dist || die
+ rm -f aclocal/libtool.m4
+ sed -i \
+ -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
+ configure.ac || die
+ sed -i \
+ -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
+ aclocal/programs.m4 || die
+ AT_M4DIR="aclocal aclocal_java" eautoreconf
+ # Upstream sucks - they do autoconf and THEN replace the version variables.
+ . ./RELEASE
+ sed -i \
+ -e "s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" \
+ -e "s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" \
+ -e "s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" \
+ -e "s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" \
+ -e "s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" \
+ -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" configure || die
+}
+
+multilib_src_configure() {
+ local myconf=()
+
+ tc-ld-disable-gold #470634
+
+ # compilation with -O0 fails on amd64, see bug #171231
+ if [[ ${ABI} == amd64 ]]; then
+ local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
+ replace-flags -O0 -O2
+ is-flagq -O[s123] || append-flags -O2
+ fi
+
+ # Add linker versions to the symbols. Easier to do, and safer than header file
+ # mumbo jumbo.
+ if use userland_GNU ; then
+ append-ldflags -Wl,--default-symver
+ fi
+
+ # use `set` here since the java opts will contain whitespace
+ if multilib_is_native_abi && use java ; then
+ myconf+=(
+ --with-java-prefix="${JAVA_HOME}"
+ --with-javac-flags="$(java-pkg_javac-args)"
+ )
+ fi
+
+ # Bug #270851: test needs TCL support
+ if use tcl || use test ; then
+ myconf+=(
+ --enable-tcl
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)"
+ )
+ else
+ myconf+=(--disable-tcl )
+ fi
+
+ ECONF_SOURCE="${S}"/../dist \
+ STRIP="true" \
+ econf \
+ --enable-compat185 \
+ --enable-o_direct \
+ --without-uniquename \
+ $([[ ${ABI} == arm ]] && echo --with-mutex=ARM/gcc-assembly) \
+ $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly) \
+ $(use_enable cxx) \
+ $(use_enable cxx stl) \
+ $(multilib_native_use_enable java) \
+ "${myconf[@]}" \
+ $(use_enable test)
+}
+
+multilib_src_test() {
+ multilib_is_native_abi || return
+
+ S=${BUILD_DIR} db_src_test
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+
+ db_src_install_headerslot
+
+ db_src_install_usrlibcleanup
+
+ if multilib_is_native_abi && use java; then
+ java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.so
+ java-pkg_dojar "${ED}"/usr/"$(get_libdir)"/*.jar
+ rm -f "${ED}"/usr/"$(get_libdir)"/*.jar
+ fi
+}
+
+multilib_src_install_all() {
+ db_src_install_usrbinslot
+
+ db_src_install_doc
+
+ dodir /usr/sbin
+ # This file is not always built, and no longer exists as of db-4.8
+ if [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] ; then
+ mv "${ED}"/usr/bin/berkeley_db_svc \
+ "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die
+ fi
+}
+
+pkg_postinst() {
+ multilib_foreach_abi db_fix_so
+}
+
+pkg_postrm() {
+ multilib_foreach_abi db_fix_so
+}
diff --git a/sys-libs/db/db-5.1.29-r1.ebuild b/sys-libs/db/db-5.1.29-r1.ebuild
new file mode 100644
index 000000000000..1098ae248f88
--- /dev/null
+++ b/sys-libs/db/db-5.1.29-r1.ebuild
@@ -0,0 +1,203 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils db flag-o-matic java-pkg-opt-2 autotools multilib toolchain-funcs
+
+#Number of official patches
+#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
+PATCHNO=${PV/*.*.*_p}
+if [[ ${PATCHNO} == "${PV}" ]] ; then
+ MY_PV=${PV}
+ MY_P=${P}
+ PATCHNO=0
+else
+ MY_PV=${PV/_p${PATCHNO}}
+ MY_P=${PN}-${MY_PV}
+fi
+
+S_BASE="${WORKDIR}/${MY_P}"
+S="${S_BASE}/build_unix"
+DESCRIPTION="Oracle Berkeley DB"
+HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
+SRC_URI="http://download.oracle.com/berkeley-db/${MY_P}.tar.gz"
+for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
+ export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
+done
+
+LICENSE="Sleepycat"
+SLOT="5.1"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="doc java cxx tcl test"
+
+REQUIRED_USE="test? ( tcl )"
+
+# the entire testsuite needs the TCL functionality
+DEPEND="tcl? ( >=dev-lang/tcl-8.4:0 )
+ test? ( >=dev-lang/tcl-8.4:0 )
+ java? ( >=virtual/jdk-1.5 )
+ >=sys-devel/binutils-2.16.1"
+RDEPEND="tcl? ( dev-lang/tcl:0 )
+ java? ( >=virtual/jre-1.5 )"
+
+src_prepare() {
+ cd "${WORKDIR}"/"${MY_P}"
+ for (( i=1 ; i<=${PATCHNO} ; i++ ))
+ do
+ epatch "${DISTDIR}"/patch."${MY_PV}"."${i}"
+ done
+ epatch "${FILESDIR}"/${PN}-4.8-libtool.patch
+ epatch "${FILESDIR}"/${PN}-4.8.24-java-manifest-location.patch
+
+ # use the includes from the prefix
+ epatch "${FILESDIR}"/${PN}-4.6-jni-check-prefix-first.patch
+ epatch "${FILESDIR}"/${PN}-4.3-listen-to-java-options.patch
+
+ # upstream autoconf fails to build DBM when it's supposed to
+ # merged upstream in 5.0.26
+ #epatch "${FILESDIR}"/${PN}-5.0.21-enable-dbm-autoconf.patch
+
+ # Needed when compiling with clang
+ epatch "${FILESDIR}"/${P}-rename-atomic-compare-exchange.patch
+
+ # Upstream release script grabs the dates when the script was run, so lets
+ # end-run them to keep the date the same.
+ export REAL_DB_RELEASE_DATE="$(awk \
+ '/^DB_VERSION_STRING=/{ gsub(".*\\(|\\).*","",$0); print $0; }' \
+ "${S_BASE}"/dist/configure)"
+ sed -r -i \
+ -e "/^DB_RELEASE_DATE=/s~=.*~='${REAL_DB_RELEASE_DATE}'~g" \
+ "${S_BASE}"/dist/RELEASE
+
+ # Include the SLOT for Java JAR files
+ # This supersedes the unused jarlocation patches.
+ sed -r -i \
+ -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
+ "${S_BASE}"/dist/Makefile.in
+
+ cd "${S_BASE}"/dist
+ rm -f aclocal/libtool.m4
+ sed -i \
+ -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
+ configure.ac
+ sed -i \
+ -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
+ aclocal/programs.m4
+ AT_M4DIR="aclocal aclocal_java" eautoreconf
+ # Upstream sucks - they do autoconf and THEN replace the version variables.
+ . ./RELEASE
+ for v in \
+ DB_VERSION_{FAMILY,LETTER,RELEASE,MAJOR,MINOR} \
+ DB_VERSION_{PATCH,FULL,UNIQUE_NAME,STRING,FULL_STRING} \
+ DB_VERSION \
+ DB_RELEASE_DATE ; do
+ local ev="__EDIT_${v}__"
+ sed -i -e "s/${ev}/${!v}/g" configure
+ done
+}
+
+src_configure() {
+ local myconf=''
+
+ tc-ld-disable-gold #470634
+
+ # compilation with -O0 fails on amd64, see bug #171231
+ if use amd64; then
+ replace-flags -O0 -O2
+ is-flagq -O[s123] || append-flags -O2
+ fi
+
+ # use `set` here since the java opts will contain whitespace
+ set --
+ if use java ; then
+ set -- "$@" \
+ --with-java-prefix="${JAVA_HOME}" \
+ --with-javac-flags="$(java-pkg_javac-args)"
+ fi
+
+ # Add linker versions to the symbols. Easier to do, and safer than header file
+ # mumbo jumbo.
+ if use userland_GNU ; then
+ append-ldflags -Wl,--default-symver
+ fi
+
+ # Bug #270851: test needs TCL support
+ if use tcl || use test ; then
+ myconf="${myconf} --enable-tcl"
+ myconf="${myconf} --with-tcl=${EPREFIX}/usr/$(get_libdir)"
+ else
+ myconf="${myconf} --disable-tcl"
+ fi
+
+ # sql_compat will cause a collision with sqlite3
+ # --enable-sql_compat
+ cd "${S}"
+ ECONF_SOURCE="${S_BASE}"/dist \
+ STRIP="true" \
+ econf \
+ --enable-compat185 \
+ --enable-dbm \
+ --enable-o_direct \
+ --without-uniquename \
+ --enable-sql \
+ --enable-sql_codegen \
+ --disable-sql_compat \
+ $(use arm && echo --with-mutex=ARM/gcc-assembly) \
+ $(use amd64 && echo --with-mutex=x86/gcc-assembly) \
+ $(use_enable cxx) \
+ $(use_enable cxx stl) \
+ $(use_enable java) \
+ ${myconf} \
+ $(use_enable test) \
+ "$@"
+}
+
+src_compile() {
+ emake || die "make failed"
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+
+ db_src_install_usrbinslot
+
+ db_src_install_headerslot
+
+ db_src_install_doc
+
+ db_src_install_usrlibcleanup
+
+ dodir /usr/sbin
+ # This file is not always built, and no longer exists as of db-4.8
+ [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] && \
+ mv "${ED}"/usr/bin/berkeley_db_svc "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc
+
+ if use java; then
+ java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.so
+ java-pkg_dojar "${ED}"/usr/"$(get_libdir)"/*.jar
+ rm -f "${ED}"/usr/"$(get_libdir)"/*.jar
+ fi
+}
+
+pkg_postinst() {
+ db_fix_so
+}
+
+pkg_postrm() {
+ db_fix_so
+}
+
+src_test() {
+ # db_repsite is impossible to build, as upstream strips those sources.
+ # db_repsite is used directly in the setup_site_prog,
+ # setup_site_prog is called from open_site_prog
+ # which is called only from tests in the multi_repmgr group.
+ #sed -ri \
+ # -e '/set subs/s,multi_repmgr,,g' \
+ # "${S_BASE}/test/testparams.tcl"
+ sed -ri \
+ -e '/multi_repmgr/d' \
+ "${S_BASE}/test/tcl/test.tcl"
+
+ db_src_test
+}
diff --git a/sys-libs/db/db-5.3.28-r2.ebuild b/sys-libs/db/db-5.3.28-r2.ebuild
new file mode 100644
index 000000000000..5f80d60111f2
--- /dev/null
+++ b/sys-libs/db/db-5.3.28-r2.ebuild
@@ -0,0 +1,232 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils db flag-o-matic java-pkg-opt-2 autotools multilib multilib-minimal toolchain-funcs
+
+#Number of official patches
+#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
+PATCHNO=${PV/*.*.*_p}
+if [[ ${PATCHNO} == "${PV}" ]] ; then
+ MY_PV=${PV}
+ MY_P=${P}
+ PATCHNO=0
+else
+ MY_PV=${PV/_p${PATCHNO}}
+ MY_P=${PN}-${MY_PV}
+fi
+
+S_BASE="${WORKDIR}/${MY_P}"
+S="${S_BASE}/build_unix"
+DESCRIPTION="Oracle Berkeley DB"
+HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
+SRC_URI="http://download.oracle.com/berkeley-db/${MY_P}.tar.gz"
+for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
+ export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
+done
+
+LICENSE="Sleepycat"
+SLOT="5.3"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="doc java cxx tcl test"
+
+REQUIRED_USE="test? ( tcl )"
+
+# the entire testsuite needs the TCL functionality
+DEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ test? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jdk-1.5 )
+ >=sys-devel/binutils-2.16.1"
+RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jre-1.5 )"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/db5.3/db.h
+)
+
+src_prepare() {
+ cd "${WORKDIR}"/"${MY_P}"
+ for (( i=1 ; i<=${PATCHNO} ; i++ ))
+ do
+ epatch "${DISTDIR}"/patch."${MY_PV}"."${i}"
+ done
+
+ # bug #510506
+ epatch "${FILESDIR}"/${PN}-4.8.24-java-manifest-location.patch
+
+ # use the includes from the prefix
+ epatch "${FILESDIR}"/${PN}-4.6-jni-check-prefix-first.patch
+ epatch "${FILESDIR}"/${PN}-4.3-listen-to-java-options.patch
+
+ # sqlite configure call has an extra leading ..
+ # upstreamed:5.2.36, missing in 5.3.x
+ epatch "${FILESDIR}"/${PN}-5.2.28-sqlite-configure-path.patch
+
+ # The upstream testsuite copies .lib and the binaries for each parallel test
+ # core, ~300MB each. This patch uses links instead, saves a lot of space.
+ epatch "${FILESDIR}"/${PN}-6.0.20-test-link.patch
+
+ # Needed when compiling with clang
+ epatch "${FILESDIR}"/${PN}-5.1.29-rename-atomic-compare-exchange.patch
+
+ # Upstream release script grabs the dates when the script was run, so lets
+ # end-run them to keep the date the same.
+ export REAL_DB_RELEASE_DATE="$(awk \
+ '/^DB_VERSION_STRING=/{ gsub(".*\\(|\\).*","",$0); print $0; }' \
+ "${S_BASE}"/dist/configure)"
+ sed -r -i \
+ -e "/^DB_RELEASE_DATE=/s~=.*~='${REAL_DB_RELEASE_DATE}'~g" \
+ "${S_BASE}"/dist/RELEASE || die
+
+ # Include the SLOT for Java JAR files
+ # This supersedes the unused jarlocation patches.
+ sed -r -i \
+ -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
+ "${S_BASE}"/dist/Makefile.in || die
+
+ cd "${S_BASE}"/dist || die
+ rm -f aclocal/libtool.m4
+ sed -i \
+ -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
+ configure.ac || die
+ sed -i \
+ -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
+ aclocal/programs.m4 || die
+ AT_M4DIR="aclocal aclocal_java" eautoreconf
+ # Upstream sucks - they do autoconf and THEN replace the version variables.
+ . ./RELEASE
+ for v in \
+ DB_VERSION_{FAMILY,LETTER,RELEASE,MAJOR,MINOR} \
+ DB_VERSION_{PATCH,FULL,UNIQUE_NAME,STRING,FULL_STRING} \
+ DB_VERSION \
+ DB_RELEASE_DATE ; do
+ local ev="__EDIT_${v}__"
+ sed -i -e "s/${ev}/${!v}/g" configure || die
+ done
+}
+
+multilib_src_configure() {
+ local myconf=()
+
+ tc-ld-disable-gold #470634
+
+ # compilation with -O0 fails on amd64, see bug #171231
+ if [[ ${ABI} == amd64 ]]; then
+ local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
+ replace-flags -O0 -O2
+ is-flagq -O[s123] || append-flags -O2
+ fi
+
+ # Add linker versions to the symbols. Easier to do, and safer than header file
+ # mumbo jumbo.
+ if use userland_GNU ; then
+ append-ldflags -Wl,--default-symver
+ fi
+
+ # use `set` here since the java opts will contain whitespace
+ if multilib_is_native_abi && use java ; then
+ myconf+=(
+ --with-java-prefix="${JAVA_HOME}"
+ --with-javac-flags="$(java-pkg_javac-args)"
+ )
+ fi
+
+ # Bug #270851: test needs TCL support
+ if use tcl || use test ; then
+ myconf+=(
+ --enable-tcl
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)"
+ )
+ else
+ myconf+=(--disable-tcl )
+ fi
+
+ # sql_compat will cause a collision with sqlite3
+ # --enable-sql_compat
+ ECONF_SOURCE="${S_BASE}"/dist \
+ STRIP="true" \
+ econf \
+ --enable-compat185 \
+ --enable-dbm \
+ --enable-o_direct \
+ --without-uniquename \
+ --enable-sql \
+ --enable-sql_codegen \
+ --disable-sql_compat \
+ $([[ ${ABI} == arm ]] && echo --with-mutex=ARM/gcc-assembly) \
+ $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly) \
+ $(use_enable cxx) \
+ $(use_enable cxx stl) \
+ $(multilib_native_use_enable java) \
+ "${myconf[@]}" \
+ $(use_enable test)
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+
+ db_src_install_headerslot
+
+ db_src_install_usrlibcleanup
+
+ if multilib_is_native_abi && use java; then
+ java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.so
+ java-pkg_dojar "${ED}"/usr/"$(get_libdir)"/*.jar
+ rm -f "${ED}"/usr/"$(get_libdir)"/*.jar
+ fi
+}
+
+multilib_src_install_all() {
+ db_src_install_usrbinslot
+
+ db_src_install_doc
+
+ dodir /usr/sbin
+ # This file is not always built, and no longer exists as of db-4.8
+ if [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] ; then
+ mv "${ED}"/usr/bin/berkeley_db_svc \
+ "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die
+ fi
+}
+
+pkg_postinst() {
+ multilib_foreach_abi db_fix_so
+}
+
+pkg_postrm() {
+ multilib_foreach_abi db_fix_so
+}
+
+src_test() {
+ # db_repsite is impossible to build, as upstream strips those sources.
+ # db_repsite is used directly in the setup_site_prog,
+ # setup_site_prog is called from open_site_prog
+ # which is called only from tests in the multi_repmgr group.
+ #sed -ri \
+ # -e '/set subs/s,multi_repmgr,,g' \
+ # "${S_BASE}/test/testparams.tcl"
+ sed -ri \
+ -e '/multi_repmgr/d' \
+ "${S_BASE}/test/tcl/test.tcl" || die
+
+ # This is the only failure in 5.2.28 so far, and looks like a false positive.
+ # Repmgr018 (btree): Test of repmgr stats.
+ # Repmgr018.a: Start a master.
+ # Repmgr018.b: Start a client.
+ # Repmgr018.c: Run some transactions at master.
+ # Rep_test: btree 20 key/data pairs starting at 0
+ # Rep_test.a: put/get loop
+ # FAIL:07:05:59 (00:00:00) perm_no_failed_stat: expected 0, got 1
+ sed -ri \
+ -e '/set parms.*repmgr018/d' \
+ -e 's/repmgr018//g' \
+ "${S_BASE}/test/tcl/test.tcl" || die
+
+ multilib-minimal_src_test
+}
+
+multilib_src_test() {
+ multilib_is_native_abi || return
+
+ S=${BUILD_DIR} db_src_test
+}
diff --git a/sys-libs/db/db-5.3.28-r3.ebuild b/sys-libs/db/db-5.3.28-r3.ebuild
new file mode 100644
index 000000000000..240a2b09a416
--- /dev/null
+++ b/sys-libs/db/db-5.3.28-r3.ebuild
@@ -0,0 +1,234 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils db flag-o-matic java-pkg-opt-2 autotools multilib multilib-minimal toolchain-funcs
+
+#Number of official patches
+#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
+PATCHNO=${PV/*.*.*_p}
+if [[ ${PATCHNO} == "${PV}" ]] ; then
+ MY_PV=${PV}
+ MY_P=${P}
+ PATCHNO=0
+else
+ MY_PV=${PV/_p${PATCHNO}}
+ MY_P=${PN}-${MY_PV}
+fi
+
+S_BASE="${WORKDIR}/${MY_P}"
+S="${S_BASE}/build_unix"
+DESCRIPTION="Oracle Berkeley DB"
+HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
+SRC_URI="http://download.oracle.com/berkeley-db/${MY_P}.tar.gz"
+for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
+ export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
+done
+
+LICENSE="Sleepycat"
+SLOT="5.3"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="doc java cxx tcl test"
+
+REQUIRED_USE="test? ( tcl )"
+
+# the entire testsuite needs the TCL functionality
+DEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ test? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jdk-1.5 )
+ >=sys-devel/binutils-2.16.1"
+RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jre-1.5 )"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/db5.3/db.h
+)
+
+src_prepare() {
+ cd "${WORKDIR}"/"${MY_P}"
+ for (( i=1 ; i<=${PATCHNO} ; i++ ))
+ do
+ epatch "${DISTDIR}"/patch."${MY_PV}"."${i}"
+ done
+
+ # bug #510506
+ epatch "${FILESDIR}"/${PN}-4.8.24-java-manifest-location.patch
+
+ # use the includes from the prefix
+ epatch "${FILESDIR}"/${PN}-4.6-jni-check-prefix-first.patch
+ epatch "${FILESDIR}"/${PN}-4.3-listen-to-java-options.patch
+
+ # sqlite configure call has an extra leading ..
+ # upstreamed:5.2.36, missing in 5.3.x
+ epatch "${FILESDIR}"/${PN}-5.2.28-sqlite-configure-path.patch
+
+ # The upstream testsuite copies .lib and the binaries for each parallel test
+ # core, ~300MB each. This patch uses links instead, saves a lot of space.
+ epatch "${FILESDIR}"/${PN}-6.0.20-test-link.patch
+
+ # Needed when compiling with clang
+ epatch "${FILESDIR}"/${PN}-5.1.29-rename-atomic-compare-exchange.patch
+
+ # Upstream release script grabs the dates when the script was run, so lets
+ # end-run them to keep the date the same.
+ export REAL_DB_RELEASE_DATE="$(awk \
+ '/^DB_VERSION_STRING=/{ gsub(".*\\(|\\).*","",$0); print $0; }' \
+ "${S_BASE}"/dist/configure)"
+ sed -r -i \
+ -e "/^DB_RELEASE_DATE=/s~=.*~='${REAL_DB_RELEASE_DATE}'~g" \
+ "${S_BASE}"/dist/RELEASE || die
+
+ # Include the SLOT for Java JAR files
+ # This supersedes the unused jarlocation patches.
+ sed -r -i \
+ -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
+ "${S_BASE}"/dist/Makefile.in || die
+
+ cd "${S_BASE}"/dist || die
+ rm -f aclocal/libtool.m4
+ sed -i \
+ -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
+ configure.ac || die
+ sed -i \
+ -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
+ aclocal/programs.m4 || die
+ AT_M4DIR="aclocal aclocal_java" eautoreconf
+ # Upstream sucks - they do autoconf and THEN replace the version variables.
+ . ./RELEASE
+ for v in \
+ DB_VERSION_{FAMILY,LETTER,RELEASE,MAJOR,MINOR} \
+ DB_VERSION_{PATCH,FULL,UNIQUE_NAME,STRING,FULL_STRING} \
+ DB_VERSION \
+ DB_RELEASE_DATE ; do
+ local ev="__EDIT_${v}__"
+ sed -i -e "s/${ev}/${!v}/g" configure || die
+ done
+}
+
+multilib_src_configure() {
+ local myconf=()
+
+ tc-ld-disable-gold #470634
+
+ # compilation with -O0 fails on amd64, see bug #171231
+ if [[ ${ABI} == amd64 ]]; then
+ local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
+ replace-flags -O0 -O2
+ is-flagq -O[s123] || append-flags -O2
+ fi
+
+ # Add linker versions to the symbols. Easier to do, and safer than header file
+ # mumbo jumbo.
+ if use userland_GNU ; then
+ append-ldflags -Wl,--default-symver
+ fi
+
+ # use `set` here since the java opts will contain whitespace
+ if multilib_is_native_abi && use java ; then
+ myconf+=(
+ --with-java-prefix="${JAVA_HOME}"
+ --with-javac-flags="$(java-pkg_javac-args)"
+ )
+ fi
+
+ # Bug #270851: test needs TCL support
+ if use tcl || use test ; then
+ myconf+=(
+ --enable-tcl
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)"
+ )
+ else
+ myconf+=(--disable-tcl )
+ fi
+
+ # sql_compat will cause a collision with sqlite3
+ # --enable-sql_compat
+ # Don't --enable-sql* because we don't want to use bundled sqlite.
+ # See Gentoo bug #605688
+ ECONF_SOURCE="${S_BASE}"/dist \
+ STRIP="true" \
+ econf \
+ --enable-compat185 \
+ --enable-dbm \
+ --enable-o_direct \
+ --without-uniquename \
+ --disable-sql \
+ --disable-sql_codegen \
+ --disable-sql_compat \
+ $([[ ${ABI} == arm ]] && echo --with-mutex=ARM/gcc-assembly) \
+ $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly) \
+ $(use_enable cxx) \
+ $(use_enable cxx stl) \
+ $(multilib_native_use_enable java) \
+ "${myconf[@]}" \
+ $(use_enable test)
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+
+ db_src_install_headerslot
+
+ db_src_install_usrlibcleanup
+
+ if multilib_is_native_abi && use java; then
+ java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.so
+ java-pkg_dojar "${ED}"/usr/"$(get_libdir)"/*.jar
+ rm -f "${ED}"/usr/"$(get_libdir)"/*.jar
+ fi
+}
+
+multilib_src_install_all() {
+ db_src_install_usrbinslot
+
+ db_src_install_doc
+
+ dodir /usr/sbin
+ # This file is not always built, and no longer exists as of db-4.8
+ if [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] ; then
+ mv "${ED}"/usr/bin/berkeley_db_svc \
+ "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die
+ fi
+}
+
+pkg_postinst() {
+ multilib_foreach_abi db_fix_so
+}
+
+pkg_postrm() {
+ multilib_foreach_abi db_fix_so
+}
+
+src_test() {
+ # db_repsite is impossible to build, as upstream strips those sources.
+ # db_repsite is used directly in the setup_site_prog,
+ # setup_site_prog is called from open_site_prog
+ # which is called only from tests in the multi_repmgr group.
+ #sed -ri \
+ # -e '/set subs/s,multi_repmgr,,g' \
+ # "${S_BASE}/test/testparams.tcl"
+ sed -ri \
+ -e '/multi_repmgr/d' \
+ "${S_BASE}/test/tcl/test.tcl" || die
+
+ # This is the only failure in 5.2.28 so far, and looks like a false positive.
+ # Repmgr018 (btree): Test of repmgr stats.
+ # Repmgr018.a: Start a master.
+ # Repmgr018.b: Start a client.
+ # Repmgr018.c: Run some transactions at master.
+ # Rep_test: btree 20 key/data pairs starting at 0
+ # Rep_test.a: put/get loop
+ # FAIL:07:05:59 (00:00:00) perm_no_failed_stat: expected 0, got 1
+ sed -ri \
+ -e '/set parms.*repmgr018/d' \
+ -e 's/repmgr018//g' \
+ "${S_BASE}/test/tcl/test.tcl" || die
+
+ multilib-minimal_src_test
+}
+
+multilib_src_test() {
+ multilib_is_native_abi || return
+
+ S=${BUILD_DIR} db_src_test
+}
diff --git a/sys-libs/db/db-6.0.35-r1.ebuild b/sys-libs/db/db-6.0.35-r1.ebuild
new file mode 100644
index 000000000000..0c5fe167e084
--- /dev/null
+++ b/sys-libs/db/db-6.0.35-r1.ebuild
@@ -0,0 +1,232 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils db flag-o-matic java-pkg-opt-2 autotools multilib multilib-minimal versionator toolchain-funcs
+
+#Number of official patches
+#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
+PATCHNO=${PV/*.*.*_p}
+if [[ ${PATCHNO} == "${PV}" ]] ; then
+ MY_PV=${PV}
+ MY_P=${P}
+ PATCHNO=0
+else
+ MY_PV=${PV/_p${PATCHNO}}
+ MY_P=${PN}-${MY_PV}
+fi
+
+S_BASE="${WORKDIR}/${MY_P}"
+S="${S_BASE}/build_unix"
+DESCRIPTION="Oracle Berkeley DB"
+HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
+SRC_URI="http://download.oracle.com/berkeley-db/${MY_P}.tar.gz"
+for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
+ export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
+done
+
+LICENSE="AGPL-3"
+SLOT="$(get_version_component_range 1-2)"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="doc java cxx tcl test"
+
+REQUIRED_USE="test? ( tcl )"
+
+# the entire testsuite needs the TCL functionality
+DEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ test? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jdk-1.5 )
+ >=sys-devel/binutils-2.16.1"
+RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jre-1.5 )"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/db$(get_version_component_range 1-2)/db.h
+)
+
+src_prepare() {
+ cd "${WORKDIR}"/"${MY_P}"
+ for (( i=1 ; i<=${PATCHNO} ; i++ ))
+ do
+ epatch "${DISTDIR}"/patch."${MY_PV}"."${i}"
+ done
+
+ # bug #510506
+ epatch "${FILESDIR}"/${PN}-4.8.24-java-manifest-location.patch
+
+ # use the includes from the prefix
+ epatch "${FILESDIR}"/${PN}-4.6-jni-check-prefix-first.patch
+ epatch "${FILESDIR}"/${PN}-4.3-listen-to-java-options.patch
+
+ # sqlite configure call has an extra leading ..
+ # upstreamed:5.2.36, missing in 5.3.x/6.x
+ # still needs to be patched in 6.0.20
+ epatch "${FILESDIR}"/${PN}-6.0.35-sqlite-configure-path.patch
+
+ # The upstream testsuite copies .lib and the binaries for each parallel test
+ # core, ~300MB each. This patch uses links instead, saves a lot of space.
+ epatch "${FILESDIR}"/${PN}-6.0.20-test-link.patch
+
+ # Upstream release script grabs the dates when the script was run, so lets
+ # end-run them to keep the date the same.
+ export REAL_DB_RELEASE_DATE="$(awk \
+ '/^DB_VERSION_STRING=/{ gsub(".*\\(|\\).*","",$0); print $0; }' \
+ "${S_BASE}"/dist/configure)"
+ sed -r -i \
+ -e "/^DB_RELEASE_DATE=/s~=.*~='${REAL_DB_RELEASE_DATE}'~g" \
+ "${S_BASE}"/dist/RELEASE || die
+
+ # Include the SLOT for Java JAR files
+ # This supersedes the unused jarlocation patches.
+ sed -r -i \
+ -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
+ "${S_BASE}"/dist/Makefile.in || die
+
+ cd "${S_BASE}"/dist || die
+ rm -f aclocal/libtool.m4
+ sed -i \
+ -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
+ configure.ac || die
+ sed -i \
+ -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
+ aclocal/programs.m4 || die
+ AT_M4DIR="aclocal aclocal_java" eautoreconf
+ # Upstream sucks - they do autoconf and THEN replace the version variables.
+ . ./RELEASE
+ for v in \
+ DB_VERSION_{FAMILY,LETTER,RELEASE,MAJOR,MINOR} \
+ DB_VERSION_{PATCH,FULL,UNIQUE_NAME,STRING,FULL_STRING} \
+ DB_VERSION \
+ DB_RELEASE_DATE ; do
+ local ev="__EDIT_${v}__"
+ sed -i -e "s/${ev}/${!v}/g" configure || die
+ done
+}
+
+multilib_src_configure() {
+ local myconf=()
+
+ tc-ld-disable-gold #470634
+
+ # compilation with -O0 fails on amd64, see bug #171231
+ if [[ ${ABI} == amd64 ]]; then
+ local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
+ replace-flags -O0 -O2
+ is-flagq -O[s123] || append-flags -O2
+ fi
+
+ # Add linker versions to the symbols. Easier to do, and safer than header file
+ # mumbo jumbo.
+ if use userland_GNU ; then
+ append-ldflags -Wl,--default-symver
+ fi
+
+ # use `set` here since the java opts will contain whitespace
+ if multilib_is_native_abi && use java ; then
+ myconf+=(
+ --with-java-prefix="${JAVA_HOME}"
+ --with-javac-flags="$(java-pkg_javac-args)"
+ )
+ fi
+
+ # Bug #270851: test needs TCL support
+ if use tcl || use test ; then
+ myconf+=(
+ --enable-tcl
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)"
+ )
+ else
+ myconf+=(--disable-tcl )
+ fi
+
+ # sql_compat will cause a collision with sqlite3
+ # --enable-sql_compat
+ # Don't --enable-sql* because we don't want to use bundled sqlite.
+ # See Gentoo bug #605688
+ ECONF_SOURCE="${S_BASE}"/dist \
+ STRIP="true" \
+ econf \
+ --enable-compat185 \
+ --enable-dbm \
+ --enable-o_direct \
+ --without-uniquename \
+ --disable-sql \
+ --disable-sql_codegen \
+ --disable-sql_compat \
+ $([[ ${ABI} == arm ]] && echo --with-mutex=ARM/gcc-assembly) \
+ $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly) \
+ $(use_enable cxx) \
+ $(use_enable cxx stl) \
+ $(multilib_native_use_enable java) \
+ "${myconf[@]}" \
+ $(use_enable test)
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+
+ db_src_install_headerslot
+
+ db_src_install_usrlibcleanup
+
+ if multilib_is_native_abi && use java; then
+ java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.so
+ java-pkg_dojar "${ED}"/usr/"$(get_libdir)"/*.jar
+ rm -f "${ED}"/usr/"$(get_libdir)"/*.jar
+ fi
+}
+
+multilib_src_install_all() {
+ db_src_install_usrbinslot
+
+ db_src_install_doc
+
+ dodir /usr/sbin
+ # This file is not always built, and no longer exists as of db-4.8
+ if [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] ; then
+ mv "${ED}"/usr/bin/berkeley_db_svc \
+ "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die
+ fi
+}
+
+pkg_postinst() {
+ multilib_foreach_abi db_fix_so
+}
+
+pkg_postrm() {
+ multilib_foreach_abi db_fix_so
+}
+
+src_test() {
+ # db_repsite is impossible to build, as upstream strips those sources.
+ # db_repsite is used directly in the setup_site_prog,
+ # setup_site_prog is called from open_site_prog
+ # which is called only from tests in the multi_repmgr group.
+ #sed -ri \
+ # -e '/set subs/s,multi_repmgr,,g' \
+ # "${S_BASE}/test/testparams.tcl"
+ sed -ri \
+ -e '/multi_repmgr/d' \
+ "${S_BASE}/test/tcl/test.tcl" || die
+
+ # This is the only failure in 5.2.28 so far, and looks like a false positive.
+ # Repmgr018 (btree): Test of repmgr stats.
+ # Repmgr018.a: Start a master.
+ # Repmgr018.b: Start a client.
+ # Repmgr018.c: Run some transactions at master.
+ # Rep_test: btree 20 key/data pairs starting at 0
+ # Rep_test.a: put/get loop
+ # FAIL:07:05:59 (00:00:00) perm_no_failed_stat: expected 0, got 1
+ sed -ri \
+ -e '/set parms.*repmgr018/d' \
+ -e 's/repmgr018//g' \
+ "${S_BASE}/test/tcl/test.tcl" || die
+
+ multilib-minimal_src_test
+}
+
+multilib_src_test() {
+ multilib_is_native_abi || return
+
+ S=${BUILD_DIR} db_src_test
+}
diff --git a/sys-libs/db/db-6.0.35.ebuild b/sys-libs/db/db-6.0.35.ebuild
new file mode 100644
index 000000000000..5dce460076e1
--- /dev/null
+++ b/sys-libs/db/db-6.0.35.ebuild
@@ -0,0 +1,230 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils db flag-o-matic java-pkg-opt-2 autotools multilib multilib-minimal versionator toolchain-funcs
+
+#Number of official patches
+#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
+PATCHNO=${PV/*.*.*_p}
+if [[ ${PATCHNO} == "${PV}" ]] ; then
+ MY_PV=${PV}
+ MY_P=${P}
+ PATCHNO=0
+else
+ MY_PV=${PV/_p${PATCHNO}}
+ MY_P=${PN}-${MY_PV}
+fi
+
+S_BASE="${WORKDIR}/${MY_P}"
+S="${S_BASE}/build_unix"
+DESCRIPTION="Oracle Berkeley DB"
+HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
+SRC_URI="http://download.oracle.com/berkeley-db/${MY_P}.tar.gz"
+for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
+ export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
+done
+
+LICENSE="AGPL-3"
+SLOT="$(get_version_component_range 1-2)"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="doc java cxx tcl test"
+
+REQUIRED_USE="test? ( tcl )"
+
+# the entire testsuite needs the TCL functionality
+DEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ test? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jdk-1.5 )
+ >=sys-devel/binutils-2.16.1"
+RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jre-1.5 )"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/db$(get_version_component_range 1-2)/db.h
+)
+
+src_prepare() {
+ cd "${WORKDIR}"/"${MY_P}"
+ for (( i=1 ; i<=${PATCHNO} ; i++ ))
+ do
+ epatch "${DISTDIR}"/patch."${MY_PV}"."${i}"
+ done
+
+ # bug #510506
+ epatch "${FILESDIR}"/${PN}-4.8.24-java-manifest-location.patch
+
+ # use the includes from the prefix
+ epatch "${FILESDIR}"/${PN}-4.6-jni-check-prefix-first.patch
+ epatch "${FILESDIR}"/${PN}-4.3-listen-to-java-options.patch
+
+ # sqlite configure call has an extra leading ..
+ # upstreamed:5.2.36, missing in 5.3.x/6.x
+ # still needs to be patched in 6.0.20
+ epatch "${FILESDIR}"/${PN}-6.0.35-sqlite-configure-path.patch
+
+ # The upstream testsuite copies .lib and the binaries for each parallel test
+ # core, ~300MB each. This patch uses links instead, saves a lot of space.
+ epatch "${FILESDIR}"/${PN}-6.0.20-test-link.patch
+
+ # Upstream release script grabs the dates when the script was run, so lets
+ # end-run them to keep the date the same.
+ export REAL_DB_RELEASE_DATE="$(awk \
+ '/^DB_VERSION_STRING=/{ gsub(".*\\(|\\).*","",$0); print $0; }' \
+ "${S_BASE}"/dist/configure)"
+ sed -r -i \
+ -e "/^DB_RELEASE_DATE=/s~=.*~='${REAL_DB_RELEASE_DATE}'~g" \
+ "${S_BASE}"/dist/RELEASE || die
+
+ # Include the SLOT for Java JAR files
+ # This supersedes the unused jarlocation patches.
+ sed -r -i \
+ -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
+ "${S_BASE}"/dist/Makefile.in || die
+
+ cd "${S_BASE}"/dist || die
+ rm -f aclocal/libtool.m4
+ sed -i \
+ -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
+ configure.ac || die
+ sed -i \
+ -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
+ aclocal/programs.m4 || die
+ AT_M4DIR="aclocal aclocal_java" eautoreconf
+ # Upstream sucks - they do autoconf and THEN replace the version variables.
+ . ./RELEASE
+ for v in \
+ DB_VERSION_{FAMILY,LETTER,RELEASE,MAJOR,MINOR} \
+ DB_VERSION_{PATCH,FULL,UNIQUE_NAME,STRING,FULL_STRING} \
+ DB_VERSION \
+ DB_RELEASE_DATE ; do
+ local ev="__EDIT_${v}__"
+ sed -i -e "s/${ev}/${!v}/g" configure || die
+ done
+}
+
+multilib_src_configure() {
+ local myconf=()
+
+ tc-ld-disable-gold #470634
+
+ # compilation with -O0 fails on amd64, see bug #171231
+ if [[ ${ABI} == amd64 ]]; then
+ local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
+ replace-flags -O0 -O2
+ is-flagq -O[s123] || append-flags -O2
+ fi
+
+ # Add linker versions to the symbols. Easier to do, and safer than header file
+ # mumbo jumbo.
+ if use userland_GNU ; then
+ append-ldflags -Wl,--default-symver
+ fi
+
+ # use `set` here since the java opts will contain whitespace
+ if multilib_is_native_abi && use java ; then
+ myconf+=(
+ --with-java-prefix="${JAVA_HOME}"
+ --with-javac-flags="$(java-pkg_javac-args)"
+ )
+ fi
+
+ # Bug #270851: test needs TCL support
+ if use tcl || use test ; then
+ myconf+=(
+ --enable-tcl
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)"
+ )
+ else
+ myconf+=(--disable-tcl )
+ fi
+
+ # sql_compat will cause a collision with sqlite3
+ # --enable-sql_compat
+ ECONF_SOURCE="${S_BASE}"/dist \
+ STRIP="true" \
+ econf \
+ --enable-compat185 \
+ --enable-dbm \
+ --enable-o_direct \
+ --without-uniquename \
+ --enable-sql \
+ --enable-sql_codegen \
+ --disable-sql_compat \
+ $([[ ${ABI} == arm ]] && echo --with-mutex=ARM/gcc-assembly) \
+ $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly) \
+ $(use_enable cxx) \
+ $(use_enable cxx stl) \
+ $(multilib_native_use_enable java) \
+ "${myconf[@]}" \
+ $(use_enable test)
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+
+ db_src_install_headerslot
+
+ db_src_install_usrlibcleanup
+
+ if multilib_is_native_abi && use java; then
+ java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.so
+ java-pkg_dojar "${ED}"/usr/"$(get_libdir)"/*.jar
+ rm -f "${ED}"/usr/"$(get_libdir)"/*.jar
+ fi
+}
+
+multilib_src_install_all() {
+ db_src_install_usrbinslot
+
+ db_src_install_doc
+
+ dodir /usr/sbin
+ # This file is not always built, and no longer exists as of db-4.8
+ if [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] ; then
+ mv "${ED}"/usr/bin/berkeley_db_svc \
+ "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die
+ fi
+}
+
+pkg_postinst() {
+ multilib_foreach_abi db_fix_so
+}
+
+pkg_postrm() {
+ multilib_foreach_abi db_fix_so
+}
+
+src_test() {
+ # db_repsite is impossible to build, as upstream strips those sources.
+ # db_repsite is used directly in the setup_site_prog,
+ # setup_site_prog is called from open_site_prog
+ # which is called only from tests in the multi_repmgr group.
+ #sed -ri \
+ # -e '/set subs/s,multi_repmgr,,g' \
+ # "${S_BASE}/test/testparams.tcl"
+ sed -ri \
+ -e '/multi_repmgr/d' \
+ "${S_BASE}/test/tcl/test.tcl" || die
+
+ # This is the only failure in 5.2.28 so far, and looks like a false positive.
+ # Repmgr018 (btree): Test of repmgr stats.
+ # Repmgr018.a: Start a master.
+ # Repmgr018.b: Start a client.
+ # Repmgr018.c: Run some transactions at master.
+ # Rep_test: btree 20 key/data pairs starting at 0
+ # Rep_test.a: put/get loop
+ # FAIL:07:05:59 (00:00:00) perm_no_failed_stat: expected 0, got 1
+ sed -ri \
+ -e '/set parms.*repmgr018/d' \
+ -e 's/repmgr018//g' \
+ "${S_BASE}/test/tcl/test.tcl" || die
+
+ multilib-minimal_src_test
+}
+
+multilib_src_test() {
+ multilib_is_native_abi || return
+
+ S=${BUILD_DIR} db_src_test
+}
diff --git a/sys-libs/db/db-6.1.29-r1.ebuild b/sys-libs/db/db-6.1.29-r1.ebuild
new file mode 100644
index 000000000000..1055a51317b6
--- /dev/null
+++ b/sys-libs/db/db-6.1.29-r1.ebuild
@@ -0,0 +1,232 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils db flag-o-matic java-pkg-opt-2 autotools multilib multilib-minimal versionator toolchain-funcs
+
+#Number of official patches
+#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
+PATCHNO=${PV/*.*.*_p}
+if [[ ${PATCHNO} == "${PV}" ]] ; then
+ MY_PV=${PV}
+ MY_P=${P}
+ PATCHNO=0
+else
+ MY_PV=${PV/_p${PATCHNO}}
+ MY_P=${PN}-${MY_PV}
+fi
+
+S_BASE="${WORKDIR}/${MY_P}"
+S="${S_BASE}/build_unix"
+DESCRIPTION="Oracle Berkeley DB"
+HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
+SRC_URI="http://download.oracle.com/berkeley-db/${MY_P}.tar.gz"
+for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
+ export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
+done
+
+LICENSE="AGPL-3"
+SLOT="$(get_version_component_range 1-2)"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="doc java cxx tcl test"
+
+REQUIRED_USE="test? ( tcl )"
+
+# the entire testsuite needs the TCL functionality
+DEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ test? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jdk-1.5 )
+ >=sys-devel/binutils-2.16.1"
+RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jre-1.5 )"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/db$(get_version_component_range 1-2)/db.h
+)
+
+src_prepare() {
+ cd "${WORKDIR}"/"${MY_P}"
+ for (( i=1 ; i<=${PATCHNO} ; i++ ))
+ do
+ epatch "${DISTDIR}"/patch."${MY_PV}"."${i}"
+ done
+
+ # bug #510506
+ epatch "${FILESDIR}"/${PN}-4.8.24-java-manifest-location.patch
+
+ # use the includes from the prefix
+ epatch "${FILESDIR}"/${PN}-6.2-jni-check-prefix-first.patch
+ epatch "${FILESDIR}"/${PN}-4.3-listen-to-java-options.patch
+
+ # sqlite configure call has an extra leading ..
+ # upstreamed:5.2.36, missing in 5.3.x/6.x
+ # still needs to be patched in 6.0.20
+ epatch "${FILESDIR}"/${PN}-6.1.19-sqlite-configure-path.patch
+
+ # The upstream testsuite copies .lib and the binaries for each parallel test
+ # core, ~300MB each. This patch uses links instead, saves a lot of space.
+ epatch "${FILESDIR}"/${PN}-6.0.20-test-link.patch
+
+ # Upstream release script grabs the dates when the script was run, so lets
+ # end-run them to keep the date the same.
+ export REAL_DB_RELEASE_DATE="$(awk \
+ '/^DB_VERSION_STRING=/{ gsub(".*\\(|\\).*","",$0); print $0; }' \
+ "${S_BASE}"/dist/configure)"
+ sed -r -i \
+ -e "/^DB_RELEASE_DATE=/s~=.*~='${REAL_DB_RELEASE_DATE}'~g" \
+ "${S_BASE}"/dist/RELEASE || die
+
+ # Include the SLOT for Java JAR files
+ # This supersedes the unused jarlocation patches.
+ sed -r -i \
+ -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
+ "${S_BASE}"/dist/Makefile.in || die
+
+ cd "${S_BASE}"/dist || die
+ rm -f aclocal/libtool.m4
+ sed -i \
+ -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
+ configure.ac || die
+ sed -i \
+ -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
+ aclocal/programs.m4 || die
+ AT_M4DIR="aclocal aclocal_java" eautoreconf
+ # Upstream sucks - they do autoconf and THEN replace the version variables.
+ . ./RELEASE
+ for v in \
+ DB_VERSION_{FAMILY,LETTER,RELEASE,MAJOR,MINOR} \
+ DB_VERSION_{PATCH,FULL,UNIQUE_NAME,STRING,FULL_STRING} \
+ DB_VERSION \
+ DB_RELEASE_DATE ; do
+ local ev="__EDIT_${v}__"
+ sed -i -e "s/${ev}/${!v}/g" configure || die
+ done
+}
+
+multilib_src_configure() {
+ local myconf=()
+
+ tc-ld-disable-gold #470634
+
+ # compilation with -O0 fails on amd64, see bug #171231
+ if [[ ${ABI} == amd64 ]]; then
+ local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
+ replace-flags -O0 -O2
+ is-flagq -O[s123] || append-flags -O2
+ fi
+
+ # Add linker versions to the symbols. Easier to do, and safer than header file
+ # mumbo jumbo.
+ if use userland_GNU ; then
+ append-ldflags -Wl,--default-symver
+ fi
+
+ # use `set` here since the java opts will contain whitespace
+ if multilib_is_native_abi && use java ; then
+ myconf+=(
+ --with-java-prefix="${JAVA_HOME}"
+ --with-javac-flags="$(java-pkg_javac-args)"
+ )
+ fi
+
+ # Bug #270851: test needs TCL support
+ if use tcl || use test ; then
+ myconf+=(
+ --enable-tcl
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)"
+ )
+ else
+ myconf+=(--disable-tcl )
+ fi
+
+ # sql_compat will cause a collision with sqlite3
+ # --enable-sql_compat
+ # Don't --enable-sql* because we don't want to use bundled sqlite.
+ # See Gentoo bug #605688
+ ECONF_SOURCE="${S_BASE}"/dist \
+ STRIP="true" \
+ econf \
+ --enable-compat185 \
+ --enable-dbm \
+ --enable-o_direct \
+ --without-uniquename \
+ --disable-sql \
+ --disable-sql_codegen \
+ --disable-sql_compat \
+ $([[ ${ABI} == arm ]] && echo --with-mutex=ARM/gcc-assembly) \
+ $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly) \
+ $(use_enable cxx) \
+ $(use_enable cxx stl) \
+ $(multilib_native_use_enable java) \
+ "${myconf[@]}" \
+ $(use_enable test)
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+
+ db_src_install_headerslot
+
+ db_src_install_usrlibcleanup
+
+ if multilib_is_native_abi && use java; then
+ java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.so
+ java-pkg_dojar "${ED}"/usr/"$(get_libdir)"/*.jar
+ rm -f "${ED}"/usr/"$(get_libdir)"/*.jar
+ fi
+}
+
+multilib_src_install_all() {
+ db_src_install_usrbinslot
+
+ db_src_install_doc
+
+ dodir /usr/sbin
+ # This file is not always built, and no longer exists as of db-4.8
+ if [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] ; then
+ mv "${ED}"/usr/bin/berkeley_db_svc \
+ "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die
+ fi
+}
+
+pkg_postinst() {
+ multilib_foreach_abi db_fix_so
+}
+
+pkg_postrm() {
+ multilib_foreach_abi db_fix_so
+}
+
+src_test() {
+ # db_repsite is impossible to build, as upstream strips those sources.
+ # db_repsite is used directly in the setup_site_prog,
+ # setup_site_prog is called from open_site_prog
+ # which is called only from tests in the multi_repmgr group.
+ #sed -ri \
+ # -e '/set subs/s,multi_repmgr,,g' \
+ # "${S_BASE}/test/testparams.tcl"
+ sed -ri \
+ -e '/multi_repmgr/d' \
+ "${S_BASE}/test/tcl/test.tcl" || die
+
+ # This is the only failure in 5.2.28 so far, and looks like a false positive.
+ # Repmgr018 (btree): Test of repmgr stats.
+ # Repmgr018.a: Start a master.
+ # Repmgr018.b: Start a client.
+ # Repmgr018.c: Run some transactions at master.
+ # Rep_test: btree 20 key/data pairs starting at 0
+ # Rep_test.a: put/get loop
+ # FAIL:07:05:59 (00:00:00) perm_no_failed_stat: expected 0, got 1
+ sed -ri \
+ -e '/set parms.*repmgr018/d' \
+ -e 's/repmgr018//g' \
+ "${S_BASE}/test/tcl/test.tcl" || die
+
+ multilib-minimal_src_test
+}
+
+multilib_src_test() {
+ multilib_is_native_abi || return
+
+ S=${BUILD_DIR} db_src_test
+}
diff --git a/sys-libs/db/db-6.1.29.ebuild b/sys-libs/db/db-6.1.29.ebuild
new file mode 100644
index 000000000000..950bc6f97452
--- /dev/null
+++ b/sys-libs/db/db-6.1.29.ebuild
@@ -0,0 +1,230 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils db flag-o-matic java-pkg-opt-2 autotools multilib multilib-minimal versionator toolchain-funcs
+
+#Number of official patches
+#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
+PATCHNO=${PV/*.*.*_p}
+if [[ ${PATCHNO} == "${PV}" ]] ; then
+ MY_PV=${PV}
+ MY_P=${P}
+ PATCHNO=0
+else
+ MY_PV=${PV/_p${PATCHNO}}
+ MY_P=${PN}-${MY_PV}
+fi
+
+S_BASE="${WORKDIR}/${MY_P}"
+S="${S_BASE}/build_unix"
+DESCRIPTION="Oracle Berkeley DB"
+HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
+SRC_URI="http://download.oracle.com/berkeley-db/${MY_P}.tar.gz"
+for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
+ export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
+done
+
+LICENSE="AGPL-3"
+SLOT="$(get_version_component_range 1-2)"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="doc java cxx tcl test"
+
+REQUIRED_USE="test? ( tcl )"
+
+# the entire testsuite needs the TCL functionality
+DEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ test? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jdk-1.5 )
+ >=sys-devel/binutils-2.16.1"
+RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jre-1.5 )"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/db$(get_version_component_range 1-2)/db.h
+)
+
+src_prepare() {
+ cd "${WORKDIR}"/"${MY_P}"
+ for (( i=1 ; i<=${PATCHNO} ; i++ ))
+ do
+ epatch "${DISTDIR}"/patch."${MY_PV}"."${i}"
+ done
+
+ # bug #510506
+ epatch "${FILESDIR}"/${PN}-4.8.24-java-manifest-location.patch
+
+ # use the includes from the prefix
+ epatch "${FILESDIR}"/${PN}-6.2-jni-check-prefix-first.patch
+ epatch "${FILESDIR}"/${PN}-4.3-listen-to-java-options.patch
+
+ # sqlite configure call has an extra leading ..
+ # upstreamed:5.2.36, missing in 5.3.x/6.x
+ # still needs to be patched in 6.0.20
+ epatch "${FILESDIR}"/${PN}-6.1.19-sqlite-configure-path.patch
+
+ # The upstream testsuite copies .lib and the binaries for each parallel test
+ # core, ~300MB each. This patch uses links instead, saves a lot of space.
+ epatch "${FILESDIR}"/${PN}-6.0.20-test-link.patch
+
+ # Upstream release script grabs the dates when the script was run, so lets
+ # end-run them to keep the date the same.
+ export REAL_DB_RELEASE_DATE="$(awk \
+ '/^DB_VERSION_STRING=/{ gsub(".*\\(|\\).*","",$0); print $0; }' \
+ "${S_BASE}"/dist/configure)"
+ sed -r -i \
+ -e "/^DB_RELEASE_DATE=/s~=.*~='${REAL_DB_RELEASE_DATE}'~g" \
+ "${S_BASE}"/dist/RELEASE || die
+
+ # Include the SLOT for Java JAR files
+ # This supersedes the unused jarlocation patches.
+ sed -r -i \
+ -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
+ "${S_BASE}"/dist/Makefile.in || die
+
+ cd "${S_BASE}"/dist || die
+ rm -f aclocal/libtool.m4
+ sed -i \
+ -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
+ configure.ac || die
+ sed -i \
+ -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
+ aclocal/programs.m4 || die
+ AT_M4DIR="aclocal aclocal_java" eautoreconf
+ # Upstream sucks - they do autoconf and THEN replace the version variables.
+ . ./RELEASE
+ for v in \
+ DB_VERSION_{FAMILY,LETTER,RELEASE,MAJOR,MINOR} \
+ DB_VERSION_{PATCH,FULL,UNIQUE_NAME,STRING,FULL_STRING} \
+ DB_VERSION \
+ DB_RELEASE_DATE ; do
+ local ev="__EDIT_${v}__"
+ sed -i -e "s/${ev}/${!v}/g" configure || die
+ done
+}
+
+multilib_src_configure() {
+ local myconf=()
+
+ tc-ld-disable-gold #470634
+
+ # compilation with -O0 fails on amd64, see bug #171231
+ if [[ ${ABI} == amd64 ]]; then
+ local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
+ replace-flags -O0 -O2
+ is-flagq -O[s123] || append-flags -O2
+ fi
+
+ # Add linker versions to the symbols. Easier to do, and safer than header file
+ # mumbo jumbo.
+ if use userland_GNU ; then
+ append-ldflags -Wl,--default-symver
+ fi
+
+ # use `set` here since the java opts will contain whitespace
+ if multilib_is_native_abi && use java ; then
+ myconf+=(
+ --with-java-prefix="${JAVA_HOME}"
+ --with-javac-flags="$(java-pkg_javac-args)"
+ )
+ fi
+
+ # Bug #270851: test needs TCL support
+ if use tcl || use test ; then
+ myconf+=(
+ --enable-tcl
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)"
+ )
+ else
+ myconf+=(--disable-tcl )
+ fi
+
+ # sql_compat will cause a collision with sqlite3
+ # --enable-sql_compat
+ ECONF_SOURCE="${S_BASE}"/dist \
+ STRIP="true" \
+ econf \
+ --enable-compat185 \
+ --enable-dbm \
+ --enable-o_direct \
+ --without-uniquename \
+ --enable-sql \
+ --enable-sql_codegen \
+ --disable-sql_compat \
+ $([[ ${ABI} == arm ]] && echo --with-mutex=ARM/gcc-assembly) \
+ $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly) \
+ $(use_enable cxx) \
+ $(use_enable cxx stl) \
+ $(multilib_native_use_enable java) \
+ "${myconf[@]}" \
+ $(use_enable test)
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+
+ db_src_install_headerslot
+
+ db_src_install_usrlibcleanup
+
+ if multilib_is_native_abi && use java; then
+ java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.so
+ java-pkg_dojar "${ED}"/usr/"$(get_libdir)"/*.jar
+ rm -f "${ED}"/usr/"$(get_libdir)"/*.jar
+ fi
+}
+
+multilib_src_install_all() {
+ db_src_install_usrbinslot
+
+ db_src_install_doc
+
+ dodir /usr/sbin
+ # This file is not always built, and no longer exists as of db-4.8
+ if [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] ; then
+ mv "${ED}"/usr/bin/berkeley_db_svc \
+ "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die
+ fi
+}
+
+pkg_postinst() {
+ multilib_foreach_abi db_fix_so
+}
+
+pkg_postrm() {
+ multilib_foreach_abi db_fix_so
+}
+
+src_test() {
+ # db_repsite is impossible to build, as upstream strips those sources.
+ # db_repsite is used directly in the setup_site_prog,
+ # setup_site_prog is called from open_site_prog
+ # which is called only from tests in the multi_repmgr group.
+ #sed -ri \
+ # -e '/set subs/s,multi_repmgr,,g' \
+ # "${S_BASE}/test/testparams.tcl"
+ sed -ri \
+ -e '/multi_repmgr/d' \
+ "${S_BASE}/test/tcl/test.tcl" || die
+
+ # This is the only failure in 5.2.28 so far, and looks like a false positive.
+ # Repmgr018 (btree): Test of repmgr stats.
+ # Repmgr018.a: Start a master.
+ # Repmgr018.b: Start a client.
+ # Repmgr018.c: Run some transactions at master.
+ # Rep_test: btree 20 key/data pairs starting at 0
+ # Rep_test.a: put/get loop
+ # FAIL:07:05:59 (00:00:00) perm_no_failed_stat: expected 0, got 1
+ sed -ri \
+ -e '/set parms.*repmgr018/d' \
+ -e 's/repmgr018//g' \
+ "${S_BASE}/test/tcl/test.tcl" || die
+
+ multilib-minimal_src_test
+}
+
+multilib_src_test() {
+ multilib_is_native_abi || return
+
+ S=${BUILD_DIR} db_src_test
+}
diff --git a/sys-libs/db/db-6.2.23-r1.ebuild b/sys-libs/db/db-6.2.23-r1.ebuild
new file mode 100644
index 000000000000..2d4ba9b44373
--- /dev/null
+++ b/sys-libs/db/db-6.2.23-r1.ebuild
@@ -0,0 +1,237 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils db flag-o-matic java-pkg-opt-2 autotools multilib multilib-minimal versionator toolchain-funcs
+
+#Number of official patches
+#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
+PATCHNO=${PV/*.*.*_p}
+if [[ ${PATCHNO} == "${PV}" ]] ; then
+ MY_PV=${PV}
+ MY_P=${P}
+ PATCHNO=0
+else
+ MY_PV=${PV/_p${PATCHNO}}
+ MY_P=${PN}-${MY_PV}
+fi
+
+S_BASE="${WORKDIR}/${MY_P}"
+S="${S_BASE}/build_unix"
+DESCRIPTION="Oracle Berkeley DB"
+HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
+SRC_URI="http://download.oracle.com/berkeley-db/${MY_P}.tar.gz"
+for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
+ export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
+done
+
+LICENSE="AGPL-3"
+SLOT="$(get_version_component_range 1-2)"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="doc java cxx tcl test"
+
+REQUIRED_USE="test? ( tcl )"
+
+# the entire testsuite needs the TCL functionality
+DEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ test? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jdk-1.5 )
+ >=sys-devel/binutils-2.16.1"
+RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jre-1.5 )"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/db$(get_version_component_range 1-2)/db.h
+)
+
+PATCHES=(
+ # bug #510506
+ "${FILESDIR}"/${PN}-4.8.24-java-manifest-location.patch
+
+ # use the includes from the prefix
+ "${FILESDIR}"/${PN}-6.2-jni-check-prefix-first.patch
+ "${FILESDIR}"/${PN}-4.3-listen-to-java-options.patch
+
+ # sqlite configure call has an extra leading ..
+ # upstreamed:5.2.36, missing in 5.3.x/6.x
+ # still needs to be patched in 6.0.20
+ "${FILESDIR}"/${PN}-6.1.19-sqlite-configure-path.patch
+
+ # The upstream testsuite copies .lib and the binaries for each parallel test
+ # core, ~300MB each. This patch uses links instead, saves a lot of space.
+ "${FILESDIR}"/${PN}-6.0.20-test-link.patch
+)
+
+src_prepare() {
+ cd "${WORKDIR}"/"${MY_P}"
+ for (( i=1 ; i<=${PATCHNO} ; i++ ))
+ do
+ epatch "${DISTDIR}"/patch."${MY_PV}"."${i}"
+ done
+
+ epatch "${PATCHES[@]}"
+ epatch_user
+
+ # Upstream release script grabs the dates when the script was run, so lets
+ # end-run them to keep the date the same.
+ export REAL_DB_RELEASE_DATE="$(awk \
+ '/^DB_VERSION_STRING=/{ gsub(".*\\(|\\).*","",$0); print $0; }' \
+ "${S_BASE}"/dist/configure)"
+ sed -r -i \
+ -e "/^DB_RELEASE_DATE=/s~=.*~='${REAL_DB_RELEASE_DATE}'~g" \
+ "${S_BASE}"/dist/RELEASE || die
+
+ # Include the SLOT for Java JAR files
+ # This supersedes the unused jarlocation patches.
+ sed -r -i \
+ -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
+ "${S_BASE}"/dist/Makefile.in || die
+
+ cd "${S_BASE}"/dist || die
+ rm -f aclocal/libtool.m4
+ sed -i \
+ -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
+ configure.ac || die
+ sed -i \
+ -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
+ aclocal/programs.m4 || die
+ AT_M4DIR="aclocal aclocal_java" eautoreconf
+ # Upstream sucks - they do autoconf and THEN replace the version variables.
+ . ./RELEASE
+ for v in \
+ DB_VERSION_{FAMILY,LETTER,RELEASE,MAJOR,MINOR} \
+ DB_VERSION_{PATCH,FULL,UNIQUE_NAME,STRING,FULL_STRING} \
+ DB_VERSION \
+ DB_RELEASE_DATE ; do
+ local ev="__EDIT_${v}__"
+ sed -i -e "s/${ev}/${!v}/g" configure || die
+ done
+}
+
+multilib_src_configure() {
+ local myconf=()
+
+ tc-ld-disable-gold #470634
+
+ # compilation with -O0 fails on amd64, see bug #171231
+ if [[ ${ABI} == amd64 ]]; then
+ local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
+ replace-flags -O0 -O2
+ is-flagq -O[s123] || append-flags -O2
+ fi
+
+ # Add linker versions to the symbols. Easier to do, and safer than header file
+ # mumbo jumbo.
+ if use userland_GNU ; then
+ append-ldflags -Wl,--default-symver
+ fi
+
+ # use `set` here since the java opts will contain whitespace
+ if multilib_is_native_abi && use java ; then
+ myconf+=(
+ --with-java-prefix="${JAVA_HOME}"
+ --with-javac-flags="$(java-pkg_javac-args)"
+ )
+ fi
+
+ # Bug #270851: test needs TCL support
+ if use tcl || use test ; then
+ myconf+=(
+ --enable-tcl
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)"
+ )
+ else
+ myconf+=(--disable-tcl )
+ fi
+
+ # sql_compat will cause a collision with sqlite3
+ # --enable-sql_compat
+ # Don't --enable-sql* because we don't want to use bundled sqlite.
+ # See Gentoo bug #605688
+ ECONF_SOURCE="${S_BASE}"/dist \
+ STRIP="true" \
+ econf \
+ --enable-compat185 \
+ --enable-dbm \
+ --enable-o_direct \
+ --without-uniquename \
+ --disable-sql \
+ --disable-sql_codegen \
+ --disable-sql_compat \
+ $([[ ${ABI} == arm ]] && echo --with-mutex=ARM/gcc-assembly) \
+ $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly) \
+ $(use_enable cxx) \
+ $(use_enable cxx stl) \
+ $(multilib_native_use_enable java) \
+ "${myconf[@]}" \
+ $(use_enable test)
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+
+ db_src_install_headerslot
+
+ db_src_install_usrlibcleanup
+
+ if multilib_is_native_abi && use java; then
+ java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.so
+ java-pkg_dojar "${ED}"/usr/"$(get_libdir)"/*.jar
+ rm -f "${ED}"/usr/"$(get_libdir)"/*.jar
+ fi
+}
+
+multilib_src_install_all() {
+ db_src_install_usrbinslot
+
+ db_src_install_doc
+
+ dodir /usr/sbin
+ # This file is not always built, and no longer exists as of db-4.8
+ if [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] ; then
+ mv "${ED}"/usr/bin/berkeley_db_svc \
+ "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die
+ fi
+}
+
+pkg_postinst() {
+ multilib_foreach_abi db_fix_so
+}
+
+pkg_postrm() {
+ multilib_foreach_abi db_fix_so
+}
+
+src_test() {
+ # db_repsite is impossible to build, as upstream strips those sources.
+ # db_repsite is used directly in the setup_site_prog,
+ # setup_site_prog is called from open_site_prog
+ # which is called only from tests in the multi_repmgr group.
+ #sed -ri \
+ # -e '/set subs/s,multi_repmgr,,g' \
+ # "${S_BASE}/test/testparams.tcl"
+ sed -ri \
+ -e '/multi_repmgr/d' \
+ "${S_BASE}/test/tcl/test.tcl" || die
+
+ # This is the only failure in 5.2.28 so far, and looks like a false positive.
+ # Repmgr018 (btree): Test of repmgr stats.
+ # Repmgr018.a: Start a master.
+ # Repmgr018.b: Start a client.
+ # Repmgr018.c: Run some transactions at master.
+ # Rep_test: btree 20 key/data pairs starting at 0
+ # Rep_test.a: put/get loop
+ # FAIL:07:05:59 (00:00:00) perm_no_failed_stat: expected 0, got 1
+ sed -ri \
+ -e '/set parms.*repmgr018/d' \
+ -e 's/repmgr018//g' \
+ "${S_BASE}/test/tcl/test.tcl" || die
+
+ multilib-minimal_src_test
+}
+
+multilib_src_test() {
+ multilib_is_native_abi || return
+
+ S=${BUILD_DIR} db_src_test
+}
diff --git a/sys-libs/db/db-6.2.23.ebuild b/sys-libs/db/db-6.2.23.ebuild
new file mode 100644
index 000000000000..ff7694a3b692
--- /dev/null
+++ b/sys-libs/db/db-6.2.23.ebuild
@@ -0,0 +1,235 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils db flag-o-matic java-pkg-opt-2 autotools multilib multilib-minimal versionator toolchain-funcs
+
+#Number of official patches
+#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
+PATCHNO=${PV/*.*.*_p}
+if [[ ${PATCHNO} == "${PV}" ]] ; then
+ MY_PV=${PV}
+ MY_P=${P}
+ PATCHNO=0
+else
+ MY_PV=${PV/_p${PATCHNO}}
+ MY_P=${PN}-${MY_PV}
+fi
+
+S_BASE="${WORKDIR}/${MY_P}"
+S="${S_BASE}/build_unix"
+DESCRIPTION="Oracle Berkeley DB"
+HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
+SRC_URI="http://download.oracle.com/berkeley-db/${MY_P}.tar.gz"
+for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
+ export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
+done
+
+LICENSE="AGPL-3"
+SLOT="$(get_version_component_range 1-2)"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="doc java cxx tcl test"
+
+REQUIRED_USE="test? ( tcl )"
+
+# the entire testsuite needs the TCL functionality
+DEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ test? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jdk-1.5 )
+ >=sys-devel/binutils-2.16.1"
+RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jre-1.5 )"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/db$(get_version_component_range 1-2)/db.h
+)
+
+PATCHES=(
+ # bug #510506
+ "${FILESDIR}"/${PN}-4.8.24-java-manifest-location.patch
+
+ # use the includes from the prefix
+ "${FILESDIR}"/${PN}-6.2-jni-check-prefix-first.patch
+ "${FILESDIR}"/${PN}-4.3-listen-to-java-options.patch
+
+ # sqlite configure call has an extra leading ..
+ # upstreamed:5.2.36, missing in 5.3.x/6.x
+ # still needs to be patched in 6.0.20
+ "${FILESDIR}"/${PN}-6.1.19-sqlite-configure-path.patch
+
+ # The upstream testsuite copies .lib and the binaries for each parallel test
+ # core, ~300MB each. This patch uses links instead, saves a lot of space.
+ "${FILESDIR}"/${PN}-6.0.20-test-link.patch
+)
+
+src_prepare() {
+ cd "${WORKDIR}"/"${MY_P}"
+ for (( i=1 ; i<=${PATCHNO} ; i++ ))
+ do
+ epatch "${DISTDIR}"/patch."${MY_PV}"."${i}"
+ done
+
+ epatch "${PATCHES[@]}"
+ epatch_user
+
+ # Upstream release script grabs the dates when the script was run, so lets
+ # end-run them to keep the date the same.
+ export REAL_DB_RELEASE_DATE="$(awk \
+ '/^DB_VERSION_STRING=/{ gsub(".*\\(|\\).*","",$0); print $0; }' \
+ "${S_BASE}"/dist/configure)"
+ sed -r -i \
+ -e "/^DB_RELEASE_DATE=/s~=.*~='${REAL_DB_RELEASE_DATE}'~g" \
+ "${S_BASE}"/dist/RELEASE || die
+
+ # Include the SLOT for Java JAR files
+ # This supersedes the unused jarlocation patches.
+ sed -r -i \
+ -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
+ "${S_BASE}"/dist/Makefile.in || die
+
+ cd "${S_BASE}"/dist || die
+ rm -f aclocal/libtool.m4
+ sed -i \
+ -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
+ configure.ac || die
+ sed -i \
+ -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
+ aclocal/programs.m4 || die
+ AT_M4DIR="aclocal aclocal_java" eautoreconf
+ # Upstream sucks - they do autoconf and THEN replace the version variables.
+ . ./RELEASE
+ for v in \
+ DB_VERSION_{FAMILY,LETTER,RELEASE,MAJOR,MINOR} \
+ DB_VERSION_{PATCH,FULL,UNIQUE_NAME,STRING,FULL_STRING} \
+ DB_VERSION \
+ DB_RELEASE_DATE ; do
+ local ev="__EDIT_${v}__"
+ sed -i -e "s/${ev}/${!v}/g" configure || die
+ done
+}
+
+multilib_src_configure() {
+ local myconf=()
+
+ tc-ld-disable-gold #470634
+
+ # compilation with -O0 fails on amd64, see bug #171231
+ if [[ ${ABI} == amd64 ]]; then
+ local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
+ replace-flags -O0 -O2
+ is-flagq -O[s123] || append-flags -O2
+ fi
+
+ # Add linker versions to the symbols. Easier to do, and safer than header file
+ # mumbo jumbo.
+ if use userland_GNU ; then
+ append-ldflags -Wl,--default-symver
+ fi
+
+ # use `set` here since the java opts will contain whitespace
+ if multilib_is_native_abi && use java ; then
+ myconf+=(
+ --with-java-prefix="${JAVA_HOME}"
+ --with-javac-flags="$(java-pkg_javac-args)"
+ )
+ fi
+
+ # Bug #270851: test needs TCL support
+ if use tcl || use test ; then
+ myconf+=(
+ --enable-tcl
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)"
+ )
+ else
+ myconf+=(--disable-tcl )
+ fi
+
+ # sql_compat will cause a collision with sqlite3
+ # --enable-sql_compat
+ ECONF_SOURCE="${S_BASE}"/dist \
+ STRIP="true" \
+ econf \
+ --enable-compat185 \
+ --enable-dbm \
+ --enable-o_direct \
+ --without-uniquename \
+ --enable-sql \
+ --enable-sql_codegen \
+ --disable-sql_compat \
+ $([[ ${ABI} == arm ]] && echo --with-mutex=ARM/gcc-assembly) \
+ $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly) \
+ $(use_enable cxx) \
+ $(use_enable cxx stl) \
+ $(multilib_native_use_enable java) \
+ "${myconf[@]}" \
+ $(use_enable test)
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+
+ db_src_install_headerslot
+
+ db_src_install_usrlibcleanup
+
+ if multilib_is_native_abi && use java; then
+ java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.so
+ java-pkg_dojar "${ED}"/usr/"$(get_libdir)"/*.jar
+ rm -f "${ED}"/usr/"$(get_libdir)"/*.jar
+ fi
+}
+
+multilib_src_install_all() {
+ db_src_install_usrbinslot
+
+ db_src_install_doc
+
+ dodir /usr/sbin
+ # This file is not always built, and no longer exists as of db-4.8
+ if [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] ; then
+ mv "${ED}"/usr/bin/berkeley_db_svc \
+ "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die
+ fi
+}
+
+pkg_postinst() {
+ multilib_foreach_abi db_fix_so
+}
+
+pkg_postrm() {
+ multilib_foreach_abi db_fix_so
+}
+
+src_test() {
+ # db_repsite is impossible to build, as upstream strips those sources.
+ # db_repsite is used directly in the setup_site_prog,
+ # setup_site_prog is called from open_site_prog
+ # which is called only from tests in the multi_repmgr group.
+ #sed -ri \
+ # -e '/set subs/s,multi_repmgr,,g' \
+ # "${S_BASE}/test/testparams.tcl"
+ sed -ri \
+ -e '/multi_repmgr/d' \
+ "${S_BASE}/test/tcl/test.tcl" || die
+
+ # This is the only failure in 5.2.28 so far, and looks like a false positive.
+ # Repmgr018 (btree): Test of repmgr stats.
+ # Repmgr018.a: Start a master.
+ # Repmgr018.b: Start a client.
+ # Repmgr018.c: Run some transactions at master.
+ # Rep_test: btree 20 key/data pairs starting at 0
+ # Rep_test.a: put/get loop
+ # FAIL:07:05:59 (00:00:00) perm_no_failed_stat: expected 0, got 1
+ sed -ri \
+ -e '/set parms.*repmgr018/d' \
+ -e 's/repmgr018//g' \
+ "${S_BASE}/test/tcl/test.tcl" || die
+
+ multilib-minimal_src_test
+}
+
+multilib_src_test() {
+ multilib_is_native_abi || return
+
+ S=${BUILD_DIR} db_src_test
+}
diff --git a/sys-libs/db/db-6.2.32-r1.ebuild b/sys-libs/db/db-6.2.32-r1.ebuild
new file mode 100644
index 000000000000..2dbb2cc1a5de
--- /dev/null
+++ b/sys-libs/db/db-6.2.32-r1.ebuild
@@ -0,0 +1,237 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils db flag-o-matic java-pkg-opt-2 autotools multilib multilib-minimal versionator toolchain-funcs
+
+#Number of official patches
+#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
+PATCHNO=${PV/*.*.*_p}
+if [[ ${PATCHNO} == "${PV}" ]] ; then
+ MY_PV=${PV}
+ MY_P=${P}
+ PATCHNO=0
+else
+ MY_PV=${PV/_p${PATCHNO}}
+ MY_P=${PN}-${MY_PV}
+fi
+
+S_BASE="${WORKDIR}/${MY_P}"
+S="${S_BASE}/build_unix"
+DESCRIPTION="Oracle Berkeley DB"
+HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
+SRC_URI="http://download.oracle.com/berkeley-db/${MY_P}.tar.gz"
+for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
+ export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
+done
+
+LICENSE="AGPL-3"
+SLOT="$(get_version_component_range 1-2)"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="doc java cxx tcl test"
+
+REQUIRED_USE="test? ( tcl )"
+
+# the entire testsuite needs the TCL functionality
+DEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ test? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jdk-1.5 )
+ >=sys-devel/binutils-2.16.1"
+RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jre-1.5 )"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/db$(get_version_component_range 1-2)/db.h
+)
+
+PATCHES=(
+ # bug #510506
+ "${FILESDIR}"/${PN}-4.8.24-java-manifest-location.patch
+
+ # use the includes from the prefix
+ "${FILESDIR}"/${PN}-6.2.32-jni-check-prefix-first.patch
+ "${FILESDIR}"/${PN}-4.3-listen-to-java-options.patch
+
+ # sqlite configure call has an extra leading ..
+ # upstreamed:5.2.36, missing in 5.3.x/6.x
+ # still needs to be patched in 6.0.20
+ "${FILESDIR}"/${PN}-6.1.19-sqlite-configure-path.patch
+
+ # The upstream testsuite copies .lib and the binaries for each parallel test
+ # core, ~300MB each. This patch uses links instead, saves a lot of space.
+ "${FILESDIR}"/${PN}-6.0.20-test-link.patch
+)
+
+src_prepare() {
+ cd "${WORKDIR}"/"${MY_P}"
+ for (( i=1 ; i<=${PATCHNO} ; i++ ))
+ do
+ epatch "${DISTDIR}"/patch."${MY_PV}"."${i}"
+ done
+
+ epatch "${PATCHES[@]}"
+ epatch_user
+
+ # Upstream release script grabs the dates when the script was run, so lets
+ # end-run them to keep the date the same.
+ export REAL_DB_RELEASE_DATE="$(awk \
+ '/^DB_VERSION_STRING=/{ gsub(".*\\(|\\).*","",$0); print $0; }' \
+ "${S_BASE}"/dist/configure)"
+ sed -r -i \
+ -e "/^DB_RELEASE_DATE=/s~=.*~='${REAL_DB_RELEASE_DATE}'~g" \
+ "${S_BASE}"/dist/RELEASE || die
+
+ # Include the SLOT for Java JAR files
+ # This supersedes the unused jarlocation patches.
+ sed -r -i \
+ -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
+ "${S_BASE}"/dist/Makefile.in || die
+
+ cd "${S_BASE}"/dist || die
+ rm -f aclocal/libtool.m4
+ sed -i \
+ -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
+ configure.ac || die
+ sed -i \
+ -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
+ aclocal/programs.m4 || die
+ AT_M4DIR="aclocal aclocal_java" eautoreconf
+ # Upstream sucks - they do autoconf and THEN replace the version variables.
+ . ./RELEASE
+ for v in \
+ DB_VERSION_{FAMILY,LETTER,RELEASE,MAJOR,MINOR} \
+ DB_VERSION_{PATCH,FULL,UNIQUE_NAME,STRING,FULL_STRING} \
+ DB_VERSION \
+ DB_RELEASE_DATE ; do
+ local ev="__EDIT_${v}__"
+ sed -i -e "s/${ev}/${!v}/g" configure || die
+ done
+}
+
+multilib_src_configure() {
+ local myconf=()
+
+ tc-ld-disable-gold #470634
+
+ # compilation with -O0 fails on amd64, see bug #171231
+ if [[ ${ABI} == amd64 ]]; then
+ local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
+ replace-flags -O0 -O2
+ is-flagq -O[s123] || append-flags -O2
+ fi
+
+ # Add linker versions to the symbols. Easier to do, and safer than header file
+ # mumbo jumbo.
+ if use userland_GNU ; then
+ append-ldflags -Wl,--default-symver
+ fi
+
+ # use `set` here since the java opts will contain whitespace
+ if multilib_is_native_abi && use java ; then
+ myconf+=(
+ --with-java-prefix="${JAVA_HOME}"
+ --with-javac-flags="$(java-pkg_javac-args)"
+ )
+ fi
+
+ # Bug #270851: test needs TCL support
+ if use tcl || use test ; then
+ myconf+=(
+ --enable-tcl
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)"
+ )
+ else
+ myconf+=(--disable-tcl )
+ fi
+
+ # sql_compat will cause a collision with sqlite3
+ # --enable-sql_compat
+ # Don't --enable-sql* because we don't want to use bundled sqlite.
+ # See Gentoo bug #605688
+ ECONF_SOURCE="${S_BASE}"/dist \
+ STRIP="true" \
+ econf \
+ --enable-compat185 \
+ --enable-dbm \
+ --enable-o_direct \
+ --without-uniquename \
+ --disable-sql \
+ --disable-sql_codegen \
+ --disable-sql_compat \
+ $([[ ${ABI} == arm ]] && echo --with-mutex=ARM/gcc-assembly) \
+ $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly) \
+ $(use_enable cxx) \
+ $(use_enable cxx stl) \
+ $(multilib_native_use_enable java) \
+ "${myconf[@]}" \
+ $(use_enable test)
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+
+ db_src_install_headerslot
+
+ db_src_install_usrlibcleanup
+
+ if multilib_is_native_abi && use java; then
+ java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.so
+ java-pkg_dojar "${ED}"/usr/"$(get_libdir)"/*.jar
+ rm -f "${ED}"/usr/"$(get_libdir)"/*.jar
+ fi
+}
+
+multilib_src_install_all() {
+ db_src_install_usrbinslot
+
+ db_src_install_doc
+
+ dodir /usr/sbin
+ # This file is not always built, and no longer exists as of db-4.8
+ if [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] ; then
+ mv "${ED}"/usr/bin/berkeley_db_svc \
+ "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die
+ fi
+}
+
+pkg_postinst() {
+ multilib_foreach_abi db_fix_so
+}
+
+pkg_postrm() {
+ multilib_foreach_abi db_fix_so
+}
+
+src_test() {
+ # db_repsite is impossible to build, as upstream strips those sources.
+ # db_repsite is used directly in the setup_site_prog,
+ # setup_site_prog is called from open_site_prog
+ # which is called only from tests in the multi_repmgr group.
+ #sed -ri \
+ # -e '/set subs/s,multi_repmgr,,g' \
+ # "${S_BASE}/test/testparams.tcl"
+ sed -ri \
+ -e '/multi_repmgr/d' \
+ "${S_BASE}/test/tcl/test.tcl" || die
+
+ # This is the only failure in 5.2.28 so far, and looks like a false positive.
+ # Repmgr018 (btree): Test of repmgr stats.
+ # Repmgr018.a: Start a master.
+ # Repmgr018.b: Start a client.
+ # Repmgr018.c: Run some transactions at master.
+ # Rep_test: btree 20 key/data pairs starting at 0
+ # Rep_test.a: put/get loop
+ # FAIL:07:05:59 (00:00:00) perm_no_failed_stat: expected 0, got 1
+ sed -ri \
+ -e '/set parms.*repmgr018/d' \
+ -e 's/repmgr018//g' \
+ "${S_BASE}/test/tcl/test.tcl" || die
+
+ multilib-minimal_src_test
+}
+
+multilib_src_test() {
+ multilib_is_native_abi || return
+
+ S=${BUILD_DIR} db_src_test
+}
diff --git a/sys-libs/db/db-6.2.32.ebuild b/sys-libs/db/db-6.2.32.ebuild
new file mode 100644
index 000000000000..61a18bfa9445
--- /dev/null
+++ b/sys-libs/db/db-6.2.32.ebuild
@@ -0,0 +1,235 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils db flag-o-matic java-pkg-opt-2 autotools multilib multilib-minimal versionator toolchain-funcs
+
+#Number of official patches
+#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
+PATCHNO=${PV/*.*.*_p}
+if [[ ${PATCHNO} == "${PV}" ]] ; then
+ MY_PV=${PV}
+ MY_P=${P}
+ PATCHNO=0
+else
+ MY_PV=${PV/_p${PATCHNO}}
+ MY_P=${PN}-${MY_PV}
+fi
+
+S_BASE="${WORKDIR}/${MY_P}"
+S="${S_BASE}/build_unix"
+DESCRIPTION="Oracle Berkeley DB"
+HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
+SRC_URI="http://download.oracle.com/berkeley-db/${MY_P}.tar.gz"
+for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
+ export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
+done
+
+LICENSE="AGPL-3"
+SLOT="$(get_version_component_range 1-2)"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="doc java cxx tcl test"
+
+REQUIRED_USE="test? ( tcl )"
+
+# the entire testsuite needs the TCL functionality
+DEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ test? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jdk-1.5 )
+ >=sys-devel/binutils-2.16.1"
+RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jre-1.5 )"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/db$(get_version_component_range 1-2)/db.h
+)
+
+PATCHES=(
+ # bug #510506
+ "${FILESDIR}"/${PN}-4.8.24-java-manifest-location.patch
+
+ # use the includes from the prefix
+ "${FILESDIR}"/${PN}-6.2.32-jni-check-prefix-first.patch
+ "${FILESDIR}"/${PN}-4.3-listen-to-java-options.patch
+
+ # sqlite configure call has an extra leading ..
+ # upstreamed:5.2.36, missing in 5.3.x/6.x
+ # still needs to be patched in 6.0.20
+ "${FILESDIR}"/${PN}-6.1.19-sqlite-configure-path.patch
+
+ # The upstream testsuite copies .lib and the binaries for each parallel test
+ # core, ~300MB each. This patch uses links instead, saves a lot of space.
+ "${FILESDIR}"/${PN}-6.0.20-test-link.patch
+)
+
+src_prepare() {
+ cd "${WORKDIR}"/"${MY_P}"
+ for (( i=1 ; i<=${PATCHNO} ; i++ ))
+ do
+ epatch "${DISTDIR}"/patch."${MY_PV}"."${i}"
+ done
+
+ epatch "${PATCHES[@]}"
+ epatch_user
+
+ # Upstream release script grabs the dates when the script was run, so lets
+ # end-run them to keep the date the same.
+ export REAL_DB_RELEASE_DATE="$(awk \
+ '/^DB_VERSION_STRING=/{ gsub(".*\\(|\\).*","",$0); print $0; }' \
+ "${S_BASE}"/dist/configure)"
+ sed -r -i \
+ -e "/^DB_RELEASE_DATE=/s~=.*~='${REAL_DB_RELEASE_DATE}'~g" \
+ "${S_BASE}"/dist/RELEASE || die
+
+ # Include the SLOT for Java JAR files
+ # This supersedes the unused jarlocation patches.
+ sed -r -i \
+ -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
+ "${S_BASE}"/dist/Makefile.in || die
+
+ cd "${S_BASE}"/dist || die
+ rm -f aclocal/libtool.m4
+ sed -i \
+ -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
+ configure.ac || die
+ sed -i \
+ -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
+ aclocal/programs.m4 || die
+ AT_M4DIR="aclocal aclocal_java" eautoreconf
+ # Upstream sucks - they do autoconf and THEN replace the version variables.
+ . ./RELEASE
+ for v in \
+ DB_VERSION_{FAMILY,LETTER,RELEASE,MAJOR,MINOR} \
+ DB_VERSION_{PATCH,FULL,UNIQUE_NAME,STRING,FULL_STRING} \
+ DB_VERSION \
+ DB_RELEASE_DATE ; do
+ local ev="__EDIT_${v}__"
+ sed -i -e "s/${ev}/${!v}/g" configure || die
+ done
+}
+
+multilib_src_configure() {
+ local myconf=()
+
+ tc-ld-disable-gold #470634
+
+ # compilation with -O0 fails on amd64, see bug #171231
+ if [[ ${ABI} == amd64 ]]; then
+ local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
+ replace-flags -O0 -O2
+ is-flagq -O[s123] || append-flags -O2
+ fi
+
+ # Add linker versions to the symbols. Easier to do, and safer than header file
+ # mumbo jumbo.
+ if use userland_GNU ; then
+ append-ldflags -Wl,--default-symver
+ fi
+
+ # use `set` here since the java opts will contain whitespace
+ if multilib_is_native_abi && use java ; then
+ myconf+=(
+ --with-java-prefix="${JAVA_HOME}"
+ --with-javac-flags="$(java-pkg_javac-args)"
+ )
+ fi
+
+ # Bug #270851: test needs TCL support
+ if use tcl || use test ; then
+ myconf+=(
+ --enable-tcl
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)"
+ )
+ else
+ myconf+=(--disable-tcl )
+ fi
+
+ # sql_compat will cause a collision with sqlite3
+ # --enable-sql_compat
+ ECONF_SOURCE="${S_BASE}"/dist \
+ STRIP="true" \
+ econf \
+ --enable-compat185 \
+ --enable-dbm \
+ --enable-o_direct \
+ --without-uniquename \
+ --enable-sql \
+ --enable-sql_codegen \
+ --disable-sql_compat \
+ $([[ ${ABI} == arm ]] && echo --with-mutex=ARM/gcc-assembly) \
+ $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly) \
+ $(use_enable cxx) \
+ $(use_enable cxx stl) \
+ $(multilib_native_use_enable java) \
+ "${myconf[@]}" \
+ $(use_enable test)
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+
+ db_src_install_headerslot
+
+ db_src_install_usrlibcleanup
+
+ if multilib_is_native_abi && use java; then
+ java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.so
+ java-pkg_dojar "${ED}"/usr/"$(get_libdir)"/*.jar
+ rm -f "${ED}"/usr/"$(get_libdir)"/*.jar
+ fi
+}
+
+multilib_src_install_all() {
+ db_src_install_usrbinslot
+
+ db_src_install_doc
+
+ dodir /usr/sbin
+ # This file is not always built, and no longer exists as of db-4.8
+ if [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] ; then
+ mv "${ED}"/usr/bin/berkeley_db_svc \
+ "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die
+ fi
+}
+
+pkg_postinst() {
+ multilib_foreach_abi db_fix_so
+}
+
+pkg_postrm() {
+ multilib_foreach_abi db_fix_so
+}
+
+src_test() {
+ # db_repsite is impossible to build, as upstream strips those sources.
+ # db_repsite is used directly in the setup_site_prog,
+ # setup_site_prog is called from open_site_prog
+ # which is called only from tests in the multi_repmgr group.
+ #sed -ri \
+ # -e '/set subs/s,multi_repmgr,,g' \
+ # "${S_BASE}/test/testparams.tcl"
+ sed -ri \
+ -e '/multi_repmgr/d' \
+ "${S_BASE}/test/tcl/test.tcl" || die
+
+ # This is the only failure in 5.2.28 so far, and looks like a false positive.
+ # Repmgr018 (btree): Test of repmgr stats.
+ # Repmgr018.a: Start a master.
+ # Repmgr018.b: Start a client.
+ # Repmgr018.c: Run some transactions at master.
+ # Rep_test: btree 20 key/data pairs starting at 0
+ # Rep_test.a: put/get loop
+ # FAIL:07:05:59 (00:00:00) perm_no_failed_stat: expected 0, got 1
+ sed -ri \
+ -e '/set parms.*repmgr018/d' \
+ -e 's/repmgr018//g' \
+ "${S_BASE}/test/tcl/test.tcl" || die
+
+ multilib-minimal_src_test
+}
+
+multilib_src_test() {
+ multilib_is_native_abi || return
+
+ S=${BUILD_DIR} db_src_test
+}
diff --git a/sys-libs/db/files/db-1.85-gentoo-paths.patch b/sys-libs/db/files/db-1.85-gentoo-paths.patch
new file mode 100644
index 000000000000..4a65106bdc70
--- /dev/null
+++ b/sys-libs/db/files/db-1.85-gentoo-paths.patch
@@ -0,0 +1,29 @@
+--- PORT/linux/Makefile
++++ PORT/linux/Makefile
+@@ -1,12 +1,12 @@
+ # @(#)Makefile 8.9 (Berkeley) 7/14/94
+
+-LIBDB= libdb.a
+-LIBDBSO=libdb.so
++LIBDB= libdb1.a
++LIBDBSO=libdb1.so
+ SOVER=2
+ SONAME=$(LIBDBSO).$(SOVER)
+ LIBNDBM=libndbm.a
+ LIBNDBMSO=libndbm.so
+-PROG= db_dump185
++PROG= db1_dump185
+ OBJ1= hash.o hash_bigkey.o hash_buf.o hash_func.o hash_log2.o hash_page.o \
+ ndbm.o
+ OBJ2= bt_close.o bt_conv.o bt_debug.o bt_delete.o bt_get.o bt_open.o \
+@@ -27,8 +27,8 @@
+ DESTDIR =
+ prefix = /usr
+ bindir = $(prefix)/bin
+-libdir = $(prefix)/lib
+-includedir = $(prefix)/include
++libdir = $(prefix)/@GENTOO_LIBDIR@
++includedir = $(prefix)/include/db1
+
+ all: $(LIBDB) $(LIBDBSO) $(PROG)
+
diff --git a/sys-libs/db/files/db-3.2.9-fix-dep-link.patch b/sys-libs/db/files/db-3.2.9-fix-dep-link.patch
new file mode 100644
index 000000000000..cdf6599b0d55
--- /dev/null
+++ b/sys-libs/db/files/db-3.2.9-fix-dep-link.patch
@@ -0,0 +1,26 @@
+--- db-3.2.9/dist/Makefile.in.orig 2003-02-23 23:41:13.000000000 +0200
++++ db-3.2.9/dist/Makefile.in 2003-02-23 23:42:07.000000000 +0200
+@@ -240,19 +240,19 @@
+
+ $(libso_target): $(OBJS)
+ $(SOLINK) $(SOFLAGS) -o $(libso_target) \
+- $(OBJS) $(LDFLAGS) $(LIBSO_LIBS)
++ $(OBJS) $(LDFLAGS) $(LIBS) $(LIBSO_LIBS)
+
+ $(libxso_target): $(COBJS) $(OBJS)
+ $(SOLINK) $(SOFLAGS) -o $(libxso_target) \
+- $(COBJS) $(OBJS) $(LDFLAGS) $(LIBXSO_LIBS)
++ $(COBJS) $(OBJS) $(LDFLAGS) $(LIBS) $(LIBXSO_LIBS)
+
+ $(libjso_target): $(JOBJS) $(OBJS)
+ $(SOLINK) $(SOFLAGS) -o $(libjso_target) \
+- $(JOBJS) $(OBJS) $(LDFLAGS) $(LIBJSO_LIBS)
++ $(JOBJS) $(OBJS) $(LDFLAGS) $(LIBS) $(LIBJSO_LIBS)
+
+ $(libtso_target): $(TOBJS) $(OBJS)
+ $(SOLINK) $(SOFLAGS) -o $(libtso_target) \
+- $(TOBJS) $(OBJS) $(LDFLAGS) $(LIBTSO_LIBS)
++ $(TOBJS) $(OBJS) $(LDFLAGS) $(LIBS) $(LIBTSO_LIBS)
+
+ ##################################################
+ # Creating individual dependencies and actions for building class
diff --git a/sys-libs/db/files/db-3.2.9-gcc43.patch b/sys-libs/db/files/db-3.2.9-gcc43.patch
new file mode 100644
index 000000000000..f032da85296a
--- /dev/null
+++ b/sys-libs/db/files/db-3.2.9-gcc43.patch
@@ -0,0 +1,16 @@
+diff -Nuar db-3.2.9.orig/include/db_cxx.h db-3.2.9/include/db_cxx.h
+--- db-3.2.9.orig/include/db_cxx.h 2001-01-11 10:28:55.000000000 -0800
++++ db-3.2.9/include/db_cxx.h 2008-08-16 16:10:48.474699646 -0700
+@@ -49,7 +49,12 @@
+ // Forward declarations
+ //
+
++#if defined(__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)
++using namespace std;
++#include <iostream>
++#else
+ #include <iostream.h>
++#endif
+ #include <stdarg.h>
+ #include "db.h"
+
diff --git a/sys-libs/db/files/db-4.0.14-fix-dep-link.patch b/sys-libs/db/files/db-4.0.14-fix-dep-link.patch
new file mode 100644
index 000000000000..f54f064640e6
--- /dev/null
+++ b/sys-libs/db/files/db-4.0.14-fix-dep-link.patch
@@ -0,0 +1,38 @@
+--- db-4.0.14/dist/Makefile.in.orig 2003-08-16 06:21:53.763400112 +0200
++++ db-4.0.14/dist/Makefile.in 2003-08-16 06:23:16.036892640 +0200
+@@ -58,7 +58,7 @@
+
+ LDFLAGS= @LDFLAGS@
+ LIBS= @LIBS@
+-LIBSO_LIBS= @LIBSO_LIBS@
++LIBSO_LIBS= @LIBSO_LIBS@ $(LIBS)
+
+ libdb= libdb.a
+ libso_base= libdb
+@@ -77,7 +77,7 @@
+ CXX= @MAKEFILE_CXX@
+ CXXLINK= @MAKEFILE_CXXLINK@
+ XSOLINK= @MAKEFILE_XSOLINK@
+-LIBXSO_LIBS= @LIBXSO_LIBS@
++LIBXSO_LIBS= @LIBXSO_LIBS@ $(LIBS)
+
+ libcxx= libdb_cxx.a
+ libxso_base= libdb_cxx
+@@ -93,7 +93,7 @@
+ # Java support is optional and requires shared librarires.
+ ##################################################
+ CLASSPATH= $(JAVA_CLASSTOP)
+-LIBJSO_LIBS= @LIBJSO_LIBS@
++LIBJSO_LIBS= @LIBJSO_LIBS@ $(LIBS)
+
+ JAR= @JAR@
+ JAVAC= env CLASSPATH="$(CLASSPATH)" @JAVAC@
+@@ -121,7 +121,7 @@
+ # Tcl support is optional and requires shared libraries.
+ ##################################################
+ TCFLAGS= @TCFLAGS@
+-LIBTSO_LIBS= @LIBTSO_LIBS@
++LIBTSO_LIBS= @LIBTSO_LIBS@ $(LIBS)
+ libtso_base= libdb_tcl
+ libtso= $(libtso_base)-$(SOVERSION).@SOSUFFIX@
+ libtso_static= $(libtso_base)-$(SOVERSION).a
diff --git a/sys-libs/db/files/db-4.2-jni-check-prefix-first.patch b/sys-libs/db/files/db-4.2-jni-check-prefix-first.patch
new file mode 100644
index 000000000000..17f80e1bcfef
--- /dev/null
+++ b/sys-libs/db/files/db-4.2-jni-check-prefix-first.patch
@@ -0,0 +1,30 @@
+--- dist/aclocal_java/ac_jni_include_dirs.ac 2003-10-06 20:41:38.000000000 +0200
++++ dist/aclocal_java/ac_jni_include_dirs.ac 2005-09-23 21:31:26.000000000 +0200
+@@ -43,14 +43,19 @@
+ *) AC_MSG_ERROR([$_ACJNI_JAVAC is not an absolute path name]);;
+ esac
+
+-_ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
+-_JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
+-case "$host_os" in
+- darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
+- _JINC="$_JTOPDIR/Headers";;
+- *) _JINC="$_JTOPDIR/include";;
+-esac
+-
++# If JAVAPREFIX is defined, look there first
++if test -r "$JAVAPREFIX/include/jni.h"; then
++ _JTOPDIR="$JAVAPREFIX"
++ _JINC="$JAVAPREFIX/include"
++else
++ _ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
++ _JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
++ case "$host_os" in
++ darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
++ _JINC="$_JTOPDIR/Headers";;
++ *) _JINC="$_JTOPDIR/include";;
++ esac
++fi
+ # If we find jni.h in /usr/include, then it's not a java-only tree, so
+ # don't add /usr/include or subdirectories to the list of includes.
+ # An extra -I/usr/include can foul things up with newer gcc's.
diff --git a/sys-libs/db/files/db-4.2-libtool.patch b/sys-libs/db/files/db-4.2-libtool.patch
new file mode 100644
index 000000000000..a4a9db7f4557
--- /dev/null
+++ b/sys-libs/db/files/db-4.2-libtool.patch
@@ -0,0 +1,20 @@
+--- ./dist/configure.orig 2004-09-22 22:58:48.421632944 -0700
++++ ./dist/configure 2004-09-22 23:02:55.068136976 -0700
+@@ -5657,7 +5657,7 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+-case `"$LD" -v 2>&1 </dev/null` in
++case `$LD -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+@@ -11135,7 +11135,7 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+-case `"$LD" -v 2>&1 </dev/null` in
++case `$LD -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
diff --git a/sys-libs/db/files/db-4.2-listen-to-java-options.patch b/sys-libs/db/files/db-4.2-listen-to-java-options.patch
new file mode 100644
index 000000000000..8ddb46b70261
--- /dev/null
+++ b/sys-libs/db/files/db-4.2-listen-to-java-options.patch
@@ -0,0 +1,10 @@
+--- dist/configure.ac 2005-09-23 21:01:26.000000000 +0200
++++ dist/configure.ac 2005-09-23 20:59:20.000000000 +0200
+@@ -385,6 +385,7 @@
+ # A classpath that includes . is needed to check for Java
+ CLASSPATH=".:$CLASSPATH"
+ export CLASSPATH
++ AC_JAVA_OPTIONS
+ AC_PROG_JAVAC
+ AC_PROG_JAR
+ AC_PROG_JAVA
diff --git a/sys-libs/db/files/db-4.2.52_p2-TXN.patch b/sys-libs/db/files/db-4.2.52_p2-TXN.patch
new file mode 100644
index 000000000000..7ff8874c0ca8
--- /dev/null
+++ b/sys-libs/db/files/db-4.2.52_p2-TXN.patch
@@ -0,0 +1,68 @@
+This patch is intended to be applied to Berkeley DB 4.2.52 and,
+if applied, will automatically be used by slapd(8) back-bdb/hdb.
+Without this patch the BDB DB_LOG_AUTOREMOVE option will not work,
+nor will db_archive allow any transaction log files to be removed
+while slapd is running.
+
+The patch can be applied to the BDB source using patch(1) as follows
+ cd db-4.2.52
+ patch -p0 < openldap-src/build/BerkeleyDB42.patch
+
+(modify directory paths as necessary), then recompile and reinstall
+the BerkeleyDB 4.2 library, and then build and install OpenLDAP
+Software.
+
+The patch should not be applied to Berkeley DB 4.3.
+
+
+Index: dbinc/db.in
+===================================================================
+RCS file: /var/CVSROOT/bdb42/dbinc/db.in,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -u -r1.1.1.1 -r1.2
+--- dbinc/db.in 25 Nov 2003 21:58:02 -0000 1.1.1.1
++++ dbinc/db.in 17 Jul 2004 16:07:23 -0000 1.2
+@@ -839,6 +839,7 @@
+ #define TXN_NOWAIT 0x040 /* Do not wait on locks. */
+ #define TXN_RESTORED 0x080 /* Transaction has been restored. */
+ #define TXN_SYNC 0x100 /* Sync on prepare and commit. */
++#define TXN_NOLOG 0x200 /* Do not log this transaction. */
+ u_int32_t flags;
+ };
+
+Index: txn/txn.c
+===================================================================
+RCS file: /var/CVSROOT/bdb42/txn/txn.c,v
+retrieving revision 1.1.1.2
+retrieving revision 1.2
+diff -u -r1.1.1.2 -r1.2
+--- txn/txn.c 17 Dec 2003 21:43:53 -0000 1.1.1.2
++++ txn/txn.c 17 Jul 2004 16:07:27 -0000 1.2
+@@ -127,7 +127,7 @@
+ if ((ret = __db_fchk(dbenv,
+ "txn_begin", flags,
+ DB_DIRTY_READ | DB_TXN_NOWAIT |
+- DB_TXN_NOSYNC | DB_TXN_SYNC)) != 0)
++ DB_TXN_NOSYNC | DB_TXN_SYNC | DB_TXN_NOT_DURABLE)) != 0)
+ return (ret);
+ if ((ret = __db_fcchk(dbenv,
+ "txn_begin", flags, DB_TXN_NOSYNC, DB_TXN_SYNC)) != 0)
+@@ -193,6 +193,8 @@
+ F_SET(txn, TXN_SYNC);
+ if (LF_ISSET(DB_TXN_NOWAIT))
+ F_SET(txn, TXN_NOWAIT);
++ if (LF_ISSET(DB_TXN_NOT_DURABLE))
++ F_SET(txn, TXN_NOLOG);
+
+ if ((ret = __txn_begin_int(txn, 0)) != 0)
+ goto err;
+@@ -328,7 +330,7 @@
+ * We should set this value when we write the first log record, not
+ * here.
+ */
+- if (DBENV_LOGGING(dbenv))
++ if (DBENV_LOGGING(dbenv) && !F_ISSET(txn, TXN_NOLOG))
+ __log_txn_lsn(dbenv, &begin_lsn, NULL, NULL);
+ else
+ ZERO_LSN(begin_lsn);
diff --git a/sys-libs/db/files/db-4.3-jni-check-prefix-first.patch b/sys-libs/db/files/db-4.3-jni-check-prefix-first.patch
new file mode 100644
index 000000000000..17f80e1bcfef
--- /dev/null
+++ b/sys-libs/db/files/db-4.3-jni-check-prefix-first.patch
@@ -0,0 +1,30 @@
+--- dist/aclocal_java/ac_jni_include_dirs.ac 2003-10-06 20:41:38.000000000 +0200
++++ dist/aclocal_java/ac_jni_include_dirs.ac 2005-09-23 21:31:26.000000000 +0200
+@@ -43,14 +43,19 @@
+ *) AC_MSG_ERROR([$_ACJNI_JAVAC is not an absolute path name]);;
+ esac
+
+-_ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
+-_JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
+-case "$host_os" in
+- darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
+- _JINC="$_JTOPDIR/Headers";;
+- *) _JINC="$_JTOPDIR/include";;
+-esac
+-
++# If JAVAPREFIX is defined, look there first
++if test -r "$JAVAPREFIX/include/jni.h"; then
++ _JTOPDIR="$JAVAPREFIX"
++ _JINC="$JAVAPREFIX/include"
++else
++ _ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
++ _JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
++ case "$host_os" in
++ darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
++ _JINC="$_JTOPDIR/Headers";;
++ *) _JINC="$_JTOPDIR/include";;
++ esac
++fi
+ # If we find jni.h in /usr/include, then it's not a java-only tree, so
+ # don't add /usr/include or subdirectories to the list of includes.
+ # An extra -I/usr/include can foul things up with newer gcc's.
diff --git a/sys-libs/db/files/db-4.3-libtool.patch b/sys-libs/db/files/db-4.3-libtool.patch
new file mode 100644
index 000000000000..426fd519f714
--- /dev/null
+++ b/sys-libs/db/files/db-4.3-libtool.patch
@@ -0,0 +1,47 @@
+--- dist/configure.orig 2005-02-02 11:22:49.596096072 +0100
++++ dist/configure 2005-02-02 11:23:46.749407448 +0100
+@@ -5684,7 +5684,7 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+-case `$LD -v 2>&1 </dev/null` in
++case `"$LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+@@ -8461,7 +8461,7 @@
+ tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_cmds="$tmp_archive_cmds"
+ supports_anon_versioning=no
+- case `$LD -v 2>/dev/null` in
++ case `"$LD" -v 2>/dev/null` in
+ *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+@@ -11383,7 +11383,7 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+-case `$LD -v 2>&1 </dev/null` in
++case `"$LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+@@ -15353,7 +15353,7 @@
+ tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_cmds_F77="$tmp_archive_cmds"
+ supports_anon_versioning=no
+- case `$LD -v 2>/dev/null` in
++ case `"$LD" -v 2>/dev/null` in
+ *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+@@ -17695,7 +17695,7 @@
+ tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_cmds_GCJ="$tmp_archive_cmds"
+ supports_anon_versioning=no
+- case `$LD -v 2>/dev/null` in
++ case `"$LD" -v 2>/dev/null` in
+ *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
diff --git a/sys-libs/db/files/db-4.3-listen-to-java-options.patch b/sys-libs/db/files/db-4.3-listen-to-java-options.patch
new file mode 100644
index 000000000000..8ddb46b70261
--- /dev/null
+++ b/sys-libs/db/files/db-4.3-listen-to-java-options.patch
@@ -0,0 +1,10 @@
+--- dist/configure.ac 2005-09-23 21:01:26.000000000 +0200
++++ dist/configure.ac 2005-09-23 20:59:20.000000000 +0200
+@@ -385,6 +385,7 @@
+ # A classpath that includes . is needed to check for Java
+ CLASSPATH=".:$CLASSPATH"
+ export CLASSPATH
++ AC_JAVA_OPTIONS
+ AC_PROG_JAVAC
+ AC_PROG_JAR
+ AC_PROG_JAVA
diff --git a/sys-libs/db/files/db-4.3.27-fix-dep-link.patch b/sys-libs/db/files/db-4.3.27-fix-dep-link.patch
new file mode 100644
index 000000000000..1d14e83d078c
--- /dev/null
+++ b/sys-libs/db/files/db-4.3.27-fix-dep-link.patch
@@ -0,0 +1,38 @@
+--- db-4.3.27/dist/Makefile.in.chris 2005-02-01 23:40:34.447945464 +0100
++++ db-4.3.27/dist/Makefile.in 2005-02-01 23:42:21.635650456 +0100
+@@ -58,7 +58,7 @@
+ LDFLAGS= @LDFLAGS@
+ LIBS= @LIBS@
+ TEST_LIBS= @TEST_LIBS@
+-LIBSO_LIBS= @LIBSO_LIBS@
++LIBSO_LIBS= @LIBSO_LIBS@ $(LIBS)
+
+ libdb_base= libdb
+ libdb= $(libdb_base).a
+@@ -77,7 +77,7 @@
+ CXX= @MAKEFILE_CXX@
+ CXXLINK= @MAKEFILE_CXXLINK@ @CXXFLAGS@
+ XSOLINK= @MAKEFILE_XSOLINK@ @CXXFLAGS@
+-LIBXSO_LIBS= @LIBXSO_LIBS@
++LIBXSO_LIBS= @LIBXSO_LIBS@ $(LIBS)
+
+ libcxx_base= libdb_cxx
+ libcxx= $(libcxx_base).a
+@@ -93,7 +93,7 @@
+ # Java support is optional and requires shared librarires.
+ ##################################################
+ CLASSPATH= $(JAVA_CLASSTOP)
+-LIBJSO_LIBS= @LIBJSO_LIBS@
++LIBJSO_LIBS= @LIBJSO_LIBS@ $(LIBS)
+
+ JAR= @JAR@
+ JAVAC= env CLASSPATH="$(CLASSPATH)" @JAVAC@
+@@ -126,7 +126,7 @@
+ # Tcl support is optional and requires shared libraries.
+ ##################################################
+ TCFLAGS= @TCFLAGS@
+-LIBTSO_LIBS= @LIBTSO_LIBS@
++LIBTSO_LIBS= @LIBTSO_LIBS@ $(LIBS)
+ libtso_base= libdb_tcl
+ libtso= $(libtso_base)-$(LIBVERSION)@MODSUFFIX@
+ libtso_static= $(libtso_base)-$(LIBVERSION).a
diff --git a/sys-libs/db/files/db-4.4-libtool.patch b/sys-libs/db/files/db-4.4-libtool.patch
new file mode 100644
index 000000000000..3d86b88f86b3
--- /dev/null
+++ b/sys-libs/db/files/db-4.4-libtool.patch
@@ -0,0 +1,47 @@
+--- dist/configure.orig 2006-01-31 10:23:58.000000000 +0100
++++ dist/configure 2006-01-31 10:26:43.000000000 +0100
+@@ -5765,7 +5765,7 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+-case `$LD -v 2>&1 </dev/null` in
++case `"$LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+@@ -8753,7 +8753,7 @@
+ whole_archive_flag_spec=
+ fi
+ supports_anon_versioning=no
+- case `$LD -v 2>/dev/null` in
++ case `"$LD" -v 2>/dev/null` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+@@ -11855,7 +11855,7 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+-case `$LD -v 2>&1 </dev/null` in
++case `"$LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+@@ -15842,7 +15842,7 @@
+ whole_archive_flag_spec_F77=
+ fi
+ supports_anon_versioning=no
+- case `$LD -v 2>/dev/null` in
++ case `"$LD" -v 2>/dev/null` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+@@ -18300,7 +18300,7 @@
+ whole_archive_flag_spec_GCJ=
+ fi
+ supports_anon_versioning=no
+- case `$LD -v 2>/dev/null` in
++ case `"$LD" -v 2>/dev/null` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
diff --git a/sys-libs/db/files/db-4.5-libtool.patch b/sys-libs/db/files/db-4.5-libtool.patch
new file mode 100644
index 000000000000..3d86b88f86b3
--- /dev/null
+++ b/sys-libs/db/files/db-4.5-libtool.patch
@@ -0,0 +1,47 @@
+--- dist/configure.orig 2006-01-31 10:23:58.000000000 +0100
++++ dist/configure 2006-01-31 10:26:43.000000000 +0100
+@@ -5765,7 +5765,7 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+-case `$LD -v 2>&1 </dev/null` in
++case `"$LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+@@ -8753,7 +8753,7 @@
+ whole_archive_flag_spec=
+ fi
+ supports_anon_versioning=no
+- case `$LD -v 2>/dev/null` in
++ case `"$LD" -v 2>/dev/null` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+@@ -11855,7 +11855,7 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+-case `$LD -v 2>&1 </dev/null` in
++case `"$LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+@@ -15842,7 +15842,7 @@
+ whole_archive_flag_spec_F77=
+ fi
+ supports_anon_versioning=no
+- case `$LD -v 2>/dev/null` in
++ case `"$LD" -v 2>/dev/null` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+@@ -18300,7 +18300,7 @@
+ whole_archive_flag_spec_GCJ=
+ fi
+ supports_anon_versioning=no
+- case `$LD -v 2>/dev/null` in
++ case `"$LD" -v 2>/dev/null` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
diff --git a/sys-libs/db/files/db-4.6-jni-check-prefix-first.patch b/sys-libs/db/files/db-4.6-jni-check-prefix-first.patch
new file mode 100644
index 000000000000..63735e62469f
--- /dev/null
+++ b/sys-libs/db/files/db-4.6-jni-check-prefix-first.patch
@@ -0,0 +1,30 @@
+--- dist/aclocal_java/ac_jni_include_dirs.m4 2003-10-06 20:41:38.000000000 +0200
++++ dist/aclocal_java/ac_jni_include_dirs.m4 2005-09-23 21:31:26.000000000 +0200
+@@ -43,14 +43,19 @@
+ *) AC_MSG_ERROR([$_ACJNI_JAVAC is not an absolute path name]);;
+ esac
+
+-_ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
+-_JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
+-case "$host_os" in
+- darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
+- _JINC="$_JTOPDIR/Headers";;
+- *) _JINC="$_JTOPDIR/include";;
+-esac
+-
++# If JAVAPREFIX is defined, look there first
++if test -r "$JAVAPREFIX/include/jni.h"; then
++ _JTOPDIR="$JAVAPREFIX"
++ _JINC="$JAVAPREFIX/include"
++else
++ _ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
++ _JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
++ case "$host_os" in
++ darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
++ _JINC="$_JTOPDIR/Headers";;
++ *) _JINC="$_JTOPDIR/include";;
++ esac
++fi
+ # If we find jni.h in /usr/include, then it's not a java-only tree, so
+ # don't add /usr/include or subdirectories to the list of includes.
+ # An extra -I/usr/include can foul things up with newer gcc's.
diff --git a/sys-libs/db/files/db-4.6-libtool.patch b/sys-libs/db/files/db-4.6-libtool.patch
new file mode 100644
index 000000000000..3d86b88f86b3
--- /dev/null
+++ b/sys-libs/db/files/db-4.6-libtool.patch
@@ -0,0 +1,47 @@
+--- dist/configure.orig 2006-01-31 10:23:58.000000000 +0100
++++ dist/configure 2006-01-31 10:26:43.000000000 +0100
+@@ -5765,7 +5765,7 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+-case `$LD -v 2>&1 </dev/null` in
++case `"$LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+@@ -8753,7 +8753,7 @@
+ whole_archive_flag_spec=
+ fi
+ supports_anon_versioning=no
+- case `$LD -v 2>/dev/null` in
++ case `"$LD" -v 2>/dev/null` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+@@ -11855,7 +11855,7 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+-case `$LD -v 2>&1 </dev/null` in
++case `"$LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+@@ -15842,7 +15842,7 @@
+ whole_archive_flag_spec_F77=
+ fi
+ supports_anon_versioning=no
+- case `$LD -v 2>/dev/null` in
++ case `"$LD" -v 2>/dev/null` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+@@ -18300,7 +18300,7 @@
+ whole_archive_flag_spec_GCJ=
+ fi
+ supports_anon_versioning=no
+- case `$LD -v 2>/dev/null` in
++ case `"$LD" -v 2>/dev/null` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
diff --git a/sys-libs/db/files/db-4.8-libtool.patch b/sys-libs/db/files/db-4.8-libtool.patch
new file mode 100644
index 000000000000..f5d985b2f209
--- /dev/null
+++ b/sys-libs/db/files/db-4.8-libtool.patch
@@ -0,0 +1,65 @@
+--- dist/configure
++++ dist/configure
+@@ -6691,7 +6691,7 @@
+ $as_echo_n "(cached) " >&6
+ else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+-case `$LD -v 2>&1 </dev/null` in
++case `"$LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+@@ -7348,7 +7348,7 @@
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+- case $LD in
++ case "$LD" in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+@@ -10664,7 +10664,7 @@
+ whole_archive_flag_spec=
+ fi
+ supports_anon_versioning=no
+- case `$LD -v 2>&1` in
++ case `"$LD" -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+@@ -10858,7 +10858,7 @@
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+- case `$LD -v 2>&1` in
++ case `"$LD" -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+@@ -12206,7 +12206,7 @@
+ libsuff= shlibsuff=
+ ;;
+ *)
+- case $LD in # libtool.m4 will add one of these switches to LD
++ case "$LD" in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+@@ -13423,7 +13423,7 @@
+ $as_echo_n "(cached) " >&6
+ else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+-case `$LD -v 2>&1 </dev/null` in
++case `"$LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+@@ -15672,7 +15672,7 @@
+ libsuff= shlibsuff=
+ ;;
+ *)
+- case $LD in # libtool.m4 will add one of these switches to LD
++ case "$LD" in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
diff --git a/sys-libs/db/files/db-4.8.24-java-manifest-location.patch b/sys-libs/db/files/db-4.8.24-java-manifest-location.patch
new file mode 100644
index 000000000000..9cebadc52064
--- /dev/null
+++ b/sys-libs/db/files/db-4.8.24-java-manifest-location.patch
@@ -0,0 +1,12 @@
+diff -Nuar db-4.8.24.orig/dist/Makefile.in db-4.8.24/dist/Makefile.in
+--- db-4.8.24.orig/dist/Makefile.in 2009-09-19 23:39:45.286001896 +0000
++++ db-4.8.24/dist/Makefile.in 2009-09-19 23:41:13.079326882 +0000
+@@ -830,7 +830,7 @@
+ $(JAVA) -classpath $(JAVA_CLASSTOP) \
+ com.sleepycat.persist.model.ClassEnhancer $(JAVA_CLASSTOP)
+ cd $(JAVA_CLASSTOP) && \
+- $(JAR) cfm ../$(libj_jarfile) ../$(JAVA_MANIFEST) ./com/sleepycat
++ $(JAR) cfm ../$(libj_jarfile) $(JAVA_MANIFEST) ./com/sleepycat
+
+ $(libj_exjarfile): $(libj_jarfile) $(JAVA_EXSRCS)
+ @test -d $(JAVA_EXCLASSTOP) || \
diff --git a/sys-libs/db/files/db-4.8.30-rename-atomic-compare-exchange.patch b/sys-libs/db/files/db-4.8.30-rename-atomic-compare-exchange.patch
new file mode 100644
index 000000000000..c53160a82970
--- /dev/null
+++ b/sys-libs/db/files/db-4.8.30-rename-atomic-compare-exchange.patch
@@ -0,0 +1,22 @@
+diff --git a/dbinc/atomic.h b/dbinc/atomic.h
+index 0034dcc..fa7ba93 100644
+--- a/dbinc/atomic.h
++++ b/dbinc/atomic.h
+@@ -144,7 +144,7 @@ typedef LONG volatile *interlocked_val;
+ #define atomic_inc(env, p) __atomic_inc(p)
+ #define atomic_dec(env, p) __atomic_dec(p)
+ #define atomic_compare_exchange(env, p, o, n) \
+- __atomic_compare_exchange((p), (o), (n))
++ __db_atomic_compare_exchange((p), (o), (n))
+ static inline int __atomic_inc(db_atomic_t *p)
+ {
+ int temp;
+@@ -176,7 +176,7 @@ static inline int __atomic_dec(db_atomic_t *p)
+ * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html
+ * which configure could be changed to use.
+ */
+-static inline int __atomic_compare_exchange(
++static inline int __db_atomic_compare_exchange(
+ db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval)
+ {
+ atomic_value_t was;
diff --git a/sys-libs/db/files/db-5.1.29-rename-atomic-compare-exchange.patch b/sys-libs/db/files/db-5.1.29-rename-atomic-compare-exchange.patch
new file mode 100644
index 000000000000..ad3da2786c88
--- /dev/null
+++ b/sys-libs/db/files/db-5.1.29-rename-atomic-compare-exchange.patch
@@ -0,0 +1,22 @@
+diff --git a/src/dbinc/atomic.h b/src/dbinc/atomic.h
+index 0034dcc..fa7ba93 100644
+--- a/src/dbinc/atomic.h
++++ b/src/dbinc/atomic.h
+@@ -144,7 +144,7 @@ typedef LONG volatile *interlocked_val;
+ #define atomic_inc(env, p) __atomic_inc(p)
+ #define atomic_dec(env, p) __atomic_dec(p)
+ #define atomic_compare_exchange(env, p, o, n) \
+- __atomic_compare_exchange((p), (o), (n))
++ __db_atomic_compare_exchange((p), (o), (n))
+ static inline int __atomic_inc(db_atomic_t *p)
+ {
+ int temp;
+@@ -176,7 +176,7 @@ static inline int __atomic_dec(db_atomic_t *p)
+ * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html
+ * which configure could be changed to use.
+ */
+-static inline int __atomic_compare_exchange(
++static inline int __db_atomic_compare_exchange(
+ db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval)
+ {
+ atomic_value_t was;
diff --git a/sys-libs/db/files/db-5.2.28-sqlite-configure-path.patch b/sys-libs/db/files/db-5.2.28-sqlite-configure-path.patch
new file mode 100644
index 000000000000..ff7abbe1fd79
--- /dev/null
+++ b/sys-libs/db/files/db-5.2.28-sqlite-configure-path.patch
@@ -0,0 +1,12 @@
+diff -Nuar db-5.2.28.orig//dist/aclocal/sql.m4 db-5.2.28//dist/aclocal/sql.m4
+--- db-5.2.28.orig//dist/aclocal/sql.m4 2011-06-10 09:50:45.000000000 -0700
++++ db-5.2.28//dist/aclocal/sql.m4 2011-07-15 17:02:54.646521189 -0700
+@@ -91,7 +91,7 @@
+ # !!! END COPIED from autoconf distribution
+
+ sqlite_dir=$srcdir/../lang/sql/sqlite
+-(cd sql && eval "\$SHELL ../$sqlite_dir/configure --disable-option-checking $ac_sub_configure_args CPPFLAGS=\"-I.. $CPPFLAGS\" --enable-amalgamation=$db_cv_sql_amalgamation --enable-readline=$with_readline" && cat build_config.h >> config.h) || exit 1
++(cd sql && eval "\$SHELL $sqlite_dir/configure --disable-option-checking $ac_sub_configure_args CPPFLAGS=\"-I.. $CPPFLAGS\" --enable-amalgamation=$db_cv_sql_amalgamation --enable-readline=$with_readline" && cat build_config.h >> config.h) || exit 1
+
+ # Configure JDBC if --enable-jdbc
+ if test "$db_cv_jdbc" != "no"; then
diff --git a/sys-libs/db/files/db-6.0.20-test-link.patch b/sys-libs/db/files/db-6.0.20-test-link.patch
new file mode 100644
index 000000000000..8aceaa4d6f8c
--- /dev/null
+++ b/sys-libs/db/files/db-6.0.20-test-link.patch
@@ -0,0 +1,38 @@
+diff -Nuar db-6.0.20.orig/test/tcl/parallel.tcl db-6.0.20/test/tcl/parallel.tcl
+--- db-6.0.20.orig/test/tcl/parallel.tcl 2013-07-04 15:49:43.408348040 +0000
++++ db-6.0.20/test/tcl/parallel.tcl 2013-07-04 17:40:07.147943377 +0000
+@@ -289,16 +289,26 @@
+ [eval glob -nocomplain {$dir/$buildpath/db_{reptest,repsite,replicate}$EXE}] \
+ $destdir/$buildpath}
+ }
++ catch {
++ set l [eval glob {$dir/.libs} {$dir/db_{checkpoint,deadlock}$EXE} \
++ {$dir/db_{dump,load,printlog,recover,stat,upgrade}$EXE} \
++ {$dir/db_{archive,verify,hotbackup,log_verify}$EXE}]
++ foreach fn $l {
++ set fbasename [file tail $fn]
++ eval file link {$destdir/$fbasename} $fn
++ }
++ }
++ # we will be modifying this file, so we must copy, not link
+ catch {eval file copy \
+- [eval glob {$dir/{.libs,include.tcl}}] $destdir}
++ [eval glob {$dir/include.tcl}] $destdir}
+ # catch {eval file copy $dir/$queuedir $destdir}
+- catch {eval file copy \
+- [eval glob {$dir/db_{checkpoint,deadlock}$EXE} \
+- {$dir/db_{dump,load,printlog,recover,stat,upgrade}$EXE} \
+- {$dir/db_{archive,verify,hotbackup,log_verify}$EXE}] \
+- $destdir}
+- catch {eval file copy \
+- [eval glob -nocomplain {$dir/db_{reptest,repsite,replicate}$EXE}] $destdir}
++ catch {
++ set l [eval glob -nocomplain {$dir/db_{reptest,repsite,replicate}$EXE}]
++ foreach fn $l {
++ set fbasename [file tail $fn]
++ eval file link {$destdir/$fbasename} $fn
++ }
++ }
+
+ # Create modified copies of include.tcl in parallel
+ # directories so paths still work.
diff --git a/sys-libs/db/files/db-6.0.35-sqlite-configure-path.patch b/sys-libs/db/files/db-6.0.35-sqlite-configure-path.patch
new file mode 100644
index 000000000000..c239bb118a82
--- /dev/null
+++ b/sys-libs/db/files/db-6.0.35-sqlite-configure-path.patch
@@ -0,0 +1,11 @@
+--- db-6.0.35/dist/aclocal/sql.m4
++++ db-6.0.35/dist/aclocal/sql.m4
+@@ -96,7 +96,7 @@
+ if test "$db_cv_build_cryptography" = "yes"; then
+ CPPFLAGS="$CPPFLAGS -DSQLITE_HAS_CODEC=1"
+ fi
+-(cd sql && eval "\$SHELL ../$sqlite_dir/configure --disable-option-checking $ac_sub_configure_args CPPFLAGS=\"-I.. $CPPFLAGS\" --enable-amalgamation=$db_cv_sql_amalgamation --enable-readline=$with_readline " && cat build_config.h >> config.h) || exit 1
++(cd sql && eval "\$SHELL $sqlite_dir/configure --disable-option-checking $ac_sub_configure_args CPPFLAGS=\"-I.. $CPPFLAGS\" --enable-amalgamation=$db_cv_sql_amalgamation --enable-readline=$with_readline " && cat build_config.h >> config.h) || exit 1
+
+ # Configure JDBC if --enable-jdbc
+ if test "$db_cv_jdbc" != "no"; then
diff --git a/sys-libs/db/files/db-6.1.19-sqlite-configure-path.patch b/sys-libs/db/files/db-6.1.19-sqlite-configure-path.patch
new file mode 100644
index 000000000000..25854c53e160
--- /dev/null
+++ b/sys-libs/db/files/db-6.1.19-sqlite-configure-path.patch
@@ -0,0 +1,10 @@
+--- db-6.1.19/dist/aclocal/sql.m4
++++ db-6.1.19/dist/aclocal/sql.m4
+@@ -96,6 +96,6 @@
+ if test "$db_cv_build_cryptography" = "yes"; then
+ CPPFLAGS="$CPPFLAGS -DSQLITE_HAS_CODEC=1"
+ fi
+-(cd sql && eval "\$SHELL ../$sqlite_dir/configure --disable-option-checking $ac_sub_configure_args CPPFLAGS=\"-I.. $CPPFLAGS\" --enable-amalgamation=$db_cv_sql_amalgamation --enable-readline=$with_readline " && cat build_config.h >> config.h) || exit 1
++(cd sql && eval "\$SHELL $sqlite_dir/configure --disable-option-checking $ac_sub_configure_args CPPFLAGS=\"-I.. $CPPFLAGS\" --enable-amalgamation=$db_cv_sql_amalgamation --enable-readline=$with_readline " && cat build_config.h >> config.h) || exit 1
+
+ # Configure JDBC if --enable-jdbc
diff --git a/sys-libs/db/files/db-6.2-jni-check-prefix-first.patch b/sys-libs/db/files/db-6.2-jni-check-prefix-first.patch
new file mode 100644
index 000000000000..963b01380c23
--- /dev/null
+++ b/sys-libs/db/files/db-6.2-jni-check-prefix-first.patch
@@ -0,0 +1,38 @@
+--- db-6.2.23/dist/aclocal_java/ac_jni_include_dirs.m4
++++ db-6.2.23/dist/aclocal_java/ac_jni_include_dirs.m4
+@@ -43,18 +43,23 @@
+ *) AC_MSG_ERROR([$_ACJNI_JAVAC is not an absolute path name]);;
+ esac
+
+-_ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
+-_JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
+-case "$host_os" in
+- darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
+- if test -d "$_JTOPDIR/include"; then
+- _JINC="$_JTOPDIR/include"
+- else
+- _JINC="$_JTOPDIR/Headers"
+- fi;;
+- *) _JINC="$_JTOPDIR/include";;
+-esac
+-
++# If JAVAPREFIX is defined, look there first
++if test -r "$JAVAPREFIX/include/jni.h"; then
++ _JTOPDIR="$JAVAPREFIX"
++ _JINC="$JAVAPREFIX/include"
++else
++ _ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
++ _JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
++ case "$host_os" in
++ darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
++ if test -d "$_JTOPDIR/include"; then
++ _JINC="$_JTOPDIR/include"
++ else
++ _JINC="$_JTOPDIR/Headers"
++ fi;;
++ *) _JINC="$_JTOPDIR/include";;
++ esac
++fi
+ # If we find jni.h in /usr/include, then it's not a java-only tree, so
+ # don't add /usr/include or subdirectories to the list of includes.
+ # An extra -I/usr/include can foul things up with newer gcc's.
diff --git a/sys-libs/db/files/db-6.2.32-jni-check-prefix-first.patch b/sys-libs/db/files/db-6.2.32-jni-check-prefix-first.patch
new file mode 100644
index 000000000000..0a320d7f9336
--- /dev/null
+++ b/sys-libs/db/files/db-6.2.32-jni-check-prefix-first.patch
@@ -0,0 +1,44 @@
+--- db-6.2.32/dist/aclocal_java/ac_jni_include_dirs.m4
++++ db-6.2.32/dist/aclocal_java/ac_jni_include_dirs.m4
+@@ -43,21 +43,26 @@
+ *) AC_MSG_ERROR([$_ACJNI_JAVAC is not an absolute path name]);;
+ esac
+
+-_ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
+-_JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
+-case "$host_os" in
+- darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
+- if test -d "$_JTOPDIR/include"; then
+- _JINC="$_JTOPDIR/include"
+- else
+- _JINC="`$_JTOPDIR/Commands/java_home`/include"
+- fi;;
+- *) if test ! -r "$_JTOPDIR/include/jni.h"; then
+- _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
+- fi
+- _JINC="$_JTOPDIR/include";;
+-esac
+-
++# If JAVAPREFIX is defined, look there first
++if test -r "$JAVAPREFIX/include/jni.h"; then
++ _JTOPDIR="$JAVAPREFIX"
++ _JINC="$JAVAPREFIX/include"
++else
++ _ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
++ _JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
++ case "$host_os" in
++ darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
++ if test -d "$_JTOPDIR/include"; then
++ _JINC="$_JTOPDIR/include"
++ else
++ _JINC="`$_JTOPDIR/Commands/java_home`/include"
++ fi;;
++ *) if test ! -r "$_JTOPDIR/include/jni.h"; then
++ _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
++ fi
++ _JINC="$_JTOPDIR/include";;
++ esac
++fi
+ # If we find jni.h in /usr/include, then it's not a java-only tree, so
+ # don't add /usr/include or subdirectories to the list of includes.
+ # An extra -I/usr/include can foul things up with newer gcc's.
diff --git a/sys-libs/db/metadata.xml b/sys-libs/db/metadata.xml
new file mode 100644
index 000000000000..19c65222929a
--- /dev/null
+++ b/sys-libs/db/metadata.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<longdescription>
+The Berkeley Database (Berkeley DB) is a programmatic toolkit
+that provides embedded database support for both traditional and client/server
+applications. Berkeley DB includes b+tree, queue, extended linear hashing,
+fixed, and variable-length record access methods, transactions, locking,
+logging, shared memory caching and database recovery. DB supports C, C++, Java,
+and Perl APIs. DB is available for a wide variety of UNIX platforms as well as
+Windows NT and Windows '95 (MSVC 4, 5 and 6).
+</longdescription>
+<longdescription lang="nl">
+De Berkeley Database is een programmatische toolkit
+die embedded database support verzorg voor en traditionele en client/server
+applicaties. Berkeley DB bevat b+tree, rij, uitgebreide lineaire hashing, vaste
+en variabele lengte record toegangsmethoden, transacties, locking, logging,
+gedeeld geheugen caching en database herstel. DB ondersteund C, C++, Java en
+Perl API's. DB is beschikbaar voor veel UNIX platformen en
+Windows.
+</longdescription>
+<use>
+ <flag name="rpc">Enable rpc client/server</flag>
+</use>
+</pkgmetadata>