summaryrefslogtreecommitdiff
path: root/dev-libs/mongo-c-driver
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-libs/mongo-c-driver
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-libs/mongo-c-driver')
-rw-r--r--dev-libs/mongo-c-driver/Manifest23
-rw-r--r--dev-libs/mongo-c-driver/files/0.8.1-api-version.diff14
-rw-r--r--dev-libs/mongo-c-driver/files/mongo-c-driver-1.10.3-enable-tests.patch25
-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.10.3.ebuild86
-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
-rw-r--r--dev-libs/mongo-c-driver/mongo-c-driver-1.8.2.ebuild84
-rw-r--r--dev-libs/mongo-c-driver/mongo-c-driver-1.9.3.ebuild84
14 files changed, 797 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..b04977db4012
--- /dev/null
+++ b/dev-libs/mongo-c-driver/Manifest
@@ -0,0 +1,23 @@
+AUX 0.8.1-api-version.diff 421 BLAKE2B 77cd7452029021c098f3d9a40a94e0af63a30c986148101f9b86d0dc416873f6081d8530001e9c478cf3c1b6d933fefee227987b9ac7e2305c82c16903259a24 SHA512 0ee058b1f16feef966cbddc9502507f8890d9a9ce5a6eca70bd0b831909d286caf7c09cfdded4ac97a28efda2215b11df8e9f747ace727b4b972c79841a7400e
+AUX mongo-c-driver-1.10.3-enable-tests.patch 866 BLAKE2B b4abf32f0915f28185b8e036ed5083a37795cb84980dee755649ca63322f29469d1be614c1d2d97455ca37639c25956cdba08efa320db213561cddd337b1bc31 SHA512 23e41702d7e1d64c3baab4045f87945c36f028f9802701c37316bbddba667c2e1c038c1234b3374c66b252e9b2ff068f3dfd513a397ee56d170397cc268277c2
+DIST mongo-c-driver-0.7.1.tar.gz 108537 BLAKE2B 29d7f6680d700d15d02b3d5deefbdc27b4e0841a2ac30205ed148216d15e95fe487f4cea4decacdf573a4ce78248cfd12cba72b9dbf90065e127fa7fb56cad27 SHA512 5c6996dc47ecbe4d77971e3aa983a877e7de736bf358c467808eceba8b1a5eea342376249cdc682a034fc7ec39290d234527cec3c3732686f184281a72aec724
+DIST mongo-c-driver-0.8.1.tar.gz 124053 BLAKE2B 1c6b0d3998c6497c39fc2f6597021e84571c717e5d6f288d79d3862e7f15f131604648595ca0e12200352a7fbf40652803afd0f60a80eac657b9853a1de51173 SHA512 7b61ac4b1b154ee1f518eddb2bbc0cdafe0da8786eed4475e5703c2a735ec5a09efde59f5bfa45fb226cbce24d8c0ba0de403d8fc3e561c0e48507dfb07962b1
+DIST mongo-c-driver-0.98.2.tar.gz 5342760 BLAKE2B 399fb03464234c87dcb66647c5383c505e654238e72e86794fdbc56716590ea6637aa7bfb0d25c0fb6aae8fce6055741753ac33125cb1b475c7bfe1e198a0a1e SHA512 6e3abc31b1e0e02d3bb864882444a95aa01ec4a85ee77abdc52675a730790be7f1924f3c6ea36405ff0f2066e332302ca567bbfa35ba7b918bce81fb409600eb
+DIST mongo-c-driver-1.1.10.tar.gz 5321144 BLAKE2B d63ba4b1a256b8b29654398a53d9ca46d49faad0e0327db0d51cfc4e2a1771568341ff4e7ba6ff2ff31fb11ad8a14c452e52cabdd83da7eb1c1ceb8af7bef7d2 SHA512 10ebd1bddc0c713c0934679974fb1ed29eda1bf8e2ebbe2a1ebbcba219574092c34c4b352231ec65ffe3e350d8d701ef85debaaa9f9c10e6ab36fc3fa29f69df
+DIST mongo-c-driver-1.1.2.tar.gz 5443153 BLAKE2B f8004486baf6d2d3086e458bdb4bc8060462fd52ba700cbf05fdb9827adcbd087b61d7e0e00169cf635c8021983dc851b7f34c3e08d66efc65483fce98a85f74 SHA512 d420fc407f6a04c06a959b8971dc2643c987df5c3d82f2b13bfdf6a44e96bc377478c4d0e385abf67f21b56892c915c79675fe9ebf6efa9aab51fe452c5e6f95
+DIST mongo-c-driver-1.10.3.tar.gz 5616159 BLAKE2B 368e273aedc21ec79b804625276a49f7b670f027b410595b1e6455228dc776f0ed629d6ee599d16b9d0db08ec08a8e4dac2bdf06fa931ef1578849bf86d85726 SHA512 47af1baad1ad74bbbdf2fd22a437034d317a2f3ec02fee485e983ae6829b3f01af2649a09577f08144a88385fa940dfa211ea02bfa3c0e25b59dbe2090269603
+DIST mongo-c-driver-1.3.5.tar.gz 5860804 BLAKE2B a55de56d285638f21caff06446e3c0c19a5b8722a2ed69fdf046c35973c9bedcc1686065e4355db28afc83c1415872eee2972a6fb3f21647d2cafce12706adc0 SHA512 23844ffe20580998308aa9c8409afcb87dccde874077eefc6806b705e5de5743846ba0513f3a3fe83147fc47842ab8c7438ad1de5f3f55b81586b9e19046aabf
+DIST mongo-c-driver-1.6.2.tar.gz 6907818 BLAKE2B 7922a50ba58d92d2954eb5c2ccb02fd3b70861bd26516fd12fe6bdf79a926799fbc3a367e1c24a57932870726aa5abc1d264215ea964a56bc318ab0f413afc60 SHA512 b3fe08a31bc83707a4d94f8ea2742fc9b17d024d6c2f92b49cfc4fe012e58cd441c9f0fa4bae9f4205fca44b2a0d8c6d5bc32a05fc9ede9bab0011839a1394af
+DIST mongo-c-driver-1.8.2.tar.gz 7308675 BLAKE2B ca82c2824486cee78b164d1fdfcf1de062804f0f8637a36ec197efe434ae23a387ec0e6b2e4aa3e9c8bb2434a3cef48fecd17fc4b159a92ad86b8b940b17598a SHA512 af23601ba33694d80acdb890c1b85a354fda966491c4bbfb341a884bcd6314886e405efa3a09e47398adf8dbfdeb1b05ae8b022a72f04a66265bfaeddb661f76
+DIST mongo-c-driver-1.9.3.tar.gz 7716783 BLAKE2B 9f5fc8cddbc1c4cf1f85016027e49d4c3bf2ebe50b1df45eda8569d48b88e174fe2c73e76f7afd4f3a36b74c5d02b826f55c610b8c4df273d8ebd4047e823edc SHA512 2c3f915c4f367f5614a904741b4b480896dd521b7039158b2f421d0d7579a45862d5099cd26b6d14cb088f9db49019538aca553c5cf72d9706ec9ab6516ff40a
+EBUILD mongo-c-driver-0.7.1-r1.ebuild 1265 BLAKE2B 8dd36363056eccf480098c353f77eb89c66e2be3e38568e97a6a92b0adef6c3887324df07fcbf10a81784e2508e2249a7131c6eb288ece61b6691c341a43a476 SHA512 eb9f7c198354e5daf80cccfc3cae0640dbeb5b748bd5e4bd9f9c94400ff56df7616c389234063c362a2dbe89d0bf8908593df06b68d4fb6bce4d350f795ccc94
+EBUILD mongo-c-driver-0.8.1-r1.ebuild 1204 BLAKE2B 1dcdd5945923fde34f50fba03998f88096e598e1f1cde394eab22a74ba1d537531e5365317383609dac5baa5932fde85ca5d426e03cc649b6ec6e2e5370474e2 SHA512 c66b8e7d836d5ca9845bbbb73ca643a74d2568c70ec9b08912b4b55bbfb08ed581579373f2c2443713ced62b72620b7462bfdc1cf7a9fda009f288d82305fcda
+EBUILD mongo-c-driver-0.98.2.ebuild 1692 BLAKE2B 247c26866b8eb10aef7b0894300157a7522d2e579d7c5f19022f086e0352afaca4d5f6a45f9eea94f99049b102fcca84bcbfa56a138ef8d6afc4cd44008ebe71 SHA512 b74806852fbc46322c52966c987d882866fcf551c865eac0bba641b4ccf0f7f4a2129feb3f610e4fa57d3a0be99f50cd1e4796aafec2a1d6ed851c16125c370e
+EBUILD mongo-c-driver-1.1.10.ebuild 1803 BLAKE2B ed8a0f4296418db9836fe3cc4052a9d2c72562542d5588c9219803ee408ba8106829945ab22d1cb64b49428f7a78991d086652f68bebc592ba5872f7aeba2a86 SHA512 3f5a4deeb9115b9a31b1229cf560f62d28611281fa76e1c2d043602f49264a0b75b67540a872621a72bb20bf3aafdfdc4b528aaccaf206ad538127bb69e8587e
+EBUILD mongo-c-driver-1.1.2-r1.ebuild 1800 BLAKE2B 61782ec9c74e2d67bd884c1e1aa1b51eda2aa7148b3df90de3b45187c2823efb3afff7edff1eb5047bb205004a3b9cb8977c0945e6609df7a7c037ca97ab2bf1 SHA512 0183addeff7e2bac1add74db48b727edaf09f1b24b774bafe717c43c0e9a4a083081f12ab1d2afb743b61fd3591d6d3fa04f1b6c2be9339a2ab55a27ef4791ea
+EBUILD mongo-c-driver-1.10.3.ebuild 2191 BLAKE2B 43dba477bba4672c2846b940e30f87a1db9d22b20f2f8b333b73ca0903236fc10da2f5a2a022121b06d09f0037418eca3aad1f54ddc13e2813e9c64c8a4b665e SHA512 cc8ddbdfd8dcbb8ac48315ac880e7c36036c42ab87357661a1ba50caa375590371550415c4f4b4a934a65556549c5208fdaa565dd9b4fda143c26a650af82633
+EBUILD mongo-c-driver-1.3.5.ebuild 2023 BLAKE2B fc14f7ffb1d3f6c6d8495b10276944240d57a712d76ce58f909de934ee3f1ddd9f9d57723d1e686692de422033859dbec384aff65eb0e16a4a915674980d923f SHA512 30eb5a0bdd2d92de202dc28df98b3038a8015af39d6bc8fdc7b76299efd509bc9bf0690f824d34c1d7ff4a59dabd036567d18e4846411759560a65ae027f4469
+EBUILD mongo-c-driver-1.6.2.ebuild 1963 BLAKE2B 6a65450eb17c0de23d4525d9028ecba3b69f8cf6b8be52af3ec81893d3295d30cb25f06869b915da4c6f87e2344777356dac99f1aeb506eaca2def1e1550bae4 SHA512 776b41fa17aa7859aae0a8861647cfa4072e31c75a9189cf59da53b3798d5832b45abb60073cf37176ee05a2abc734da3c9e1f9e5fdad718002670bb99e54cfc
+EBUILD mongo-c-driver-1.8.2.ebuild 2150 BLAKE2B 1ff46d08933c2d525b4dd60cfbd1ba4c3e8183cea11923f3b851b9fe1e0b25bdaf1d08e70f68a3dde383ff4ee7ca9127ea0cb7d0ac011c4aac2f42f46dd4a6f8 SHA512 55338086d4a8c91527f62758b153031751385b975eec7b8dc35a0d07132eb8120b4d0ccf8cdce419f4623ddb8b7deea62556dd7c9c41ad8a01abf04bad6869a9
+EBUILD mongo-c-driver-1.9.3.ebuild 2153 BLAKE2B d6abb8f98f741dc893ad46c50b8ff92f7f151b83ac402bb07c5a3335f648c04eafa26e85f4f9dceaa3bd2a89e96df4d673f755135fd1e31cd03a203ba4643193 SHA512 75657ac140fc3aeac90342be78a18e999f62813a5ac0dd6de782c1ab603e7b602c2d6351650563d95113d9d936413178650bcdeac66d6774255708a6e4d025d7
+MISC metadata.xml 334 BLAKE2B 7e10c3396a8bf28586240a95cc10a42de507d995b9f67dcf3b016cd586a973ce7478fe3974188dfb215123c8ca7188479d0d5be46ebcbb6b7790472f4e6ce225 SHA512 80ff1ae78c264618a7d5253d80ea5f4d1a15a568d5215d03dbe3062a591ec1c99d6625feff3b7baabe314bb284b5e5340c873b8846d05fd932f8cbc78df00d34
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/files/mongo-c-driver-1.10.3-enable-tests.patch b/dev-libs/mongo-c-driver/files/mongo-c-driver-1.10.3-enable-tests.patch
new file mode 100644
index 000000000000..af26b6953139
--- /dev/null
+++ b/dev-libs/mongo-c-driver/files/mongo-c-driver-1.10.3-enable-tests.patch
@@ -0,0 +1,25 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2eeb6cb..aeaa23b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -109,7 +109,6 @@ if (ENABLE_BSON STREQUAL SYSTEM)
+ message ("-- libbson include path \"${BSON_INCLUDE_DIRS}\"")
+ message ("-- libbson libraries \"${BSON_LIBRARIES}\"")
+ message ("-- disabling test-libmongoc since using system libbson")
+- SET (ENABLE_TESTS OFF)
+
+ if (ENABLE_STATIC MATCHES "ON|AUTO")
+ find_package (libbson-static-1.0
+diff --git a/src/libbson/tests/test-bson.c b/src/libbson/tests/test-bson.c
+index 51514ed..accb251 100644
+--- a/src/libbson/tests/test-bson.c
++++ b/src/libbson/tests/test-bson.c
+@@ -18,7 +18,7 @@
+ #include <bson.h>
+ #include <bcon.h>
+ #define BSON_INSIDE
+-#include <bson-private.h>
++#include "bson-private.h"
+ #undef BSON_INSIDE
+ #include <fcntl.h>
+ #include <time.h>
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..495c4072b100
--- /dev/null
+++ b/dev-libs/mongo-c-driver/mongo-c-driver-0.8.1-r1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2018 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.10.3.ebuild b/dev-libs/mongo-c-driver/mongo-c-driver-1.10.3.ebuild
new file mode 100644
index 000000000000..e2009f3e717e
--- /dev/null
+++ b/dev-libs/mongo-c-driver/mongo-c-driver-1.10.3.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils
+
+DESCRIPTION="Client library written in C for MongoDB"
+HOMEPAGE="https://github.com/mongodb/mongo-c-driver"
+SRC_URI="https://github.com/mongodb/mongo-c-driver/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE="debug examples libressl sasl ssl static-libs test"
+REQUIRED_USE="test? ( static-libs )"
+
+RDEPEND="app-arch/snappy:=
+ >=dev-libs/libbson-1.10.3
+ dev-python/sphinx
+ sys-libs/zlib:=
+ sasl? ( dev-libs/cyrus-sasl:= )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ test? (
+ dev-db/mongodb
+ dev-libs/libbson[static-libs]
+ )"
+
+# No tests on x86 because tests require dev-db/mongodb which don't support
+# x86 anymore (bug #645994)
+RESTRICT="x86? ( test )"
+
+PATCHES=(
+ "${FILESDIR}/${P}-enable-tests.patch" # enable tests without libbson
+)
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ # copy private headers for tests since we don't build libbson
+ if use test; then
+ for f in bson-private.h bson-iso8601-private.h bson-thread-private.h; do
+ cp -v src/libbson/src/bson/${f} src/libbson/tests/ || die
+ done
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_SKIP_RPATH=ON # mongoc-stat insecure runpath
+ -DENABLE_BSON=SYSTEM
+ -DENABLE_EXAMPLES=OFF
+ -DENABLE_MAN_PAGES=ON
+ -DENABLE_MONGOC=ON
+ -DENABLE_SNAPPY=SYSTEM
+ -DENABLE_ZLIB=SYSTEM
+ -DENABLE_SASL="$(usex sasl CYRUS OFF)"
+ -DENABLE_SSL="$(usex ssl $(usex libressl LIBRESSL OPENSSL) OFF)"
+ -DENABLE_STATIC="$(usex static-libs ON OFF)"
+ -DENABLE_TESTS="$(usex test ON OFF)"
+ -DENABLE_TRACING="$(usex debug ON OFF)"
+ )
+
+ cmake-utils_src_configure
+}
+
+src_test() {
+ local PORT=27099
+ mongod --port ${PORT} --bind_ip 127.0.0.1 --nounixsocket --fork \
+ --dbpath="${T}" --logpath="${T}/mongod.log" || die
+ MONGOC_TEST_URI="mongodb://[127.0.0.1]:${PORT}" ../mongo-c-driver-${PV}_build/src/libmongoc/test-libmongoc || die
+ kill $(<"${T}/mongod.lock")
+}
+
+src_install() {
+ if use examples; then
+ docinto examples
+ dodoc src/libmongoc/examples/*.c
+ fi
+
+ cmake-utils_src_install
+}
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")
+}
diff --git a/dev-libs/mongo-c-driver/mongo-c-driver-1.8.2.ebuild b/dev-libs/mongo-c-driver/mongo-c-driver-1.8.2.ebuild
new file mode 100644
index 000000000000..d034808158e7
--- /dev/null
+++ b/dev-libs/mongo-c-driver/mongo-c-driver-1.8.2.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+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="app-arch/snappy:=
+ >=dev-libs/libbson-1.8.2
+ sys-libs/zlib:=
+ sasl? ( dev-libs/cyrus-sasl )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ test? ( dev-db/mongodb )"
+
+# No tests on x86 because tests require dev-db/mongodb which don't support
+# x86 anymore (bug #645994)
+RESTRICT="x86? ( test )"
+
+src_prepare() {
+ # remove bundled libs
+ rm -rv src/{libbson,zlib*} || die
+
+ # bundled headers are gone
+ sed -e '/^ac_config_files/s@src/zlib-.*/zconf.h@@g' \
+ -i configure || die
+
+ # this test fails
+ sed -e '/test_topology_install (&suite)/d' \
+ -i tests/test-libmongoc.c || die
+
+ default
+}
+
+src_configure() {
+ econf --with-libbson=system \
+ --with-snappy=system \
+ --with-zlib=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")
+}
diff --git a/dev-libs/mongo-c-driver/mongo-c-driver-1.9.3.ebuild b/dev-libs/mongo-c-driver/mongo-c-driver-1.9.3.ebuild
new file mode 100644
index 000000000000..8c5b2194c35f
--- /dev/null
+++ b/dev-libs/mongo-c-driver/mongo-c-driver-1.9.3.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+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="app-arch/snappy:=
+ >=dev-libs/libbson-1.8.2
+ sys-libs/zlib:=
+ sasl? ( dev-libs/cyrus-sasl )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ test? ( dev-db/mongodb )"
+
+# No tests on x86 because tests require dev-db/mongodb which don't support
+# x86 anymore (bug #645994)
+RESTRICT="x86? ( test )"
+
+src_prepare() {
+ # remove bundled libs
+ rm -rv src/{libbson,zlib*} || die
+
+ # bundled headers are gone
+ sed -e '/^ac_config_files/s@src/zlib-.*/zconf.h@@g' \
+ -i configure || die
+
+ # this test fails
+ sed -e '/test_topology_install (&suite)/d' \
+ -i tests/test-libmongoc.c || die
+
+ default
+}
+
+src_configure() {
+ econf --with-libbson=system \
+ --with-snappy=system \
+ --with-zlib=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")
+}