summaryrefslogtreecommitdiff
path: root/dev-libs/mongo-cxx-driver
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-libs/mongo-cxx-driver
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-libs/mongo-cxx-driver')
-rw-r--r--dev-libs/mongo-cxx-driver/Manifest15
-rw-r--r--dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.0.0-fix-scons.patch34
-rw-r--r--dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.1.0-fix-scons.patch54
-rw-r--r--dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.1.2-boost-ref.patch15
-rw-r--r--dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-26compat-fix-scons.patch34
-rw-r--r--dev-libs/mongo-cxx-driver/metadata.xml11
-rw-r--r--dev-libs/mongo-cxx-driver/mongo-cxx-driver-0.0.2.6.7-r1.ebuild89
-rw-r--r--dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.0.0.ebuild72
-rw-r--r--dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.0.5.ebuild72
-rw-r--r--dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.1.2-r1.ebuild71
10 files changed, 467 insertions, 0 deletions
diff --git a/dev-libs/mongo-cxx-driver/Manifest b/dev-libs/mongo-cxx-driver/Manifest
new file mode 100644
index 000000000000..ce6c8910cab1
--- /dev/null
+++ b/dev-libs/mongo-cxx-driver/Manifest
@@ -0,0 +1,15 @@
+AUX mongo-cxx-driver-1.0.0-fix-scons.patch 1345 SHA256 11c5657660ef1359339589b06401378145afb4a47de770604cc6576788ee9914 SHA512 24031ed20354c98633887b57f513b0bd891370923fd5e6b9e668610e68875afcb64c01fb4d84dd01ab1629dcbce332f60822aa0ac7a8774cd06277cf02cb95b1 WHIRLPOOL 2dcc873753a9304e68960208bd4e7f95fe91c9bd6db8cddd84f964df7087b1feaf0bb269ef9d8c6c6ecf469d738208117171ff7b8579f0f3f262efc3e726034e
+AUX mongo-cxx-driver-1.1.0-fix-scons.patch 2126 SHA256 1bfe65a40b4fd2b2be5c2ff3a94bb3f04b8de4ae5fe935256053a92790f926a0 SHA512 1a643dbfa20e1f53bd76b61487b7895daf165139d7264f3c6cee61d7bd30b8a583dee02e63f9c7295cc8a49028075c0f3066b0a57e7e1c4f2eb1a750f2249122 WHIRLPOOL 059c333c03afcee5f455553d532a09ff654343d63eb847c3d5b26da865c4985e0be8e002f3e87264e3ba3d5b4f6146409261b4d653783bc5538c47996652d54e
+AUX mongo-cxx-driver-1.1.2-boost-ref.patch 425 SHA256 79156469a86f190a7ef0dac5acf57fb9d26c1eac262a541ebe7b9d3ba24e8256 SHA512 613fb5c45c425c2ed2f907ff569741402f2ade0a11a2abb4183b5d05bc18c8b3d8143ac892d99b7561e04e0f74796f5ff7d32c385e78e08ec11415fd24ea697b WHIRLPOOL 7e49ac5dc9adc264e08a3cdee84a2750fedf7fc136ba2d2fcfade0d18f611d17b7568c3b3309f5b2633662e9be5a58f5f29391b089398255530b061e6eb6c960
+AUX mongo-cxx-driver-26compat-fix-scons.patch 1478 SHA256 9b7e8629b1d35a9089b460bf816415abc06adfcfd6ffe8f483e6be70011a229a SHA512 3ba454dc193dfe0ab1a3727521a67f46c765a5e6f0a1fc04647d9ad52905899afd4d95ade632a9339fc3a5e5cb14473a812ea4772eecf4456874a49ff25bedd7 WHIRLPOOL cd6411d64db46be4ae9f01070687152f56f063ceb7af7cb664500dd714157ec31129f5069d83ea31da6337b31ac27876828ed0272f9755c53fe7c6e8e847fe14
+DIST legacy-0.0-26compat-2.6.7.tar.gz 1512331 SHA256 a77165e7ad0c1ff8e246adc5e60b9ebb18eec7f0cc18682a33498c12d7cab0ba SHA512 edf13d5b7802c3b2e9772f08949fd0c412f2cd25ec6d05ff4e8c1f25c3e3506da6ebbd7b017ceec5478585c84e9fa44c66a5094ad3e7a7373187d3fb3c1c1222 WHIRLPOOL f64cfded6a02e241b4b59b3394bcec1cf7df4bc175aba261893d8b24106760eb3899b85b520c5f9af9d929d93ad29ed6d2ef1e11d662b7a331f143f2b88d637c
+DIST legacy-1.0.0.tar.gz 1569156 SHA256 1350dfdcdb3969e472bf83eec08378f771196c47e70b474e7349c816acb0cca4 SHA512 e161972715fe45b777ee3d9c7e788ee3a808af789e2c1248af1dde3d3f3936e29f619e039f53210cdd3fc6a6bd8a02c101facf49c61759c6f108d25c5c03b59b WHIRLPOOL 7d5c8fc6d011f219652bc6cc5a8dd59fac899a95ca3bde22fc76a2505cb7393a1762681f77cfc9295028a427e875c0155ee7046fa9d1c2e4e52d340a19e2c925
+DIST legacy-1.0.5.tar.gz 1573929 SHA256 7e83927285f294ef5b98c4bad022c3dc8e0af5628595abfb676f3d027a8bbebe SHA512 e904d73f78ffbc1ce18ffa11dd7e3dddd67c730b6e79bace0e48c0be4e8ffd7b5fe12e1373e42ad941d8fc239ef031a47d39ff04aaf3f0a5ecf88115c816bc70 WHIRLPOOL 8512c9a694288d71d0ad3383457a021a905d384c29c1cdbe426adf3aee9d59406518657d263f9b7d6dcb943ad1268dfd1ac007318139ac409254039a29d62c7c
+DIST legacy-1.1.2.tar.gz 1577527 SHA256 8c52cae798086c3e9d0e6fe488c3378601db858cc71944b6b83440d8b00298f4 SHA512 a0b21719db8205a16c574ce21565577787ea00cf2492353bcd4dd79a7ef3b7d685287be47e6eee59fad46c6fa2ac3c6a0e00c26ef88be8b17e9d93fbc763cb10 WHIRLPOOL 84563ee7eedcd89a08515e8a2284edd7822042f3dcaf24adab905533bfa65c367f071eaa5869a5308f6a1689f30aeed37796a35bf977277b247b295ebeefde8b
+EBUILD mongo-cxx-driver-0.0.2.6.7-r1.ebuild 2183 SHA256 b2376847e9465dbce99ba57b4efa8cb3a47f898e0465a0875c0bdfd773f7252b SHA512 b1dc255b60e05f8ca56bb5626c256db056751aff967e58beff6f6a8a250fc0b49e2cb6162101161971febdcbb9128cb37a073762df720ae8c1a57d67cf39a9d3 WHIRLPOOL 7cdd726b416aa3ec02a1ade0d2f20a55d4ffa7468e404665ad2930ff8effd4d13c29287b7927af2670579a4f390e3a89e83c7cb41f29591fcf00b79a546b3623
+EBUILD mongo-cxx-driver-1.0.0.ebuild 1585 SHA256 c705afe174dfed0c6344c9a8126e11295e7e26af09ccd3a99ac571b6d52c6444 SHA512 133ab4ce256dbff77333432b4e2c71227a4bda772367629e5bb847393d564e4795ee8bc491181029fb8fa714081a1cdf55c9ad410a88f9c302bd73fa33a42e2c WHIRLPOOL 4abef4c517a10260d0a6745348dce4825a533c72be87c2458fadc58c74cec46243da15284c7d08b8f8a6d3816a0f7260017b027fd86c0bcbc3cefd104524fdad
+EBUILD mongo-cxx-driver-1.0.5.ebuild 1585 SHA256 c705afe174dfed0c6344c9a8126e11295e7e26af09ccd3a99ac571b6d52c6444 SHA512 133ab4ce256dbff77333432b4e2c71227a4bda772367629e5bb847393d564e4795ee8bc491181029fb8fa714081a1cdf55c9ad410a88f9c302bd73fa33a42e2c WHIRLPOOL 4abef4c517a10260d0a6745348dce4825a533c72be87c2458fadc58c74cec46243da15284c7d08b8f8a6d3816a0f7260017b027fd86c0bcbc3cefd104524fdad
+EBUILD mongo-cxx-driver-1.1.2-r1.ebuild 1510 SHA256 1c832820c1bb0551108341165f94523ae7ed100e5ea1dc1eda27e5a225adf3b0 SHA512 1d336516d494e5699ad67bd2765655e9717a240f0d09ddaa33545a480dd2de59ff22e0b92c404e0abce353b307609fe6a91d3a6a414d03976beb968d97b43448 WHIRLPOOL d65fcf4e66f6a0be5fe3eeafe1085359ab87416d1400c49cc4c63d4b5c56218ea2c9e0c7f0c09750904820cee5d0f942dede111e27e7557b39a504d8024abe25
+MISC ChangeLog 3703 SHA256 77a67ec711797670e1a1e9b3e18786bff5b707a50dddca3b3ad6d3a507bed34e SHA512 1763ccc51b8f2ebb40aba3bd3f5de97d0063843d864dc8cb616b5fc891db3463bb92c1d0764c200ef94e3c452acebcc18d2c029486ede9ab743af81d2f203701 WHIRLPOOL f36943e30b9f64de00b52f2ce10a6c07de8a60d59d11b10a11f35ead2285676006cea3bb92f035f6212bfe40e3e47fd90935e553654d774c4374ab4d0542306f
+MISC ChangeLog-2015 1345 SHA256 c2fdd3df95dff7bbafed8bb11e222be335043a37260936d0b5668529eecaf1c4 SHA512 1df3e604471cc8297a86dbb4d4ff347bc10ab5269cdbdee0b5ad73ca2fa13cb98e828cacd685b89dd1fff94d053ccba53f392959c46a4cb9b1a97458eb8c4d6f WHIRLPOOL 2c74cc73c6181eaae652de0fd7fc37215f833ab393ee80da161cc14e364905c7f95658ec9dbceda4e1a89e7f3e21f40444f47c3883f92dab0f5770c25034e677
+MISC metadata.xml 336 SHA256 5487b02cc39033cabcea5d9415690b75f71cd276b9cfadd750e7b22d2b0f70fd SHA512 b75e79f4e7e6ae6e596797bed26600142d8ec89bf15a5d71183d09835c3cdb5bcc4cdd625048fe5ba0e3ab04b8c36ae3cb30da97c185f1ee420040103c69ccf0 WHIRLPOOL 3156953b3e436a42d36bfd74d29198dc646385e7080d84ffabc4188d9345711803cd83b06a00aed99a09bc003174af3f24ad2c22891a97d450e9898599c2113a
diff --git a/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.0.0-fix-scons.patch b/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.0.0-fix-scons.patch
new file mode 100644
index 000000000000..319773c7d571
--- /dev/null
+++ b/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.0.0-fix-scons.patch
@@ -0,0 +1,34 @@
+--- a/SConstruct 2015-03-17 10:19:58.766530807 +0100
++++ b/SConstruct 2015-03-17 10:27:58.400062874 +0100
+@@ -853,7 +853,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",
+- "-ggdb",
+ "-pthread",
+ "-Wall",
+ "-Wsign-compare",
+@@ -861,13 +860,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"] )
++ 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.
+@@ -933,7 +932,6 @@
+ except OSError:
+ pass
+
+-env.Prepend(CPPPATH=['$VARIANT_DIR/third_party/gtest-1.7.0/include'])
+
+ boostSuffixList = ["-mt", ""]
+ if get_option("boost-lib-search-suffixes") is not None:
diff --git a/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.1.0-fix-scons.patch b/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.1.0-fix-scons.patch
new file mode 100644
index 000000000000..2a8ce309b66c
--- /dev/null
+++ b/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.1.0-fix-scons.patch
@@ -0,0 +1,54 @@
+--- a/SConstruct
++++ b/SConstruct
+@@ -865,7 +865,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",
+- "-ggdb",
+ "-pthread",
+ "-Wall",
+ "-Wsign-compare",
+@@ -873,13 +872,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"] )
++ 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.
+@@ -905,11 +904,6 @@
+ env.Append( CXXFLAGS=" -fprofile-arcs -ftest-coverage " )
+ env.Append( LINKFLAGS=" -fprofile-arcs -ftest-coverage " )
+
+- if optBuild:
+- env.Append( CCFLAGS=["-O3"] )
+- else:
+- env.Append( CCFLAGS=["-O0"] )
+-
+ if debugBuild:
+ if not optBuild:
+ env.Append( CCFLAGS=["-fstack-protector"] )
+@@ -932,7 +926,6 @@
+ except OSError:
+ pass
+
+-env.Prepend(CPPPATH=['$VARIANT_DIR/third_party/gtest-1.7.0/include'])
+
+ boostSuffixList = ["-mt", ""]
+ if get_option("boost-lib-search-suffixes") is not None:
+@@ -1143,6 +1136,7 @@
+ # Clang likes to warn about unused functions, which seems a tad aggressive and breaks
+ # -Werror, which we want to be able to use.
+ AddToCCFLAGSIfSupported(myenv, '-Wno-unused-function')
++ AddToCCFLAGSIfSupported(myenv, '-Wno-unused-variable')
+
+ # TODO: Note that the following two flags are added to CCFLAGS even though they are
+ # really C++ specific. We need to do this because SCons passes CXXFLAGS *before*
diff --git a/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.1.2-boost-ref.patch b/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.1.2-boost-ref.patch
new file mode 100644
index 000000000000..9997dd57a2c1
--- /dev/null
+++ b/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.1.2-boost-ref.patch
@@ -0,0 +1,15 @@
+Fix missing implicit include.
+Patch by Jan-Matthias Braun
+See also: https://bugs.gentoo.org/show_bug.cgi?id=598340
+
+--- a/src/mongo/client/examples/connect.cpp
++++ b/src/mongo/client/examples/connect.cpp
+@@ -29,6 +29,8 @@
+ #include "mongo/client/dbclient.h"
+ #include "mongo/stdx/functional.h"
+
++#include <boost/core/ref.hpp>
++
+ namespace {
+
+ class OstreamAppender : public mongo::logger::MessageLogDomain::EventAppender {
diff --git a/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-26compat-fix-scons.patch b/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-26compat-fix-scons.patch
new file mode 100644
index 000000000000..be5408511bda
--- /dev/null
+++ b/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-26compat-fix-scons.patch
@@ -0,0 +1,34 @@
+--- a/SConstruct 2015-03-23 10:36:42.328921927 +0100
++++ b/SConstruct 2015-03-23 10:37:37.599310414 +0100
+@@ -828,7 +828,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",
+@@ -836,13 +835,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.
+@@ -938,7 +937,6 @@
+ if not use_system_version_of_library("snappy"):
+ env.Prepend(CPPPATH=['$BUILD_DIR/third_party/snappy'])
+
+-env.Prepend(CPPPATH=['$BUILD_DIR/third_party/gtest-1.7.0/include'])
+
+ env.Append( CPPPATH=['$EXTRACPPPATH'],
+ LIBPATH=['$EXTRALIBPATH'] )
diff --git a/dev-libs/mongo-cxx-driver/metadata.xml b/dev-libs/mongo-cxx-driver/metadata.xml
new file mode 100644
index 000000000000..e27bea24f74d
--- /dev/null
+++ b/dev-libs/mongo-cxx-driver/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>ultrabug@gentoo.org</email>
+ <name>Alexys Jacob</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">mongodb/mongo-cxx-driver</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-libs/mongo-cxx-driver/mongo-cxx-driver-0.0.2.6.7-r1.ebuild b/dev-libs/mongo-cxx-driver/mongo-cxx-driver-0.0.2.6.7-r1.ebuild
new file mode 100644
index 000000000000..b30484198d61
--- /dev/null
+++ b/dev-libs/mongo-cxx-driver/mongo-cxx-driver-0.0.2.6.7-r1.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+SCONS_MIN_VERSION="2.3.0"
+
+inherit eutils flag-o-matic multilib scons-utils versionator
+
+MY_PV=$(get_version_component_range 3-5)
+MY_P=legacy-0.0-26compat-${MY_PV}
+
+DESCRIPTION="C++ Driver for MongoDB"
+HOMEPAGE="https://github.com/mongodb/mongo-cxx-driver"
+SRC_URI="https://github.com/mongodb/${PN}/archive/${MY_P}.tar.gz"
+
+LICENSE="AGPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="kerberos libressl ssl static-libs"
+
+RDEPEND="
+ app-arch/snappy
+ >=dev-cpp/yaml-cpp-0.5.1
+ >=dev-libs/boost-1.50[threads(+)]
+ >=dev-libs/libpcre-8.30[cxx]
+ dev-util/google-perftools[-minimal]
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] )"
+
+S=${WORKDIR}/${PN}-${MY_P}
+
+pkg_setup() {
+ scons_opts="--variant-dir=build --cc=$(tc-getCC) --cxx=$(tc-getCXX)"
+ scons_opts+=" --disable-warnings-as-errors --sharedclient"
+ scons_opts+=" --use-system-boost"
+ scons_opts+=" --use-system-pcre"
+ scons_opts+=" --use-system-snappy"
+ scons_opts+=" --use-system-yaml"
+
+ if use prefix; then
+ scons_opts+=" --cpppath=${EPREFIX}/usr/include"
+ scons_opts+=" --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_prepare() {
+ epatch "${FILESDIR}/${PN}-26compat-fix-scons.patch"
+
+ # stemmer/pcap are not used, strip them wrt #518104
+ sed -e '/stemmer/d' -e '/pcap/d' -i SConstruct || die
+
+ # fix yaml-cpp detection
+ sed -i -e "s/\[\"yaml\"\]/\[\"yaml-cpp\"\]/" SConstruct || die
+
+ # bug #462606
+ sed -i -e "s@\$INSTALL_DIR/lib@\$INSTALL_DIR/$(get_libdir)@g" src/SConscript.client || die
+}
+
+src_compile() {
+ escons ${scons_opts} mongoclient
+}
+
+src_install() {
+ escons ${scons_opts} --full --nostrip install-mongoclient --prefix="${ED}"/usr
+
+ use static-libs || find "${ED}"/usr/ -type f -name "*.a" -delete
+
+ dodoc README.md CONTRIBUTING.md
+}
+
+pkg_preinst() {
+ if [[ "$(get_libdir)" == "lib64" ]]; then
+ rmdir "${ED}"/usr/lib64/ &>/dev/null
+ else
+ rmdir "${ED}"/usr/lib/ &>/dev/null
+ fi
+}
diff --git a/dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.0.0.ebuild b/dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.0.0.ebuild
new file mode 100644
index 000000000000..a32629c15ff1
--- /dev/null
+++ b/dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.0.0.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+SCONS_MIN_VERSION="2.3.0"
+
+inherit eutils flag-o-matic multilib scons-utils
+
+DESCRIPTION="C++ Driver for MongoDB"
+HOMEPAGE="https://github.com/mongodb/mongo-cxx-driver"
+SRC_URI="https://github.com/mongodb/${PN}/archive/legacy-${PV}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug libressl sasl ssl static-libs"
+
+RDEPEND="!dev-db/tokumx
+ >=dev-libs/boost-1.50[threads(+)]
+ sasl? ( dev-libs/cyrus-sasl )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}"
+
+# Maintainer notes
+# TODO: enable test in IUSE with
+# test? ( >=dev-cpp/gtest-1.7.0 dev-db/mongodb )
+
+DOCS=( README.md )
+
+S="${WORKDIR}/${PN}-legacy-${PV}"
+
+pkg_setup() {
+ scons_opts="--variant-dir=build --cc=$(tc-getCC) --cxx=$(tc-getCXX)"
+ scons_opts+=" --disable-warnings-as-errors --sharedclient"
+
+ if use debug; then
+ scons_opts+=" --dbg=on"
+ fi
+
+ if use prefix; then
+ scons_opts+=" --cpppath=${EPREFIX}/usr/include"
+ scons_opts+=" --libpath=${EPREFIX}/usr/$(get_libdir)"
+ fi
+
+ if use sasl; then
+ scons_opts+=" --use-sasl-client"
+ fi
+
+ if use ssl; then
+ scons_opts+=" --ssl"
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-1.0.0-fix-scons.patch"
+
+ # respect mongoDB upstream's basic recommendations
+ # see bug #536688 and #526114
+ if ! use debug; then
+ filter-flags '-m*'
+ filter-flags '-O?'
+ fi
+}
+
+src_install() {
+ escons ${scons_opts} install --prefix="${ED}"/usr
+
+ use static-libs || find "${D}" -name '*.a' -delete
+}
diff --git a/dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.0.5.ebuild b/dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.0.5.ebuild
new file mode 100644
index 000000000000..a32629c15ff1
--- /dev/null
+++ b/dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.0.5.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+SCONS_MIN_VERSION="2.3.0"
+
+inherit eutils flag-o-matic multilib scons-utils
+
+DESCRIPTION="C++ Driver for MongoDB"
+HOMEPAGE="https://github.com/mongodb/mongo-cxx-driver"
+SRC_URI="https://github.com/mongodb/${PN}/archive/legacy-${PV}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug libressl sasl ssl static-libs"
+
+RDEPEND="!dev-db/tokumx
+ >=dev-libs/boost-1.50[threads(+)]
+ sasl? ( dev-libs/cyrus-sasl )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}"
+
+# Maintainer notes
+# TODO: enable test in IUSE with
+# test? ( >=dev-cpp/gtest-1.7.0 dev-db/mongodb )
+
+DOCS=( README.md )
+
+S="${WORKDIR}/${PN}-legacy-${PV}"
+
+pkg_setup() {
+ scons_opts="--variant-dir=build --cc=$(tc-getCC) --cxx=$(tc-getCXX)"
+ scons_opts+=" --disable-warnings-as-errors --sharedclient"
+
+ if use debug; then
+ scons_opts+=" --dbg=on"
+ fi
+
+ if use prefix; then
+ scons_opts+=" --cpppath=${EPREFIX}/usr/include"
+ scons_opts+=" --libpath=${EPREFIX}/usr/$(get_libdir)"
+ fi
+
+ if use sasl; then
+ scons_opts+=" --use-sasl-client"
+ fi
+
+ if use ssl; then
+ scons_opts+=" --ssl"
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-1.0.0-fix-scons.patch"
+
+ # respect mongoDB upstream's basic recommendations
+ # see bug #536688 and #526114
+ if ! use debug; then
+ filter-flags '-m*'
+ filter-flags '-O?'
+ fi
+}
+
+src_install() {
+ escons ${scons_opts} install --prefix="${ED}"/usr
+
+ use static-libs || find "${D}" -name '*.a' -delete
+}
diff --git a/dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.1.2-r1.ebuild b/dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.1.2-r1.ebuild
new file mode 100644
index 000000000000..4b2e018de535
--- /dev/null
+++ b/dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.1.2-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+SCONS_MIN_VERSION=2.3.0
+
+inherit scons-utils toolchain-funcs
+
+DESCRIPTION="C++ Driver for MongoDB"
+HOMEPAGE="https://github.com/mongodb/mongo-cxx-driver"
+SRC_URI="https://github.com/mongodb/${PN}/archive/legacy-${PV}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug libressl sasl ssl static-libs"
+
+RDEPEND="
+ !dev-db/tokumx
+ dev-libs/boost:=[threads(+)]
+ sasl? ( dev-libs/cyrus-sasl )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}"
+
+# Maintainer notes
+# TODO: enable test in IUSE with
+# test? ( >=dev-cpp/gtest-1.7.0 dev-db/mongodb )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.1.0-fix-scons.patch
+ "${FILESDIR}"/${PN}-1.1.2-boost-ref.patch
+)
+
+S="${WORKDIR}/${PN}-legacy-${PV}"
+
+src_configure() {
+ scons_opts=(
+ --cc=$(tc-getCC)
+ --cxx=$(tc-getCXX)
+ --cpppath="${EPREFIX}"/usr/include
+ --libpath="${EPREFIX}"/usr/$(get_libdir)
+ --variant-dir=build
+ --disable-warnings-as-errors
+ --sharedclient
+ )
+
+ use debug && scons_opts+=( --dbg=on )
+ use sasl && scons_opts+=( --use-sasl-client )
+ use ssl && scons_opts+=( --ssl )
+}
+
+src_compile() {
+ escons "${scons_opts[@]}"
+}
+
+src_install() {
+ escons "${scons_opts[@]}" install --prefix="${ED%/}"/usr
+
+ # fix multilib-strict QA failures
+ mv "${ED%/}"/usr/{lib,$(get_libdir)} || die
+
+ einstalldocs
+
+ if ! use static-libs; then
+ find "${D}" -name '*.a' -delete || die
+ fi
+}