summaryrefslogtreecommitdiff
path: root/dev-db/mongodb
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-db/mongodb
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-db/mongodb')
-rw-r--r--dev-db/mongodb/Manifest49
-rw-r--r--dev-db/mongodb/files/mongodb-3.0.14-fix-scons.patch36
-rw-r--r--dev-db/mongodb/files/mongodb-3.0.14-fix-std-string.patch83
-rw-r--r--dev-db/mongodb/files/mongodb-3.2.0-fix-scons.patch49
-rw-r--r--dev-db/mongodb/files/mongodb-3.2.10-boost-1.62.patch15
-rw-r--r--dev-db/mongodb/files/mongodb-3.2.16-Replace-string-with-explicit-std-string.patch283
-rw-r--r--dev-db/mongodb/files/mongodb-3.2.4-boost-1.60.patch84
-rw-r--r--dev-db/mongodb/files/mongodb-3.4.0-fix-scons.patch35
-rw-r--r--dev-db/mongodb/files/mongodb-3.4.6-sysmacros-include.patch38
-rw-r--r--dev-db/mongodb/files/mongodb-3.4.7-no-boost-check.patch13
-rw-r--r--dev-db/mongodb/files/mongodb-3.6.1-fix-scons.patch32
-rw-r--r--dev-db/mongodb/files/mongodb-3.6.1-no-compass.patch46
-rw-r--r--dev-db/mongodb/files/mongodb-4.0.0-no-compass.patch57
-rw-r--r--dev-db/mongodb/files/mongodb.conf-r334
-rw-r--r--dev-db/mongodb/files/mongodb.confd-r212
-rw-r--r--dev-db/mongodb/files/mongodb.confd-r311
-rw-r--r--dev-db/mongodb/files/mongodb.initd-r226
-rw-r--r--dev-db/mongodb/files/mongodb.initd-r318
-rw-r--r--dev-db/mongodb/files/mongodb.logrotate13
-rw-r--r--dev-db/mongodb/files/mongodb.service10
-rw-r--r--dev-db/mongodb/files/mongos.conf-r230
-rw-r--r--dev-db/mongodb/files/mongos.confd-r212
-rw-r--r--dev-db/mongodb/files/mongos.confd-r311
-rw-r--r--dev-db/mongodb/files/mongos.initd-r226
-rw-r--r--dev-db/mongodb/files/mongos.initd-r318
-rw-r--r--dev-db/mongodb/metadata.xml28
-rw-r--r--dev-db/mongodb/mongodb-3.0.14.ebuild174
-rw-r--r--dev-db/mongodb/mongodb-3.0.15.ebuild174
-rw-r--r--dev-db/mongodb/mongodb-3.2.17.ebuild197
-rw-r--r--dev-db/mongodb/mongodb-3.4.10.ebuild194
-rw-r--r--dev-db/mongodb/mongodb-3.4.13.ebuild167
-rw-r--r--dev-db/mongodb/mongodb-3.4.14.ebuild167
-rw-r--r--dev-db/mongodb/mongodb-3.4.15.ebuild167
-rw-r--r--dev-db/mongodb/mongodb-3.6.2-r1.ebuild170
-rw-r--r--dev-db/mongodb/mongodb-3.6.3-r1.ebuild170
-rw-r--r--dev-db/mongodb/mongodb-3.6.4-r1.ebuild170
-rw-r--r--dev-db/mongodb/mongodb-3.6.5-r1.ebuild170
-rw-r--r--dev-db/mongodb/mongodb-4.0.0-r1.ebuild170
38 files changed, 3159 insertions, 0 deletions
diff --git a/dev-db/mongodb/Manifest b/dev-db/mongodb/Manifest
new file mode 100644
index 000000000000..740453c48b3f
--- /dev/null
+++ b/dev-db/mongodb/Manifest
@@ -0,0 +1,49 @@
+AUX mongodb-3.0.14-fix-scons.patch 1419 BLAKE2B da2aaf46a04a1fb345b8e44ca950d8e1b0de8e1699d47bf146e879f6461b8329a5900265a97710df5a8195283d21007dc9a1bd2b3ecebb113f718d0fd0ed74ba SHA512 2cf591ee25d33adf98ca6baeb086fb8677720809bc3e2b9398bba6ae84548b2aa3dfd57216e185fc6aa0aa185c9a906fe2a1b97bc81942560f02903b24f7bd25
+AUX mongodb-3.0.14-fix-std-string.patch 2341 BLAKE2B ae22f1c03e9230ee8dac8bacefcbd3dd193d8776dd2e86a761d5b0fe3bba823c3c1c8f9a0d2b91ff4aea0860c01289d7bc4b12fb91c02db72d0e4a755f40172f SHA512 1c1d46f4d058685371914ac70c8ad36fba387e9a140ddfd5650cf0411a73776d7b8ef6108a778eaeaa5ba22eba0e16b2301d257a47250a67e7e013d7bb402e47
+AUX mongodb-3.2.0-fix-scons.patch 1738 BLAKE2B 0e85c39637900a67c7a04396963624e9e53cc5d482eb177e7845e10817ce51bc0bec32f91c7ba31bc953d26f9b28f05dbf3ee2423e058c4ea49ac101ece95434 SHA512 04f95586b46960405b7b1906ea3c3c75d37d6831a458f619347ac028c77db5744131cb7bf39cdf62bf564500b1f6785e25b9a0c0526f126bf2072269385afe45
+AUX mongodb-3.2.10-boost-1.62.patch 702 BLAKE2B fb3822a1a212aae30f6fbb33a4a87f5f7d0992dfc94b95247e8a0253ed453035aa8f1ba3b9912d3cd1245561d4e529b4e29ab1cf109430c4d2fef51ca33c1bd8 SHA512 79edfd1a6eaba597b31a82e54722dccab288d8b8840a53f79140b5fca221b5acd9fbc770d99e46ea9fa0da502cdf18dd35d982c95a4aa341806c3d8b61fc732f
+AUX mongodb-3.2.16-Replace-string-with-explicit-std-string.patch 12636 BLAKE2B 21f04acd87242a11577a20cadde11a9cc994172532b933efba6e3f96ae6bb1aaa64ab271aaf7d286f84e77ae13a688682d19e815820d5ee3c64d8a605226adea SHA512 43a610b0c37c74576ef3e3df3734c4d9d904271dd3853003ff439f61099666a356ed5d4f046573a753c652dfe1e1c1607b1abe041482b740fe828f543272646c
+AUX mongodb-3.2.4-boost-1.60.patch 3352 BLAKE2B c008120ace4dc5507fd0de68caf12a79465f61345a68be8a98a0dc84fe457bc7f04d0f99b9eab6644df34ac79efad1e7b77134cd7a29c65485568bce9e2b59cc SHA512 260c3edc3a04f3fae9f18fb73b3ae027709aa019751627d1a24b2ee40a72f91ef9de64606aff32c0890861fc56ae3c80341ba87cd16fffdd009b4fa5089c70db
+AUX mongodb-3.4.0-fix-scons.patch 1411 BLAKE2B 6e5975b70ec7f281ea2cd101b16ee2849762fa1dd8427522eb3b01cd1738e60ece013bf23d07c180c58af024aebd141ca7fdf80bc240701f48556da46d3787ab SHA512 2e29c91a22663259d2f5413fbb2652702bceb122899e50a8969fb82d74a64a78649e79b005e20e6640740c089b1cee19080890eb8d9344c2ce355a977146b770
+AUX mongodb-3.4.6-sysmacros-include.patch 1419 BLAKE2B f07ab093f13ea2b9675538dc99e2e58f85019edffad05bbbf3032f85f8ef881020cc9bf25bc62ca13344e7b8b7dd3b04954c76974c512a41ea5a7a2045de2b34 SHA512 ab269ec003b74848f981021f5eb09e38216d75dd9d1b8a155068b2a335d9ec9d1f5f575028ae9b4b0d8745d15e464cb05b70aabc6c28c984115574c6747afc05
+AUX mongodb-3.4.7-no-boost-check.patch 641 BLAKE2B 0dc3a426b28cd80d7b3361ff9c6747aff64dd27c1bc01a9717c2dd1c160b66f53feb72fd2ead385c220ebe92a8c7b8fa6b04fb3fa8437dba17d5f8346665f6b8 SHA512 812eaaadb6f265cfc904e8f3a7ae8276e42e3968529914179efab5e44f1951ab46ac3bbcfb259f924b20a8ca61d2ebcf72b7103ea9d5f25594ff8e9e3e85836b
+AUX mongodb-3.6.1-fix-scons.patch 1207 BLAKE2B 3c47d72eb940d67f40e4a12becb6de469255446b74aa5e0b2f27e8e0021e77f1af9cce12ae26ed0b05871e995e29d3da1eaee718997bc6de6e62838285946094 SHA512 70efb9309ff5a2415cec6ddca694c33ebaba29d5fb959ecc79907218205a10d4e7329fe48c8c8515bda83751061245d41f4fb11a5d8cd0c80c1db61217acb90e
+AUX mongodb-3.6.1-no-compass.patch 2046 BLAKE2B e6b6977b69eb297c6a6340661f906e0206c2b68a1cebfd3c7ca01b27cc05562e0909531a2488159a54db32a05ec0cc4f81b4fe675db51bf3c30d66bc9d484c0b SHA512 5a7257a3670f40453c424ae2e6d2bbe0e3d1c795b57351c24a1b48ea4134146b08310d88a47cbb0c94a0a451a2c4a3c30fb10c44a1b9203681ee9cb5240db412
+AUX mongodb-4.0.0-no-compass.patch 2270 BLAKE2B 66659a18d46755e6661b57e2ba020d7b967c455b0bfd5d198e0efd5bab1c0fdbb5def66b9e9fb54b34eb415e9b9231dcb6ba4b943d674e09685b47333af31d22 SHA512 e3b3adae4991e7687b191651f4c93471042bc8f56c5977743afec573fe026df3af1459b8bcbdb4f9995ecfbf83785ad56ccf46d6756429164b1f49524a36fed7
+AUX mongodb.conf-r3 722 BLAKE2B c053bf101f5e3e38cc68f2bcbe7fb66ed9e55da9382d2412a497d68b478573390eddc5f284f76d56ca4792fe6241f6d1273a6585a98f96a1cb20530499a15904 SHA512 ef193bfed673477aa0e868114bd52be6675492c164f218c71ccd02c4a620b5c4799ea1d18df0c3f2b364027b9f25e60ac4475bb216b25e1dc10bfd00a9f5d45d
+AUX mongodb.confd-r2 549 BLAKE2B b43518e43d9c2fe030887cde657fdc08cdd15349cf12cfa1f0f4f0a0db568ba2ae3e3cdec1d04953e62d87feaea6bae969be03bb2270ca31bd9ebbe5e9c79416 SHA512 75f11e8350e98b90eccafd577d794e4b05f36ede8d95e7839e9fa1eb77ea7bd9cdd2fdd07719abb78a714cd7d72109c177d265d6417ef198a4217453c0a4db68
+AUX mongodb.confd-r3 473 BLAKE2B b9d812cfb424309e117cf5c43ba8ee7bd4dadac78d6ebd1b0d3c2cdd04d14b334c8f2e26ee24c5ede1a8fe6500bda1b39a5422a3bc1eb8a2c4a8dde038db7997 SHA512 8a90fb39ad16837458a2add25a9b9059e2b356794cfbf3cb35c9ecd6a584ee300c67b49b5261e062eaf7aac593588e2871e5cf76ab2287e58ea342436d0afe56
+AUX mongodb.initd-r2 654 BLAKE2B dac26431711bc4e4047075331c830e356a15b76ef67436f2e6b3984cffb6c9c47ae4196b788ab4b53695d5c2269c35b8ba475fa3ee3b5edf6b2c51944e576413 SHA512 566d47356ef956ee44b170b4498a6361583efea5a01cc3a7e0936c0abdff3100b535eb1259434bd7a68de354b75d165e543362bb93f1fb527b1605de23557398
+AUX mongodb.initd-r3 422 BLAKE2B 8c4e1a227f279e49a48b5cb7badfb18c805ce01d471f4fa8634a0d2e4b2ddc6c7e8ccc02fce682bd4fc4436f53ec86fa69a4c287a9b8924a67157e36854c24b9 SHA512 ebeefa1abefddd8d90fd09da035215c65d4f4fa374ec72db487fb7f457ff5a92c5b806743e58b1f6e97854d362b3b3699dba260bd3f8d0614b4cfc5de550f45b
+AUX mongodb.logrotate 205 BLAKE2B d47c211207e599d9b7f56dd9579d3a9eec577ad0efc07dd6980747b6aa59eec930b760f956dd6e180681c684e4507eb12cc88a985e506f77e0c3162ef7df4675 SHA512 8c089b1a11f494e4148fb4646265964c925bf937633a65e395ee1361d42facf837871dd493a9a2e0f480ae0e0829dbd3ed60794c5334e2716332e131fc5c2c51
+AUX mongodb.service 220 BLAKE2B ea55bb2f08066d7399e9e66f981f86395f6a177faa198c66f93ea2965ea80d61c170336a4f49fc7f1f855d3abd5e7cf3862d58a2be4a7708c0582fb4ff80b255 SHA512 177251404b2e818ae2b546fe8b13cb76e348c99e85c7bef22a04b0f07b600fd515a309ede50214f4198594388a6d2b31f46e945b9dae84aabb4dfa13b1123bb9
+AUX mongos.conf-r2 648 BLAKE2B 420bebfafc1ef4af4b90580077a803fe30f37d63eca6509e7381ca5fcf4e5bc31e136dfc72b653b4d942fdeda058f9fcecc3dcbec9c61e2c82ac3324b9fc0f44 SHA512 5aa8ced8d83572358e008c0df45dbe72a2e9c0003c9f49514d6b91bf9b75d4fb48b189ffe00d14e5675679943a05215a9873c5c9bde9ab1be4ed4813e75714e3
+AUX mongos.confd-r2 546 BLAKE2B 45203bdec8e30bbf97af6b02a66a366946c02f6820bc23486dcfc7ff87d9db771f8efa387e2afa77900ad68bdeeb327ed288af2d63a22000580f9f882c6ec571 SHA512 30e208690b5f28bd0442b7ed302d9be991aedd27203f24e5849201d33291ad7f0f9153ae3a00b55697d79a45c40d7b3792ff45f0c24ef2cf4e88222f88ea1400
+AUX mongos.confd-r3 470 BLAKE2B 9cf6f201d337430901d957a5a0811ff11ac2e81814aac2120c5018e6ec4c38b5ca22d19caea593834416c63609c69a8294227fb6b30200b41dfb29799cc5c1b4 SHA512 952fb9cf5d3eeea2006b101e23142e408c98d66d1f4f868f6ea5a4df6a6331ddcbcbdfb24f4b031c1a8c42652141a3684073b96dfc0b3fbd21dc6b5bcf0e36cb
+AUX mongos.initd-r2 654 BLAKE2B e1d87021c218adf49f2efbd3dc6d8afb94bc4f71e60d91df9c1338241b950f62ecb1d4a989cd559b39c4c05ed7084618e4f1ec4e5eb253fae0b62f03fc9696d9 SHA512 751ddcfa406d6683e33b484ae441f7c8502698b651a1ace9b77bc13be48cee1c1ad657c474764f06bd8ef4bff51cdb235929c8d41b669a326a6ab7d24647a2c5
+AUX mongos.initd-r3 422 BLAKE2B 90872d0d8cdc5e33e3eebee848f58a2db0511d48b496ba9318117b74ad9265ead53a21b7d1790729a62d61839099bee315ace8ff3646c01e096a943c2251bf88 SHA512 bf5897614d59c6b4e72529b126408a62ea37d9e9368e5ff69c8fcf2bad3ec09065cff09467f82117a892c51090018706d2f38c03cb9a974a61a49bd9efa0f144
+DIST mongodb-src-r3.0.14.tar.gz 28093922 BLAKE2B c36f1868aaf8d149550d9e8fcfa3598b917426f896cdb9e1d12fb047345011b06975719d24db3ffadadf6e1f6007a3e32768eaaa9da9ec8f340c7a49c9239b45 SHA512 477fab29ca0ad2a0f24b895e30dc4770af8d6a1a57f3c10a02a989b58dd22510db554da0418129d4e81958342ad169696eed4b86bf5aa73916c7cec879db1152
+DIST mongodb-src-r3.0.15.tar.gz 28096395 BLAKE2B 123194723e7f1057bc5497ce9bf51f8dd2d65495f6e2c84adde22e3b41cace9c0bce8134a7b85fa1c8e89ce953a3df780eae013d61bba44bbf9339c1e2e478af SHA512 21cec235a691dad7d1d2c625ef04a851b59223b8f2c0bdc979f2a0b8249ed46b4e62753fd595afa7b74bce13851d1f6547e54d8ffad8ba1f56e36db664f5b27e
+DIST mongodb-src-r3.2.17.tar.gz 29295394 BLAKE2B 3fa9d8fa0b50b72c3b2aa86980dd4d46bd053f23d044e321d6f98f5edb76c566bf00455cf745110a8c39355843664d9d1fbbdf554fc8696de73db2b270446adc SHA512 0d6a01278bc61805afd164e4a29abe150a5a96d551ed2c7c5d385b269924a7c5f065315e4f19c0ab070aa275ac03447959af45f33826457e5db0c5f98e623512
+DIST mongodb-src-r3.4.10.tar.gz 39959937 BLAKE2B f14f081525f694b939bc21f8cb6364c2a37573c0e1867322dd2062dc167b112751579c3e2d76730b3ff07b0c6bbfd36666bbea99162b7c10eef62d92eb1b0850 SHA512 6293dde40a8433477ba3b1cf77abbdb32b28ce58279cc616b488647c8ab71b5ab3eab2146058c4a74b9e00f0938f1415020e2f26ea01f2b29dd78a1a38d58c3a
+DIST mongodb-src-r3.4.13.tar.gz 39992720 BLAKE2B 5620711c5ffddd9a96c29be1f2801a37f30536d1b7afe5a7b339a41cacf1f97caf8d03aafdf1d6b71cc488e48f5066ebc49a63a6bf318483d552863cd47a0c0e SHA512 295dbb38d44c99e0dce46c5e4aa5d73c64d813a3767e71a7187aff05e30f896d283ca7ef19c0a7bbd036eecf3d419e38ea3bc7d98ba93d12296c49e565df0f66
+DIST mongodb-src-r3.4.14.tar.gz 40017360 BLAKE2B 617ebf0346b9ea5034d05ba607b21b745a44e70edb347c6bf0cd8b273b448caef7da2d5f11036d48add6f452883a9b15259fe8ad466e58199be5eb9512167b6d SHA512 f8c38d12e24ae332221db15aab646725ef666012837b8127a1ab128ac2d6da2ab702f3edd17fdf3e6a840f603c8c66acf2a87fe74adf30bd9c4fe6b873c98186
+DIST mongodb-src-r3.4.15.tar.gz 40063153 BLAKE2B 7912a1b0450337c8b9935deb6abfbda6080f8fec68222b6eb9fbbd278e4d8a1ffb873c7c4a63c78c3eadc722c694d4d48b3f5d9247531f1731d7713a527daec5 SHA512 8b29c1cef4c34e9c2e16bbaf50aa10574eb63c9692ab248849a0cc476acc637794c3be27df0663a27ee4ced28c6d80bb0e11ac00fcd6d0a8babfc835b78fce59
+DIST mongodb-src-r3.6.2.tar.gz 39999539 BLAKE2B 3e38917ebaf79b63bf054279fbb91a648fe52e69d8194998dc74453ad6766688929a80456f6cb4801f2806ac938a5dfc0407e5f46345b47a80ecce0ba03d7fde SHA512 7acfbcc68c1bd4e6e63eee09be1dfbb064be6f8b0144418105100a065f8162cafc9b776fe0429fd64c79b958561aa42d0bdef56588dda65acee27ccc98631f39
+DIST mongodb-src-r3.6.3.tar.gz 40093607 BLAKE2B bb21bf0487661eec6140ade22526617b26b2499bd36e138d955d14a4b13a0685ec7308bccfc11ef17c785cd8a71c5b6cd9d154d461b8973410b03952b93953ec SHA512 94aa9955f99d5f6bbbe65dc3755583952525398308ca7cb9224b91d1fa403de5bb3abb63a651583815cbecaff58966b5cfe7334a36ef6583f73d8c213410ddbc
+DIST mongodb-src-r3.6.4.tar.gz 40159916 BLAKE2B d3878d4e6bbf331de672768b2c92a4d71f758232170432d757f7e61849e6e1ef3b190e6a089101c9ea23c4ce23087c684c86fc6ea0f32f6fe052ce322d47e438 SHA512 02c2a697af9fdcbb16d19792be17d987e18c684418a63ed4750471c7ec22eb2eabf84e93cb1d298f67898b7e23687f668bb333c50ffc4e1b8adf8859f856ad95
+DIST mongodb-src-r3.6.5.tar.gz 40310152 BLAKE2B 72110ae47b17ec8b1f60636a5ef8491b076e1cc019513fd872ea38b3bb8393efff4bddc7b795b3da711f258d21be9fa23e24d396a9429349c51ce05fff180a53 SHA512 6ecb3140ee4a7929fabe62d698f23e87cb5030cf31abefe7f82374f407fb87dc05f712089998f96bc40e23698836a86e7f3590892bde9d2d6f2c4bcc15cc3ebf
+DIST mongodb-src-r4.0.0.tar.gz 49138467 BLAKE2B 616e267c737729103de544d82db60489e7a32c5f9847ffd2d643a9025c18aa867718216f5de9f18a93fb2a7930c3dbe9ec3850eef09dbec084570328a99f2865 SHA512 11d00cdde606cfea268471cffccedb6d003e421aeffda2303aff4d4126c386aaec50a1de733d7a1d5fb6605403cf9f2218dae50374c7b5e8625fa80317804589
+EBUILD mongodb-3.0.14.ebuild 4559 BLAKE2B e72ff73baaa3b6a5bb4bbb33f3153d2aeaa9458b6e7f48419f5fd0f9b7fe43dfbcd93bf0824555e688faa461839a8c3cb5e4d1a24219a395f1a245828d639777 SHA512 747424cae955229f6affd867961171d9ad3fe9c34553ddb94e034db76d4e389ba0c6dc47db23c291212b893b7377d1bfac52e79ae4ab1b9dfd8f4c89743e1a19
+EBUILD mongodb-3.0.15.ebuild 4561 BLAKE2B 85e994c18b57a0278059eb0e2e141842b551a96e1a030b5d84e0bb4c1524bacff7ed1a1576093b0336ed042f8bcbf01d37ba725392c077a400fdefc2705ec2ab SHA512 d5b77ede0ab5d9fa814542e831ec93d5854f0aaa55930c5e445410d347787be96294a741f30089764ea23cdab52413d1d82c6796b3d7133796d28de95726e294
+EBUILD mongodb-3.2.17.ebuild 5338 BLAKE2B fd327b1c5bb85e833782839e07b3379a103f0545fb9852cb06d7f6f0b3548b921dfce227d1882a1e448a533c043718c778e9141ec5715805a24c9e2fbf199fa1 SHA512 a439c32b20a81d1c8e199c8a6928aa75479562e6b33c0d7b50797181226a093f571a1caaab102569a9a308db18a73c51558657ccd4bcb1d7e137eb22fb363c4e
+EBUILD mongodb-3.4.10.ebuild 5133 BLAKE2B e6b3742a9bff53afd63eae4fe3b9574e43f7007dc1efc1687583b17820e812341f354e7dd7882762a871f1d5b1e2732a9cd20cff7981c05de4058c26c58f68d2 SHA512 737046d5ac14920014581840d3e53597e916cc4f1bbdfba850842718039c227c5cf3e5b62cd3f491e1221ff8fefd74fb3ea75ecafd6218c4036f4973316c56eb
+EBUILD mongodb-3.4.13.ebuild 4256 BLAKE2B e4caf3957d5bea1811879828abb9a1407afcb9646e4e91911369d8e43564412e0fa19ec84264d1ad5dbea758fb32c5dfe2fb4dca60636b7838f4c3d4ef3832d2 SHA512 dee3412d989c9d00e1097a2ebb8d05e7d77d14e8399d7bf570da37904ec90de86d62807383c95caa057b2c2cfe2057be0b208b262bf488687b201a2f38ea7bac
+EBUILD mongodb-3.4.14.ebuild 4256 BLAKE2B e4caf3957d5bea1811879828abb9a1407afcb9646e4e91911369d8e43564412e0fa19ec84264d1ad5dbea758fb32c5dfe2fb4dca60636b7838f4c3d4ef3832d2 SHA512 dee3412d989c9d00e1097a2ebb8d05e7d77d14e8399d7bf570da37904ec90de86d62807383c95caa057b2c2cfe2057be0b208b262bf488687b201a2f38ea7bac
+EBUILD mongodb-3.4.15.ebuild 4256 BLAKE2B e4caf3957d5bea1811879828abb9a1407afcb9646e4e91911369d8e43564412e0fa19ec84264d1ad5dbea758fb32c5dfe2fb4dca60636b7838f4c3d4ef3832d2 SHA512 dee3412d989c9d00e1097a2ebb8d05e7d77d14e8399d7bf570da37904ec90de86d62807383c95caa057b2c2cfe2057be0b208b262bf488687b201a2f38ea7bac
+EBUILD mongodb-3.6.2-r1.ebuild 4446 BLAKE2B 23e7edab8f84fac52f1dd5289017f6a27a6151deafd53cb8f0eccb229653704c780eda604bf3c08291d6cc7d20962d733c6b44e5ea659e0b5fb7e44ef8e0ed30 SHA512 70e7443ad7de93688bb58382f6a311500f580354111ce60f8bc0848862963e86be1d742fce95918f2fccce7583dc22e12940b1ca004e5f148fa0a72d512fe99a
+EBUILD mongodb-3.6.3-r1.ebuild 4446 BLAKE2B 23e7edab8f84fac52f1dd5289017f6a27a6151deafd53cb8f0eccb229653704c780eda604bf3c08291d6cc7d20962d733c6b44e5ea659e0b5fb7e44ef8e0ed30 SHA512 70e7443ad7de93688bb58382f6a311500f580354111ce60f8bc0848862963e86be1d742fce95918f2fccce7583dc22e12940b1ca004e5f148fa0a72d512fe99a
+EBUILD mongodb-3.6.4-r1.ebuild 4446 BLAKE2B 23e7edab8f84fac52f1dd5289017f6a27a6151deafd53cb8f0eccb229653704c780eda604bf3c08291d6cc7d20962d733c6b44e5ea659e0b5fb7e44ef8e0ed30 SHA512 70e7443ad7de93688bb58382f6a311500f580354111ce60f8bc0848862963e86be1d742fce95918f2fccce7583dc22e12940b1ca004e5f148fa0a72d512fe99a
+EBUILD mongodb-3.6.5-r1.ebuild 4446 BLAKE2B 23e7edab8f84fac52f1dd5289017f6a27a6151deafd53cb8f0eccb229653704c780eda604bf3c08291d6cc7d20962d733c6b44e5ea659e0b5fb7e44ef8e0ed30 SHA512 70e7443ad7de93688bb58382f6a311500f580354111ce60f8bc0848862963e86be1d742fce95918f2fccce7583dc22e12940b1ca004e5f148fa0a72d512fe99a
+EBUILD mongodb-4.0.0-r1.ebuild 4445 BLAKE2B b6e7e01a6fd89ac0db97172a6c8257232089b1bd2c22ef8c1e5d689827d8b9c4b4ba384b68b63e8bb3038a25d2592b3cd13e38bdf3930bfd962d57a7262fef4c SHA512 961fcccb68ae8364172471f985c46b8e4d04c57a9620661810587f7e069cf521c6c0f0a5c50e7d015cbef1ded0cdcb983890d0564c7f8a8706fe7c6e6cc44750
+MISC metadata.xml 1053 BLAKE2B f2104654da3600c3d10882bb600d9002c015c7fb5dcfc8bdb98ab1fcb06d384ead4af990d55d6596d4bd602e5c4e9978a11cc66382ee01bab006f817ba44bdc2 SHA512 9ab708e294e25487ceeeeac7500a64684c914e95aa593c3a1f06d845b6b629766a5b98d972bf0802f3713b89bd6c81e293fc45205604980164542442438b13a2
diff --git a/dev-db/mongodb/files/mongodb-3.0.14-fix-scons.patch b/dev-db/mongodb/files/mongodb-3.0.14-fix-scons.patch
new file mode 100644
index 000000000000..1db5d7695c72
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-3.0.14-fix-scons.patch
@@ -0,0 +1,36 @@
+diff --git a/SConstruct b/SConstruct
+--- a/SConstruct
++++ b/SConstruct
+@@ -1008,7 +1008,6 @@
+ # -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used.
+ env.Append( CCFLAGS=["-fPIC",
+ "-fno-strict-aliasing",
+- "-ggdb",
+ "-pthread",
+ "-Wall",
+ "-Wsign-compare",
+@@ -1016,13 +1015,13 @@
+ "-Winvalid-pch"] )
+ # env.Append( " -Wconversion" ) TODO: this doesn't really work yet
+ if linux or darwin:
+- env.Append( CCFLAGS=["-pipe"] )
+ if not has_option("disable-warnings-as-errors"):
+ env.Append( CCFLAGS=["-Werror"] )
+
+ env.Append( CPPDEFINES=["_FILE_OFFSET_BITS=64"] )
+- env.Append( CXXFLAGS=["-Wnon-virtual-dtor", "-Woverloaded-virtual"] )
+ env.Append( LINKFLAGS=["-fPIC", "-pthread"] )
++ env.Append( CXXFLAGS=os.environ['CXXFLAGS'] )
++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] )
+
+ # SERVER-9761: Ensure early detection of missing symbols in dependent libraries at program
+ # startup.
+@@ -1039,7 +1038,7 @@
+ if not darwin:
+ env.Append( LINKFLAGS=["-rdynamic"] )
+
+- env.Append( LIBS=[] )
++ env.Append( LIBS=['pcre', 'pcrecpp', 'snappy', 'yaml-cpp'] )
+
+ #make scons colorgcc friendly
+ for key in ('HOME', 'TERM'):
diff --git a/dev-db/mongodb/files/mongodb-3.0.14-fix-std-string.patch b/dev-db/mongodb/files/mongodb-3.0.14-fix-std-string.patch
new file mode 100644
index 000000000000..9de319bda9dd
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-3.0.14-fix-std-string.patch
@@ -0,0 +1,83 @@
+--- a/src/mongo/shell/bench.cpp 2017-09-20 19:12:20.893056990 +0200
++++ b/src/mongo/shell/bench.cpp 2017-09-20 19:14:08.165060566 +0200
+@@ -52,6 +52,9 @@
+ #include "mongo/util/time_support.h"
+ #include "mongo/util/version.h"
+
++#include <string>
++using namespace std;
++
+ // ---------------------------------
+ // ---- benchmarking system --------
+ // ---------------------------------
+--- a/src/mongo/db/dbwebserver.cpp 2017-09-20 19:24:50.042081961 +0200
++++ b/src/mongo/db/dbwebserver.cpp 2017-09-20 19:26:20.240084968 +0200
+@@ -58,6 +58,8 @@
+ #include "mongo/util/ramlog.h"
+ #include "mongo/util/version.h"
+
++#include <string>
++using namespace std;
+
+ namespace mongo {
+
+--- a/src/mongo/db/matcher/expression_leaf.cpp 2017-09-20 19:27:59.009088260 +0200
++++ b/src/mongo/db/matcher/expression_leaf.cpp 2017-09-20 19:28:31.082089329 +0200
+@@ -39,6 +39,9 @@
+ #include "mongo/db/jsobj.h"
+ #include "mongo/db/matcher/path.h"
+
++#include <string>
++using namespace std;
++
+ namespace mongo {
+
+ Status LeafMatchExpression::initPath(const StringData& path) {
+--- a/src/mongo/db/repl/master_slave.cpp 2017-09-20 19:30:04.569092445 +0200
++++ b/src/mongo/db/repl/master_slave.cpp 2017-09-20 19:31:19.145094931 +0200
+@@ -70,6 +70,9 @@
+ #include "mongo/util/exit.h"
+ #include "mongo/util/log.h"
+
++#include <string>
++using namespace std;
++
+ using boost::scoped_ptr;
+ using std::auto_ptr;
+ using std::cout;
+--- a/src/mongo/util/net/miniwebserver.cpp 2017-09-20 19:32:55.368098138 +0200
++++ b/src/mongo/util/net/miniwebserver.cpp 2017-09-20 19:33:57.128100197 +0200
+@@ -39,6 +39,9 @@
+ #include "mongo/util/hex.h"
+ #include "mongo/util/log.h"
+
++#include <string>
++using namespace std;
++
+ namespace mongo {
+
+ using boost::shared_ptr;
+--- a/src/mongo/s/config.cpp 2017-09-20 19:42:45.614117812 +0200
++++ b/src/mongo/s/config.cpp 2017-09-20 19:43:28.278119234 +0200
+@@ -60,6 +60,9 @@
+ #include "mongo/util/net/message.h"
+ #include "mongo/util/stringutils.h"
+
++#include <string>
++using namespace std;
++
+ namespace mongo {
+
+ using boost::scoped_ptr;
+--- a/src/mongo/s/grid.cpp 2017-09-20 19:51:07.684134547 +0200
++++ b/src/mongo/s/grid.cpp 2017-09-20 19:51:43.436135739 +0200
+@@ -55,6 +55,9 @@
+ #include "mongo/util/startup_test.h"
+ #include "mongo/util/stringutils.h"
+
++#include <string>
++using namespace std;
++
+ namespace mongo {
+
+ using std::endl;
diff --git a/dev-db/mongodb/files/mongodb-3.2.0-fix-scons.patch b/dev-db/mongodb/files/mongodb-3.2.0-fix-scons.patch
new file mode 100644
index 000000000000..8b29bd4a2a4f
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-3.2.0-fix-scons.patch
@@ -0,0 +1,49 @@
+From ab6f929ee4584f3f1a040e55a63f493603f228d2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Fri, 1 Jan 2016 10:27:35 +0100
+Subject: [PATCH] Fix build for Gentoo
+
+---
+ SConstruct | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/SConstruct b/SConstruct
+index 64c8387..fa9ab8b 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -1371,7 +1371,6 @@ if env.TargetOSIs('posix'):
+ env.Append( CCFLAGS=["-fno-omit-frame-pointer",
+ "-fPIC",
+ "-fno-strict-aliasing",
+- "-ggdb",
+ "-pthread",
+ "-Wall",
+ "-Wsign-compare",
+@@ -1382,8 +1381,9 @@ if env.TargetOSIs('posix'):
+ if not has_option("disable-warnings-as-errors"):
+ env.Append( CCFLAGS=["-Werror"] )
+
+- env.Append( CXXFLAGS=["-Wnon-virtual-dtor", "-Woverloaded-virtual"] )
+ env.Append( LINKFLAGS=["-fPIC", "-pthread"] )
++ env.Append( CXXFLAGS=os.environ['CXXFLAGS'] )
++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] )
+
+ # SERVER-9761: Ensure early detection of missing symbols in dependent libraries at program
+ # startup.
+@@ -1398,10 +1398,10 @@ if env.TargetOSIs('posix'):
+ env.Append( SHLINKFLAGS=["-Wl,-z,now"] )
+ env.Append( LINKFLAGS=["-rdynamic"] )
+
+- env.Append( LIBS=[] )
++ env.Append( LIBS=['pcre', 'pcrecpp', 'snappy', 'yaml-cpp'] )
+
+- #make scons colorgcc friendly
+- for key in ('HOME', 'TERM'):
++ #make scons colorgcc, distcc, ccache friendly
++ for key in ('HOME', 'PATH', 'TERM'):
+ try:
+ env['ENV'][key] = os.environ[key]
+ except KeyError:
+--
+2.6.4
+
diff --git a/dev-db/mongodb/files/mongodb-3.2.10-boost-1.62.patch b/dev-db/mongodb/files/mongodb-3.2.10-boost-1.62.patch
new file mode 100644
index 000000000000..30a3bdff45f8
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-3.2.10-boost-1.62.patch
@@ -0,0 +1,15 @@
+Derived from http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/databases/mongodb/patches/patch-src_mongo_db_fts_unicode_string.cpp v1.1
+
+* Fix build with boost 1.62.0
+
+--- a/src/mongo/db/fts/unicode/string.cpp 2016-09-26 12:10:04.000000000 +0000
++++ b/src/mongo/db/fts/unicode/string.cpp
+@@ -274,7 +274,7 @@ bool String::substrMatch(const std::stri
+
+ // Case sensitive and diacritic sensitive.
+ return boost::algorithm::boyer_moore_search(
+- haystack.begin(), haystack.end(), needle.begin(), needle.end()) != haystack.end();
++ haystack.begin(), haystack.end(), needle.begin(), needle.end()) != std::make_pair(haystack.end(), haystack.end());
+ }
+
+ } // namespace unicode
diff --git a/dev-db/mongodb/files/mongodb-3.2.16-Replace-string-with-explicit-std-string.patch b/dev-db/mongodb/files/mongodb-3.2.16-Replace-string-with-explicit-std-string.patch
new file mode 100644
index 000000000000..6067850ad0b2
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-3.2.16-Replace-string-with-explicit-std-string.patch
@@ -0,0 +1,283 @@
+diff -Nru mongodb-src-r3.2.16_orig/src/mongo/db/dbwebserver.cpp mongodb-src-r3.2.16/src/mongo/db/dbwebserver.cpp
+--- mongodb-src-r3.2.16_orig/src/mongo/db/dbwebserver.cpp 2017-07-14 22:36:01.000000000 +0200
++++ mongodb-src-r3.2.16/src/mongo/db/dbwebserver.cpp 2017-08-01 15:43:55.860712772 +0200
+@@ -69,6 +69,7 @@
+ using std::map;
+ using std::stringstream;
+ using std::vector;
++using std::string;
+
+ using namespace html;
+
+diff -Nru mongodb-src-r3.2.16_orig/src/mongo/db/matcher/expression_leaf.cpp mongodb-src-r3.2.16/src/mongo/db/matcher/expression_leaf.cpp
+--- mongodb-src-r3.2.16_orig/src/mongo/db/matcher/expression_leaf.cpp 2017-07-14 22:36:01.000000000 +0200
++++ mongodb-src-r3.2.16/src/mongo/db/matcher/expression_leaf.cpp 2017-08-01 15:46:17.070708001 +0200
+@@ -200,7 +200,7 @@
+ }
+
+ void ComparisonMatchExpression::toBSON(BSONObjBuilder* out) const {
+- string opString = "";
++ std::string opString = "";
+ switch (matchType()) {
+ case LT:
+ opString = "$lt";
+@@ -880,7 +880,7 @@
+ }
+
+ void BitTestMatchExpression::toBSON(BSONObjBuilder* out) const {
+- string opString = "";
++ std::string opString = "";
+
+ switch (matchType()) {
+ case BITS_ALL_SET:
+diff -Nru mongodb-src-r3.2.16_orig/src/mongo/db/repl/master_slave.cpp mongodb-src-r3.2.16/src/mongo/db/repl/master_slave.cpp
+--- mongodb-src-r3.2.16_orig/src/mongo/db/repl/master_slave.cpp 2017-07-14 22:36:01.000000000 +0200
++++ mongodb-src-r3.2.16/src/mongo/db/repl/master_slave.cpp 2017-08-01 15:54:45.140690837 +0200
+@@ -161,7 +161,7 @@
+
+ BSONObjBuilder dbsNextPassBuilder;
+ int n = 0;
+- for (set<string>::iterator i = addDbNextPass.begin(); i != addDbNextPass.end(); i++) {
++ for (set<std::string>::iterator i = addDbNextPass.begin(); i != addDbNextPass.end(); i++) {
+ n++;
+ dbsNextPassBuilder.appendBool(*i, 1);
+ }
+@@ -170,7 +170,7 @@
+
+ BSONObjBuilder incompleteCloneDbsBuilder;
+ n = 0;
+- for (set<string>::iterator i = incompleteCloneDbs.begin(); i != incompleteCloneDbs.end(); i++) {
++ for (set<std::string>::iterator i = incompleteCloneDbs.begin(); i != incompleteCloneDbs.end(); i++) {
+ n++;
+ incompleteCloneDbsBuilder.appendBool(*i, 1);
+ }
+@@ -181,7 +181,7 @@
+ }
+
+ void ReplSource::ensureMe(OperationContext* txn) {
+- string myname = getHostName();
++ std::string myname = getHostName();
+
+ // local.me is an identifier for a server for getLastError w:2+
+ bool exists = Helpers::getSingleton(txn, "local.me", _me);
+@@ -373,10 +373,10 @@
+ }
+
+ virtual bool run(OperationContext* txn,
+- const string& ns,
++ const std::string& ns,
+ BSONObj& cmdObj,
+ int options,
+- string& errmsg,
++ std::string& errmsg,
+ BSONObjBuilder& result) {
+ HandshakeArgs handshake;
+ Status status = handshake.initialize(cmdObj);
+@@ -393,7 +393,7 @@
+ } handshakeCmd;
+
+ bool replHandshake(DBClientConnection* conn, const OID& myRID) {
+- string myname = getHostName();
++ std::string myname = getHostName();
+
+ BSONObjBuilder cmd;
+ cmd.append("handshake", myRID);
+@@ -445,7 +445,7 @@
+ BSONElement e = i.next();
+ if (e.eoo())
+ break;
+- string name = e.embeddedObject().getField("name").valuestr();
++ std::string name = e.embeddedObject().getField("name").valuestr();
+ if (!e.embeddedObject().getBoolField("empty")) {
+ if (name != "local") {
+ if (only.empty() || only == name) {
+@@ -459,7 +459,7 @@
+ save(txn);
+ }
+
+-void ReplSource::resyncDrop(OperationContext* txn, const string& db) {
++void ReplSource::resyncDrop(OperationContext* txn, const std::string& db) {
+ log() << "resync: dropping database " << db;
+ OldClientContext ctx(txn, db);
+ dropDatabase(txn, ctx.db());
+@@ -502,13 +502,13 @@
+
+ static DatabaseIgnorer ___databaseIgnorer;
+
+-void DatabaseIgnorer::doIgnoreUntilAfter(const string& db, const Timestamp& futureOplogTime) {
++void DatabaseIgnorer::doIgnoreUntilAfter(const std::string& db, const Timestamp& futureOplogTime) {
+ if (futureOplogTime > _ignores[db]) {
+ _ignores[db] = futureOplogTime;
+ }
+ }
+
+-bool DatabaseIgnorer::ignoreAt(const string& db, const Timestamp& currentOplogTime) {
++bool DatabaseIgnorer::ignoreAt(const std::string& db, const Timestamp& currentOplogTime) {
+ if (_ignores[db].isNull()) {
+ return false;
+ }
+@@ -598,7 +598,7 @@
+
+ // The database is present on the master and no conflicting databases
+ // are present on the master. Drop any local conflicts.
+- for (set<string>::const_iterator i = duplicates.begin(); i != duplicates.end(); ++i) {
++ for (set<std::string>::const_iterator i = duplicates.begin(); i != duplicates.end(); ++i) {
+ ___databaseIgnorer.doIgnoreUntilAfter(*i, lastTime);
+ incompleteCloneDbs.erase(*i);
+ addDbNextPass.erase(*i);
+@@ -793,10 +793,10 @@
+ }
+
+ void ReplSource::syncToTailOfRemoteLog() {
+- string _ns = ns();
++ std::string _ns = ns();
+ BSONObjBuilder b;
+ if (!only.empty()) {
+- b.appendRegex("ns", string("^") + pcrecpp::RE::QuoteMeta(only));
++ b.appendRegex("ns", std::string("^") + pcrecpp::RE::QuoteMeta(only));
+ }
+ BSONObj last = oplogReader.findOne(_ns.c_str(), Query(b.done()).sort(BSON("$natural" << -1)));
+ if (!last.isEmpty()) {
+@@ -844,7 +844,7 @@
+ */
+ int ReplSource::_sync_pullOpLog(OperationContext* txn, int& nApplied) {
+ int okResultCode = 1;
+- string ns = string("local.oplog.$") + sourceName();
++ std::string ns = std::string("local.oplog.$") + sourceName();
+ LOG(2) << "sync_pullOpLog " << ns << " syncedTo:" << syncedTo.toStringLong() << '\n';
+
+ bool tailing = true;
+@@ -864,7 +864,7 @@
+ BSONElement e = i.next();
+ if (e.eoo())
+ break;
+- string name = e.embeddedObject().getField("name").valuestr();
++ std::string name = e.embeddedObject().getField("name").valuestr();
+ if (!e.embeddedObject().getBoolField("empty")) {
+ if (name != "local") {
+ if (only.empty() || only == name) {
+@@ -888,7 +888,7 @@
+ if (!only.empty()) {
+ // note we may here skip a LOT of data table scanning, a lot of work for the master.
+ // maybe append "\\." here?
+- query.appendRegex("ns", string("^") + pcrecpp::RE::QuoteMeta(only));
++ query.appendRegex("ns", std::string("^") + pcrecpp::RE::QuoteMeta(only));
+ }
+ BSONObj queryObj = query.done();
+ // e.g. queryObj = { ts: { $gte: syncedTo } }
+@@ -907,7 +907,7 @@
+
+ // show any deferred database creates from a previous pass
+ {
+- set<string>::iterator i = addDbNextPass.begin();
++ set<std::string>::iterator i = addDbNextPass.begin();
+ if (i != addDbNextPass.end()) {
+ BSONObjBuilder b;
+ b.append("ns", *i + '.');
+@@ -938,7 +938,7 @@
+ BSONObj op = oplogReader.next();
+ BSONElement ts = op.getField("ts");
+ if (ts.type() != Date && ts.type() != bsonTimestamp) {
+- string err = op.getStringField("$err");
++ std::string err = op.getStringField("$err");
+ if (!err.empty()) {
+ // 13051 is "tailable cursor requested on non capped collection"
+ if (op.getIntField("code") == 13051) {
+@@ -1106,7 +1106,7 @@
+
+ // FIXME Handle cases where this db isn't on default port, or default port is spec'd in
+ // hostName.
+- if ((string("localhost") == hostName || string("127.0.0.1") == hostName) &&
++ if ((std::string("localhost") == hostName || std::string("127.0.0.1") == hostName) &&
+ serverGlobalParams.port == ServerGlobalParams::DefaultDBPort) {
+ log() << "can't sync from self (localhost). sources configuration may be wrong." << endl;
+ sleepsecs(5);
+@@ -1251,7 +1251,7 @@
+ if (s) {
+ stringstream ss;
+ ss << "sleep " << s << " sec before next pass";
+- string msg = ss.str();
++ std::string msg = ss.str();
+ if (!serverGlobalParams.quiet)
+ log() << msg << endl;
+ ReplInfo r(msg.c_str());
+diff -Nru mongodb-src-r3.2.16_orig/src/mongo/shell/bench.cpp mongodb-src-r3.2.16/src/mongo/shell/bench.cpp
+--- mongodb-src-r3.2.16_orig/src/mongo/shell/bench.cpp 2017-07-14 22:36:01.000000000 +0200
++++ mongodb-src-r3.2.16/src/mongo/shell/bench.cpp 2017-08-01 16:20:20.864638957 +0200
+@@ -674,7 +674,7 @@
+ invariant(bsonTemplateEvaluator.setId(_id) == BsonTemplateEvaluator::StatusSuccess);
+
+ if (_config->username != "") {
+- string errmsg;
++ std::string errmsg;
+ if (!conn->auth("admin", _config->username, _config->password, errmsg)) {
+ uasserted(15931, "Authenticating to connection for _benchThread failed: " + errmsg);
+ }
+@@ -920,7 +920,7 @@
+
+ if (!result["err"].eoo() && result["err"].type() == String &&
+ (_config->throwGLE || op.throwGLE))
+- throw DBException((string) "From benchRun GLE" +
++ throw DBException((std::string) "From benchRun GLE" +
+ causedBy(result["err"].String()),
+ result["code"].eoo() ? 0 : result["code"].Int());
+ }
+@@ -987,7 +987,7 @@
+
+ if (!result["err"].eoo() && result["err"].type() == String &&
+ (_config->throwGLE || op.throwGLE))
+- throw DBException((string) "From benchRun GLE" +
++ throw DBException((std::string) "From benchRun GLE" +
+ causedBy(result["err"].String()),
+ result["code"].eoo() ? 0 : result["code"].Int());
+ }
+@@ -1035,7 +1035,7 @@
+
+ if (!result["err"].eoo() && result["err"].type() == String &&
+ (_config->throwGLE || op.throwGLE))
+- throw DBException((string) "From benchRun GLE " +
++ throw DBException((std::string) "From benchRun GLE " +
+ causedBy(result["err"].String()),
+ result["code"].eoo() ? 0 : result["code"].Int());
+ }
+@@ -1136,7 +1136,7 @@
+ try {
+ std::unique_ptr<DBClientBase> conn(_config->createConnection());
+ if (!_config->username.empty()) {
+- string errmsg;
++ std::string errmsg;
+ if (!conn->auth("admin", _config->username, _config->password, errmsg)) {
+ uasserted(15932, "Authenticating to connection for benchThread failed: " + errmsg);
+ }
+@@ -1168,7 +1168,7 @@
+ std::unique_ptr<DBClientBase> conn(_config->createConnection());
+ // Must authenticate to admin db in order to run serverStatus command
+ if (_config->username != "") {
+- string errmsg;
++ std::string errmsg;
+ if (!conn->auth("admin", _config->username, _config->password, errmsg)) {
+ uasserted(16704,
+ str::stream()
+@@ -1204,7 +1204,7 @@
+ {
+ std::unique_ptr<DBClientBase> conn(_config->createConnection());
+ if (_config->username != "") {
+- string errmsg;
++ std::string errmsg;
+ // this can only fail if admin access was revoked since start of run
+ if (!conn->auth("admin", _config->username, _config->password, errmsg)) {
+ uasserted(16705,
+diff -Nru mongodb-src-r3.2.16_orig/src/mongo/util/net/miniwebserver.cpp mongodb-src-r3.2.16/src/mongo/util/net/miniwebserver.cpp
+--- mongodb-src-r3.2.16_orig/src/mongo/util/net/miniwebserver.cpp 2017-07-14 22:36:01.000000000 +0200
++++ mongodb-src-r3.2.16/src/mongo/util/net/miniwebserver.cpp 2017-08-01 16:01:01.832678112 +0200
+@@ -45,8 +45,9 @@
+ using std::endl;
+ using std::stringstream;
+ using std::vector;
++using std::string;
+
+-MiniWebServer::MiniWebServer(const string& name, const string& ip, int port)
++MiniWebServer::MiniWebServer(const std::string& name, const std::string& ip, int port)
+ : Listener(name, ip, port, false) {}
+
+ string MiniWebServer::parseURL(const char* buf) {
diff --git a/dev-db/mongodb/files/mongodb-3.2.4-boost-1.60.patch b/dev-db/mongodb/files/mongodb-3.2.4-boost-1.60.patch
new file mode 100644
index 000000000000..41c9bd2ba85c
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-3.2.4-boost-1.60.patch
@@ -0,0 +1,84 @@
+Fix issues caused by boost::none changes.
+See also: https://bugs.gentoo.org/show_bug.cgi?id=578846
+Adapted from: https://github.com/mongodb/mongo/commit/92c3f80f384d2825efeabd0d26aa534c0deb6988
+
+--- mongodb-src-r3.2.4/src/mongo/db/ftdc/compressor.cpp
++++ mongodb-src-r3.2.4/src/mongo/db/ftdc/compressor.cpp
+@@ -47,7 +47,7 @@
+ if (_referenceDoc.isEmpty()) {
+ FTDCBSONUtil::extractMetricsFromDocument(sample, sample, &_metrics);
+ _reset(sample, date);
+- return {boost::none_t()};
++ return {boost::none};
+ }
+
+ _metrics.resize(0);
+@@ -107,7 +107,7 @@
+ }
+
+ // The buffer is not full, inform the caller
+- return {boost::none_t()};
++ return {boost::none};
+ }
+
+ StatusWith<std::tuple<ConstDataRange, Date_t>> FTDCCompressor::getCompressedSamples() {
+--- mongodb-src-r3.2.4/src/mongo/db/ftdc/compressor_test.cpp
++++ mongodb-src-r3.2.4/src/mongo/db/ftdc/compressor_test.cpp
+@@ -122,7 +122,7 @@
+ TestTie() : _compressor(&_config) {}
+
+ ~TestTie() {
+- validate(boost::none_t());
++ validate(boost::none);
+ }
+
+ StatusWith<boost::optional<std::tuple<ConstDataRange, FTDCCompressor::CompressorState, Date_t>>>
+--- mongodb-src-r3.2.4/src/mongo/db/ftdc/file_writer.cpp
++++ mongodb-src-r3.2.4/src/mongo/db/ftdc/file_writer.cpp
+@@ -205,7 +205,7 @@
+
+ Status FTDCFileWriter::close() {
+ if (_archiveStream.is_open()) {
+- Status s = flush(boost::none_t(), Date_t());
++ Status s = flush(boost::none, Date_t());
+
+ _archiveStream.close();
+
+--- mongodb-src-r3.2.4/src/mongo/util/concurrency/shared_mutex_win.hpp
++++ mongodb-src-r3.2.4/src/mongo/util/concurrency/shared_mutex_win.hpp
+@@ -175,7 +175,7 @@
+ return true;
+ }
+
+- unsigned long const res=detail::win32::WaitForSingleObject(unlock_sem,::boost::detail::get_milliseconds_until(wait_until));
++ unsigned long const res=WaitForSingleObject(unlock_sem,::boost::detail::get_milliseconds_until(wait_until));
+ if(res==detail::win32::timeout)
+ {
+ for(;;)
+@@ -328,7 +328,7 @@
+ {
+ return true;
+ }
+- unsigned long const wait_res=detail::win32::WaitForMultipleObjects(2,semaphores,true,::boost::detail::get_milliseconds_until(wait_until));
++ unsigned long const wait_res=WaitForMultipleObjects(2,semaphores,true,::boost::detail::get_milliseconds_until(wait_until));
+ if(wait_res==detail::win32::timeout)
+ {
+ for(;;)
+@@ -421,7 +421,7 @@
+ return;
+ }
+
+- BOOST_VERIFY(!detail::win32::WaitForSingleObject(unlock_sem,detail::win32::infinite));
++ BOOST_VERIFY(!WaitForSingleObject(unlock_sem,detail::win32::infinite));
+ }
+ }
+
+@@ -502,7 +502,7 @@
+ {
+ if(!last_reader)
+ {
+- BOOST_VERIFY(!detail::win32::WaitForSingleObject(upgrade_sem,detail::win32::infinite));
++ BOOST_VERIFY(!WaitForSingleObject(upgrade_sem,detail::win32::infinite));
+ }
+ break;
+ }
diff --git a/dev-db/mongodb/files/mongodb-3.4.0-fix-scons.patch b/dev-db/mongodb/files/mongodb-3.4.0-fix-scons.patch
new file mode 100644
index 000000000000..2dd751fad813
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-3.4.0-fix-scons.patch
@@ -0,0 +1,35 @@
+--- a/SConstruct 2016-12-27 11:10:06.801949538 +0100
++++ b/SConstruct 2016-12-27 11:12:40.426407713 +0100
+@@ -1557,7 +1557,6 @@
+ # -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used.
+ env.Append( CCFLAGS=["-fno-omit-frame-pointer",
+ "-fno-strict-aliasing",
+- "-ggdb",
+ "-pthread",
+ "-Wall",
+ "-Wsign-compare",
+@@ -1568,8 +1567,9 @@
+ if not has_option("disable-warnings-as-errors"):
+ env.Append( CCFLAGS=["-Werror"] )
+
+- env.Append( CXXFLAGS=["-Woverloaded-virtual"] )
+ env.Append( LINKFLAGS=["-pthread"] )
++ env.Append( CXXFLAGS=os.environ['CXXFLAGS'] )
++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] )
+
+ # SERVER-9761: Ensure early detection of missing symbols in dependent libraries at program
+ # startup.
+@@ -1579,10 +1579,10 @@
+ env.Append( LINKFLAGS=["-Wl,-z,now"] )
+ env.Append( LINKFLAGS=["-rdynamic"] )
+
+- env.Append( LIBS=[] )
++ env.Append( LIBS=['pcre', 'pcrecpp', 'snappy', 'yaml-cpp'] )
+
+- #make scons colorgcc friendly
+- for key in ('HOME', 'TERM'):
++ #make scons colorgcc, distcc, ccache friendly
++ for key in ('HOME', 'PATH', 'TERM'):
+ try:
+ env['ENV'][key] = os.environ[key]
+ except KeyError:
diff --git a/dev-db/mongodb/files/mongodb-3.4.6-sysmacros-include.patch b/dev-db/mongodb/files/mongodb-3.4.6-sysmacros-include.patch
new file mode 100644
index 000000000000..868ba73e4421
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-3.4.6-sysmacros-include.patch
@@ -0,0 +1,38 @@
+From e245cac2b3c18015dee8caddd449532785d15c2b Mon Sep 17 00:00:00 2001
+From: Jason Carey <jcarey@argv.me>
+Date: Mon, 26 Jun 2017 11:09:10 -0400
+Subject: [PATCH] SERVER-29855 Pull major/minor from sys/sysmacros.h
+
+Per newer versions of glibc:
+
+----
+error: In the GNU C Library, "major" is defined
+ by <sys/sysmacros.h>. For historical compatibility, it is
+ currently defined by <sys/types.h> as well, but we plan to
+ remove this soon. To use "major", include <sys/sysmacros.h>
+ directly. If you did not intend to use a system-defined macro
+ "major", you should undefine it after including <sys/types.h>. [-Werror]
+ string path = str::stream() << "/sys/dev/block/" << major(dev) << ':' << minor(dev)
+----
+
+Including <sys/sysmacros.h> appears to be the correct solution to quiet
+the warning
+---
+ src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp b/src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp
+index 5a784b25dc7..c43e148d3f4 100644
+--- a/src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp
++++ b/src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp
+@@ -36,6 +36,10 @@
+ #include <boost/filesystem/path.hpp>
+ #include <fstream>
+
++#ifdef __linux__
++#include <sys/sysmacros.h>
++#endif
++
+ #include "mongo/db/mongod_options.h"
+ #include "mongo/db/storage/mmap_v1/data_file_sync.h"
+ #include "mongo/db/storage/mmap_v1/dur.h"
diff --git a/dev-db/mongodb/files/mongodb-3.4.7-no-boost-check.patch b/dev-db/mongodb/files/mongodb-3.4.7-no-boost-check.patch
new file mode 100644
index 000000000000..1d908e73f438
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-3.4.7-no-boost-check.patch
@@ -0,0 +1,13 @@
+diff --git a/SConstruct b/SConstruct
+index df92e41659..2c387d5a24 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -2831,8 +2831,6 @@ def doConfigure(myenv):
+ if use_system_version_of_library("boost"):
+ if not conf.CheckCXXHeader( "boost/filesystem/operations.hpp" ):
+ myenv.ConfError("can't find boost headers")
+- if not conf.CheckBoostMinVersion():
+- myenv.ConfError("system's version of boost is too old. version 1.49 or better required")
+
+ # Note that on Windows with using-system-boost builds, the following
+ # FindSysLibDep calls do nothing useful (but nothing problematic either)
diff --git a/dev-db/mongodb/files/mongodb-3.6.1-fix-scons.patch b/dev-db/mongodb/files/mongodb-3.6.1-fix-scons.patch
new file mode 100644
index 000000000000..d7bfb35b00d5
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-3.6.1-fix-scons.patch
@@ -0,0 +1,32 @@
+diff --git a/SConstruct b/SConstruct
+index fe7975b..92659a7 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -1619,7 +1619,6 @@ if env.TargetOSIs('posix'):
+ # -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used.
+ env.Append( CCFLAGS=["-fno-omit-frame-pointer",
+ "-fno-strict-aliasing",
+- "-ggdb",
+ "-pthread",
+ "-Wall",
+ "-Wsign-compare",
+@@ -1631,6 +1630,8 @@ if env.TargetOSIs('posix'):
+ env.Append( CCFLAGS=["-Werror"] )
+
+ env.Append( CXXFLAGS=["-Woverloaded-virtual"] )
++ env.Append( CXXFLAGS=os.environ['CXXFLAGS'] )
++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] )
+ if env.ToolchainIs('clang'):
+ env.Append( CXXFLAGS=['-Werror=unused-result'] )
+
+@@ -1650,8 +1651,8 @@ if env.TargetOSIs('posix'):
+
+ env.Append( LIBS=[] )
+
+- #make scons colorgcc friendly
+- for key in ('HOME', 'TERM'):
++ #make scons colorgcc, distcc, ccache friendly
++ for key in ('HOME', 'PATH', 'TERM'):
+ try:
+ env['ENV'][key] = os.environ[key]
+ except KeyError:
diff --git a/dev-db/mongodb/files/mongodb-3.6.1-no-compass.patch b/dev-db/mongodb/files/mongodb-3.6.1-no-compass.patch
new file mode 100644
index 000000000000..133c10fd258b
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-3.6.1-no-compass.patch
@@ -0,0 +1,46 @@
+diff --git a/src/mongo/SConscript b/src/mongo/SConscript
+index 9cde728..e29664e 100644
+--- a/src/mongo/SConscript
++++ b/src/mongo/SConscript
+@@ -629,33 +629,6 @@ for full_dir, archive_dir in env["ARCHIVE_ADDITION_DIR_MAP"].items():
+ for target in env["DIST_BINARIES"]:
+ installBinary(env, "db/modules/" + target)
+
+-# Set the download url to the right place
+-compass_type = 'compass-community'
+-if 'enterprise' in env['MONGO_MODULES']:
+- compass_type = 'compass'
+-
+-compass_script = "install_compass"
+-if env.TargetOSIs('windows'):
+- # On windows the .in needs to be explicitly added to the file.
+- compass_script = "Install-Compass.ps1.in"
+-
+-compass_python_interpreter = '/usr/bin/env python2'
+-if env.TargetOSIs('darwin'):
+- compass_python_interpreter = '/usr/bin/env python'
+-
+-compass_installer = env.Substfile('#/src/mongo/installer/compass/' + compass_script,
+- SUBST_DICT=[
+- ('@compass_type@', compass_type),
+- ('@python_interpreter@', compass_python_interpreter),
+- ])
+-distBinaries.append(compass_installer)
+-
+-compass_script_installer = env.Install("$INSTALL_DIR/bin", compass_installer)
+-
+-if env.TargetOSIs('posix'):
+- env.AddPostAction( compass_script_installer, 'chmod 755 $TARGET' )
+- env.AddPostAction( compass_installer, 'chmod 755 $TARGET' )
+-
+ # "dist" target is valid only when --use-new-tools is specified
+ # Attempts to build release artifacts without tools must fail
+ if has_option("use-new-tools"):
+@@ -673,7 +646,6 @@ if has_option("use-new-tools"):
+ '--transform $BUILD_DIR/mongo=$SERVER_DIST_BASENAME/bin',
+ '--transform $BUILD_DIR/mongo/stripped/src/mongo-tools=$SERVER_DIST_BASENAME/bin',
+ '--transform src/mongo-tools=$SERVER_DIST_BASENAME/bin',
+- '--transform src/mongo/installer/compass=$SERVER_DIST_BASENAME/bin',
+ '${TEMPFILE(SOURCES[1:])}'
+ ],
+ ),
diff --git a/dev-db/mongodb/files/mongodb-4.0.0-no-compass.patch b/dev-db/mongodb/files/mongodb-4.0.0-no-compass.patch
new file mode 100644
index 000000000000..35e9c172e9e7
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-4.0.0-no-compass.patch
@@ -0,0 +1,57 @@
+diff --git a/src/mongo/SConscript b/src/mongo/SConscript
+index c8f925b7..0e4f99ad 100644
+--- a/src/mongo/SConscript
++++ b/src/mongo/SConscript
+@@ -671,44 +671,6 @@ for full_dir, archive_dir in env["ARCHIVE_ADDITION_DIR_MAP"].items():
+ for target in env["DIST_BINARIES"]:
+ installBinary(env, "db/modules/" + target)
+
+-# Set the download url to the right place
+-compass_type = 'compass-community'
+-if 'enterprise' in env['MONGO_MODULES']:
+- compass_type = 'compass'
+-
+-compass_script = "install_compass"
+-if env.TargetOSIs('windows'):
+- # On windows the .in needs to be explicitly added to the file.
+- compass_script = "Install-Compass.ps1.in"
+-
+-compass_python_interpreter = '/usr/bin/env python2'
+-if env.TargetOSIs('darwin'):
+- compass_python_interpreter = '/usr/bin/env python'
+-
+-compass_installer = env.Substfile('#/src/mongo/installer/compass/' + compass_script,
+- SUBST_DICT=[
+- ('@compass_type@', compass_type),
+- ('@python_interpreter@', compass_python_interpreter),
+- ])
+-distBinaries.append(compass_installer)
+-
+-if not hygienic:
+- compass_script_installer = env.Install("$INSTALL_DIR/bin", compass_installer)
+-else:
+- compass_script_installer = env.AutoInstall(
+- 'bin',
+- source=[
+- compass_installer,
+- ],
+- INSTALL_ALIAS=[
+- 'tools',
+- ],
+- )
+-
+-if env.TargetOSIs('posix'):
+- env.AddPostAction( compass_script_installer, 'chmod 755 $TARGET' )
+- env.AddPostAction( compass_installer, 'chmod 755 $TARGET' )
+-
+ # "dist" target is valid only when --use-new-tools is specified
+ # Attempts to build release artifacts without tools must fail
+ if has_option("use-new-tools"):
+@@ -726,7 +688,6 @@ if has_option("use-new-tools"):
+ '--transform $BUILD_DIR/mongo=$SERVER_DIST_BASENAME/bin',
+ '--transform $BUILD_DIR/mongo/stripped/src/mongo-tools=$SERVER_DIST_BASENAME/bin',
+ '--transform src/mongo-tools=$SERVER_DIST_BASENAME/bin',
+- '--transform src/mongo/installer/compass=$SERVER_DIST_BASENAME/bin',
+ '${TEMPFILE(SOURCES[1:])}'
+ ],
+ ),
diff --git a/dev-db/mongodb/files/mongodb.conf-r3 b/dev-db/mongodb/files/mongodb.conf-r3
new file mode 100644
index 000000000000..83b4cc0589ad
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb.conf-r3
@@ -0,0 +1,34 @@
+# !! IMPORTANT !!
+#
+# This file uses the YAML format as described in the documentation:
+# http://docs.mongodb.org/manual/reference/configuration-options/
+
+storage:
+ dbPath: "/var/lib/mongodb"
+ #engine: wiredTiger
+
+systemLog:
+ destination: file
+ path: "/var/log/mongodb/mongodb.log"
+ quiet: true
+ logAppend: true
+
+net:
+ port: 27017
+ bindIp: 127.0.0.1
+ #ssl:
+ # mode: disabled
+
+#security:
+ #keyFile:
+ #clusterAuthMode:
+
+#replication:
+ #replSetName:
+
+# Specifies one of the MongoDB parameters described here:
+# http://docs.mongodb.org/manual/reference/parameters/
+#
+# You can specify multiple setParameter fields such as:
+# setParameter: {enableTestCommands: 1}
+#setParameter:
diff --git a/dev-db/mongodb/files/mongodb.confd-r2 b/dev-db/mongodb/files/mongodb.confd-r2
new file mode 100644
index 000000000000..dddb67e9301d
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb.confd-r2
@@ -0,0 +1,12 @@
+# !! IMPORTANT !!
+#
+# This file is ONLY used to override some of the init script configuration.
+#
+# You should NOT use this file to configure your mongodb instance,
+# see the /etc/mongodb.conf file instead.
+#
+# Available init script modifiers :
+# - config_file : the configuration file to use (default : /etc/mongodb.conf)
+# - user : the user used to run your mongodb instance (default : mongodb)
+# - group : the group used to run your mongodb instance (default : mongodb)
+# - run_dir : the run directory for your PID files (default : /run/mongodb)
diff --git a/dev-db/mongodb/files/mongodb.confd-r3 b/dev-db/mongodb/files/mongodb.confd-r3
new file mode 100644
index 000000000000..e515d1ddc730
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb.confd-r3
@@ -0,0 +1,11 @@
+# !! IMPORTANT !!
+#
+# This file is ONLY used to override some of the init script configuration.
+#
+# You should NOT use this file to configure your mongodb instance,
+# see the /etc/mongodb.conf file instead.
+#
+# Available init script modifiers :
+# - config_file : the configuration file to use (default : /etc/mongodb.conf)
+# - user : the user used to run your mongodb instance (default : mongodb)
+# - group : the group used to run your mongodb instance (default : mongodb)
diff --git a/dev-db/mongodb/files/mongodb.initd-r2 b/dev-db/mongodb/files/mongodb.initd-r2
new file mode 100644
index 000000000000..27b9f2a43872
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb.initd-r2
@@ -0,0 +1,26 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+config_file=${config_file:-/etc/${SVCNAME}.conf}
+run_dir=${run_dir:-/run/mongodb}
+
+command="/usr/bin/mongod"
+command_args="--config ${config_file}"
+command_background="true"
+pidfile=${run_dir}/${SVCNAME}.pid
+user=${user:-mongodb}
+group=${group:-mongodb}
+start_stop_daemon_args="--user ${user} --group ${group}"
+
+depend() {
+ use net
+}
+
+start_pre() {
+ checkpath -d -m 0750 -o "${user}":"${group}" "${run_dir}"
+ if [ ! -f ${config_file} ]; then
+ eerror "Missing configuration file ${config_file}"
+ return 1
+ fi
+}
diff --git a/dev-db/mongodb/files/mongodb.initd-r3 b/dev-db/mongodb/files/mongodb.initd-r3
new file mode 100644
index 000000000000..778ef7482406
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb.initd-r3
@@ -0,0 +1,18 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+: ${config_file:="/etc/${RC_SVCNAME}.conf"}
+: ${user:=mongodb}
+: ${group:=mongodb}
+
+command="/usr/bin/mongod"
+command_args="--config ${config_file}"
+command_background="true"
+pidfile="/run/${RC_SVCNAME}.pid"
+command_user="${user}:${group}"
+required_files="${config_file}"
+
+depend() {
+ use net
+}
diff --git a/dev-db/mongodb/files/mongodb.logrotate b/dev-db/mongodb/files/mongodb.logrotate
new file mode 100644
index 000000000000..f95a438b5b2c
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb.logrotate
@@ -0,0 +1,13 @@
+# Default log rotation / compression keeps 1 year of logs.
+/var/log/mongodb/*.log {
+ daily
+ rotate 365
+ dateext
+ copytruncate
+ delaycompress
+ compress
+ notifempty
+ extension gz
+ sharedscripts
+ missingok
+}
diff --git a/dev-db/mongodb/files/mongodb.service b/dev-db/mongodb/files/mongodb.service
new file mode 100644
index 000000000000..78d551183838
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=High-performance, schema-free document-oriented database
+After=network.target
+
+[Service]
+User=mongodb
+ExecStart=/usr/bin/mongod --quiet --config /etc/mongodb.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/dev-db/mongodb/files/mongos.conf-r2 b/dev-db/mongodb/files/mongos.conf-r2
new file mode 100644
index 000000000000..fc0068962cfd
--- /dev/null
+++ b/dev-db/mongodb/files/mongos.conf-r2
@@ -0,0 +1,30 @@
+# !! IMPORTANT !!
+#
+# This file uses the YAML format as described in the documentation:
+# http://docs.mongodb.org/manual/reference/configuration-options/
+
+systemLog:
+ destination: file
+ path: "/var/log/mongodb/mongos.log"
+ quiet: true
+ logAppend: true
+
+net:
+ port: 27017
+ bindIp: 127.0.0.1
+ ssl:
+ mode: disabled
+
+#security:
+ #keyFile:
+ #clusterAuthMode:
+
+#sharding:
+ #configDB:
+
+# Specifies one of the MongoDB parameters described here:
+# http://docs.mongodb.org/manual/reference/parameters/
+#
+# You can specify multiple setParameter fields such as:
+# setParameter: {enableTestCommands: 1}
+#setParameter:
diff --git a/dev-db/mongodb/files/mongos.confd-r2 b/dev-db/mongodb/files/mongos.confd-r2
new file mode 100644
index 000000000000..0dc2a189ff67
--- /dev/null
+++ b/dev-db/mongodb/files/mongos.confd-r2
@@ -0,0 +1,12 @@
+# !! IMPORTANT !!
+#
+# This file is ONLY used to override some of the init script configuration.
+#
+# You should NOT use this file to configure your mongos instance,
+# see the /etc/mongos.conf file instead.
+#
+# Available init script modifiers :
+# - config_file : the configuration file to use (default : /etc/mongos.conf)
+# - user : the user used to run your mongodb instance (default : mongodb)
+# - group : the group used to run your mongodb instance (default : mongodb)
+# - run_dir : the run directory for your PID files (default : /run/mongodb)
diff --git a/dev-db/mongodb/files/mongos.confd-r3 b/dev-db/mongodb/files/mongos.confd-r3
new file mode 100644
index 000000000000..7f297dfd3e43
--- /dev/null
+++ b/dev-db/mongodb/files/mongos.confd-r3
@@ -0,0 +1,11 @@
+# !! IMPORTANT !!
+#
+# This file is ONLY used to override some of the init script configuration.
+#
+# You should NOT use this file to configure your mongos instance,
+# see the /etc/mongos.conf file instead.
+#
+# Available init script modifiers :
+# - config_file : the configuration file to use (default : /etc/mongos.conf)
+# - user : the user used to run your mongodb instance (default : mongodb)
+# - group : the group used to run your mongodb instance (default : mongodb)
diff --git a/dev-db/mongodb/files/mongos.initd-r2 b/dev-db/mongodb/files/mongos.initd-r2
new file mode 100644
index 000000000000..2e7db669a5e0
--- /dev/null
+++ b/dev-db/mongodb/files/mongos.initd-r2
@@ -0,0 +1,26 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+config_file=${config_file:-/etc/${SVCNAME}.conf}
+run_dir=${run_dir:-/run/mongodb}
+
+command="/usr/bin/mongos"
+command_args="--config ${config_file}"
+command_background="true"
+pidfile=${run_dir}/${SVCNAME}.pid
+user=${user:-mongodb}
+group=${group:-mongodb}
+start_stop_daemon_args="--user ${user} --group ${group}"
+
+depend() {
+ use net
+}
+
+start_pre() {
+ checkpath -d -m 0750 -o "${user}":"${group}" "${run_dir}"
+ if [ ! -f ${config_file} ]; then
+ eerror "Missing configuration file ${config_file}"
+ return 1
+ fi
+}
diff --git a/dev-db/mongodb/files/mongos.initd-r3 b/dev-db/mongodb/files/mongos.initd-r3
new file mode 100644
index 000000000000..cf5844ae30a9
--- /dev/null
+++ b/dev-db/mongodb/files/mongos.initd-r3
@@ -0,0 +1,18 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+: ${config_file:="/etc/${RC_SVCNAME}.conf"}
+: ${user:=mongodb}
+: ${group:=mongodb}
+
+command="/usr/bin/mongos"
+command_args="--config ${config_file}"
+command_background="true"
+pidfile="/run/${RC_SVCNAME}.pid"
+command_user="${user}:${group}"
+required_files="${config_file}"
+
+depend() {
+ use net
+}
diff --git a/dev-db/mongodb/metadata.xml b/dev-db/mongodb/metadata.xml
new file mode 100644
index 000000000000..9a81e6986392
--- /dev/null
+++ b/dev-db/mongodb/metadata.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>julien@thebault.co</email>
+ <name>Lujeni</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>ultrabug@gentoo.org</email>
+ <name>Alexys Jacob</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription lang="en">
+ MongoDB (from "humongous") is a scalable, high-performance, open source,
+ schema-free, document-oriented database. Written in C++, MongoDB features:
+
+ MongoDB bridges the gap between key-value stores (which are fast and highly
+ scalable) and traditional RDBMS systems (which provide structured schemas
+ and powerful queries).
+ </longdescription>
+ <use>
+ <flag name="mms-agent">Install the MongoDB Monitoring Service agent</flag>
+ <flag name="tools">Install the MongoDB tools (mongoimport, mongodump...) from <pkg>app-admin/mongo-tools</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-db/mongodb/mongodb-3.0.14.ebuild b/dev-db/mongodb/mongodb-3.0.14.ebuild
new file mode 100644
index 000000000000..97c48d9a1d0b
--- /dev/null
+++ b/dev-db/mongodb/mongodb-3.0.14.ebuild
@@ -0,0 +1,174 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+SCONS_MIN_VERSION="2.3.0"
+CHECKREQS_DISK_BUILD="2400M"
+CHECKREQS_DISK_USR="512M"
+CHECKREQS_MEMORY="1024M"
+
+inherit eutils flag-o-matic multilib pax-utils scons-utils systemd toolchain-funcs user versionator check-reqs
+
+MY_P=${PN}-src-r${PV/_rc/-rc}
+
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
+HOMEPAGE="http://www.mongodb.org"
+SRC_URI="http://downloads.mongodb.org/src/${MY_P}.tar.gz"
+
+LICENSE="AGPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug kerberos libressl mms-agent ssl +tools"
+
+RDEPEND="app-arch/snappy
+ >=dev-cpp/yaml-cpp-0.5.1
+ >=dev-libs/boost-1.57[threads(+)]
+ >=dev-libs/libpcre-8.39[cxx]
+ dev-libs/snowball-stemmer
+ net-libs/libpcap
+ sys-libs/zlib
+ mms-agent? ( app-admin/mms-agent )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ >=sys-devel/gcc-4.8.2:*
+ sys-libs/ncurses
+ sys-libs/readline
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] )"
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.0.14-fix-scons.patch"
+ "${FILESDIR}/${PN}-3.0.14-fix-std-string.patch"
+ "${FILESDIR}/${PN}-3.4.6-sysmacros-include.patch"
+)
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewgroup mongodb
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb
+
+ # Maintainer notes
+ #
+ # --use-system-tcmalloc is strongly NOT recommended:
+ # https://www.mongodb.org/about/contributors/tutorial/build-mongodb-from-source/
+ #
+ # --c++11 is required by scons instead of auto detection:
+ # https://jira.mongodb.org/browse/SERVER-19661
+
+ scons_opts=(
+ --variant-dir=build --cc=$(tc-getCC) --cxx=$(tc-getCXX) --c++11
+ --disable-warnings-as-errors
+ --use-system-boost
+ --use-system-pcre
+ --use-system-snappy
+ --use-system-stemmer
+ --use-system-yaml
+ )
+
+ if use debug; then
+ scons_opts+=( --dbg=on )
+ fi
+
+ if use prefix; then
+ scons_opts+=(
+ --cpppath="${EPREFIX}/usr/include )"
+ --libpath="${EPREFIX}/usr/$(get_libdir)"
+ )
+ fi
+
+ if use kerberos; then
+ scons_opts+=( --use-sasl-client )
+ fi
+
+ if use ssl; then
+ scons_opts+=( --ssl )
+ fi
+}
+
+src_compile() {
+ # respect mongoDB upstream's basic recommendations
+ # see bug #536688 and #526114
+ if ! use debug; then
+ filter-flags '-m*'
+ filter-flags '-O?'
+ fi
+ escons "${scons_opts[@]}" core tools || die
+}
+
+src_install() {
+ escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr || die
+
+ local x
+ for x in /var/{lib,log}/${PN}; do
+ keepdir "${x}"
+ fowners mongodb:mongodb "${x}"
+ done
+
+ doman debian/mongo*.1
+ dodoc README docs/building.md
+
+ newinitd "${FILESDIR}/${PN}.initd-r2" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r2" ${PN}
+ newinitd "${FILESDIR}/${PN/db/s}.initd-r2" ${PN/db/s}
+ newconfd "${FILESDIR}/${PN/db/s}.confd-r2" ${PN/db/s}
+
+ insinto /etc
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
+ newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ # see bug #526114
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
+}
+
+pkg_preinst() {
+ # wrt bug #461466
+ if [[ "$(get_libdir)" == "lib64" ]]; then
+ rmdir "${ED}"/usr/lib/ &>/dev/null
+ fi
+}
+
+src_test() {
+ escons "${scons_opts[@]}" unittests || die
+
+ # tests fail
+ sed -i '/\/util\/options_parser\/options_parser_test/d' build/unittests.txt || die
+ sed -i '/\/mongo\/server_options_test/d' build/unittests.txt || die
+
+ local x
+ while read x; do
+ einfo "Running test $x"
+ ./$x || die
+ done < build/unittests.txt
+}
+
+pkg_postinst() {
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 3.0 ${v}; then
+ ewarn "!! IMPORTANT !!"
+ ewarn " "
+ ewarn "${PN} configuration files have changed !"
+ ewarn " "
+ ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf"
+ ewarn " http://docs.mongodb.org/manual/reference/configuration-options/"
+ ewarn " "
+ ewarn "Make sure you also follow the upgrading process :"
+ ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/"
+ ewarn " "
+ ewarn "MongoDB 3.0 introduces the WiredTiger storage engine."
+ ewarn "WiredTiger is incompatible with MMAPv1 and you need to dump/reload your data if you want to use it."
+ ewarn "Once you have your data dumped, you need to set storage.engine: wiredTiger in /etc/${PN}.conf"
+ ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/#change-storage-engine-to-wiredtiger"
+ break
+ fi
+ done
+}
diff --git a/dev-db/mongodb/mongodb-3.0.15.ebuild b/dev-db/mongodb/mongodb-3.0.15.ebuild
new file mode 100644
index 000000000000..08741ca2af67
--- /dev/null
+++ b/dev-db/mongodb/mongodb-3.0.15.ebuild
@@ -0,0 +1,174 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+SCONS_MIN_VERSION="2.3.0"
+CHECKREQS_DISK_BUILD="2400M"
+CHECKREQS_DISK_USR="512M"
+CHECKREQS_MEMORY="1024M"
+
+inherit eutils flag-o-matic multilib pax-utils scons-utils systemd toolchain-funcs user versionator check-reqs
+
+MY_P=${PN}-src-r${PV/_rc/-rc}
+
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
+HOMEPAGE="http://www.mongodb.org"
+SRC_URI="http://downloads.mongodb.org/src/${MY_P}.tar.gz"
+
+LICENSE="AGPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug kerberos libressl mms-agent ssl +tools"
+
+RDEPEND="app-arch/snappy
+ >=dev-cpp/yaml-cpp-0.5.1
+ >=dev-libs/boost-1.57[threads(+)]
+ >=dev-libs/libpcre-8.39[cxx]
+ dev-libs/snowball-stemmer
+ net-libs/libpcap
+ sys-libs/zlib
+ mms-agent? ( app-admin/mms-agent )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ >=sys-devel/gcc-4.8.2:*
+ sys-libs/ncurses
+ sys-libs/readline
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] )"
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.0.14-fix-scons.patch"
+ "${FILESDIR}/${PN}-3.0.14-fix-std-string.patch"
+ "${FILESDIR}/${PN}-3.4.6-sysmacros-include.patch"
+)
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewgroup mongodb
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb
+
+ # Maintainer notes
+ #
+ # --use-system-tcmalloc is strongly NOT recommended:
+ # https://www.mongodb.org/about/contributors/tutorial/build-mongodb-from-source/
+ #
+ # --c++11 is required by scons instead of auto detection:
+ # https://jira.mongodb.org/browse/SERVER-19661
+
+ scons_opts=(
+ --variant-dir=build --cc=$(tc-getCC) --cxx=$(tc-getCXX) --c++11
+ --disable-warnings-as-errors
+ --use-system-boost
+ --use-system-pcre
+ --use-system-snappy
+ --use-system-stemmer
+ --use-system-yaml
+ )
+
+ if use debug; then
+ scons_opts+=( --dbg=on )
+ fi
+
+ if use prefix; then
+ scons_opts+=(
+ --cpppath="${EPREFIX}/usr/include )"
+ --libpath="${EPREFIX}/usr/$(get_libdir)"
+ )
+ fi
+
+ if use kerberos; then
+ scons_opts+=( --use-sasl-client )
+ fi
+
+ if use ssl; then
+ scons_opts+=( --ssl )
+ fi
+}
+
+src_compile() {
+ # respect mongoDB upstream's basic recommendations
+ # see bug #536688 and #526114
+ if ! use debug; then
+ filter-flags '-m*'
+ filter-flags '-O?'
+ fi
+ escons "${scons_opts[@]}" core tools || die
+}
+
+src_install() {
+ escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr || die
+
+ local x
+ for x in /var/{lib,log}/${PN}; do
+ keepdir "${x}"
+ fowners mongodb:mongodb "${x}"
+ done
+
+ doman debian/mongo*.1
+ dodoc README docs/building.md
+
+ newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
+ newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
+ newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
+
+ insinto /etc
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
+ newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ # see bug #526114
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
+}
+
+pkg_preinst() {
+ # wrt bug #461466
+ if [[ "$(get_libdir)" == "lib64" ]]; then
+ rmdir "${ED}"/usr/lib/ &>/dev/null
+ fi
+}
+
+src_test() {
+ escons "${scons_opts[@]}" unittests || die
+
+ # tests fail
+ sed -i '/\/util\/options_parser\/options_parser_test/d' build/unittests.txt || die
+ sed -i '/\/mongo\/server_options_test/d' build/unittests.txt || die
+
+ local x
+ while read x; do
+ einfo "Running test $x"
+ ./$x || die
+ done < build/unittests.txt
+}
+
+pkg_postinst() {
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 3.0 ${v}; then
+ ewarn "!! IMPORTANT !!"
+ ewarn " "
+ ewarn "${PN} configuration files have changed !"
+ ewarn " "
+ ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf"
+ ewarn " http://docs.mongodb.org/manual/reference/configuration-options/"
+ ewarn " "
+ ewarn "Make sure you also follow the upgrading process :"
+ ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/"
+ ewarn " "
+ ewarn "MongoDB 3.0 introduces the WiredTiger storage engine."
+ ewarn "WiredTiger is incompatible with MMAPv1 and you need to dump/reload your data if you want to use it."
+ ewarn "Once you have your data dumped, you need to set storage.engine: wiredTiger in /etc/${PN}.conf"
+ ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/#change-storage-engine-to-wiredtiger"
+ break
+ fi
+ done
+}
diff --git a/dev-db/mongodb/mongodb-3.2.17.ebuild b/dev-db/mongodb/mongodb-3.2.17.ebuild
new file mode 100644
index 000000000000..bda8f3b4e588
--- /dev/null
+++ b/dev-db/mongodb/mongodb-3.2.17.ebuild
@@ -0,0 +1,197 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+SCONS_MIN_VERSION="2.3.0"
+CHECKREQS_DISK_BUILD="2400M"
+CHECKREQS_DISK_USR="512M"
+CHECKREQS_MEMORY="1024M"
+
+inherit eutils flag-o-matic multilib multiprocessing pax-utils python-any-r1 scons-utils systemd toolchain-funcs user versionator check-reqs
+
+MY_P=${PN}-src-r${PV/_rc/-rc}
+
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
+HOMEPAGE="http://www.mongodb.org"
+SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
+
+LICENSE="AGPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 ~x86"
+IUSE="debug kerberos libressl mms-agent ssl test +tools"
+
+RDEPEND=">=app-arch/snappy-1.1.2
+ >=dev-cpp/yaml-cpp-0.5.1
+ >=dev-libs/boost-1.57:=[threads(+)]
+ >=dev-libs/libpcre-8.39[cxx]
+ dev-libs/snowball-stemmer
+ net-libs/libpcap
+ >=sys-libs/zlib-1.2.8:=
+ mms-agent? ( app-admin/mms-agent )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ =dev-lang/python-2*
+ <dev-util/scons-3
+ >=sys-devel/gcc-4.8.2:*
+ sys-libs/ncurses
+ sys-libs/readline
+ debug? ( dev-util/valgrind )
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] )
+ test? (
+ dev-python/pymongo
+ dev-python/pyyaml
+ )"
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.2.0-fix-scons.patch"
+ "${FILESDIR}/${PN}-3.2.4-boost-1.60.patch"
+ "${FILESDIR}/${PN}-3.2.10-boost-1.62.patch"
+ "${FILESDIR}/${PN}-3.2.16-Replace-string-with-explicit-std-string.patch"
+ "${FILESDIR}/${PN}-3.4.6-sysmacros-include.patch"
+)
+
+S=${WORKDIR}/${MY_P}
+
+pkg_pretend() {
+ if [[ ${REPLACING_VERSIONS} < 3.0 ]]; then
+ ewarn "To upgrade an existing MongoDB deployment to 3.2, you must be"
+ ewarn "running a 3.0-series release. Please update to the latest 3.0"
+ ewarn "release before continuing if wish to keep your data."
+ fi
+}
+
+pkg_setup() {
+ enewgroup mongodb
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb
+
+ # Maintainer notes
+ #
+ # --use-system-tcmalloc is strongly NOT recommended:
+ # https://www.mongodb.org/about/contributors/tutorial/build-mongodb-from-source/
+
+ scons_opts=(
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+
+ --disable-warnings-as-errors
+ --use-system-boost
+ --use-system-pcre
+ --use-system-snappy
+ --use-system-stemmer
+ --use-system-yaml
+ --use-system-zlib
+ )
+
+ # wiredtiger not supported on 32bit platforms #572166
+ use x86 && scons_opts+=( --wiredtiger=off )
+
+ if use debug; then
+ scons_opts+=( --dbg=on )
+ fi
+
+ if use prefix; then
+ scons_opts+=(
+ --cpppath="${EPREFIX}/usr/include"
+ --libpath="${EPREFIX}/usr/$(get_libdir)"
+ )
+ fi
+
+ if use kerberos; then
+ scons_opts+=( --use-sasl-client )
+ fi
+
+ if use ssl; then
+ scons_opts+=( --ssl )
+ fi
+
+ python-any-r1_pkg_setup
+}
+
+src_compile() {
+ # respect mongoDB upstream's basic recommendations
+ # see bug #536688 and #526114
+ if ! use debug; then
+ filter-flags '-m*'
+ filter-flags '-O?'
+ fi
+ escons "${scons_opts[@]}" core tools
+}
+
+src_install() {
+ escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
+
+ local x
+ for x in /var/{lib,log}/${PN}; do
+ keepdir "${x}"
+ fowners mongodb:mongodb "${x}"
+ fperms 0750 "${x}"
+ done
+
+ doman debian/mongo*.1
+ dodoc README docs/building.md
+
+ newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
+ newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
+ newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
+
+ insinto /etc
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
+ newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ # see bug #526114
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
+}
+
+pkg_preinst() {
+ # wrt bug #461466
+ if [[ "$(get_libdir)" == "lib64" ]]; then
+ rmdir "${ED}"/usr/lib/ &>/dev/null
+ fi
+}
+
+# FEATURES="test -usersandbox" emerge dev-db/mongodb
+src_test() {
+ "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
+}
+
+pkg_postinst() {
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 3.0 ${v}; then
+ ewarn "!! IMPORTANT !!"
+ ewarn " "
+ ewarn "${PN} configuration files have changed !"
+ ewarn " "
+ ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf"
+ ewarn " http://docs.mongodb.org/manual/reference/configuration-options/"
+ ewarn " "
+ ewarn "Make sure you also follow the upgrading process :"
+ ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/"
+ ewarn " "
+ ewarn "MongoDB 3.0 introduces the WiredTiger storage engine."
+ ewarn "WiredTiger is incompatible with MMAPv1 and you need to dump/reload your data if you want to use it."
+ ewarn "Once you have your data dumped, you need to set storage.engine: wiredTiger in /etc/${PN}.conf"
+ ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/#change-storage-engine-to-wiredtiger"
+ break
+ fi
+ done
+
+ ewarn "Make sure to read the release notes and follow the upgrade process:"
+ ewarn " https://docs.mongodb.org/manual/release-notes/3.2/"
+ ewarn " https://docs.mongodb.org/master/release-notes/3.2-upgrade/"
+ ewarn
+ ewarn " Starting in 3.2, MongoDB uses the WiredTiger as the default storage engine."
+}
diff --git a/dev-db/mongodb/mongodb-3.4.10.ebuild b/dev-db/mongodb/mongodb-3.4.10.ebuild
new file mode 100644
index 000000000000..18ea5f820117
--- /dev/null
+++ b/dev-db/mongodb/mongodb-3.4.10.ebuild
@@ -0,0 +1,194 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+SCONS_MIN_VERSION="2.3.0"
+CHECKREQS_DISK_BUILD="2400M"
+CHECKREQS_DISK_USR="512M"
+CHECKREQS_MEMORY="1024M"
+
+inherit eutils flag-o-matic multilib multiprocessing pax-utils python-any-r1 scons-utils systemd toolchain-funcs user versionator check-reqs
+
+MY_P=${PN}-src-r${PV/_rc/-rc}
+
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
+HOMEPAGE="http://www.mongodb.org"
+SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
+
+LICENSE="AGPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64"
+IUSE="debug kerberos libressl mms-agent ssl test +tools"
+
+RDEPEND=">=app-arch/snappy-1.1.3
+ >=dev-cpp/yaml-cpp-0.5.3
+ >=dev-libs/boost-1.60:=[threads(+)]
+ >=dev-libs/libpcre-8.41[cxx]
+ dev-libs/snowball-stemmer
+ net-libs/libpcap
+ >=sys-libs/zlib-1.2.8:=
+ mms-agent? ( app-admin/mms-agent )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ =dev-lang/python-2*
+ <dev-util/scons-3
+ >=sys-devel/gcc-5.3.0:*
+ sys-libs/ncurses
+ sys-libs/readline
+ debug? ( dev-util/valgrind )
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] )
+ test? (
+ dev-python/pymongo
+ dev-python/pyyaml
+ )"
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.2.10-boost-1.62.patch"
+ "${FILESDIR}/${PN}-3.4.0-fix-scons.patch"
+ "${FILESDIR}/${PN}-3.4.6-sysmacros-include.patch"
+ "${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
+)
+
+S=${WORKDIR}/${MY_P}
+
+pkg_pretend() {
+ if [[ ${REPLACING_VERSIONS} < 3.0 ]]; then
+ ewarn "To upgrade from a version earlier than the 3.0-series, you must"
+ ewarn "successively upgrade major releases until you have upgraded"
+ ewarn "to 3.2-series. Then upgrade to 3.4 series."
+ fi
+}
+
+pkg_setup() {
+ enewgroup mongodb
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb
+
+ # Maintainer notes
+ #
+ # --use-system-tcmalloc is strongly NOT recommended:
+ # https://www.mongodb.org/about/contributors/tutorial/build-mongodb-from-source/
+
+ scons_opts=(
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+
+ --disable-warnings-as-errors
+ --use-system-boost
+ --use-system-pcre
+ --use-system-snappy
+ --use-system-stemmer
+ --use-system-yaml
+ --use-system-zlib
+ )
+
+ if use debug; then
+ scons_opts+=( --dbg=on )
+ fi
+
+ if use prefix; then
+ scons_opts+=(
+ --cpppath="${EPREFIX}/usr/include"
+ --libpath="${EPREFIX}/usr/$(get_libdir)"
+ )
+ fi
+
+ if use kerberos; then
+ scons_opts+=( --use-sasl-client )
+ fi
+
+ if use ssl; then
+ scons_opts+=( --ssl )
+ fi
+
+ python-any-r1_pkg_setup
+}
+
+src_compile() {
+ # respect mongoDB upstream's basic recommendations
+ # see bug #536688 and #526114
+ if ! use debug; then
+ filter-flags '-m*'
+ filter-flags '-O?'
+ fi
+ escons "${scons_opts[@]}" core tools
+}
+
+src_install() {
+ escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
+
+ local x
+ for x in /var/{lib,log}/${PN}; do
+ keepdir "${x}"
+ fowners mongodb:mongodb "${x}"
+ fperms 0750 "${x}"
+ done
+
+ doman debian/mongo*.1
+ dodoc README docs/building.md
+
+ newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
+ newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
+ newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
+
+ insinto /etc
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
+ newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ # see bug #526114
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
+}
+
+pkg_preinst() {
+ # wrt bug #461466
+ if [[ "$(get_libdir)" == "lib64" ]]; then
+ rmdir "${ED}"/usr/lib/ &>/dev/null
+ fi
+}
+
+# FEATURES="test -usersandbox" emerge dev-db/mongodb
+src_test() {
+ # this one test fails
+ rm jstests/core/jsHeapLimit.js || die
+
+ "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
+}
+
+pkg_postinst() {
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 3.0 ${v}; then
+ ewarn "!! IMPORTANT !!"
+ ewarn " "
+ ewarn "${PN} configuration files have changed !"
+ ewarn " "
+ ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf"
+ ewarn " http://docs.mongodb.org/manual/reference/configuration-options/"
+ ewarn " "
+ ewarn "Make sure you also follow the upgrading process :"
+ ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/"
+ ewarn " "
+ ewarn "MongoDB 3.0 introduces the WiredTiger storage engine."
+ ewarn "WiredTiger is incompatible with MMAPv1 and you need to dump/reload your data if you want to use it."
+ ewarn "Once you have your data dumped, you need to set storage.engine: wiredTiger in /etc/${PN}.conf"
+ ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/#change-storage-engine-to-wiredtiger"
+ break
+ fi
+ done
+
+ ewarn "Make sure to read the release notes and follow the upgrade process:"
+ ewarn " https://docs.mongodb.org/manual/release-notes/3.4/"
+ ewarn " https://docs.mongodb.com/manual/release-notes/3.4/#upgrade-procedures"
+}
diff --git a/dev-db/mongodb/mongodb-3.4.13.ebuild b/dev-db/mongodb/mongodb-3.4.13.ebuild
new file mode 100644
index 000000000000..3869755fe9f4
--- /dev/null
+++ b/dev-db/mongodb/mongodb-3.4.13.ebuild
@@ -0,0 +1,167 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+SCONS_MIN_VERSION="2.3.0"
+CHECKREQS_DISK_BUILD="2400M"
+CHECKREQS_DISK_USR="512M"
+CHECKREQS_MEMORY="1024M"
+
+inherit check-reqs eutils flag-o-matic multilib multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user versionator
+
+MY_P=${PN}-src-r${PV/_rc/-rc}
+
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
+HOMEPAGE="https://www.mongodb.com"
+SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
+
+LICENSE="AGPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug kerberos libressl mms-agent ssl test +tools"
+
+RDEPEND=">=app-arch/snappy-1.1.3
+ >=dev-cpp/yaml-cpp-0.5.3
+ >=dev-libs/boost-1.60:=[threads(+)]
+ >=dev-libs/libpcre-8.41[cxx]
+ dev-libs/snowball-stemmer
+ net-libs/libpcap
+ >=sys-libs/zlib-1.2.8:=
+ mms-agent? ( app-admin/mms-agent )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ <dev-util/scons-3
+ sys-libs/ncurses
+ sys-libs/readline
+ debug? ( dev-util/valgrind )
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] )
+ test? (
+ dev-python/pymongo[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ )"
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.4.0-fix-scons.patch"
+ "${FILESDIR}/${PN}-3.4.6-sysmacros-include.patch"
+ "${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
+)
+
+S=${WORKDIR}/${MY_P}
+
+pkg_pretend() {
+ if [[ -n ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.2 ]]; then
+ ewarn "To upgrade from a version earlier than the 3.2-series, you must"
+ ewarn "successively upgrade major releases until you have upgraded"
+ ewarn "to 3.2-series. Then upgrade to 3.4 series."
+ fi
+}
+
+pkg_setup() {
+ enewgroup mongodb
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb
+
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # remove bundled libs
+ rm -rv src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die
+}
+
+src_configure() {
+ # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
+ # --use-system-icu fails tests
+ # --use-system-tcmalloc is strongly NOT recommended:
+
+ scons_opts=(
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+
+ --disable-warnings-as-errors
+ --use-system-boost
+ --use-system-pcre
+ --use-system-snappy
+ --use-system-stemmer
+ --use-system-yaml
+ --use-system-zlib
+ )
+
+ use debug && scons_opts+=( --dbg=on )
+ use kerberos && scons_opts+=( --use-sasl-client )
+ use ssl && scons_opts+=( --ssl )
+
+ # respect mongoDB upstream's basic recommendations
+ # see bug #536688 and #526114
+ if ! use debug; then
+ filter-flags '-m*'
+ filter-flags '-O?'
+ fi
+
+ default
+}
+
+src_compile() {
+ escons "${scons_opts[@]}" core tools
+}
+
+# FEATURES="test -usersandbox" emerge dev-db/mongodb
+src_test() {
+ # this one test fails
+ rm jstests/core/jsHeapLimit.js || die
+
+ "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
+}
+
+src_install() {
+ escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
+
+ local x
+ for x in /var/{lib,log}/${PN}; do
+ keepdir "${x}"
+ fowners mongodb:mongodb "${x}"
+ fperms 0750 "${x}"
+ done
+
+ doman debian/mongo*.1
+ dodoc README docs/building.md
+
+ newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
+ newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
+ newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
+
+ insinto /etc
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
+ newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ # see bug #526114
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
+}
+
+pkg_preinst() {
+ # wrt bug #461466
+ if [[ "$(get_libdir)" == "lib64" ]]; then
+ rmdir "${ED}"/usr/lib/ &>/dev/null
+ fi
+}
+
+pkg_postinst() {
+ ewarn "Make sure to read the release notes and follow the upgrade process:"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/#upgrade-procedures"
+}
diff --git a/dev-db/mongodb/mongodb-3.4.14.ebuild b/dev-db/mongodb/mongodb-3.4.14.ebuild
new file mode 100644
index 000000000000..3869755fe9f4
--- /dev/null
+++ b/dev-db/mongodb/mongodb-3.4.14.ebuild
@@ -0,0 +1,167 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+SCONS_MIN_VERSION="2.3.0"
+CHECKREQS_DISK_BUILD="2400M"
+CHECKREQS_DISK_USR="512M"
+CHECKREQS_MEMORY="1024M"
+
+inherit check-reqs eutils flag-o-matic multilib multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user versionator
+
+MY_P=${PN}-src-r${PV/_rc/-rc}
+
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
+HOMEPAGE="https://www.mongodb.com"
+SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
+
+LICENSE="AGPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug kerberos libressl mms-agent ssl test +tools"
+
+RDEPEND=">=app-arch/snappy-1.1.3
+ >=dev-cpp/yaml-cpp-0.5.3
+ >=dev-libs/boost-1.60:=[threads(+)]
+ >=dev-libs/libpcre-8.41[cxx]
+ dev-libs/snowball-stemmer
+ net-libs/libpcap
+ >=sys-libs/zlib-1.2.8:=
+ mms-agent? ( app-admin/mms-agent )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ <dev-util/scons-3
+ sys-libs/ncurses
+ sys-libs/readline
+ debug? ( dev-util/valgrind )
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] )
+ test? (
+ dev-python/pymongo[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ )"
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.4.0-fix-scons.patch"
+ "${FILESDIR}/${PN}-3.4.6-sysmacros-include.patch"
+ "${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
+)
+
+S=${WORKDIR}/${MY_P}
+
+pkg_pretend() {
+ if [[ -n ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.2 ]]; then
+ ewarn "To upgrade from a version earlier than the 3.2-series, you must"
+ ewarn "successively upgrade major releases until you have upgraded"
+ ewarn "to 3.2-series. Then upgrade to 3.4 series."
+ fi
+}
+
+pkg_setup() {
+ enewgroup mongodb
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb
+
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # remove bundled libs
+ rm -rv src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die
+}
+
+src_configure() {
+ # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
+ # --use-system-icu fails tests
+ # --use-system-tcmalloc is strongly NOT recommended:
+
+ scons_opts=(
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+
+ --disable-warnings-as-errors
+ --use-system-boost
+ --use-system-pcre
+ --use-system-snappy
+ --use-system-stemmer
+ --use-system-yaml
+ --use-system-zlib
+ )
+
+ use debug && scons_opts+=( --dbg=on )
+ use kerberos && scons_opts+=( --use-sasl-client )
+ use ssl && scons_opts+=( --ssl )
+
+ # respect mongoDB upstream's basic recommendations
+ # see bug #536688 and #526114
+ if ! use debug; then
+ filter-flags '-m*'
+ filter-flags '-O?'
+ fi
+
+ default
+}
+
+src_compile() {
+ escons "${scons_opts[@]}" core tools
+}
+
+# FEATURES="test -usersandbox" emerge dev-db/mongodb
+src_test() {
+ # this one test fails
+ rm jstests/core/jsHeapLimit.js || die
+
+ "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
+}
+
+src_install() {
+ escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
+
+ local x
+ for x in /var/{lib,log}/${PN}; do
+ keepdir "${x}"
+ fowners mongodb:mongodb "${x}"
+ fperms 0750 "${x}"
+ done
+
+ doman debian/mongo*.1
+ dodoc README docs/building.md
+
+ newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
+ newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
+ newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
+
+ insinto /etc
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
+ newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ # see bug #526114
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
+}
+
+pkg_preinst() {
+ # wrt bug #461466
+ if [[ "$(get_libdir)" == "lib64" ]]; then
+ rmdir "${ED}"/usr/lib/ &>/dev/null
+ fi
+}
+
+pkg_postinst() {
+ ewarn "Make sure to read the release notes and follow the upgrade process:"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/#upgrade-procedures"
+}
diff --git a/dev-db/mongodb/mongodb-3.4.15.ebuild b/dev-db/mongodb/mongodb-3.4.15.ebuild
new file mode 100644
index 000000000000..3869755fe9f4
--- /dev/null
+++ b/dev-db/mongodb/mongodb-3.4.15.ebuild
@@ -0,0 +1,167 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+SCONS_MIN_VERSION="2.3.0"
+CHECKREQS_DISK_BUILD="2400M"
+CHECKREQS_DISK_USR="512M"
+CHECKREQS_MEMORY="1024M"
+
+inherit check-reqs eutils flag-o-matic multilib multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user versionator
+
+MY_P=${PN}-src-r${PV/_rc/-rc}
+
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
+HOMEPAGE="https://www.mongodb.com"
+SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
+
+LICENSE="AGPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug kerberos libressl mms-agent ssl test +tools"
+
+RDEPEND=">=app-arch/snappy-1.1.3
+ >=dev-cpp/yaml-cpp-0.5.3
+ >=dev-libs/boost-1.60:=[threads(+)]
+ >=dev-libs/libpcre-8.41[cxx]
+ dev-libs/snowball-stemmer
+ net-libs/libpcap
+ >=sys-libs/zlib-1.2.8:=
+ mms-agent? ( app-admin/mms-agent )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ <dev-util/scons-3
+ sys-libs/ncurses
+ sys-libs/readline
+ debug? ( dev-util/valgrind )
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] )
+ test? (
+ dev-python/pymongo[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ )"
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.4.0-fix-scons.patch"
+ "${FILESDIR}/${PN}-3.4.6-sysmacros-include.patch"
+ "${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
+)
+
+S=${WORKDIR}/${MY_P}
+
+pkg_pretend() {
+ if [[ -n ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.2 ]]; then
+ ewarn "To upgrade from a version earlier than the 3.2-series, you must"
+ ewarn "successively upgrade major releases until you have upgraded"
+ ewarn "to 3.2-series. Then upgrade to 3.4 series."
+ fi
+}
+
+pkg_setup() {
+ enewgroup mongodb
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb
+
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # remove bundled libs
+ rm -rv src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die
+}
+
+src_configure() {
+ # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
+ # --use-system-icu fails tests
+ # --use-system-tcmalloc is strongly NOT recommended:
+
+ scons_opts=(
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+
+ --disable-warnings-as-errors
+ --use-system-boost
+ --use-system-pcre
+ --use-system-snappy
+ --use-system-stemmer
+ --use-system-yaml
+ --use-system-zlib
+ )
+
+ use debug && scons_opts+=( --dbg=on )
+ use kerberos && scons_opts+=( --use-sasl-client )
+ use ssl && scons_opts+=( --ssl )
+
+ # respect mongoDB upstream's basic recommendations
+ # see bug #536688 and #526114
+ if ! use debug; then
+ filter-flags '-m*'
+ filter-flags '-O?'
+ fi
+
+ default
+}
+
+src_compile() {
+ escons "${scons_opts[@]}" core tools
+}
+
+# FEATURES="test -usersandbox" emerge dev-db/mongodb
+src_test() {
+ # this one test fails
+ rm jstests/core/jsHeapLimit.js || die
+
+ "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
+}
+
+src_install() {
+ escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
+
+ local x
+ for x in /var/{lib,log}/${PN}; do
+ keepdir "${x}"
+ fowners mongodb:mongodb "${x}"
+ fperms 0750 "${x}"
+ done
+
+ doman debian/mongo*.1
+ dodoc README docs/building.md
+
+ newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
+ newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
+ newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
+
+ insinto /etc
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
+ newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ # see bug #526114
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
+}
+
+pkg_preinst() {
+ # wrt bug #461466
+ if [[ "$(get_libdir)" == "lib64" ]]; then
+ rmdir "${ED}"/usr/lib/ &>/dev/null
+ fi
+}
+
+pkg_postinst() {
+ ewarn "Make sure to read the release notes and follow the upgrade process:"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/#upgrade-procedures"
+}
diff --git a/dev-db/mongodb/mongodb-3.6.2-r1.ebuild b/dev-db/mongodb/mongodb-3.6.2-r1.ebuild
new file mode 100644
index 000000000000..5604f58eafb7
--- /dev/null
+++ b/dev-db/mongodb/mongodb-3.6.2-r1.ebuild
@@ -0,0 +1,170 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+SCONS_MIN_VERSION="2.5.0"
+CHECKREQS_DISK_BUILD="2400M"
+CHECKREQS_DISK_USR="512M"
+CHECKREQS_MEMORY="1024M"
+
+inherit check-reqs eutils flag-o-matic multilib multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user versionator
+
+MY_P=${PN}-src-r${PV/_rc/-rc}
+
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
+HOMEPAGE="https://www.mongodb.com"
+SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
+
+LICENSE="AGPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug kerberos libressl mms-agent ssl test +tools"
+
+RDEPEND=">=app-arch/snappy-1.1.3
+ >=dev-cpp/yaml-cpp-0.5.3
+ >=dev-libs/boost-1.60:=[threads(+)]
+ >=dev-libs/libpcre-8.41[cxx]
+ dev-libs/snowball-stemmer
+ net-libs/libpcap
+ >=sys-libs/zlib-1.2.8:=
+ mms-agent? ( app-admin/mms-agent )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ dev-python/cheetah[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ virtual/python-typing[${PYTHON_USEDEP}]
+ <dev-util/scons-3
+ sys-libs/ncurses
+ sys-libs/readline
+ debug? ( dev-util/valgrind )
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] )
+ test? (
+ dev-python/pymongo[${PYTHON_USEDEP}]
+ )"
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
+ "${FILESDIR}/${PN}-3.6.1-fix-scons.patch"
+ "${FILESDIR}/${PN}-3.6.1-no-compass.patch"
+)
+
+S=${WORKDIR}/${MY_P}
+
+pkg_pretend() {
+ if [[ -n ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.4 ]]; then
+ ewarn "To upgrade from a version earlier than the 3.4-series, you must"
+ ewarn "successively upgrade major releases until you have upgraded"
+ ewarn "to 3.4-series. Then upgrade to 3.6 series."
+ elif [[ -n ${REPLACING_VERSIONS} ]]; then
+ ewarn "Be sure to set featureCompatibilityVersion to 3.4 before upgrading."
+ fi
+}
+
+pkg_setup() {
+ enewgroup mongodb
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb
+
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # remove bundled libs
+ rm -rv src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die
+
+ # remove compass
+ rm -rv src/mongo/installer/compass || die
+}
+
+src_configure() {
+ # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
+ # --use-system-icu fails tests
+ # --use-system-tcmalloc is strongly NOT recommended:
+ scons_opts=(
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+
+ --disable-warnings-as-errors
+ --use-system-boost
+ --use-system-pcre
+ --use-system-snappy
+ --use-system-stemmer
+ --use-system-yaml
+ --use-system-zlib
+ )
+
+ use debug && scons_opts+=( --dbg=on )
+ use kerberos && scons_opts+=( --use-sasl-client )
+ use ssl && scons_opts+=( --ssl )
+
+ # respect mongoDB upstream's basic recommendations
+ # see bug #536688 and #526114
+ if ! use debug; then
+ filter-flags '-m*'
+ filter-flags '-O?'
+ fi
+
+ default
+}
+
+src_compile() {
+ escons "${scons_opts[@]}" core tools
+}
+
+# FEATURES="test -usersandbox" emerge dev-db/mongodb
+src_test() {
+ "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
+}
+
+src_install() {
+ escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
+
+ local x
+ for x in /var/{lib,log}/${PN}; do
+ keepdir "${x}"
+ fowners mongodb:mongodb "${x}"
+ fperms 0750 "${x}"
+ done
+
+ doman debian/mongo*.1
+ dodoc README docs/building.md
+
+ newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
+ newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
+ newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
+
+ insinto /etc
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
+ newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ # see bug #526114
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
+}
+
+pkg_preinst() {
+ # wrt bug #461466
+ if [[ "$(get_libdir)" == "lib64" ]]; then
+ rmdir "${ED}"/usr/lib/ &>/dev/null
+ fi
+}
+
+pkg_postinst() {
+ ewarn "Make sure to read the release notes and follow the upgrade process:"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/#upgrade-procedures"
+}
diff --git a/dev-db/mongodb/mongodb-3.6.3-r1.ebuild b/dev-db/mongodb/mongodb-3.6.3-r1.ebuild
new file mode 100644
index 000000000000..5604f58eafb7
--- /dev/null
+++ b/dev-db/mongodb/mongodb-3.6.3-r1.ebuild
@@ -0,0 +1,170 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+SCONS_MIN_VERSION="2.5.0"
+CHECKREQS_DISK_BUILD="2400M"
+CHECKREQS_DISK_USR="512M"
+CHECKREQS_MEMORY="1024M"
+
+inherit check-reqs eutils flag-o-matic multilib multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user versionator
+
+MY_P=${PN}-src-r${PV/_rc/-rc}
+
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
+HOMEPAGE="https://www.mongodb.com"
+SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
+
+LICENSE="AGPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug kerberos libressl mms-agent ssl test +tools"
+
+RDEPEND=">=app-arch/snappy-1.1.3
+ >=dev-cpp/yaml-cpp-0.5.3
+ >=dev-libs/boost-1.60:=[threads(+)]
+ >=dev-libs/libpcre-8.41[cxx]
+ dev-libs/snowball-stemmer
+ net-libs/libpcap
+ >=sys-libs/zlib-1.2.8:=
+ mms-agent? ( app-admin/mms-agent )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ dev-python/cheetah[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ virtual/python-typing[${PYTHON_USEDEP}]
+ <dev-util/scons-3
+ sys-libs/ncurses
+ sys-libs/readline
+ debug? ( dev-util/valgrind )
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] )
+ test? (
+ dev-python/pymongo[${PYTHON_USEDEP}]
+ )"
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
+ "${FILESDIR}/${PN}-3.6.1-fix-scons.patch"
+ "${FILESDIR}/${PN}-3.6.1-no-compass.patch"
+)
+
+S=${WORKDIR}/${MY_P}
+
+pkg_pretend() {
+ if [[ -n ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.4 ]]; then
+ ewarn "To upgrade from a version earlier than the 3.4-series, you must"
+ ewarn "successively upgrade major releases until you have upgraded"
+ ewarn "to 3.4-series. Then upgrade to 3.6 series."
+ elif [[ -n ${REPLACING_VERSIONS} ]]; then
+ ewarn "Be sure to set featureCompatibilityVersion to 3.4 before upgrading."
+ fi
+}
+
+pkg_setup() {
+ enewgroup mongodb
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb
+
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # remove bundled libs
+ rm -rv src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die
+
+ # remove compass
+ rm -rv src/mongo/installer/compass || die
+}
+
+src_configure() {
+ # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
+ # --use-system-icu fails tests
+ # --use-system-tcmalloc is strongly NOT recommended:
+ scons_opts=(
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+
+ --disable-warnings-as-errors
+ --use-system-boost
+ --use-system-pcre
+ --use-system-snappy
+ --use-system-stemmer
+ --use-system-yaml
+ --use-system-zlib
+ )
+
+ use debug && scons_opts+=( --dbg=on )
+ use kerberos && scons_opts+=( --use-sasl-client )
+ use ssl && scons_opts+=( --ssl )
+
+ # respect mongoDB upstream's basic recommendations
+ # see bug #536688 and #526114
+ if ! use debug; then
+ filter-flags '-m*'
+ filter-flags '-O?'
+ fi
+
+ default
+}
+
+src_compile() {
+ escons "${scons_opts[@]}" core tools
+}
+
+# FEATURES="test -usersandbox" emerge dev-db/mongodb
+src_test() {
+ "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
+}
+
+src_install() {
+ escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
+
+ local x
+ for x in /var/{lib,log}/${PN}; do
+ keepdir "${x}"
+ fowners mongodb:mongodb "${x}"
+ fperms 0750 "${x}"
+ done
+
+ doman debian/mongo*.1
+ dodoc README docs/building.md
+
+ newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
+ newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
+ newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
+
+ insinto /etc
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
+ newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ # see bug #526114
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
+}
+
+pkg_preinst() {
+ # wrt bug #461466
+ if [[ "$(get_libdir)" == "lib64" ]]; then
+ rmdir "${ED}"/usr/lib/ &>/dev/null
+ fi
+}
+
+pkg_postinst() {
+ ewarn "Make sure to read the release notes and follow the upgrade process:"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/#upgrade-procedures"
+}
diff --git a/dev-db/mongodb/mongodb-3.6.4-r1.ebuild b/dev-db/mongodb/mongodb-3.6.4-r1.ebuild
new file mode 100644
index 000000000000..5604f58eafb7
--- /dev/null
+++ b/dev-db/mongodb/mongodb-3.6.4-r1.ebuild
@@ -0,0 +1,170 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+SCONS_MIN_VERSION="2.5.0"
+CHECKREQS_DISK_BUILD="2400M"
+CHECKREQS_DISK_USR="512M"
+CHECKREQS_MEMORY="1024M"
+
+inherit check-reqs eutils flag-o-matic multilib multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user versionator
+
+MY_P=${PN}-src-r${PV/_rc/-rc}
+
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
+HOMEPAGE="https://www.mongodb.com"
+SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
+
+LICENSE="AGPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug kerberos libressl mms-agent ssl test +tools"
+
+RDEPEND=">=app-arch/snappy-1.1.3
+ >=dev-cpp/yaml-cpp-0.5.3
+ >=dev-libs/boost-1.60:=[threads(+)]
+ >=dev-libs/libpcre-8.41[cxx]
+ dev-libs/snowball-stemmer
+ net-libs/libpcap
+ >=sys-libs/zlib-1.2.8:=
+ mms-agent? ( app-admin/mms-agent )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ dev-python/cheetah[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ virtual/python-typing[${PYTHON_USEDEP}]
+ <dev-util/scons-3
+ sys-libs/ncurses
+ sys-libs/readline
+ debug? ( dev-util/valgrind )
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] )
+ test? (
+ dev-python/pymongo[${PYTHON_USEDEP}]
+ )"
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
+ "${FILESDIR}/${PN}-3.6.1-fix-scons.patch"
+ "${FILESDIR}/${PN}-3.6.1-no-compass.patch"
+)
+
+S=${WORKDIR}/${MY_P}
+
+pkg_pretend() {
+ if [[ -n ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.4 ]]; then
+ ewarn "To upgrade from a version earlier than the 3.4-series, you must"
+ ewarn "successively upgrade major releases until you have upgraded"
+ ewarn "to 3.4-series. Then upgrade to 3.6 series."
+ elif [[ -n ${REPLACING_VERSIONS} ]]; then
+ ewarn "Be sure to set featureCompatibilityVersion to 3.4 before upgrading."
+ fi
+}
+
+pkg_setup() {
+ enewgroup mongodb
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb
+
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # remove bundled libs
+ rm -rv src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die
+
+ # remove compass
+ rm -rv src/mongo/installer/compass || die
+}
+
+src_configure() {
+ # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
+ # --use-system-icu fails tests
+ # --use-system-tcmalloc is strongly NOT recommended:
+ scons_opts=(
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+
+ --disable-warnings-as-errors
+ --use-system-boost
+ --use-system-pcre
+ --use-system-snappy
+ --use-system-stemmer
+ --use-system-yaml
+ --use-system-zlib
+ )
+
+ use debug && scons_opts+=( --dbg=on )
+ use kerberos && scons_opts+=( --use-sasl-client )
+ use ssl && scons_opts+=( --ssl )
+
+ # respect mongoDB upstream's basic recommendations
+ # see bug #536688 and #526114
+ if ! use debug; then
+ filter-flags '-m*'
+ filter-flags '-O?'
+ fi
+
+ default
+}
+
+src_compile() {
+ escons "${scons_opts[@]}" core tools
+}
+
+# FEATURES="test -usersandbox" emerge dev-db/mongodb
+src_test() {
+ "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
+}
+
+src_install() {
+ escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
+
+ local x
+ for x in /var/{lib,log}/${PN}; do
+ keepdir "${x}"
+ fowners mongodb:mongodb "${x}"
+ fperms 0750 "${x}"
+ done
+
+ doman debian/mongo*.1
+ dodoc README docs/building.md
+
+ newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
+ newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
+ newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
+
+ insinto /etc
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
+ newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ # see bug #526114
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
+}
+
+pkg_preinst() {
+ # wrt bug #461466
+ if [[ "$(get_libdir)" == "lib64" ]]; then
+ rmdir "${ED}"/usr/lib/ &>/dev/null
+ fi
+}
+
+pkg_postinst() {
+ ewarn "Make sure to read the release notes and follow the upgrade process:"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/#upgrade-procedures"
+}
diff --git a/dev-db/mongodb/mongodb-3.6.5-r1.ebuild b/dev-db/mongodb/mongodb-3.6.5-r1.ebuild
new file mode 100644
index 000000000000..5604f58eafb7
--- /dev/null
+++ b/dev-db/mongodb/mongodb-3.6.5-r1.ebuild
@@ -0,0 +1,170 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+SCONS_MIN_VERSION="2.5.0"
+CHECKREQS_DISK_BUILD="2400M"
+CHECKREQS_DISK_USR="512M"
+CHECKREQS_MEMORY="1024M"
+
+inherit check-reqs eutils flag-o-matic multilib multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user versionator
+
+MY_P=${PN}-src-r${PV/_rc/-rc}
+
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
+HOMEPAGE="https://www.mongodb.com"
+SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
+
+LICENSE="AGPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug kerberos libressl mms-agent ssl test +tools"
+
+RDEPEND=">=app-arch/snappy-1.1.3
+ >=dev-cpp/yaml-cpp-0.5.3
+ >=dev-libs/boost-1.60:=[threads(+)]
+ >=dev-libs/libpcre-8.41[cxx]
+ dev-libs/snowball-stemmer
+ net-libs/libpcap
+ >=sys-libs/zlib-1.2.8:=
+ mms-agent? ( app-admin/mms-agent )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ dev-python/cheetah[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ virtual/python-typing[${PYTHON_USEDEP}]
+ <dev-util/scons-3
+ sys-libs/ncurses
+ sys-libs/readline
+ debug? ( dev-util/valgrind )
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] )
+ test? (
+ dev-python/pymongo[${PYTHON_USEDEP}]
+ )"
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
+ "${FILESDIR}/${PN}-3.6.1-fix-scons.patch"
+ "${FILESDIR}/${PN}-3.6.1-no-compass.patch"
+)
+
+S=${WORKDIR}/${MY_P}
+
+pkg_pretend() {
+ if [[ -n ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.4 ]]; then
+ ewarn "To upgrade from a version earlier than the 3.4-series, you must"
+ ewarn "successively upgrade major releases until you have upgraded"
+ ewarn "to 3.4-series. Then upgrade to 3.6 series."
+ elif [[ -n ${REPLACING_VERSIONS} ]]; then
+ ewarn "Be sure to set featureCompatibilityVersion to 3.4 before upgrading."
+ fi
+}
+
+pkg_setup() {
+ enewgroup mongodb
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb
+
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # remove bundled libs
+ rm -rv src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die
+
+ # remove compass
+ rm -rv src/mongo/installer/compass || die
+}
+
+src_configure() {
+ # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
+ # --use-system-icu fails tests
+ # --use-system-tcmalloc is strongly NOT recommended:
+ scons_opts=(
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+
+ --disable-warnings-as-errors
+ --use-system-boost
+ --use-system-pcre
+ --use-system-snappy
+ --use-system-stemmer
+ --use-system-yaml
+ --use-system-zlib
+ )
+
+ use debug && scons_opts+=( --dbg=on )
+ use kerberos && scons_opts+=( --use-sasl-client )
+ use ssl && scons_opts+=( --ssl )
+
+ # respect mongoDB upstream's basic recommendations
+ # see bug #536688 and #526114
+ if ! use debug; then
+ filter-flags '-m*'
+ filter-flags '-O?'
+ fi
+
+ default
+}
+
+src_compile() {
+ escons "${scons_opts[@]}" core tools
+}
+
+# FEATURES="test -usersandbox" emerge dev-db/mongodb
+src_test() {
+ "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
+}
+
+src_install() {
+ escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
+
+ local x
+ for x in /var/{lib,log}/${PN}; do
+ keepdir "${x}"
+ fowners mongodb:mongodb "${x}"
+ fperms 0750 "${x}"
+ done
+
+ doman debian/mongo*.1
+ dodoc README docs/building.md
+
+ newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
+ newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
+ newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
+
+ insinto /etc
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
+ newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ # see bug #526114
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
+}
+
+pkg_preinst() {
+ # wrt bug #461466
+ if [[ "$(get_libdir)" == "lib64" ]]; then
+ rmdir "${ED}"/usr/lib/ &>/dev/null
+ fi
+}
+
+pkg_postinst() {
+ ewarn "Make sure to read the release notes and follow the upgrade process:"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/#upgrade-procedures"
+}
diff --git a/dev-db/mongodb/mongodb-4.0.0-r1.ebuild b/dev-db/mongodb/mongodb-4.0.0-r1.ebuild
new file mode 100644
index 000000000000..46989477c500
--- /dev/null
+++ b/dev-db/mongodb/mongodb-4.0.0-r1.ebuild
@@ -0,0 +1,170 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+SCONS_MIN_VERSION="2.5.0"
+CHECKREQS_DISK_BUILD="2400M"
+CHECKREQS_DISK_USR="512M"
+CHECKREQS_MEMORY="1024M"
+
+inherit check-reqs eutils flag-o-matic multilib multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user versionator
+
+MY_P=${PN}-src-r${PV/_rc/-rc}
+
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
+HOMEPAGE="https://www.mongodb.com"
+SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
+
+LICENSE="AGPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug kerberos libressl mms-agent ssl test +tools"
+
+RDEPEND=">=app-arch/snappy-1.1.3
+ >=dev-cpp/yaml-cpp-0.5.3
+ >=dev-libs/boost-1.60:=[threads(+)]
+ >=dev-libs/libpcre-8.41[cxx]
+ dev-libs/snowball-stemmer
+ net-libs/libpcap
+ >=sys-libs/zlib-1.2.11:=
+ mms-agent? ( app-admin/mms-agent )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ dev-python/cheetah[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ virtual/python-typing[${PYTHON_USEDEP}]
+ <dev-util/scons-3
+ sys-libs/ncurses
+ sys-libs/readline
+ debug? ( dev-util/valgrind )
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] )
+ test? (
+ dev-python/pymongo[${PYTHON_USEDEP}]
+ )"
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
+ "${FILESDIR}/${PN}-3.6.1-fix-scons.patch"
+ "${FILESDIR}/${PN}-4.0.0-no-compass.patch"
+)
+
+S=${WORKDIR}/${MY_P}
+
+pkg_pretend() {
+ if [[ -n ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.6 ]]; then
+ ewarn "To upgrade from a version earlier than the 3.6-series, you must"
+ ewarn "successively upgrade major releases until you have upgraded"
+ ewarn "to 3.6-series. Then upgrade to 4.0 series."
+ elif [[ -n ${REPLACING_VERSIONS} ]]; then
+ ewarn "Be sure to set featureCompatibilityVersion to 3.6 before upgrading."
+ fi
+}
+
+pkg_setup() {
+ enewgroup mongodb
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb
+
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # remove bundled libs
+ rm -r src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die
+
+ # remove compass
+ rm -r src/mongo/installer/compass || die
+}
+
+src_configure() {
+ # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
+ # --use-system-icu fails tests
+ # --use-system-tcmalloc is strongly NOT recommended:
+ scons_opts=(
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+
+ --disable-warnings-as-errors
+ --use-system-boost
+ --use-system-pcre
+ --use-system-snappy
+ --use-system-stemmer
+ --use-system-yaml
+ --use-system-zlib
+ )
+
+ use debug && scons_opts+=( --dbg=on )
+ use kerberos && scons_opts+=( --use-sasl-client )
+ use ssl && scons_opts+=( --ssl )
+
+ # respect mongoDB upstream's basic recommendations
+ # see bug #536688 and #526114
+ if ! use debug; then
+ filter-flags '-m*'
+ filter-flags '-O?'
+ fi
+
+ default
+}
+
+src_compile() {
+ escons "${scons_opts[@]}" core tools
+}
+
+# FEATURES="test -usersandbox" emerge dev-db/mongodb
+src_test() {
+ "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
+}
+
+src_install() {
+ escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
+
+ local x
+ for x in /var/{lib,log}/${PN}; do
+ keepdir "${x}"
+ fowners mongodb:mongodb "${x}"
+ fperms 0750 "${x}"
+ done
+
+ doman debian/mongo*.1
+ dodoc README docs/building.md
+
+ newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
+ newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
+ newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
+
+ insinto /etc
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
+ newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ # see bug #526114
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
+}
+
+pkg_preinst() {
+ # wrt bug #461466
+ if [[ "$(get_libdir)" == "lib64" ]]; then
+ rmdir "${ED}"/usr/lib/ &>/dev/null
+ fi
+}
+
+pkg_postinst() {
+ ewarn "Make sure to read the release notes and follow the upgrade process:"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/#upgrade-procedures"
+}