summaryrefslogtreecommitdiff
path: root/dev-libs/mongo-c-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-c-driver
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-libs/mongo-c-driver')
-rw-r--r--dev-libs/mongo-c-driver/Manifest18
-rw-r--r--dev-libs/mongo-c-driver/files/0.8.1-api-version.diff14
-rw-r--r--dev-libs/mongo-c-driver/metadata.xml11
-rw-r--r--dev-libs/mongo-c-driver/mongo-c-driver-0.7.1-r1.ebuild59
-rw-r--r--dev-libs/mongo-c-driver/mongo-c-driver-0.8.1-r1.ebuild53
-rw-r--r--dev-libs/mongo-c-driver/mongo-c-driver-0.98.2.ebuild66
-rw-r--r--dev-libs/mongo-c-driver/mongo-c-driver-1.1.10.ebuild70
-rw-r--r--dev-libs/mongo-c-driver/mongo-c-driver-1.1.2-r1.ebuild70
-rw-r--r--dev-libs/mongo-c-driver/mongo-c-driver-1.3.5.ebuild75
-rw-r--r--dev-libs/mongo-c-driver/mongo-c-driver-1.6.2.ebuild77
10 files changed, 513 insertions, 0 deletions
diff --git a/dev-libs/mongo-c-driver/Manifest b/dev-libs/mongo-c-driver/Manifest
new file mode 100644
index 000000000000..5627e085b590
--- /dev/null
+++ b/dev-libs/mongo-c-driver/Manifest
@@ -0,0 +1,18 @@
+AUX 0.8.1-api-version.diff 421 SHA256 aa1107858c4ed8b7b2da28216245632100e4981b0bc93b78462a1dfd3e868b92 SHA512 0ee058b1f16feef966cbddc9502507f8890d9a9ce5a6eca70bd0b831909d286caf7c09cfdded4ac97a28efda2215b11df8e9f747ace727b4b972c79841a7400e WHIRLPOOL 96ac8cbda45252688738446809516f443d9d3c690960920b83ba9d70083df0dfd430de8cf1daed7441a29d23b60ccc983b304827aa46022a24d1133f1d1e3fe2
+DIST mongo-c-driver-0.7.1.tar.gz 108537 SHA256 6670b50bb4232cc617a114d1320ea97abc55f9570b4ebf53e1e6c22671ffc328 SHA512 5c6996dc47ecbe4d77971e3aa983a877e7de736bf358c467808eceba8b1a5eea342376249cdc682a034fc7ec39290d234527cec3c3732686f184281a72aec724 WHIRLPOOL c3aadbb61bd7bd295398b4510708f95c0a05383e80baba510609870aa39f5442d4bbfb6441889f605578e07e2c97d44d2e2d75b5a2ec6950a362825c6110fbd3
+DIST mongo-c-driver-0.8.1.tar.gz 124053 SHA256 9575f05fa87fe1f7c6562b1ec9202fd4b8a98950a4d65ea44c1c62fadc2b48b0 SHA512 7b61ac4b1b154ee1f518eddb2bbc0cdafe0da8786eed4475e5703c2a735ec5a09efde59f5bfa45fb226cbce24d8c0ba0de403d8fc3e561c0e48507dfb07962b1 WHIRLPOOL 1474a7b5fced35b511cedd97f558f284d70135c591bd6d671c34519f68097a1e2e6a32a6323acfa4ea3d0146529d3be79f2f91d1187ba3d01a7da6aaacaabf2d
+DIST mongo-c-driver-0.98.2.tar.gz 5342760 SHA256 ac0edebd6ee55ac5c63047addc67d1801440586e6a9388cb3938c5bb0319afc5 SHA512 6e3abc31b1e0e02d3bb864882444a95aa01ec4a85ee77abdc52675a730790be7f1924f3c6ea36405ff0f2066e332302ca567bbfa35ba7b918bce81fb409600eb WHIRLPOOL 931a20b916778fcff0d419a73e1263b72b3293ce320254b050ed2211b56449e5e8dcd608459dcce8af98922e64a4aefc2908883f12a590d9e3e754573aed17c1
+DIST mongo-c-driver-1.1.10.tar.gz 5321144 SHA256 19c076fcca1e7b22a731f10b757a049fd94b4aee6bbd0d7b7a0bcbd454e9dee8 SHA512 10ebd1bddc0c713c0934679974fb1ed29eda1bf8e2ebbe2a1ebbcba219574092c34c4b352231ec65ffe3e350d8d701ef85debaaa9f9c10e6ab36fc3fa29f69df WHIRLPOOL ee42e78fbab15b964a04ec70c4a782bb7cd0c46275619b46d32b2c00094df90e3de4a756e6f8496fec87a596af23a403d3cf33b391309e8a044334cbaec58a06
+DIST mongo-c-driver-1.1.2.tar.gz 5443153 SHA256 ba97f4304883abf6d57ac96751260c4b413b871b0779c12e67136320bee5f118 SHA512 d420fc407f6a04c06a959b8971dc2643c987df5c3d82f2b13bfdf6a44e96bc377478c4d0e385abf67f21b56892c915c79675fe9ebf6efa9aab51fe452c5e6f95 WHIRLPOOL d72bdd7e449e8437bc9742e5f0330e6f6c47d40e3fc07a17d95a9967ecb2ae5961f5c7c155e2d8a12e733139ffbf30091dfa283f6f6a694e05c9c9fb7a03bd2b
+DIST mongo-c-driver-1.3.5.tar.gz 5860804 SHA256 374d37a6d6e49fbb2ed6cab0a305ced347651ec04d57808961d03afa8caa68df SHA512 23844ffe20580998308aa9c8409afcb87dccde874077eefc6806b705e5de5743846ba0513f3a3fe83147fc47842ab8c7438ad1de5f3f55b81586b9e19046aabf WHIRLPOOL 6583ba6e93e15ba025232bed1bb1964e85a90695d340d14c873fee26c0c9229d66eb1acfe53e718957210c2dbec67bfc06a1b7b95a9ed4dce0fe8cdad138ac6e
+DIST mongo-c-driver-1.6.2.tar.gz 6907818 SHA256 7ec27e9be4da2bf9e4b316374f8c29f816f0a0f019b984411777e9681e17f70e SHA512 b3fe08a31bc83707a4d94f8ea2742fc9b17d024d6c2f92b49cfc4fe012e58cd441c9f0fa4bae9f4205fca44b2a0d8c6d5bc32a05fc9ede9bab0011839a1394af WHIRLPOOL f973aff4c7f457d6b7d61f4e015ed2bcdc1f4668506eb267e15891144a790f6cf2f4a660bb21cc70c63cd91d388cb5b2b323476d55f05243c3d5a5f8c89df37d
+EBUILD mongo-c-driver-0.7.1-r1.ebuild 1265 SHA256 955ae5a97be5663bc268b18d52f8b5c0b378e800744fa30c06cbfb5da3805746 SHA512 eb9f7c198354e5daf80cccfc3cae0640dbeb5b748bd5e4bd9f9c94400ff56df7616c389234063c362a2dbe89d0bf8908593df06b68d4fb6bce4d350f795ccc94 WHIRLPOOL 54176ae08476c22f8eb5d325967ac5c37c178345e8d5f31f780b0ea6c1b2cbbcb596040e9f2edcc0a418cc14dd91e57c415e00e8df258279dd057692d9e82cf8
+EBUILD mongo-c-driver-0.8.1-r1.ebuild 1206 SHA256 b51f058d6d5f33a3c1ed5392951eaf626882903b7df7bd21059c7d01d013a946 SHA512 a8fad804c2fa12ee63bba7167e299db787b9293d2850b7a234d09b3ddb6890ab97987bdf475d937f23de874447b1da80dd0ebff140aeb315c13d598cdfd7a4b3 WHIRLPOOL b5a02248b0b256dd758986d79ab2bc4b30582a8c89e133f18aae13dbc5313ce14266e45ee5da086e2875ba3880497c02d466ad9c26b3e98c152843e309a480e0
+EBUILD mongo-c-driver-0.98.2.ebuild 1692 SHA256 b2a6f42b9e4e56f2cac4ce6d01ca78fac2e01bb6bf81ae63751a26e95ed95c0b SHA512 b74806852fbc46322c52966c987d882866fcf551c865eac0bba641b4ccf0f7f4a2129feb3f610e4fa57d3a0be99f50cd1e4796aafec2a1d6ed851c16125c370e WHIRLPOOL af46f26c1aa4b34165f3e0850cf785a8fcf77b8a596f752ba0119ff2e5c99aa852d81764cac9fbae5361cb5f94be826caca0568eae5bd29c256c8234e1ab58c1
+EBUILD mongo-c-driver-1.1.10.ebuild 1803 SHA256 a874e60476fe4e8698c78e5ca3031e4c1fe0ec2fe4b1725ceacbe6e4121ed605 SHA512 3f5a4deeb9115b9a31b1229cf560f62d28611281fa76e1c2d043602f49264a0b75b67540a872621a72bb20bf3aafdfdc4b528aaccaf206ad538127bb69e8587e WHIRLPOOL ddc514ad00dc9e4543e081563ad2109db0983cd98176b239c653e960a5b2c4f59d7075e665b639179a2dc6f311cfd45f25ae7958eca44a44a8f035bf27461efc
+EBUILD mongo-c-driver-1.1.2-r1.ebuild 1800 SHA256 3113ab41d22088a36f4414b90fc649c27c80f5f8ec75924b26b23ed2867e4222 SHA512 0183addeff7e2bac1add74db48b727edaf09f1b24b774bafe717c43c0e9a4a083081f12ab1d2afb743b61fd3591d6d3fa04f1b6c2be9339a2ab55a27ef4791ea WHIRLPOOL 95e0938d7db5175d4d2541b07ba2666f76666ca6be30501e52291ba68779c64fae1ee085ccc20e63a4ebfbc73d062c3add1a60c3358f113d0839055566382fc6
+EBUILD mongo-c-driver-1.3.5.ebuild 2023 SHA256 1bc0c5e4841b757ba9672173551bc67345abef4a6d256a1aafe0bbbd03f3636b SHA512 30eb5a0bdd2d92de202dc28df98b3038a8015af39d6bc8fdc7b76299efd509bc9bf0690f824d34c1d7ff4a59dabd036567d18e4846411759560a65ae027f4469 WHIRLPOOL ceaec40592afcf35d1b9c092e6945c73ff67401793cc4b39db4cafdf34988cfdeebf17f89e71464c2892c52143f41cf426410f5015b9ae9265f1ddc4ceb9ba37
+EBUILD mongo-c-driver-1.6.2.ebuild 1963 SHA256 14e67f4ef44434fdad7d8a2783ec7188371128ef55db0209c03f0110c9521e45 SHA512 776b41fa17aa7859aae0a8861647cfa4072e31c75a9189cf59da53b3798d5832b45abb60073cf37176ee05a2abc734da3c9e1f9e5fdad718002670bb99e54cfc WHIRLPOOL 7deef9dc4795425fbfa2c2617fe8bcc1c3a705c2947e393937a186a38e528dcf7d3940fc6936812d7d4cd74322f233d2b0b2bb24b107a7d4abe7e2743cd4d942
+MISC ChangeLog 3453 SHA256 2eb20e72e2456dcf55b7073f98f050f877a3809a2cf5048596f8fdfadeaf9570 SHA512 ac62fb69ef1a7cd40ae13d91627ffd7be523606aa253365b662e2a69c0eb95c84aa9933fb6ba28196820ce3c7a732fe1b5deafbf30a9c51a19ff655d80b0763e WHIRLPOOL b7c63c0622f0e900ef1faf420a5218324be530165aa6107806a44939687018505988b96d6aae5e47e4ec41c443145a05cf280408a2bb7f0342252a4360edd471
+MISC ChangeLog-2015 3455 SHA256 511fc031f7dc91ef905ce146907ebb294be856d074c7be9aab970324117abf60 SHA512 71740b4e3ef850fede09b4942fa4d63f19ecabc5464cfa2031340d94d4ff548fa74ecd6963e3878598fee438a7a55316230bee1be324a3931edd09a9c6292b87 WHIRLPOOL fbda81489dcb9d2452ebad4691287a998c62110579a83485b6fc840fe82f3e523183f5d109a5be0d8865a4939cf1ea146aa50b8b9c251368788445ad64ad9bc5
+MISC metadata.xml 334 SHA256 f37bf7cd282e13bb0e144ff6b5b3a8b3ccdbe206ba94abd9e2a53529a75c0fd8 SHA512 80ff1ae78c264618a7d5253d80ea5f4d1a15a568d5215d03dbe3062a591ec1c99d6625feff3b7baabe314bb284b5e5340c873b8846d05fd932f8cbc78df00d34 WHIRLPOOL e479dd7e9fa94feb8fcb43c9d401dc871b0383f31f935248bf580dfbc6ffdbbb069f4bc0da4011bbfdd92d33d5e952bf7996501d24876f08c236325cd92d3ae2
diff --git a/dev-libs/mongo-c-driver/files/0.8.1-api-version.diff b/dev-libs/mongo-c-driver/files/0.8.1-api-version.diff
new file mode 100644
index 000000000000..2bd52253a17b
--- /dev/null
+++ b/dev-libs/mongo-c-driver/files/0.8.1-api-version.diff
@@ -0,0 +1,14 @@
+diff -uNr mongo-c-driver-0.8.1.ORIG/src/mongo.h mongo-c-driver-0.8.1/src/mongo.h
+--- mongo-c-driver-0.8.1.ORIG/src/mongo.h 2014-03-27 17:00:42.880465606 +0000
++++ mongo-c-driver-0.8.1/src/mongo.h 2014-03-27 17:01:05.131465940 +0000
+@@ -33,8 +33,8 @@
+ #endif
+
+ #define MONGO_MAJOR 0
+-#define MONGO_MINOR 7
+-#define MONGO_PATCH 0
++#define MONGO_MINOR 8
++#define MONGO_PATCH 1
+
+ #define MONGO_OK 0
+ #define MONGO_ERROR -1
diff --git a/dev-libs/mongo-c-driver/metadata.xml b/dev-libs/mongo-c-driver/metadata.xml
new file mode 100644
index 000000000000..a833260a7b8d
--- /dev/null
+++ b/dev-libs/mongo-c-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-c-driver</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-libs/mongo-c-driver/mongo-c-driver-0.7.1-r1.ebuild b/dev-libs/mongo-c-driver/mongo-c-driver-0.7.1-r1.ebuild
new file mode 100644
index 000000000000..a9d4a7907801
--- /dev/null
+++ b/dev-libs/mongo-c-driver/mongo-c-driver-0.7.1-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit flag-o-matic multilib python-any-r1 toolchain-funcs
+
+DESCRIPTION="C Driver for MongoDB"
+HOMEPAGE="http://www.mongodb.org/ https://github.com/mongodb/mongo-c-driver"
+SRC_URI="https://github.com/mongodb/${PN}/tarball/v${PV/_/} -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 ~hppa ppc x86"
+IUSE="doc static-libs"
+
+# tests fails to build
+RESTRICT="test"
+
+RDEPEND=""
+DEPEND="${PYTHON_DEPS}
+ doc? ( $(python_gen_any_dep 'dev-python/sphinx[${PYTHON_USEDEP}]') )
+"
+
+python_check_deps() {
+ if use doc; then
+ has_version "dev-python/sphinx[${PYTHON_USEDEP}]"
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ mv *-${PN}-* "${S}"
+}
+
+src_prepare() {
+ # bug #510722
+ sed -e 's/-O3//g' \
+ -e 's/-ggdb//g' \
+ -e "s/CC:=.*/CC:=$(tc-getCC)/g" \
+ -i Makefile || die
+}
+
+src_compile() {
+ append-cflags -D_POSIX_C_SOURCE=200112L
+ emake
+ use doc && make -C docs/source/sphinx html
+}
+
+src_install() {
+ emake install \
+ INSTALL_LIBRARY_PATH="${D}/usr/$(get_libdir)" \
+ INSTALL_INCLUDE_PATH="${D}/usr/include"
+
+ use static-libs || find "${ED}" -name '*.a' -exec rm -f {} +
+
+ use doc && dohtml -r docs/source/sphinx/build/html/*
+}
diff --git a/dev-libs/mongo-c-driver/mongo-c-driver-0.8.1-r1.ebuild b/dev-libs/mongo-c-driver/mongo-c-driver-0.8.1-r1.ebuild
new file mode 100644
index 000000000000..764dce23aa5c
--- /dev/null
+++ b/dev-libs/mongo-c-driver/mongo-c-driver-0.8.1-r1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 )
+
+inherit base flag-o-matic multilib python-any-r1 toolchain-funcs
+
+DESCRIPTION="C Driver for MongoDB"
+HOMEPAGE="http://www.mongodb.org/ https://github.com/mongodb/mongo-c-driver"
+SRC_URI="https://github.com/mongodb/${PN}/tarball/v${PV/_/} -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~x86"
+IUSE="doc static-libs"
+
+# tests fails to build
+RESTRICT="test"
+
+RDEPEND=""
+DEPEND="${PYTHON_DEPS}
+ doc? ( $(python_gen_any_dep 'dev-python/sphinx[${PYTHON_USEDEP}]') )
+"
+PATCHES=( "${FILESDIR}/${PV}-api-version.diff" )
+
+python_check_deps() {
+ if use doc; then
+ has_version "dev-python/sphinx[${PYTHON_USEDEP}]"
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ mv *-${PN}-* "${S}"
+}
+
+src_compile() {
+ append-cflags -D_POSIX_C_SOURCE=200112L
+ tc-export CC
+ emake
+ use doc && make -C docs/source/sphinx html
+}
+
+src_install() {
+ emake install \
+ INSTALL_LIBRARY_PATH="${D}/usr/$(get_libdir)" \
+ INSTALL_INCLUDE_PATH="${D}/usr/include"
+
+ use static-libs || find "${ED}" -name '*.a' -exec rm -f {} +
+
+ use doc && dohtml -r docs/source/sphinx/build/html/*
+}
diff --git a/dev-libs/mongo-c-driver/mongo-c-driver-0.98.2.ebuild b/dev-libs/mongo-c-driver/mongo-c-driver-0.98.2.ebuild
new file mode 100644
index 000000000000..c8cfa98b12d5
--- /dev/null
+++ b/dev-libs/mongo-c-driver/mongo-c-driver-0.98.2.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils
+
+DESCRIPTION="A high-performance MongoDB driver for C"
+HOMEPAGE="https://github.com/mongodb/mongo-c-driver"
+SRC_URI="https://github.com/mongodb/${PN}/releases/download/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE="debug examples libressl sasl ssl static-libs test"
+
+RDEPEND=">=dev-libs/libbson-0.98.0
+ sasl? ( dev-libs/cyrus-sasl )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ test? ( dev-db/mongodb )"
+
+DOCS=( NEWS README.rst TUTORIAL.md )
+
+src_prepare() {
+ # https://github.com/mongodb/mongo-c-driver/issues/54
+ sed -i -e "s/PTHREAD_LIBS/PTHREAD_CFLAGS/g" src/Makefile.am \
+ tests/Makefile.am || die
+ eautoreconf
+}
+
+src_configure() {
+ econf --disable-hardening \
+ --disable-optimizations \
+ --disable-examples \
+ $(use_enable sasl) \
+ $(use_enable ssl) \
+ $(use_enable debug) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ doman doc/*.3
+
+ use static-libs || find "${D}" -name '*.la' -delete
+
+ if use examples; then
+ insinto /usr/share/${PF}/examples
+ doins -r examples/*.c examples/aggregation examples/bulk
+ fi
+}
+
+src_test() {
+ # Avoid allocating too much disk space by using server.smallFiles = 1
+ echo -e "storage:\n smallFiles: true" > "${T}/mongod.conf"
+ local PORT=27099
+ mongod --port ${PORT} --bind_ip 127.0.0.1 --nounixsocket --fork \
+ -f "${T}/mongod.conf" --dbpath="${T}" \
+ --logpath="${T}/mongod.log" || die
+ MONGOC_TEST_HOST="127.0.0.1:${PORT}" emake test
+ kill `cat "${T}/mongod.lock"`
+}
diff --git a/dev-libs/mongo-c-driver/mongo-c-driver-1.1.10.ebuild b/dev-libs/mongo-c-driver/mongo-c-driver-1.1.10.ebuild
new file mode 100644
index 000000000000..270c3fa25494
--- /dev/null
+++ b/dev-libs/mongo-c-driver/mongo-c-driver-1.1.10.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils
+
+DESCRIPTION="A high-performance MongoDB driver for C"
+HOMEPAGE="https://github.com/mongodb/mongo-c-driver"
+SRC_URI="https://github.com/mongodb/${PN}/releases/download/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE="debug examples libressl sasl ssl static-libs test"
+
+RDEPEND=">=dev-libs/libbson-1.1.10
+ sasl? ( dev-libs/cyrus-sasl )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ test? ( dev-db/mongodb )"
+
+DOCS=( NEWS README.rst TUTORIAL.md )
+
+src_prepare() {
+ rm -r src/libbson || die
+ sed -i -e '/SUBDIRS/s:src/libbson::g' Makefile.am || die
+
+ # https://github.com/mongodb/mongo-c-driver/issues/54
+ sed -i -e "s/PTHREAD_LIBS/PTHREAD_CFLAGS/g" src/Makefile.am \
+ tests/Makefile.am || die
+ eautoreconf
+}
+
+src_configure() {
+ econf --with-libbson=system \
+ --disable-hardening \
+ --disable-optimizations \
+ --disable-examples \
+ $(use_enable sasl) \
+ $(use_enable ssl) \
+ $(use_enable debug) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ doman doc/*.3
+
+ use static-libs || find "${D}" -name '*.la' -delete
+
+ if use examples; then
+ insinto /usr/share/${PF}/examples
+ doins -r examples/*.c examples/aggregation examples/bulk
+ fi
+}
+
+src_test() {
+ # Avoid allocating too much disk space by using server.smallFiles = 1
+ echo -e "storage:\n smallFiles: true" > "${T}/mongod.conf"
+ local PORT=27099
+ mongod --port ${PORT} --bind_ip 127.0.0.1 --nounixsocket --fork \
+ -f "${T}/mongod.conf" --dbpath="${T}" \
+ --logpath="${T}/mongod.log" || die
+ MONGOC_TEST_HOST="127.0.0.1:${PORT}" emake test
+ kill `cat "${T}/mongod.lock"`
+}
diff --git a/dev-libs/mongo-c-driver/mongo-c-driver-1.1.2-r1.ebuild b/dev-libs/mongo-c-driver/mongo-c-driver-1.1.2-r1.ebuild
new file mode 100644
index 000000000000..44af34364f24
--- /dev/null
+++ b/dev-libs/mongo-c-driver/mongo-c-driver-1.1.2-r1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils
+
+DESCRIPTION="A high-performance MongoDB driver for C"
+HOMEPAGE="https://github.com/mongodb/mongo-c-driver"
+SRC_URI="https://github.com/mongodb/${PN}/releases/download/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE="debug examples libressl sasl ssl static-libs test"
+
+RDEPEND=">=dev-libs/libbson-1.0
+ sasl? ( dev-libs/cyrus-sasl )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ test? ( dev-db/mongodb )"
+
+DOCS=( NEWS README.rst TUTORIAL.md )
+
+src_prepare() {
+ rm -r src/libbson || die
+ sed -i -e '/SUBDIRS/s:src/libbson::g' Makefile.am || die
+
+ # https://github.com/mongodb/mongo-c-driver/issues/54
+ sed -i -e "s/PTHREAD_LIBS/PTHREAD_CFLAGS/g" src/Makefile.am \
+ tests/Makefile.am || die
+ eautoreconf
+}
+
+src_configure() {
+ econf --with-libbson=system \
+ --disable-hardening \
+ --disable-optimizations \
+ --disable-examples \
+ $(use_enable sasl) \
+ $(use_enable ssl) \
+ $(use_enable debug) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ doman doc/*.3
+
+ use static-libs || find "${D}" -name '*.la' -delete
+
+ if use examples; then
+ insinto /usr/share/${PF}/examples
+ doins -r examples/*.c examples/aggregation examples/bulk
+ fi
+}
+
+src_test() {
+ # Avoid allocating too much disk space by using server.smallFiles = 1
+ echo -e "storage:\n smallFiles: true" > "${T}/mongod.conf"
+ local PORT=27099
+ mongod --port ${PORT} --bind_ip 127.0.0.1 --nounixsocket --fork \
+ -f "${T}/mongod.conf" --dbpath="${T}" \
+ --logpath="${T}/mongod.log" || die
+ MONGOC_TEST_HOST="127.0.0.1:${PORT}" emake test
+ kill `cat "${T}/mongod.lock"`
+}
diff --git a/dev-libs/mongo-c-driver/mongo-c-driver-1.3.5.ebuild b/dev-libs/mongo-c-driver/mongo-c-driver-1.3.5.ebuild
new file mode 100644
index 000000000000..4ae9ba800142
--- /dev/null
+++ b/dev-libs/mongo-c-driver/mongo-c-driver-1.3.5.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils
+
+DESCRIPTION="A high-performance MongoDB driver for C"
+HOMEPAGE="https://github.com/mongodb/mongo-c-driver"
+SRC_URI="https://github.com/mongodb/${PN}/releases/download/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE="debug examples libressl sasl ssl static-libs test"
+
+RDEPEND=">=dev-libs/libbson-1.3.5
+ sasl? ( dev-libs/cyrus-sasl )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ test? ( dev-db/mongodb )"
+
+DOCS=( NEWS README.rst )
+
+src_prepare() {
+ rm -r src/libbson || die
+ sed -i -e '/SUBDIRS/s:src/libbson::g' Makefile.am || die
+
+ # https://github.com/mongodb/mongo-c-driver/issues/54
+ sed -i -e "s/PTHREAD_LIBS/PTHREAD_CFLAGS/g" src/Makefile.am \
+ tests/Makefile.am || die
+ eautoreconf
+}
+
+src_configure() {
+ econf --with-libbson=system \
+ --disable-hardening \
+ --disable-optimizations \
+ --disable-examples \
+ --docdir="${EPREFIX}/usr/share/doc/${P}" \
+ $(use_enable sasl) \
+ $(use_enable ssl ssl openssl) \
+ $(use_enable debug) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default_src_install
+ if [[ -f "${D}usr/share/doc/${P}/COPYING" ]] ; then
+ rm "${D}usr/share/doc/${P}/COPYING" || die
+ fi
+ # Only install the mongoc man pages to avoid conflicts of common names
+ doman doc/man/mongoc_*.3
+
+ use static-libs || find "${D}" -name '*.la' -delete
+
+ if use examples; then
+ insinto /usr/share/${PF}/examples
+ doins -r examples/*.c examples/aggregation examples/bulk
+ fi
+}
+
+src_test() {
+ # Avoid allocating too much disk space by using server.smallFiles = 1
+ echo -e "storage:\n smallFiles: true" > "${T}/mongod.conf"
+ local PORT=27099
+ mongod --port ${PORT} --bind_ip 127.0.0.1 --nounixsocket --fork \
+ -f "${T}/mongod.conf" --dbpath="${T}" \
+ --logpath="${T}/mongod.log" || die
+ MONGOC_TEST_HOST="127.0.0.1:${PORT}" emake test
+ kill `cat "${T}/mongod.lock"`
+}
diff --git a/dev-libs/mongo-c-driver/mongo-c-driver-1.6.2.ebuild b/dev-libs/mongo-c-driver/mongo-c-driver-1.6.2.ebuild
new file mode 100644
index 000000000000..09d274361f4b
--- /dev/null
+++ b/dev-libs/mongo-c-driver/mongo-c-driver-1.6.2.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools
+
+DESCRIPTION="A high-performance MongoDB driver for C"
+HOMEPAGE="https://github.com/mongodb/mongo-c-driver"
+SRC_URI="https://github.com/mongodb/${PN}/releases/download/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE="debug examples libressl sasl ssl static-libs test"
+
+RDEPEND=">=dev-libs/libbson-1.6.2
+ sasl? ( dev-libs/cyrus-sasl )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ test? ( dev-db/mongodb )"
+
+DOCS=( NEWS README.rst )
+
+src_prepare() {
+ rm -r src/libbson || die
+ sed -i -e '/SUBDIRS/s:src/libbson::g' Makefile.am || die
+
+ # https://github.com/mongodb/mongo-c-driver/issues/54
+ sed -i -e "s/PTHREAD_LIBS/PTHREAD_CFLAGS/g" src/Makefile.am \
+ tests/Makefile.am || die
+ eautoreconf
+
+ default
+}
+
+src_configure() {
+ econf --with-libbson=system \
+ --disable-optimizations \
+ --disable-shm-counters \
+ --disable-examples \
+ --docdir="${EPREFIX}/usr/share/doc/${P}" \
+ $(use_enable sasl) \
+ $(use_enable ssl ssl $(usex libressl libressl openssl)) \
+ $(use_enable debug) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default_src_install
+
+ # Only install the mongoc man pages to avoid conflicts of common names
+ doman doc/man/mongoc_*.3
+
+ if ! use static-libs; then
+ find "${D}" -name '*.la' -delete || die
+ fi
+
+ if use examples; then
+ docinto examples
+ dodoc -r examples/*.c examples/aggregation examples/bulk
+ fi
+}
+
+src_test() {
+ # Avoid allocating too much disk space by using server.smallFiles = 1
+ echo -e "storage:\n smallFiles: true" > "${T}/mongod.conf" || die
+ local PORT=27099
+ mongod --port ${PORT} --bind_ip 127.0.0.1 --nounixsocket --fork \
+ -f "${T}/mongod.conf" --dbpath="${T}" \
+ --logpath="${T}/mongod.log" || die
+ MONGOC_TEST_HOST="127.0.0.1:${PORT}" emake test
+ kill $(<"${T}/mongod.lock")
+}