summaryrefslogtreecommitdiff
path: root/dev-db/mongodb
diff options
context:
space:
mode:
Diffstat (limited to 'dev-db/mongodb')
-rw-r--r--dev-db/mongodb/Manifest7
-rw-r--r--dev-db/mongodb/files/mms-agent.confd9
-rw-r--r--dev-db/mongodb/files/mms-agent.initd41
-rw-r--r--dev-db/mongodb/files/mms-agent.initd-r131
-rw-r--r--dev-db/mongodb/files/mms-agent.initd-r225
-rw-r--r--dev-db/mongodb/files/mongodb-2.0-fix-scons.patch36
-rw-r--r--dev-db/mongodb/files/mongodb-2.0-r1-boost-1.50.patch245
-rw-r--r--dev-db/mongodb/files/mongodb-2.2-r1-fix-boost.patch13
-rw-r--r--dev-db/mongodb/files/mongodb-2.4-fix-sasl.patch33
-rw-r--r--dev-db/mongodb/files/mongodb-2.4-fix-v8-pythonpath.patch11
-rw-r--r--dev-db/mongodb/files/mongodb-2.4.11-fix-scons.patch23
-rw-r--r--dev-db/mongodb/files/mongodb-2.4.5-fix-scons.patch28
-rw-r--r--dev-db/mongodb/files/mongodb-2.6.1-fix-scons.patch35
-rw-r--r--dev-db/mongodb/files/mongodb-2.6.10-fix-boost-1.57.patch13
-rw-r--r--dev-db/mongodb/files/mongodb-2.6.2-fix-scons.patch35
-rw-r--r--dev-db/mongodb/files/mongodb-3.0.0-fix-scons.patch35
-rw-r--r--dev-db/mongodb/files/mongodb.conf8
-rw-r--r--dev-db/mongodb/files/mongodb.conf-r233
-rw-r--r--dev-db/mongodb/files/mongodb.conf-r334
-rw-r--r--dev-db/mongodb/files/mongodb.confd14
-rw-r--r--dev-db/mongodb/files/mongodb.confd-r212
-rw-r--r--dev-db/mongodb/files/mongodb.initd-r140
-rw-r--r--dev-db/mongodb/files/mongodb.initd-r227
-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.confd16
-rw-r--r--dev-db/mongodb/files/mongos.confd-r212
-rw-r--r--dev-db/mongodb/files/mongos.initd-r150
-rw-r--r--dev-db/mongodb/files/mongos.initd-r227
-rw-r--r--dev-db/mongodb/metadata.xml30
-rw-r--r--dev-db/mongodb/mongodb-2.4.13.ebuild150
-rw-r--r--dev-db/mongodb/mongodb-2.4.14.ebuild150
-rw-r--r--dev-db/mongodb/mongodb-2.6.10.ebuild180
-rw-r--r--dev-db/mongodb/mongodb-2.6.8.ebuild180
-rw-r--r--dev-db/mongodb/mongodb-3.0.4.ebuild147
-rw-r--r--dev-db/mongodb/mongodb-3.0.5.ebuild153
37 files changed, 1936 insertions, 0 deletions
diff --git a/dev-db/mongodb/Manifest b/dev-db/mongodb/Manifest
new file mode 100644
index 000000000000..b17d87bf1551
--- /dev/null
+++ b/dev-db/mongodb/Manifest
@@ -0,0 +1,7 @@
+DIST 20140409-mms-monitoring-agent.zip 40122 SHA256 9c4f89cfba10b4604512ab21eb082248104aeabe7e813b852db2b86f47d7ecb2 SHA512 5290a813c407251b5e4def813ce6fe7e09d6c3a1907fd409e326b15b07aed39f7db3a28710ecdaffe2771136c9433253c5d1857c823844a4b75dd38f1d15eefd WHIRLPOOL ce80870e2618f3d9ed80af41b1069ed5bd97af475089564eed1bc111e820c048bc5cbaa03f859349e772fe232f876127e0627c75c135a9b2e196ab13258ed9f1
+DIST mongodb-src-r2.4.13.tar.gz 14183056 SHA256 9ad8a3b58457c35b6dd020ca2364ee605e30b839f5475449a229fdcd4115866c SHA512 26256410593f2072e8a8728fbb2665bb98d4c73f3601136e8306d1d6b421421827f66e4073515fea7dfbc0a27f5615cd30f8a85e5980ea3dd46f2f06366946cb WHIRLPOOL 6e64a8ba466da74342f7eabd41b8eb86a3d1cd99c5665e54872642230ec0ed86216c0e533b08d21e0c6b6c20b7d7887a34aad0679ba32523dd3ca0e464190348
+DIST mongodb-src-r2.4.14.tar.gz 15120808 SHA256 f5ed949cf7c9669267e6f426f3dc30bf6c0e2d68ba7df9e29f16799e8212e7ce SHA512 6811f27a57a2df07f59215f544948708cd5846237c24df6eb14bf09384db4136d964587d82008ff2b0a4dea94d6869fc1dcf2ccd07e5f285da5012a0a091a74f WHIRLPOOL c89b2f4f1a77523f895b3fa21ec82813a4859391c82e3934952b25ab8602c30ac13b9e6b2a00082bbe7bace32edacdb3270e46ac0f3a8c0ab10ea48b5911e019
+DIST mongodb-src-r2.6.10.tar.gz 16456717 SHA256 74228a22aaf99570e706ecde20658165e3983ee8a9f327e80974f82a4e819476 SHA512 acce5faf1986e9650469359fac48a5e83475c1e1e34d3bdeaaaf12da08f7f01eb68f4885ee9877b012f0d705b4f814be2832b3de446cab72ba254afba1e33c7f WHIRLPOOL b39766df876d9e225683bf806f0b05b70d3140900c04c9de3d3640bd933d0c942fbbe74968dcd9d6523750df076ad99e31b59ef09f7d1b2a620e7d2848c0e1ce
+DIST mongodb-src-r2.6.8.tar.gz 14545274 SHA256 1997f60d9de17320f22c604d8aa1cbe5f38d877142cd0e9130fe3dae7b311a06 SHA512 6fa69750debb40d0be4d5d057125320d97e882e30c43c664fcb6ec6a9e6a8bff5e63637fc8952a6d898556b2c2ce84254d135387dc0879bf65dbd5e91b8732ef WHIRLPOOL ba87ca07258ad4df90c92bc300da6cc661117a98f254a8ba62ac362a857ecc2462eb9ddf1d929a6e2187853233053e975aa02139f880d736e47e542a9504bd28
+DIST mongodb-src-r3.0.4.tar.gz 26615962 SHA256 6de7aa8b12ad892ee3852ac949069fda8cb87b3ee606a88226817505e2864360 SHA512 bd35a252cd351a2d755edf5e20c69c904de326d7e47aebc055cd0160476ecf966cf53f3263410c32f70e108ff2a019f86a21e1a71917246c2f13db9251082bc3 WHIRLPOOL 224ca39c0411b1608f75191eb14d86256434d3e5ce293a9ac5d1febc3d0285bf79db0875e97fd5559f47734c7f97fedc1bcff3a28aec0a39924da1a4cc24744d
+DIST mongodb-src-r3.0.5.tar.gz 26332788 SHA256 05b16a7991aa65b1d396a3dc622107fba3216fffa8b9ed0817e76ae95f5f7fdb SHA512 17c66f9501e6517feba069f85bb468a421c45300306977ebfed71e6ce120e2bed64f14698e470c644360e23f40132171d64ac85f0962aa3ba824a48cf228775a WHIRLPOOL 7ed1f2b0daf7cb9ff081e69823e79504b8c99a221c74c2a541d673febacad9e555ef34eb4f2e97effe7e6fddafb81b903ab5a4ac8c4e8951640a0f2c6828ba14
diff --git a/dev-db/mongodb/files/mms-agent.confd b/dev-db/mongodb/files/mms-agent.confd
new file mode 100644
index 000000000000..d19b21e2d32b
--- /dev/null
+++ b/dev-db/mongodb/files/mms-agent.confd
@@ -0,0 +1,9 @@
+# Your API key - See: http://mms.10gen.com/settings
+API_KEY=""
+SECRET_KEY=""
+
+# Seconds between Mongo status checks
+#COLLECTION_INTERVAL=56
+
+# Seconds between cloud configuration checks
+#CONF_INTERVAL=120 \ No newline at end of file
diff --git a/dev-db/mongodb/files/mms-agent.initd b/dev-db/mongodb/files/mms-agent.initd
new file mode 100644
index 000000000000..7f7196501639
--- /dev/null
+++ b/dev-db/mongodb/files/mms-agent.initd
@@ -0,0 +1,41 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+ROOTDIR=/opt/mms-agent
+PIDFILE=/var/run/mm-agent.pid
+EXEC="/usr/bin/env python agent.py"
+LOGFILE=/var/log/mongodb/mms-agent.log
+
+depend() {
+ need net
+ use syslog
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+
+ checkpath -d -m 0755 -o root:root /var/run/
+
+ # Setup API/SECRETY KEYS
+ sed -i -e "s/^mms_key.*/mms_key = '${API_KEY}'/g" \
+ -e "s/^secret_key.*/secret_key = '${SECRET_KEY}'/g" ${ROOTDIR}/settings.py &>/dev/null
+
+ # Tune the agent
+ [ -z "${COLLECTION_INTERVAL}" ] || sed -i \
+ -e "s/^collection_interval.*/collection_interval = ${COLLECTION_INTERVAL}/g" ${ROOTDIR}/settings.py &>/dev/null
+ [ -z "${CONF_INTERVAL}" ] || sed -i \
+ -e "s/^conf_interval.*/conf_interval = ${CONF_INTERVAL}/g" ${ROOTDIR}/settings.py &>/dev/null
+
+ start-stop-daemon --start --chdir ${ROOTDIR} --exec ${EXEC} \
+ --pidfile "${PIDFILE}" --make-pidfile --background \
+ --user mongodb:mongodb --stdout ${LOGFILE} --stderr ${LOGFILE}
+ eend $?
+}
+
+stop() {
+ ebegin "Requesting ${SVCNAME} to stop"
+ start-stop-daemon --stop --pidfile "${PIDFILE}"
+ eend $?
+}
diff --git a/dev-db/mongodb/files/mms-agent.initd-r1 b/dev-db/mongodb/files/mms-agent.initd-r1
new file mode 100644
index 000000000000..66d408b08322
--- /dev/null
+++ b/dev-db/mongodb/files/mms-agent.initd-r1
@@ -0,0 +1,31 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+ROOTDIR=/opt/mms-agent
+PIDFILE=/var/run/mm-agent.pid
+EXEC="/usr/bin/env python agent.py"
+LOGFILE=/var/log/mongodb/mms-agent.log
+
+depend() {
+ need net
+ use syslog
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+
+ checkpath -d -m 0755 -o root:root /var/run/
+
+ start-stop-daemon --start --chdir ${ROOTDIR} --exec ${EXEC} \
+ --pidfile "${PIDFILE}" --make-pidfile --background \
+ --user mongodb:mongodb --stdout ${LOGFILE} --stderr ${LOGFILE}
+ eend $?
+}
+
+stop() {
+ ebegin "Requesting ${SVCNAME} to stop"
+ start-stop-daemon --stop --pidfile "${PIDFILE}"
+ eend $?
+}
diff --git a/dev-db/mongodb/files/mms-agent.initd-r2 b/dev-db/mongodb/files/mms-agent.initd-r2
new file mode 100644
index 000000000000..9c63be02245d
--- /dev/null
+++ b/dev-db/mongodb/files/mms-agent.initd-r2
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+logfile=/var/log/mongodb/mms-agent.log
+run_dir=${run_dir:-/run/mongodb}
+
+command="/usr/bin/python2 agent.py &>${logfile}"
+command_background="true"
+
+pidfile=${run_dir}/${SVCNAME}.pid
+user=${user:-mongodb}
+group=${group:-mongodb}
+start_stop_daemon_args="--user ${user} --group ${group}"
+
+depend() {
+ need net
+ use syslog
+}
+
+start_pre() {
+ checkpath -d -m 0750 -o "${user}":"${group}" "${run_dir}"
+ cd /opt/mms-agent
+}
diff --git a/dev-db/mongodb/files/mongodb-2.0-fix-scons.patch b/dev-db/mongodb/files/mongodb-2.0-fix-scons.patch
new file mode 100644
index 000000000000..a52e3a30a77d
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-2.0-fix-scons.patch
@@ -0,0 +1,36 @@
+--- a/SConstruct 2011-11-16 22:11:39.000000000 +0100
++++ b/SConstruct 2011-11-17 16:30:16.144117550 +0100
+@@ -688,7 +688,7 @@
+ env["CXX"] = "distcc " + env["CXX"]
+
+ # -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used.
+- env.Append( CPPFLAGS="-fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch" )
++ env.Append( CPPFLAGS="-fPIC -fno-strict-aliasing -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch" )
+ # env.Append( " -Wconversion" ) TODO: this doesn't really work yet
+ if linux:
+ env.Append( CPPFLAGS=" -Werror " )
+@@ -696,7 +696,9 @@
+ env.Append( CPPFLAGS=" -fno-builtin-memcmp " ) # glibc's memcmp is faster than gcc's
+
+ env.Append( CPPDEFINES="_FILE_OFFSET_BITS=64" )
++ env.Append( CXXFLAGS=os.environ['CXXFLAGS'])
+ env.Append( CXXFLAGS=" -Wnon-virtual-dtor " )
++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] )
+ env.Append( LINKFLAGS=" -fPIC -pthread -rdynamic" )
+ env.Append( LIBS=[] )
+
+@@ -706,12 +708,13 @@
+
+ if linux and has_option( "sharedclient" ):
+ env.Append( LINKFLAGS=" -Wl,--as-needed -Wl,-zdefs " )
++ env.Append( SHLINKFLAGS=" -Wl,-soname=libmongoclient.so " )
+
+ if debugBuild:
+ env.Append( CPPFLAGS=" -O0 -fstack-protector " );
+ env['ENV']['GLIBCXX_FORCE_NEW'] = 1; # play nice with valgrind
+ else:
+- env.Append( CPPFLAGS=" -O3 " )
++ env.Append( CXXFLAGS=" -O3 " )
+ #env.Append( CPPFLAGS=" -fprofile-generate" )
+ #env.Append( LINKFLAGS=" -fprofile-generate" )
+ # then:
diff --git a/dev-db/mongodb/files/mongodb-2.0-r1-boost-1.50.patch b/dev-db/mongodb/files/mongodb-2.0-r1-boost-1.50.patch
new file mode 100644
index 000000000000..4ccb898ec6fd
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-2.0-r1-boost-1.50.patch
@@ -0,0 +1,245 @@
+diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/db/db.cpp mongodb-src-r2.0.6-patched/db/db.cpp
+--- mongodb-src-r2.0.6/db/db.cpp 2012-06-04 15:42:54.000000000 +0200
++++ mongodb-src-r2.0.6-patched/db/db.cpp 2012-07-10 22:27:16.496886220 +0200
+@@ -326,7 +326,7 @@
+ boost::filesystem::path path( dbpath );
+ for ( boost::filesystem::directory_iterator i( path );
+ i != boost::filesystem::directory_iterator(); ++i ) {
+- string fileName = boost::filesystem::path(*i).leaf();
++ string fileName = boost::filesystem::path(*i).leaf().string();
+ if ( boost::filesystem::is_directory( *i ) &&
+ fileName.length() && fileName[ 0 ] == '$' )
+ boost::filesystem::remove_all( *i );
+@@ -655,11 +655,6 @@
+ dbExecCommand = argv[0];
+
+ srand(curTimeMicros());
+-#if( BOOST_VERSION >= 104500 )
+- boost::filesystem::path::default_name_check( boost::filesystem2::no_check );
+-#else
+- boost::filesystem::path::default_name_check( boost::filesystem::no_check );
+-#endif
+
+ {
+ unsigned x = 0x12345678;
+@@ -976,7 +971,7 @@
+ if (params.count("shutdown")){
+ bool failed = false;
+
+- string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).native_file_string();
++ string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).string();
+ if ( !boost::filesystem::exists( name ) || boost::filesystem::file_size( name ) == 0 )
+ failed = true;
+
+diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/db/dur.cpp mongodb-src-r2.0.6-patched/db/dur.cpp
+--- mongodb-src-r2.0.6/db/dur.cpp 2012-06-04 15:42:54.000000000 +0200
++++ mongodb-src-r2.0.6-patched/db/dur.cpp 2012-07-10 21:56:28.866778732 +0200
+@@ -692,7 +692,7 @@
+
+ bool samePartition = true;
+ try {
+- const string dbpathDir = boost::filesystem::path(dbpath).native_directory_string();
++ const string dbpathDir = boost::filesystem::path(dbpath).string();
+ samePartition = onSamePartition(getJournalDir().string(), dbpathDir);
+ }
+ catch(...) {
+diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/db/dur_journal.cpp mongodb-src-r2.0.6-patched/db/dur_journal.cpp
+--- mongodb-src-r2.0.6/db/dur_journal.cpp 2012-06-04 15:42:54.000000000 +0200
++++ mongodb-src-r2.0.6-patched/db/dur_journal.cpp 2012-07-10 22:04:18.583472723 +0200
+@@ -169,7 +169,7 @@
+ for ( boost::filesystem::directory_iterator i( getJournalDir() );
+ i != boost::filesystem::directory_iterator();
+ ++i ) {
+- string fileName = boost::filesystem::path(*i).leaf();
++ string fileName = boost::filesystem::path(*i).leaf().string();
+ if( str::startsWith(fileName, "j._") )
+ return true;
+ }
+@@ -185,7 +185,7 @@
+ for ( boost::filesystem::directory_iterator i( getJournalDir() );
+ i != boost::filesystem::directory_iterator();
+ ++i ) {
+- string fileName = boost::filesystem::path(*i).leaf();
++ string fileName = boost::filesystem::path(*i).leaf().string();
+ if( str::startsWith(fileName, "j._") ) {
+ try {
+ removeOldJournalFile(*i);
+diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/db/dur_recover.cpp mongodb-src-r2.0.6-patched/db/dur_recover.cpp
+--- mongodb-src-r2.0.6/db/dur_recover.cpp 2012-06-04 15:42:54.000000000 +0200
++++ mongodb-src-r2.0.6-patched/db/dur_recover.cpp 2012-07-10 22:02:18.226799055 +0200
+@@ -71,7 +71,7 @@
+ i != filesystem::directory_iterator();
+ ++i ) {
+ filesystem::path filepath = *i;
+- string fileName = filesystem::path(*i).leaf();
++ string fileName = filesystem::path(*i).leaf().string();
+ if( str::startsWith(fileName, "j._") ) {
+ unsigned u = str::toUnsigned( str::after(fileName, '_') );
+ if( m.count(u) ) {
+@@ -84,7 +84,7 @@
+ if( i != m.begin() && m.count(i->first - 1) == 0 ) {
+ uasserted(13532,
+ str::stream() << "unexpected file in journal directory " << dir.string()
+- << " : " << filesystem::path(i->second).leaf() << " : can't find its preceeding file");
++ << " : " << filesystem::path(i->second).leaf().string() << " : can't find its preceeding file");
+ }
+ files.push_back(i->second);
+ }
+diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/db/instance.cpp mongodb-src-r2.0.6-patched/db/instance.cpp
+--- mongodb-src-r2.0.6/db/instance.cpp 2012-06-04 15:42:54.000000000 +0200
++++ mongodb-src-r2.0.6-patched/db/instance.cpp 2012-07-10 22:08:55.213488817 +0200
+@@ -645,13 +645,13 @@
+ i != boost::filesystem::directory_iterator(); ++i ) {
+ if ( directoryperdb ) {
+ boost::filesystem::path p = *i;
+- string dbName = p.leaf();
++ string dbName = p.leaf().string();
+ p /= ( dbName + ".ns" );
+ if ( MMF::exists( p ) )
+ names.push_back( dbName );
+ }
+ else {
+- string fileName = boost::filesystem::path(*i).leaf();
++ string fileName = boost::filesystem::path(*i).leaf().string();
+ if ( fileName.length() > 3 && fileName.substr( fileName.length() - 3, 3 ) == ".ns" )
+ names.push_back( fileName.substr( 0, fileName.length() - 3 ) );
+ }
+@@ -893,7 +893,7 @@
+ }
+
+ void acquirePathLock(bool doingRepair) {
+- string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).native_file_string();
++ string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).string();
+
+ bool oldFile = false;
+
+diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/db/pdfile.cpp mongodb-src-r2.0.6-patched/db/pdfile.cpp
+--- mongodb-src-r2.0.6/db/pdfile.cpp 2012-06-04 15:42:54.000000000 +0200
++++ mongodb-src-r2.0.6-patched/db/pdfile.cpp 2012-07-10 22:11:44.103498643 +0200
+@@ -1987,7 +1987,7 @@
+ virtual bool apply( const Path &p ) {
+ if ( !boost::filesystem::exists( p ) )
+ return false;
+- boostRenameWrapper( p, newPath_ / ( p.leaf() + ".bak" ) );
++ boostRenameWrapper( p, newPath_ / ( p.leaf().string() + ".bak" ) );
+ return true;
+ }
+ virtual const char * op() const {
+@@ -2093,7 +2093,7 @@
+ uniqueReservedPath( ( preserveClonedFilesOnFailure || backupOriginalFiles ) ?
+ "backup" : "$tmp" );
+ BOOST_CHECK_EXCEPTION( boost::filesystem::create_directory( reservedPath ) );
+- string reservedPathString = reservedPath.native_directory_string();
++ string reservedPathString = reservedPath.string();
+
+ bool res;
+ {
+diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/dbtests/framework.cpp mongodb-src-r2.0.6-patched/dbtests/framework.cpp
+--- mongodb-src-r2.0.6/dbtests/framework.cpp 2012-06-04 15:42:54.000000000 +0200
++++ mongodb-src-r2.0.6-patched/dbtests/framework.cpp 2012-07-10 22:29:20.610226773 +0200
+@@ -281,7 +281,7 @@
+ boost::filesystem::create_directory(p);
+ }
+
+- string dbpathString = p.native_directory_string();
++ string dbpathString = p.string();
+ dbpath = dbpathString.c_str();
+
+ cmdLine.prealloc = false;
+diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/pch.h mongodb-src-r2.0.6-patched/pch.h
+--- mongodb-src-r2.0.6/pch.h 2012-06-04 15:42:54.000000000 +0200
++++ mongodb-src-r2.0.6-patched/pch.h 2012-07-10 21:35:57.133373738 +0200
+@@ -79,7 +79,7 @@
+ //#include <boost/any.hpp>
+ #include "boost/thread/once.hpp"
+ //#include <boost/archive/iterators/transform_width.hpp>
+-#define BOOST_FILESYSTEM_VERSION 2
++#define BOOST_FILESYSTEM_VERSION 3
+ #include <boost/filesystem/convenience.hpp>
+ #include <boost/filesystem/exception.hpp>
+ #include <boost/filesystem/operations.hpp>
+diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/shell/shell_utils.cpp mongodb-src-r2.0.6-patched/shell/shell_utils.cpp
+--- mongodb-src-r2.0.6/shell/shell_utils.cpp 2012-06-04 15:42:54.000000000 +0200
++++ mongodb-src-r2.0.6-patched/shell/shell_utils.cpp 2012-07-10 22:38:58.443593723 +0200
+@@ -388,7 +388,7 @@
+ #endif
+ }
+
+- argv_.push_back( programPath.native_file_string() );
++ argv_.push_back( programPath.string() );
+
+ port_ = -1;
+
+diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/tools/restore.cpp mongodb-src-r2.0.6-patched/tools/restore.cpp
+--- mongodb-src-r2.0.6/tools/restore.cpp 2012-06-04 15:42:54.000000000 +0200
++++ mongodb-src-r2.0.6-patched/tools/restore.cpp 2012-07-10 22:45:00.046948094 +0200
+@@ -131,7 +131,7 @@
+ log(2) << "drillDown: " << root.string() << endl;
+
+ // skip hidden files and directories
+- if (root.leaf()[0] == '.' && root.leaf() != ".")
++ if (root.leaf().string()[0] == '.' && root.leaf().string() != ".")
+ return;
+
+ if ( is_directory( root ) ) {
+@@ -210,7 +210,7 @@
+ ns += "." + _coll;
+ }
+ else {
+- string l = root.leaf();
++ string l = root.leaf().string();
+ l = l.substr( 0 , l.find_last_of( "." ) );
+ ns += "." + l;
+ }
+diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/tools/tool.cpp mongodb-src-r2.0.6-patched/tools/tool.cpp
+--- mongodb-src-r2.0.6/tools/tool.cpp 2012-06-04 15:42:54.000000000 +0200
++++ mongodb-src-r2.0.6-patched/tools/tool.cpp 2012-07-10 22:23:53.356874403 +0200
+@@ -113,12 +113,6 @@
+ // we want durability to be disabled.
+ cmdLine.dur = false;
+
+-#if( BOOST_VERSION >= 104500 )
+- boost::filesystem::path::default_name_check( boost::filesystem2::no_check );
+-#else
+- boost::filesystem::path::default_name_check( boost::filesystem::no_check );
+-#endif
+-
+ _name = argv[0];
+
+ /* using the same style as db.cpp */
+diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/util/background.cpp mongodb-src-r2.0.6-patched/util/background.cpp
+--- mongodb-src-r2.0.6/util/background.cpp 2012-06-04 15:42:54.000000000 +0200
++++ mongodb-src-r2.0.6-patched/util/background.cpp 2012-07-10 21:47:40.420081320 +0200
+@@ -89,7 +89,7 @@
+ if ( msTimeOut ) {
+ // add msTimeOut millisecond to current time
+ boost::xtime xt;
+- boost::xtime_get( &xt, boost::TIME_UTC );
++ boost::xtime_get( &xt, boost::TIME_UTC_ );
+
+ unsigned long long ns = msTimeOut * 1000000ULL; // milli to nano
+ if ( xt.nsec + ns < 1000000000 ) {
+diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/util/concurrency/mutex.h mongodb-src-r2.0.6-patched/util/concurrency/mutex.h
+--- mongodb-src-r2.0.6/util/concurrency/mutex.h 2012-06-04 15:42:54.000000000 +0200
++++ mongodb-src-r2.0.6-patched/util/concurrency/mutex.h 2012-07-10 21:45:51.333408307 +0200
+@@ -29,7 +29,7 @@
+
+ inline boost::xtime incxtimemillis( long long s ) {
+ boost::xtime xt;
+- boost::xtime_get(&xt, boost::TIME_UTC);
++ boost::xtime_get(&xt, boost::TIME_UTC_);
+ xt.sec += (int)( s / 1000 );
+ xt.nsec += (int)(( s % 1000 ) * 1000000);
+ if ( xt.nsec >= 1000000000 ) {
+diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/util/queue.h mongodb-src-r2.0.6-patched/util/queue.h
+--- mongodb-src-r2.0.6/util/queue.h 2012-06-04 15:42:54.000000000 +0200
++++ mongodb-src-r2.0.6-patched/util/queue.h 2012-07-10 22:14:00.243506560 +0200
+@@ -82,7 +82,7 @@
+ Timer timer;
+
+ boost::xtime xt;
+- boost::xtime_get(&xt, boost::TIME_UTC);
++ boost::xtime_get(&xt, boost::TIME_UTC_);
+ xt.sec += maxSecondsToWait;
+
+ scoped_lock l( _lock );
diff --git a/dev-db/mongodb/files/mongodb-2.2-r1-fix-boost.patch b/dev-db/mongodb/files/mongodb-2.2-r1-fix-boost.patch
new file mode 100644
index 000000000000..b6c9a1eb55df
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-2.2-r1-fix-boost.patch
@@ -0,0 +1,13 @@
+--- mongodb-src-r2.2.0/SConstruct.old 2012-10-09 12:41:25.000000000 -0400
++++ mongodb-src-r2.2.0/SConstruct 2012-10-09 12:41:41.000000000 -0400
+@@ -171,8 +171,8 @@
+ add_option( "extrapathdyn", "comma separated list of add'l paths (--extrapath /opt/foo/,/foo) dynamic linking" , 1 , True )
+ add_option( "extralib", "comma separated list of libraries (--extralib js_static,readline" , 1 , True )
+
+-add_option( "boost-compiler", "compiler used for boost (gcc41)" , 1 , True , "boostCompiler" )
+-add_option( "boost-version", "boost version for linking(1_38)" , 1 , True , "boostVersion" )
++add_option( "boost-compiler", "compiler used for boost (gcc41)" , 1 , False , "boostCompiler" )
++add_option( "boost-version", "boost version for linking(1_38)" , 1 , False , "boostVersion" )
+
+ add_option( "no-glibc-check" , "don't check for new versions of glibc" , 0 , False )
+
diff --git a/dev-db/mongodb/files/mongodb-2.4-fix-sasl.patch b/dev-db/mongodb/files/mongodb-2.4-fix-sasl.patch
new file mode 100644
index 000000000000..553967e8dedd
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-2.4-fix-sasl.patch
@@ -0,0 +1,33 @@
+--- a/src/mongo/client/sasl_client_session.cpp 2014-10-15 00:40:29.000000000 +0400
++++ b/src/mongo/client/sasl_client_session.cpp 2015-02-07 18:56:02.287762467 +0300
+@@ -29,17 +29,26 @@
+ * doesn't initialize the library for us.
+ */
+
+- void* saslOurMalloc(unsigned long sz) {
++// Version 2.1.26 is the first version to use size_t in the allocator signatures
++#if (SASL_VERSION_FULL >= ((2 << 16) | (1 << 8) | 26))
++ typedef size_t SaslAllocSize;
++#else
++ typedef unsigned long SaslAllocSize;
++#endif
++
++ typedef int(*SaslCallbackFn)();
++
++ void* saslOurMalloc(SaslAllocSize sz) {
+ return ourmalloc(sz);
+ }
+
+- void* saslOurCalloc(unsigned long count, unsigned long size) {
++ void* saslOurCalloc(SaslAllocSize count, SaslAllocSize size) {
+ void* ptr = calloc(count, size);
+- if (!ptr) printStackAndExit(0);
++ if (!ptr) abort();
+ return ptr;
+ }
+
+- void* saslOurRealloc(void* ptr, unsigned long sz) {
++ void* saslOurRealloc(void* ptr, SaslAllocSize sz) {
+ return ourrealloc(ptr, sz);
+ }
+
diff --git a/dev-db/mongodb/files/mongodb-2.4-fix-v8-pythonpath.patch b/dev-db/mongodb/files/mongodb-2.4-fix-v8-pythonpath.patch
new file mode 100644
index 000000000000..19efad676839
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-2.4-fix-v8-pythonpath.patch
@@ -0,0 +1,11 @@
+--- a/src/third_party/v8/SConscript 2014-05-26 11:00:37.725508098 +0200
++++ b/src/third_party/v8/SConscript 2014-05-26 11:01:13.265029083 +0200
+@@ -29,7 +29,7 @@
+ import sys
+ from os.path import join, dirname, abspath
+ root_dir = dirname(File('SConscript').rfile().abspath)
+-sys.path.append(join(root_dir, 'tools'))
++sys.path.insert(0, join(root_dir, 'tools'))
+ import js2c
+
+ Import("env windows linux darwin solaris freebsd debugBuild")
diff --git a/dev-db/mongodb/files/mongodb-2.4.11-fix-scons.patch b/dev-db/mongodb/files/mongodb-2.4.11-fix-scons.patch
new file mode 100644
index 000000000000..5050fe7daa35
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-2.4.11-fix-scons.patch
@@ -0,0 +1,23 @@
+--- b/SConstruct 2014-09-01 19:12:24.289585592 +0200
++++ a/SConstruct 2014-09-01 19:14:12.550312261 +0200
+@@ -704,7 +704,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",
+@@ -719,9 +718,10 @@
+ env.Append( CCFLAGS=["-fno-builtin-memcmp"] ) # glibc's memcmp is faster than gcc's
+
+ env.Append( CPPDEFINES=["_FILE_OFFSET_BITS=64"] )
+- env.Append( CXXFLAGS=["-Wnon-virtual-dtor", "-Woverloaded-virtual"] )
++ env.Append( CXXFLAGS=os.environ['CXXFLAGS'] )
++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] )
+ env.Append( LINKFLAGS=["-fPIC", "-pthread", "-rdynamic"] )
+- env.Append( LIBS=[] )
++ env.Append( LIBS=['pcre', 'pcrecpp', 'snappy'] )
+
+ #make scons colorgcc friendly
+ for key in ('HOME', 'TERM'):
diff --git a/dev-db/mongodb/files/mongodb-2.4.5-fix-scons.patch b/dev-db/mongodb/files/mongodb-2.4.5-fix-scons.patch
new file mode 100644
index 000000000000..4f4c13455430
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-2.4.5-fix-scons.patch
@@ -0,0 +1,28 @@
+--- a/SConstruct 2013-06-26 10:31:56.209089504 +0200
++++ b/SConstruct 2013-06-26 10:33:59.177045991 +0200
+@@ -702,7 +702,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",
+@@ -710,14 +709,14 @@
+ "-Winvalid-pch"] )
+ # env.Append( " -Wconversion" ) TODO: this doesn't really work yet
+ if linux:
+- env.Append( CCFLAGS=["-Werror", "-pipe"] )
+ if not has_option('clang'):
+ env.Append( CCFLAGS=["-fno-builtin-memcmp"] ) # glibc's memcmp is faster than gcc's
+
+ env.Append( CPPDEFINES=["_FILE_OFFSET_BITS=64"] )
+- env.Append( CXXFLAGS=["-Wnon-virtual-dtor", "-Woverloaded-virtual"] )
++ env.Append( CXXFLAGS=os.environ['CXXFLAGS'])
++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] )
+ env.Append( LINKFLAGS=["-fPIC", "-pthread", "-rdynamic"] )
+- env.Append( LIBS=[] )
++ env.Append( LIBS=['pcre', 'pcrecpp', 'snappy'] )
+
+ #make scons colorgcc friendly
+ for key in ('HOME', 'TERM'):
diff --git a/dev-db/mongodb/files/mongodb-2.6.1-fix-scons.patch b/dev-db/mongodb/files/mongodb-2.6.1-fix-scons.patch
new file mode 100644
index 000000000000..031d84373b71
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-2.6.1-fix-scons.patch
@@ -0,0 +1,35 @@
+diff --git SConstruct SConstruct
+index 3886d1b..81c59a9 100644
+--- SConstruct
++++ SConstruct
+@@ -811,19 +811,17 @@ if nix:
+ # -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",
+ "-Wno-unknown-pragmas",
+ "-Winvalid-pch"] )
+ # env.Append( " -Wconversion" ) TODO: this doesn't really work yet
+- if linux or darwin:
+- env.Append( CCFLAGS=["-Werror", "-pipe"] )
+
+ 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.
+@@ -840,7 +838,7 @@ if nix:
+ 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-2.6.10-fix-boost-1.57.patch b/dev-db/mongodb/files/mongodb-2.6.10-fix-boost-1.57.patch
new file mode 100644
index 000000000000..5f289c078831
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-2.6.10-fix-boost-1.57.patch
@@ -0,0 +1,13 @@
+diff -up mongodb-src-r2.6.7/src/mongo/shell/linenoise_utf8.h\~ mongodb-src-r2.6.7/src/