Updated according to feedback:
   * Using MODPY_BIN instead of hardcoded python2.7
   * Using system boost. Because the boost port is configured without
     C++11 support, I had to disable use of the user config.
   * Just use $CC and $CXX. Had to patch SConstruct to include the
     environment PATH.
   * Added DPB_PROPERTIES = parallel
   * Rephrased WiredTiger comment.
   * Moved each module to its own line.
   * Removed erroneous testing dependency.

Attached as well to prevent email whitespace mangling, just in case.

Patch
=====

commit b51751b5ae16f188713628cad85f88448ed8343c
Author: Andrew Aldridge <i80...@foxquill.com>
Date:   Sat Apr 30 05:31:12 2016 -0400

    Update to 3.2.6

diff --git a/Makefile b/Makefile
index 8c03687..f18c73b 100644
--- a/Makefile
+++ b/Makefile
@@ -2,12 +2,13 @@

 PORTROACH =    limitw:1,even

-#atomic_int.h: error "unsupported compiler or platform" on other archs
-ONLY_FOR_ARCHS =       i386 amd64
+# The default storage engine (WiredTiger) only works on amd64.
+ONLY_FOR_ARCHS =       amd64
+DPB_PROPERTIES =       parallel

 COMMENT =      scalable, high-performance document-oriented database

-DISTNAME =     mongodb-src-r2.6.4
+DISTNAME =     mongodb-src-r3.2.6
 PKGNAME =      ${DISTNAME:S/src-r//}
 REVISION =     0
 CATEGORIES =   databases
@@ -17,43 +18,58 @@ HOMEPAGE =  http://www.mongodb.org/
 # Apache 2.0 + AGPLv3
 PERMIT_PACKAGE_CDROM = Yes

-WANTLIB =      boost_filesystem-mt boost_program_options-mt boost_system-mt \
-               boost_thread-mt c execinfo m pcap pcre pcrecpp pthread \
-               stdc++ v8 yaml-cpp
+WANTLIB =      c boost_chrono-mt boost_filesystem-mt \
+               boost_program_options-mt boost_regex-mt boost_system-mt \
+               boost_thread-mt execinfo kvm m pcap pcre pcrecpp pthread \
+               estdc++ yaml-cpp z

 MASTER_SITES = http://downloads.mongodb.org/src/

-MODULES =      devel/scons
-MODSCONS_FLAGS = --prefix="${PREFIX}" \
-                --cpppath="${LOCALBASE}/include/nspr" \
-                --extralib="pcrecpp" \
-                --usev8 \
-                --sharedclient \
-                --full \
-                --use-system-pcre \
-                --use-system-boost \
-                --use-system-v8 \
-                --use-system-yaml
-
-MAKE_ENV +=    HOME="${HOME}" \
-               TERM="${TERM}" \
-               CXXFLAGS="$(CXXFLAGS)" \
-               LIBmongoclient_VERSION="${LIBmongoclient_VERSION}"
-LIB_DEPENDS =  devel/boost \
-               devel/libexecinfo \
+MODULES =      gcc4 \
+               devel/scons \
+               lang/python
+
+MODGCC4_ARCHS =        amd64
+MODGCC4_LANGS =        c c++
+MODPY_VERSION =        2.7
+ALL_TARGET =   core tools
+MODSCONS_ENV = CC="${CC}" \
+               CXX="${CXX}" \
+               CCFLAGS="${CFLAGS} -DBOOST_NO_USER_CONFIG" \
+               CXXFLAGS="${CXXFLAGS}" \
+               LINKFLAGS="${LDFLAGS}" \
+               CPPPATH="${LOCALBASE}/include" \
+               LIBPATH="${LOCALBASE}/lib"
+MODSCONS_FLAGS += --prefix="${PREFIX}" \
+                 --opt=on \
+                 --allocator=system \
+                 --use-system-boost \
+                 --use-system-pcre \
+                 --use-system-yaml \
+                 --use-system-zlib \
+                 -j${MAKE_JOBS}
+
+ALL_TARGET =   core tools
+LIB_DEPENDS =  devel/libexecinfo \
+               devel/boost \
                devel/pcre \
-               devel/yaml-cpp \
-               lang/libv8
+               devel/yaml-cpp
+TEST_DEPENDS = lang/python/2.7 \
+               textproc/py-yaml \
+               databases/py-mongo
+
+do-install:
+       ${SETENV} ${MAKE_ENV} ${MODSCONS_BIN} -C ${WRKSRC} \
+               ${MODSCONS_ENV} ${MODSCONS_FLAGS} ${INSTALL_TARGET}

 post-install:
        ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/mongodb
        ${INSTALL_DATA} ${FILESDIR}/mongodb.conf \
            ${PREFIX}/share/examples/mongodb

-# Regression tests require at least 256 file descriptors and ~700MB
 do-test:
        @${SETENV} ${MAKE_ENV} ${MODSCONS_BIN} -C ${WRKSRC} \
-           ${MODSCONS_ENV} ${MODSCONS_FLAGS} test && \
-           ${WRKSRC}/test --dbpath ${WRKSRC}/unittest
+           ${MODSCONS_ENV} ${MODSCONS_FLAGS} unittests
+       cd ${WRKSRC} && ${MODPY_BIN} buildscripts/resmoke.py --suites=unittests

 .include <bsd.port.mk>
diff --git a/distinfo b/distinfo
index 2bf23a9..1139d2f 100644
--- a/distinfo
+++ b/distinfo
@@ -1,2 +1,2 @@
-SHA256 (mongodb-src-r2.6.4.tar.gz) = B1QRpWD123QHAyuWLrtdoWoMypNuqCp9JkOUtNjLmcA=
-SIZE (mongodb-src-r2.6.4.tar.gz) = 14491215
+SHA256 (mongodb-src-r3.2.6.tar.gz) = BBWptQP2LkDSuof1VbVTdXoU+sKB0dalg9jYgLhyCSE=
+SIZE (mongodb-src-r3.2.6.tar.gz) = 29750170
diff --git a/files/mongodb.conf b/files/mongodb.conf
index 004a41e..fb7703d 100644
--- a/files/mongodb.conf
+++ b/files/mongodb.conf
@@ -1,23 +1,20 @@
 # $OpenBSD: mongodb.conf,v 1.1.1.1 2011/06/02 00:26:32 fgsch Exp $

-# Sample configuration. See mongod --help for more information.
-#
-# Note: To disable flag parameters comment them out or remove the line.
+# Sample configuration. See
+#   https://docs.mongodb.org/manual/administration/configuration/
+# for details.

-# Location of the database files.
-dbpath = /var/mongodb/data
-
-# Specific IP address that mongod will listen on.
-bind_ip = 127.0.0.1
-
-# Full filename path to where log messages will be written.
-logpath = /var/log/mongodb/mongodb.log
-
-# Append to the existing log file
-logappend =
-
-# Run in the background. Output will be redirected to logpath.
-fork =
-
-# Enable simple read-only REST interface
-rest =
+processManagement:
+  fork: true
+net:
+  # Only listen on the local network interface. Change this only if you
+  # need a public-facing instance and have turned on authorization.
+  bindIp: 127.0.0.1
+storage:
+  dbPath: /var/mongodb/data
+  journal:
+    enabled: true
+systemLog:
+  destination: file
+  path: /var/log/mongodb/mongodb.log
+  logAppend: true
diff --git a/patches/patch-SConstruct b/patches/patch-SConstruct
index aa4c381..2fbe5cb 100644
--- a/patches/patch-SConstruct
+++ b/patches/patch-SConstruct
@@ -1,48 +1,11 @@
-$OpenBSD: patch-SConstruct,v 1.5 2014/12/10 19:59:29 dcoppa Exp $
-
-Fixup detection of yaml-cpp system library
-https://github.com/mongodb/mongo/commit/44b0e3591839525a0c951319540488814e5c25fd
-
---- SConstruct.orig    Fri Aug  8 15:13:51 2014
-+++ SConstruct Wed Dec 10 09:28:50 2014
-@@ -814,7 +814,6 @@ 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",
-@@ -828,6 +827,7 @@ if nix:
-
-     env.Append( CPPDEFINES=["_FILE_OFFSET_BITS=64"] )
-     env.Append( CXXFLAGS=["-Wnon-virtual-dtor", "-Woverloaded-virtual"] )
-+    env.Append( CXXFLAGS=os.environ['CXXFLAGS'] )
-     env.Append( LINKFLAGS=["-fPIC", "-pthread"] )
-
- # SERVER-9761: Ensure early detection of missing symbols in dependent libraries at program
-@@ -859,14 +859,9 @@ if nix:
-         env.Append( CPPDEFINES=["MONGO_GCOV"] )
-         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"] )
-+            env.Append( CCFLAGS=["-fstack-protector", "-ggdb"] )
-             env.Append( LINKFLAGS=["-fstack-protector"] )
-             env.Append( SHLINKFLAGS=["-fstack-protector"] )
-         env['ENV']['GLIBCXX_FORCE_NEW'] = 1; # play nice with valgrind
-@@ -1352,7 +1347,7 @@ def doConfigure(myenv):
-         conf.FindSysLibDep("stemmer", ["stemmer"])
-
-     if use_system_version_of_library("yaml"):
--        conf.FindSysLibDep("yaml", ["yaml"])
-+        conf.FindSysLibDep("yaml", ["yaml-cpp"])
-
-     if use_system_version_of_library("boost"):
-         if not conf.CheckCXXHeader( "boost/filesystem/operations.hpp" ):
+$OpenBSD$
+--- SConstruct.orig    Sat Apr 30 18:18:21 2016
++++ SConstruct Sat Apr 30 18:20:28 2016
+@@ -831,6 +831,7 @@ envDict = dict(BUILD_ROOT=buildDir,
+                INSTALL_DIR=installDir,
+                CONFIG_HEADER_DEFINES={},
+                LIBDEPS_TAG_EXPANSIONS=[],
++               ENV = {'PATH': os.environ['PATH']},
+                )
+
+ env = Environment(variables=env_vars, **envDict)
diff --git a/patches/patch-src_mongo_SConscript b/patches/patch-src_mongo_SConscript
deleted file mode 100644
index 5d006f1..0000000
--- a/patches/patch-src_mongo_SConscript
+++ /dev/null
@@ -1,12 +0,0 @@
-$OpenBSD: patch-src_mongo_SConscript,v 1.2 2014/09/16 17:28:07 jasper Exp $
---- src/mongo/SConscript.orig  Fri Aug  8 22:13:51 2014
-+++ src/mongo/SConscript       Tue Sep 16 16:08:02 2014
-@@ -1163,7 +1163,7 @@ def installBinary( e, name ):
-     if enforce_glibc:
-         e.AddPostAction( name, checkGlibc )
-
--    if (solaris or linux) and (not has_option("nostrip")):
-+    if not has_option("nostrip"):
- name = e.Command('stripped/%s' % name, name, Copy('$TARGET', '$SOURCE'))[0]
-         e.AddPostAction(name, 'strip $TARGET')
-
diff --git a/patches/patch-src_mongo_platform_random_cpp b/patches/patch-src_mongo_platform_random_cpp
deleted file mode 100644
index c3e0f34..0000000
--- a/patches/patch-src_mongo_platform_random_cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-$OpenBSD: patch-src_mongo_platform_random_cpp,v 1.1 2013/12/10 17:30:41 joshe Exp $
---- src/mongo/platform/random.cpp.orig Thu Oct 17 11:37:56 2013
-+++ src/mongo/platform/random.cpp      Mon Oct 28 20:21:29 2013
-@@ -138,6 +138,21 @@ namespace mongo {
-         return new InputStreamSecureRandom( "/dev/urandom" );
-     }
-
-+#elif defined(__OpenBSD__)
-+
-+    class ARC4SecureRandom : public SecureRandom {
-+    public:
-+        int64_t nextInt64() {
-+            int64_t n;
-+            arc4random_buf(&n, sizeof(n));
-+            return n;
-+        }
-+    };
-+
-+    SecureRandom* SecureRandom::create() {
-+        return new ARC4SecureRandom();
-+    }
-+
- #else
-     class SRandSecureRandom : public SecureRandom {
-     public:
diff --git a/patches/patch-src_mongo_shell_linenoise_utf8_h b/patches/patch-src_mongo_shell_linenoise_utf8_h
deleted file mode 100644
index 7a74852..0000000
--- a/patches/patch-src_mongo_shell_linenoise_utf8_h
+++ /dev/null
@@ -1,17 +0,0 @@
-$OpenBSD: patch-src_mongo_shell_linenoise_utf8_h,v 1.1 2015/06/29 08:13:50 jasper Exp $
-
-From 2d5d662a834fab72ee1431e3bb0a5ed5a0826177 Mon Sep 17 00:00:00 2001
-From: Mark Benvenuto <mark.benven...@mongodb.com>
-Date: Tue, 19 Aug 2014 15:07:11 -0400
-Subject: [PATCH] SERVER-8994: Boost 1.56 build fixes
-
---- src/mongo/shell/linenoise_utf8.h.orig      Sun Jun 28 22:15:05 2015
-+++ src/mongo/shell/linenoise_utf8.h   Sun Jun 28 22:15:18 2015
-@@ -16,6 +16,7 @@
-  */
-
- #include <boost/smart_ptr/scoped_array.hpp>
-+#include <algorithm>
- #include <string.h>
-
- namespace linenoise_utf8 {
diff --git a/patches/patch-src_mongo_util_net_sock_h b/patches/patch-src_mongo_util_net_sock_h
new file mode 100644
index 0000000..44c5b6e
--- /dev/null
+++ b/patches/patch-src_mongo_util_net_sock_h
@@ -0,0 +1,11 @@
+$OpenBSD$
+--- src/mongo/util/net/sock.h.orig     Mon May  2 00:00:19 2016
++++ src/mongo/util/net/sock.h  Mon May  2 00:00:34 2016
+@@ -37,6 +37,7 @@
+ #include <sys/types.h>
+ #include <sys/un.h>
+ #include <errno.h>
++#include <unistd.h>
+
+ #ifdef __OpenBSD__
+ #include <sys/uio.h>
diff --git a/patches/patch-src_mongo_util_signal_handlers_synchronous_cpp b/patches/patch-src_mongo_util_signal_handlers_synchronous_cpp
new file mode 100644
index 0000000..6007e06
--- /dev/null
+++ b/patches/patch-src_mongo_util_signal_handlers_synchronous_cpp
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- src/mongo/util/signal_handlers_synchronous.cpp.orig Thu Apr 21 16:21:39 2016
++++ src/mongo/util/signal_handlers_synchronous.cpp     Sun May  1 23:59:28 2016
+@@ -266,7 +266,7 @@ void abruptQuitWithAddrSignal(int signalNum, siginfo_t
+     MallocFreeOStreamGuard lk{};
+
+ const char* action = (signalNum == SIGSEGV || signalNum == SIGBUS) ? "access" : "operation"; +- mallocFreeOStream << "Invalid " << action << " at address: " << siginfo->si_addr; ++ mallocFreeOStream << "Invalid " << action << " at address: " << reinterpret_cast<void*>(siginfo->si_addr);
+
+ // Writing out message to log separate from the stack trace so at least that much gets + // logged. This is important because we may get here by jumping to an invalid address which diff --git a/patches/patch-src_third_party_s2_base_port_h b/patches/patch-src_third_party_s2_base_port_h
deleted file mode 100644
index 501a266..0000000
--- a/patches/patch-src_third_party_s2_base_port_h
+++ /dev/null
@@ -1,30 +0,0 @@
-$OpenBSD: patch-src_third_party_s2_base_port_h,v 1.2 2015/05/01 16:51:24 ajacoutot Exp $
---- src/third_party/s2/base/port.h.orig        Thu Oct 17 11:37:56 2013
-+++ src/third_party/s2/base/port.h     Mon Oct 28 20:57:58 2013
-@@ -100,6 +100,14 @@ typedef uint16_t u_int16_t;
- #define __LITTLE_ENDIAN LITTLE_ENDIAN
- #define __BIG_ENDIAN BIG_ENDIAN
-
-+#elif defined __OpenBSD__
-+
-+#include <endian.h>
-+/* Let's try and follow the Linux convention */
-+#define __BYTE_ORDER  BYTE_ORDER
-+#define __LITTLE_ENDIAN LITTLE_ENDIAN
-+#define __BIG_ENDIAN BIG_ENDIAN
-+
- #endif
-
- #if defined __sunos__ || defined __freebsd__
-@@ -134,6 +142,11 @@ typedef uint16_t u_int16_t;
- #define bswap_16(x) bswap16(x)
- #define bswap_32(x) bswap32(x)
- #define bswap_64(x) bswap64(x)
-+#elif defined __OpenBSD__
-+#include <endian.h>
-+#define bswap_16(x) swap16(x)
-+#define bswap_32(x) swap32(x)
-+#define bswap_64(x) swap64(x)
- #else
- #include <byteswap.h>
- #endif
diff --git a/pkg/PLIST b/pkg/PLIST
index 7c6c094..906d75e 100644
--- a/pkg/PLIST
+++ b/pkg/PLIST
@@ -1,20 +1,11 @@
 @comment $OpenBSD: PLIST,v 1.5 2014/09/16 17:28:07 jasper Exp $
 @newgroup _mongodb:670
@newuser _mongodb:670:670:daemon:MongoDB Account:/nonexistent:/sbin/nologin
-@bin bin/bsondump
 @bin bin/mongo
 @bin bin/mongod
-@bin bin/mongodump
-@bin bin/mongoexport
-@bin bin/mongofiles
-@bin bin/mongoimport
-@bin bin/mongooplog
 @bin bin/mongoperf
-@bin bin/mongorestore
 @bin bin/mongos
 @bin bin/mongosniff
-@bin bin/mongostat
-@bin bin/mongotop
 share/examples/mongodb/
 share/examples/mongodb/mongodb.conf
 @sample ${SYSCONFDIR}/mongodb.conf

commit b51751b5ae16f188713628cad85f88448ed8343c
Author: Andrew Aldridge <i80...@foxquill.com>
Date:   Sat Apr 30 05:31:12 2016 -0400

    Update to 3.2.6

diff --git a/Makefile b/Makefile
index 8c03687..f18c73b 100644
--- a/Makefile
+++ b/Makefile
@@ -2,12 +2,13 @@
 
 PORTROACH =	limitw:1,even
 
-#atomic_int.h: error "unsupported compiler or platform" on other archs
-ONLY_FOR_ARCHS =	i386 amd64
+# The default storage engine (WiredTiger) only works on amd64.
+ONLY_FOR_ARCHS =	amd64
+DPB_PROPERTIES =	parallel
 
 COMMENT =	scalable, high-performance document-oriented database
 
-DISTNAME =	mongodb-src-r2.6.4
+DISTNAME =	mongodb-src-r3.2.6
 PKGNAME =	${DISTNAME:S/src-r//}
 REVISION =	0
 CATEGORIES =	databases
@@ -17,43 +18,58 @@ HOMEPAGE =	http://www.mongodb.org/
 # Apache 2.0 + AGPLv3
 PERMIT_PACKAGE_CDROM =	Yes
 
-WANTLIB =	boost_filesystem-mt boost_program_options-mt boost_system-mt \
-		boost_thread-mt c execinfo m pcap pcre pcrecpp pthread \
-		stdc++ v8 yaml-cpp
+WANTLIB =	c boost_chrono-mt boost_filesystem-mt \
+		boost_program_options-mt boost_regex-mt boost_system-mt \
+		boost_thread-mt execinfo kvm m pcap pcre pcrecpp pthread \
+		estdc++ yaml-cpp z
 
 MASTER_SITES =	http://downloads.mongodb.org/src/
 
-MODULES =	devel/scons
-MODSCONS_FLAGS = --prefix="${PREFIX}" \
-		 --cpppath="${LOCALBASE}/include/nspr" \
-		 --extralib="pcrecpp" \
-		 --usev8 \
-		 --sharedclient \
-		 --full \
-		 --use-system-pcre \
-		 --use-system-boost \
-		 --use-system-v8 \
-		 --use-system-yaml
-
-MAKE_ENV +=	HOME="${HOME}" \
-		TERM="${TERM}" \
-		CXXFLAGS="$(CXXFLAGS)" \
-		LIBmongoclient_VERSION="${LIBmongoclient_VERSION}"
-LIB_DEPENDS =	devel/boost \
-		devel/libexecinfo \
+MODULES =	gcc4 \
+		devel/scons \
+		lang/python
+
+MODGCC4_ARCHS =	amd64
+MODGCC4_LANGS =	c c++
+MODPY_VERSION =	2.7
+ALL_TARGET =	core tools
+MODSCONS_ENV =	CC="${CC}" \
+		CXX="${CXX}" \
+		CCFLAGS="${CFLAGS} -DBOOST_NO_USER_CONFIG" \
+		CXXFLAGS="${CXXFLAGS}" \
+		LINKFLAGS="${LDFLAGS}" \
+		CPPPATH="${LOCALBASE}/include" \
+		LIBPATH="${LOCALBASE}/lib"
+MODSCONS_FLAGS += --prefix="${PREFIX}" \
+		  --opt=on \
+		  --allocator=system \
+		  --use-system-boost \
+		  --use-system-pcre \
+		  --use-system-yaml \
+		  --use-system-zlib \
+		  -j${MAKE_JOBS}
+
+ALL_TARGET =	core tools
+LIB_DEPENDS =	devel/libexecinfo \
+		devel/boost \
 		devel/pcre \
-		devel/yaml-cpp \
-		lang/libv8
+		devel/yaml-cpp
+TEST_DEPENDS =	lang/python/2.7 \
+		textproc/py-yaml \
+		databases/py-mongo
+
+do-install:
+	${SETENV} ${MAKE_ENV} ${MODSCONS_BIN} -C ${WRKSRC} \
+		${MODSCONS_ENV} ${MODSCONS_FLAGS} ${INSTALL_TARGET}
 
 post-install:
 	${INSTALL_DATA_DIR} ${PREFIX}/share/examples/mongodb
 	${INSTALL_DATA} ${FILESDIR}/mongodb.conf \
 	    ${PREFIX}/share/examples/mongodb
 
-# Regression tests require at least 256 file descriptors and ~700MB
 do-test:
 	@${SETENV} ${MAKE_ENV} ${MODSCONS_BIN} -C ${WRKSRC} \
-	    ${MODSCONS_ENV} ${MODSCONS_FLAGS} test && \
-	    ${WRKSRC}/test --dbpath ${WRKSRC}/unittest
+	    ${MODSCONS_ENV} ${MODSCONS_FLAGS} unittests
+	cd ${WRKSRC} && ${MODPY_BIN} buildscripts/resmoke.py --suites=unittests
 
 .include <bsd.port.mk>
diff --git a/distinfo b/distinfo
index 2bf23a9..1139d2f 100644
--- a/distinfo
+++ b/distinfo
@@ -1,2 +1,2 @@
-SHA256 (mongodb-src-r2.6.4.tar.gz) = B1QRpWD123QHAyuWLrtdoWoMypNuqCp9JkOUtNjLmcA=
-SIZE (mongodb-src-r2.6.4.tar.gz) = 14491215
+SHA256 (mongodb-src-r3.2.6.tar.gz) = BBWptQP2LkDSuof1VbVTdXoU+sKB0dalg9jYgLhyCSE=
+SIZE (mongodb-src-r3.2.6.tar.gz) = 29750170
diff --git a/files/mongodb.conf b/files/mongodb.conf
index 004a41e..fb7703d 100644
--- a/files/mongodb.conf
+++ b/files/mongodb.conf
@@ -1,23 +1,20 @@
 # $OpenBSD: mongodb.conf,v 1.1.1.1 2011/06/02 00:26:32 fgsch Exp $
 
-# Sample configuration. See mongod --help for more information.
-# 
-# Note: To disable flag parameters comment them out or remove the line.
+# Sample configuration. See
+#   https://docs.mongodb.org/manual/administration/configuration/
+# for details.
 
-# Location of the database files.
-dbpath = /var/mongodb/data
-
-# Specific IP address that mongod will listen on.
-bind_ip = 127.0.0.1
-
-# Full filename path to where log messages will be written.
-logpath = /var/log/mongodb/mongodb.log
-
-# Append to the existing log file
-logappend =
-
-# Run in the background. Output will be redirected to logpath.
-fork =
-
-# Enable simple read-only REST interface
-rest =
+processManagement:
+  fork: true
+net:
+  # Only listen on the local network interface. Change this only if you
+  # need a public-facing instance and have turned on authorization.
+  bindIp: 127.0.0.1
+storage:
+  dbPath: /var/mongodb/data
+  journal:
+    enabled: true
+systemLog:
+  destination: file
+  path: /var/log/mongodb/mongodb.log
+  logAppend: true
diff --git a/patches/patch-SConstruct b/patches/patch-SConstruct
index aa4c381..2fbe5cb 100644
--- a/patches/patch-SConstruct
+++ b/patches/patch-SConstruct
@@ -1,48 +1,11 @@
-$OpenBSD: patch-SConstruct,v 1.5 2014/12/10 19:59:29 dcoppa Exp $
-
-Fixup detection of yaml-cpp system library
-https://github.com/mongodb/mongo/commit/44b0e3591839525a0c951319540488814e5c25fd
-
---- SConstruct.orig	Fri Aug  8 15:13:51 2014
-+++ SConstruct	Wed Dec 10 09:28:50 2014
-@@ -814,7 +814,6 @@ 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",
-@@ -828,6 +827,7 @@ if nix:
- 
-     env.Append( CPPDEFINES=["_FILE_OFFSET_BITS=64"] )
-     env.Append( CXXFLAGS=["-Wnon-virtual-dtor", "-Woverloaded-virtual"] )
-+    env.Append( CXXFLAGS=os.environ['CXXFLAGS'] )
-     env.Append( LINKFLAGS=["-fPIC", "-pthread"] )
- 
-     # SERVER-9761: Ensure early detection of missing symbols in dependent libraries at program
-@@ -859,14 +859,9 @@ if nix:
-         env.Append( CPPDEFINES=["MONGO_GCOV"] )
-         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"] )
-+            env.Append( CCFLAGS=["-fstack-protector", "-ggdb"] )
-             env.Append( LINKFLAGS=["-fstack-protector"] )
-             env.Append( SHLINKFLAGS=["-fstack-protector"] )
-         env['ENV']['GLIBCXX_FORCE_NEW'] = 1; # play nice with valgrind
-@@ -1352,7 +1347,7 @@ def doConfigure(myenv):
-         conf.FindSysLibDep("stemmer", ["stemmer"])
- 
-     if use_system_version_of_library("yaml"):
--        conf.FindSysLibDep("yaml", ["yaml"])
-+        conf.FindSysLibDep("yaml", ["yaml-cpp"])
- 
-     if use_system_version_of_library("boost"):
-         if not conf.CheckCXXHeader( "boost/filesystem/operations.hpp" ):
+$OpenBSD$
+--- SConstruct.orig	Sat Apr 30 18:18:21 2016
++++ SConstruct	Sat Apr 30 18:20:28 2016
+@@ -831,6 +831,7 @@ envDict = dict(BUILD_ROOT=buildDir,
+                INSTALL_DIR=installDir,
+                CONFIG_HEADER_DEFINES={},
+                LIBDEPS_TAG_EXPANSIONS=[],
++               ENV = {'PATH': os.environ['PATH']},
+                )
+ 
+ env = Environment(variables=env_vars, **envDict)
diff --git a/patches/patch-src_mongo_SConscript b/patches/patch-src_mongo_SConscript
deleted file mode 100644
index 5d006f1..0000000
--- a/patches/patch-src_mongo_SConscript
+++ /dev/null
@@ -1,12 +0,0 @@
-$OpenBSD: patch-src_mongo_SConscript,v 1.2 2014/09/16 17:28:07 jasper Exp $
---- src/mongo/SConscript.orig	Fri Aug  8 22:13:51 2014
-+++ src/mongo/SConscript	Tue Sep 16 16:08:02 2014
-@@ -1163,7 +1163,7 @@ def installBinary( e, name ):
-     if enforce_glibc:
-         e.AddPostAction( name, checkGlibc )
- 
--    if (solaris or linux) and (not has_option("nostrip")):
-+    if not has_option("nostrip"):
-         name = e.Command('stripped/%s' % name, name, Copy('$TARGET', '$SOURCE'))[0]
-         e.AddPostAction(name, 'strip $TARGET')
- 
diff --git a/patches/patch-src_mongo_platform_random_cpp b/patches/patch-src_mongo_platform_random_cpp
deleted file mode 100644
index c3e0f34..0000000
--- a/patches/patch-src_mongo_platform_random_cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-$OpenBSD: patch-src_mongo_platform_random_cpp,v 1.1 2013/12/10 17:30:41 joshe Exp $
---- src/mongo/platform/random.cpp.orig	Thu Oct 17 11:37:56 2013
-+++ src/mongo/platform/random.cpp	Mon Oct 28 20:21:29 2013
-@@ -138,6 +138,21 @@ namespace mongo {
-         return new InputStreamSecureRandom( "/dev/urandom" );
-     }
- 
-+#elif defined(__OpenBSD__)
-+
-+    class ARC4SecureRandom : public SecureRandom {
-+    public:
-+        int64_t nextInt64() {
-+            int64_t n;
-+            arc4random_buf(&n, sizeof(n));
-+            return n;
-+        }
-+    };
-+
-+    SecureRandom* SecureRandom::create() {
-+        return new ARC4SecureRandom();
-+    }
-+
- #else
-     class SRandSecureRandom : public SecureRandom {
-     public:
diff --git a/patches/patch-src_mongo_shell_linenoise_utf8_h b/patches/patch-src_mongo_shell_linenoise_utf8_h
deleted file mode 100644
index 7a74852..0000000
--- a/patches/patch-src_mongo_shell_linenoise_utf8_h
+++ /dev/null
@@ -1,17 +0,0 @@
-$OpenBSD: patch-src_mongo_shell_linenoise_utf8_h,v 1.1 2015/06/29 08:13:50 jasper Exp $
-
-From 2d5d662a834fab72ee1431e3bb0a5ed5a0826177 Mon Sep 17 00:00:00 2001
-From: Mark Benvenuto <mark.benven...@mongodb.com>
-Date: Tue, 19 Aug 2014 15:07:11 -0400
-Subject: [PATCH] SERVER-8994: Boost 1.56 build fixes
-
---- src/mongo/shell/linenoise_utf8.h.orig	Sun Jun 28 22:15:05 2015
-+++ src/mongo/shell/linenoise_utf8.h	Sun Jun 28 22:15:18 2015
-@@ -16,6 +16,7 @@
-  */
- 
- #include <boost/smart_ptr/scoped_array.hpp>
-+#include <algorithm>
- #include <string.h>
- 
- namespace linenoise_utf8 {
diff --git a/patches/patch-src_mongo_util_net_sock_h b/patches/patch-src_mongo_util_net_sock_h
new file mode 100644
index 0000000..44c5b6e
--- /dev/null
+++ b/patches/patch-src_mongo_util_net_sock_h
@@ -0,0 +1,11 @@
+$OpenBSD$
+--- src/mongo/util/net/sock.h.orig	Mon May  2 00:00:19 2016
++++ src/mongo/util/net/sock.h	Mon May  2 00:00:34 2016
+@@ -37,6 +37,7 @@
+ #include <sys/types.h>
+ #include <sys/un.h>
+ #include <errno.h>
++#include <unistd.h>
+ 
+ #ifdef __OpenBSD__
+ #include <sys/uio.h>
diff --git a/patches/patch-src_mongo_util_signal_handlers_synchronous_cpp b/patches/patch-src_mongo_util_signal_handlers_synchronous_cpp
new file mode 100644
index 0000000..6007e06
--- /dev/null
+++ b/patches/patch-src_mongo_util_signal_handlers_synchronous_cpp
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- src/mongo/util/signal_handlers_synchronous.cpp.orig	Thu Apr 21 16:21:39 2016
++++ src/mongo/util/signal_handlers_synchronous.cpp	Sun May  1 23:59:28 2016
+@@ -266,7 +266,7 @@ void abruptQuitWithAddrSignal(int signalNum, siginfo_t
+     MallocFreeOStreamGuard lk{};
+ 
+     const char* action = (signalNum == SIGSEGV || signalNum == SIGBUS) ? "access" : "operation";
+-    mallocFreeOStream << "Invalid " << action << " at address: " << siginfo->si_addr;
++    mallocFreeOStream << "Invalid " << action << " at address: " << reinterpret_cast<void*>(siginfo->si_addr);
+ 
+     // Writing out message to log separate from the stack trace so at least that much gets
+     // logged. This is important because we may get here by jumping to an invalid address which
diff --git a/patches/patch-src_third_party_s2_base_port_h b/patches/patch-src_third_party_s2_base_port_h
deleted file mode 100644
index 501a266..0000000
--- a/patches/patch-src_third_party_s2_base_port_h
+++ /dev/null
@@ -1,30 +0,0 @@
-$OpenBSD: patch-src_third_party_s2_base_port_h,v 1.2 2015/05/01 16:51:24 ajacoutot Exp $
---- src/third_party/s2/base/port.h.orig	Thu Oct 17 11:37:56 2013
-+++ src/third_party/s2/base/port.h	Mon Oct 28 20:57:58 2013
-@@ -100,6 +100,14 @@ typedef uint16_t u_int16_t;
- #define __LITTLE_ENDIAN LITTLE_ENDIAN
- #define __BIG_ENDIAN BIG_ENDIAN
- 
-+#elif defined __OpenBSD__
-+
-+#include <endian.h>
-+/* Let's try and follow the Linux convention */
-+#define __BYTE_ORDER  BYTE_ORDER
-+#define __LITTLE_ENDIAN LITTLE_ENDIAN
-+#define __BIG_ENDIAN BIG_ENDIAN
-+
- #endif
- 
- #if defined __sunos__ || defined __freebsd__
-@@ -134,6 +142,11 @@ typedef uint16_t u_int16_t;
- #define bswap_16(x) bswap16(x)
- #define bswap_32(x) bswap32(x)
- #define bswap_64(x) bswap64(x)
-+#elif defined __OpenBSD__
-+#include <endian.h>
-+#define bswap_16(x) swap16(x)
-+#define bswap_32(x) swap32(x)
-+#define bswap_64(x) swap64(x)
- #else
- #include <byteswap.h>
- #endif
diff --git a/pkg/PLIST b/pkg/PLIST
index 7c6c094..906d75e 100644
--- a/pkg/PLIST
+++ b/pkg/PLIST
@@ -1,20 +1,11 @@
 @comment $OpenBSD: PLIST,v 1.5 2014/09/16 17:28:07 jasper Exp $
 @newgroup _mongodb:670
 @newuser _mongodb:670:670:daemon:MongoDB Account:/nonexistent:/sbin/nologin
-@bin bin/bsondump
 @bin bin/mongo
 @bin bin/mongod
-@bin bin/mongodump
-@bin bin/mongoexport
-@bin bin/mongofiles
-@bin bin/mongoimport
-@bin bin/mongooplog
 @bin bin/mongoperf
-@bin bin/mongorestore
 @bin bin/mongos
 @bin bin/mongosniff
-@bin bin/mongostat
-@bin bin/mongotop
 share/examples/mongodb/
 share/examples/mongodb/mongodb.conf
 @sample ${SYSCONFDIR}/mongodb.conf

Reply via email to