summaryrefslogtreecommitdiff
path: root/databases/mongodb
diff options
context:
space:
mode:
authoradam <adam@pkgsrc.org>2019-03-05 19:35:58 +0000
committeradam <adam@pkgsrc.org>2019-03-05 19:35:58 +0000
commit9eac6f64c05e1616083d3b8ecec35df0e11690d3 (patch)
treec16fc6709ed759f50497450d5c75b13ada8c39a7 /databases/mongodb
parent750319a4223fed36518ef4892728220bea08919b (diff)
downloadpkgsrc-9eac6f64c05e1616083d3b8ecec35df0e11690d3.tar.gz
mongodb: updated to 4.0.6
4.0.6: Issues fixed: SERVER-37778: Platform Support: Add Community & Enterprise Ubuntu 18.04 (zSeries) SERVER-37777: Platform Support: Add Community SLES12 (zSeries) SERVER-37775: Platform Support: Add Community RHEL7 (zSeries) SERVER-39180: Wrong initial chunk owner shard can be selected when sharding non-empty collection with pre-created zones SERVER-32146: Log slow oplog entry application SERVER-38293: Make listDatabases understand collection privileges SERVER-38887: Mongo.getDBs() does not correctly inspect privileges 4.0.5: Issues fixed: SERVER-36437: The dbstats command should lock the database in MODE_IS instead of MODE_S SERVER-37182: Different values when referencing whole object vs. a field of that object after $arrayToObject SERVER-37200: $match stage following $listSessions not working against mongos SERVER-37557: Add startup warning about enableMajorityReadConcern and usage of arbiters 4.0.4: Issues fixed: SERVER-26854: LockStats for sub-operations should not include time for previous sub ops SERVER-35323: sessionId matching ignores userId part of the lsid SERVER-37058: Update with numeric field names inside an array can cause validation to fail SERVER-37132: Negation of $in with regex can incorrectly plan from the cache, leading to missing query results TOOLS-2069: mongoreplay does not support SCRAM-SHA-256 TOOLS-2131: mongorestore hang in replaying oplog with –archive and –oplogReplay option 4.0.3: Issues fixed: SERVER-19815: Make repair more robust with the WiredTiger storage engine SERVER-35989: db.collection.countDocuments() and db.collection.estimatedDocumentCount() helpers SERVER-36982: Reintroduce enableMajorityReadConcern:false server parameter 4.0.2: Issues fixed: SERVER-35720: Allow zones to be created on non-existent collection SERVER-35441: drop/dropDatabase does not cleanup config.tags SERVER-36102: Create initial chunks on appropriate shards for zoned sharding SERVER-36070: Aggregation with $out results in error when Auditing is enabled SERVER-34846: Covered index with collated field returns incorrect result when collation not involved in match or sort SERVER-34664: Commands that are unsupported in a transaction should error 4.0.1: Issues fixed: SERVER-33000: Platform Support: add Ubuntu 18.04. SERVER-34933: PCRE verb support. SERVER-35101: Handle bindIp argument that contains whitespaces. SERVER-36027: Enterprise build does not recognize the --redactClientLogData flag.
Diffstat (limited to 'databases/mongodb')
-rw-r--r--databases/mongodb/Makefile129
-rw-r--r--databases/mongodb/PLIST7
-rw-r--r--databases/mongodb/distinfo49
-rw-r--r--databases/mongodb/options.mk11
-rw-r--r--databases/mongodb/patches/patch-SConstruct215
-rw-r--r--databases/mongodb/patches/patch-debian_mongod.conf23
-rw-r--r--databases/mongodb/patches/patch-site__scons_mongo_platform.py26
-rw-r--r--databases/mongodb/patches/patch-site__scons_site__tools_libtool.py15
-rw-r--r--databases/mongodb/patches/patch-src_mongo_base_initializer.h7
-rw-r--r--databases/mongodb/patches/patch-src_mongo_db_dbwebserver.cpp20
-rw-r--r--databases/mongodb/patches/patch-src_mongo_db_fts_unicode_string.cpp15
-rw-r--r--databases/mongodb/patches/patch-src_mongo_db_matcher_expression__leaf.cpp14
-rw-r--r--databases/mongodb/patches/patch-src_mongo_db_repl_master__slave.cpp20
-rw-r--r--databases/mongodb/patches/patch-src_mongo_db_repl_oplog__fetcher.cpp15
-rw-r--r--databases/mongodb/patches/patch-src_mongo_installer_msi_SConscript15
-rw-r--r--databases/mongodb/patches/patch-src_mongo_platform_random.cpp9
-rw-r--r--databases/mongodb/patches/patch-src_mongo_platform_stack__locator__dragonfly.cpp63
-rw-r--r--databases/mongodb/patches/patch-src_mongo_platform_stack__locator__netbsd.cpp82
-rw-r--r--databases/mongodb/patches/patch-src_mongo_shell_bench.cpp20
-rw-r--r--databases/mongodb/patches/patch-src_mongo_shell_linenoise__utf8.h11
-rw-r--r--databases/mongodb/patches/patch-src_mongo_util_intrusive__counter.h4
-rw-r--r--databases/mongodb/patches/patch-src_mongo_util_net_miniwebserver.cpp20
-rw-r--r--databases/mongodb/patches/patch-src_mongo_util_processinfo__dragonfly.cpp195
-rw-r--r--databases/mongodb/patches/patch-src_mongo_util_processinfo__netbsd.cpp251
-rw-r--r--databases/mongodb/patches/patch-src_mongo_util_time__support.cpp15
-rw-r--r--databases/mongodb/patches/patch-src_third__party_IntelRDFPMathLib20U1_LIBRARY_float128_dpml__exception.c12
-rw-r--r--databases/mongodb/patches/patch-src_third__party_IntelRDFPMathLib20U1_LIBRARY_float128_op__system.h4
-rw-r--r--databases/mongodb/patches/patch-src_third__party_IntelRDFPMathLib20U1_LIBRARY_src_bid__functions.h12
-rw-r--r--databases/mongodb/patches/patch-src_third__party_asio-master_asio_include_asio_detail_config.hpp26
-rw-r--r--databases/mongodb/patches/patch-src_third__party_wiredtiger_SConscript13
-rw-r--r--databases/mongodb/patches/patch-src_third__party_wiredtiger_build__dragonfly_wiredtiger__config.h159
-rw-r--r--databases/mongodb/patches/patch-src_third__party_wiredtiger_build__netbsd_wiredtiger__config.h161
32 files changed, 341 insertions, 1297 deletions
diff --git a/databases/mongodb/Makefile b/databases/mongodb/Makefile
index 0a560d01249..18409683051 100644
--- a/databases/mongodb/Makefile
+++ b/databases/mongodb/Makefile
@@ -1,13 +1,12 @@
-# $NetBSD: Makefile,v 1.32 2019/01/02 20:25:00 tnn Exp $
+# $NetBSD: Makefile,v 1.33 2019/03/05 19:35:58 adam Exp $
-DISTNAME= mongodb-src-r3.4.4
-PKGNAME= ${DISTNAME:S/src-r//:S/-rc/rc/}
-PKGREVISION= 6
+DISTNAME= mongodb-src-r4.0.6
+PKGNAME= ${DISTNAME:S/src-r//}
CATEGORIES= databases
MASTER_SITES= http://fastdl.mongodb.org/src/
MAINTAINER= bartosz.kuzma@gmail.com
-HOMEPAGE= http://mongodb.org/
+HOMEPAGE= https://www.mongodb.com/
COMMENT= NoSQL distributed document-oriented database
LICENSE= gnu-agpl-v3 # Client and tools licensed under apache-2.0
@@ -16,31 +15,40 @@ NOT_FOR_PLATFORM+= *-*-i386
EXTRACT_USING= bsdtar
+BUILD_DEPENDS+= ${PYPKGPREFIX}-cheetah-[0-9]*:../../devel/py-cheetah
+BUILD_DEPENDS+= ${PYPKGPREFIX}-typing-[0-9]*:../../devel/py-typing
+BUILD_DEPENDS+= ${PYPKGPREFIX}-regex-[0-9]*:../../textproc/py-regex
+BUILD_DEPENDS+= ${PYPKGPREFIX}-yaml-[0-9]*:../../textproc/py-yaml
+
NO_CONFIGURE= yes
USE_LANGUAGES= c c++
+USE_TOOLS+= pkg-config
SCONS_ARGS= ${_MAKE_JOBS}
+SCONS_ARGS+= --disable-warnings-as-errors
+SCONS_ARGS+= --release
+SCONS_ARGS+= --runtime-hardening=off # does not produce executables
+#SCONS_ARGS+= --use-system-asio
SCONS_ARGS+= --use-system-boost
+#SCONS_ARGS+= --use-system-icu # fails with >57.1
+SCONS_ARGS+= --use-system-mongo-c
SCONS_ARGS+= --use-system-pcre
SCONS_ARGS+= --use-system-snappy
+SCONS_ARGS+= --use-system-sqlite
SCONS_ARGS+= --use-system-tcmalloc
+#SCONS_ARGS+= --use-system-wiredtiger
SCONS_ARGS+= --use-system-yaml
SCONS_ARGS+= --use-system-zlib
-SCONS_ARGS+= --js-engine=mozjs
-SCONS_ARGS+= --release
-PYTHON_VERSIONS_INCOMPATIBLE= 34 35 36 37 # not yet supported as of 3.0.4
+PYTHON_VERSIONS_ACCEPTED= 27
.include "../../mk/bsd.prefs.mk"
-# XXX this doesn't work for some reason
-#.if !empty(INSTALL_UNSTRIPPED:Uno:M[Yy][Ee][Ss])
-#SCONS_ARGS+= --nostrip
-#.endif
-
GCC_REQD+= 5.3.0
-
-CPPFLAGS+= -fno-jump-tables
+CPPFLAGS+= -fno-jump-tables # XXX: still needed?
+INCL_PATH+= ${BUILDLINK_PREFIX.mongo-c-driver}/include/libbson-1.0
+INCL_PATH+= ${BUILDLINK_PREFIX.mongo-c-driver}/include/libmongoc-1.0
+LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib -L${PREFIX}/lib
.include "options.mk"
@@ -53,6 +61,7 @@ BUILD_DEFS+= MONGODB_LOGPATH
MONGODB_USER?= mongodb
MONGODB_GROUP?= mongodb
MONGODB_DBPATH?= ${VARBASE}/mongodb
+MONGODB_CONFIGDBPATH?= ${VARBASE}/mongoconfigdb
MONGODB_LOGPATH?= ${VARBASE}/log/mongodb
PKG_USERS_VARS+= MONGODB_USER
@@ -65,34 +74,37 @@ PKG_GECOS.${MONGODB_USER}= MongoDB database administrator
PKG_HOME.${MONGODB_USER}= ${MONGODB_DBPATH}
PKG_SHELL.${MONGODB_USER}= ${SH}
-OWN_DIRS_PERMS+= ${MONGODB_DBPATH} ${MONGODB_USER} ${MONGODB_GROUP} 0755
-OWN_DIRS_PERMS+= ${MONGODB_DBPATH}/journal ${MONGODB_USER} ${MONGODB_GROUP} 0755
-OWN_DIRS_PERMS+= ${MONGODB_LOGPATH} ${MONGODB_USER} ${MONGODB_GROUP} 0755
+OWN_DIRS_PERMS+= ${MONGODB_DBPATH:Q} ${MONGODB_USER} ${MONGODB_GROUP} 0755
+OWN_DIRS_PERMS+= ${MONGODB_DBPATH:Q}/journal ${MONGODB_USER} ${MONGODB_GROUP} 0755
+OWN_DIRS_PERMS+= ${MONGODB_LOGPATH:Q} ${MONGODB_USER} ${MONGODB_GROUP} 0755
FILES_SUBST+= MONGODB_USER=${MONGODB_USER}
FILES_SUBST+= MONGODB_GROUP=${MONGODB_GROUP}
FILES_SUBST+= MONGODB_DBPATH=${MONGODB_DBPATH}
FILES_SUBST+= MONGODB_LOGPATH=${MONGODB_LOGPATH}
-# XXX No better idea how to pass CXXFLAGS and LDFLAGS to scons
-SUBST_CLASSES+= scons
-SUBST_STAGE.scons= pre-build
-SUBST_FILES.scons= SConstruct
-SUBST_VARS.scons= PREFIX CXXFLAGS LDFLAGS
-
SUBST_CLASSES+= path
SUBST_STAGE.path= pre-build
-SUBST_FILES.path= src/mongo/db/flushtest.cpp debian/mongod.conf
-SUBST_FILES.path+= debian/mongod.1 debian/mongo.1 src/mongo/shell/dbshell.cpp
-SUBST_SED.path= -e 's|/data/db|${MONGODB_DBPATH}|g'
-SUBST_SED.path+= -e 's|/etc|${PKG_SYSCONFDIR}|'
-SUBST_VARS.path= MONGODB_DBPATH MONGODB_LOGPATH
-
-LDFLAGS+= ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.boost-libs}/lib
-
-MONGODB_MAN_FILES= bsondump.1 mongo.1 mongod.1 mongodump.1 mongoexport.1 \
- mongofiles.1 mongoimport.1 mongooplog.1 mongoperf.1 \
- mongorestore.1 mongos.1 mongosniff.1 mongostat.1 mongotop.1
+SUBST_MESSAGE.path= Replacing database paths.
+SUBST_FILES.path= debian/mongo.1 debian/mongod.1
+SUBST_FILES.path+= src/mongo/db/mongod_options.cpp
+SUBST_FILES.path+= src/mongo/db/storage/storage_options.cpp
+SUBST_SED.path= -e 's,/data/db,${MONGODB_DBPATH},g'
+SUBST_SED.path+= -e 's,/data/configdb,${MONGODB_CONFIGDBPATH},g'
+SUBST_SED.path+= -e 's,/etc,${PKG_SYSCONFDIR},g'
+
+SUBST_CLASSES+= varbase
+SUBST_STAGE.varbase= pre-build
+SUBST_MESSAGE.varbase= Changing /var to ${VARBASE}.
+SUBST_FILES.varbase= debian/mongod.conf
+SUBST_SED.varbase= -e 's,/var/lib,${VARBASE},g'
+SUBST_SED.varbase+= -e 's,/var/log,${VARBASE},g'
+
+SUBST_CLASSES+= python
+SUBST_STAGE.python= pre-build
+SUBST_MESSAGE.python= Replacing Python interpreter.
+SUBST_FILES.python= src/mongo/installer/compass/install_compass.in
+SUBST_SED.python= -e 's,@python_interpreter@,${PYTHONBIN},'
NOT_PAX_MPROTECT_SAFE+= bin/mongo bin/mongod
@@ -103,42 +115,61 @@ INSTALLATION_DIRS+= share/doc/mongodb share/examples/mongodb ${PKGMANDIR}/man1
CONF_FILES+= share/examples/mongodb/mongod.conf \
${PKG_SYSCONFDIR}/mongod.conf
+# Copy system specific files for NetBSD and DragonFly
post-extract:
- chmod -R g-w ${WRKSRC}
- cp -r ${WRKSRC}/src/third_party/mozjs-45/platform/x86_64/freebsd \
+ ${CHMOD} -R g-w ${WRKSRC}
+ ${CP} -R ${WRKSRC}/src/third_party/mozjs-45/platform/x86_64/freebsd \
${WRKSRC}/src/third_party/mozjs-45/platform/x86_64/dragonfly
- cp -r ${WRKSRC}/src/third_party/mozjs-45/platform/x86_64/openbsd \
+ ${CP} -R ${WRKSRC}/src/third_party/mozjs-45/platform/x86_64/openbsd \
${WRKSRC}/src/third_party/mozjs-45/platform/x86_64/netbsd
- cp ${WRKSRC}/src/mongo/db/ftdc/ftdc_system_stats_openbsd.cpp \
+ ${CP} ${WRKSRC}/src/mongo/db/ftdc/ftdc_system_stats_openbsd.cpp \
${WRKSRC}/src/mongo/db/ftdc/ftdc_system_stats_netbsd.cpp
+ ${CP} ${WRKSRC}/src/mongo/db/ftdc/ftdc_system_stats_freebsd.cpp \
+ ${WRKSRC}/src/mongo/db/ftdc/ftdc_system_stats_dragonfly.cpp
+ ${CP} ${WRKSRC}/src/mongo/util/processinfo_openbsd.cpp \
+ ${WRKSRC}/src/mongo/util/processinfo_netbsd.cpp
+ ${CP} ${WRKSRC}/src/mongo/util/processinfo_freebsd.cpp \
+ ${WRKSRC}/src/mongo/util/processinfo_dragonfly.cpp
+ ${CP} ${WRKSRC}/src/mongo/platform/stack_locator_freebsd.cpp \
+ ${WRKSRC}/src/mongo/platform/stack_locator_netbsd.cpp
+ ${CP} ${WRKSRC}/src/mongo/platform/stack_locator_freebsd.cpp \
+ ${WRKSRC}/src/mongo/platform/stack_locator_dragonfly.cpp
+ ${CP} -R ${WRKSRC}/src/third_party/wiredtiger/build_openbsd \
+ ${WRKSRC}/src/third_party/wiredtiger/build_netbsd
+ ${CP} -R ${WRKSRC}/src/third_party/wiredtiger/build_freebsd \
+ ${WRKSRC}/src/third_party/wiredtiger/build_dragonfly
do-build:
- cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${SCONSBIN} ${SCONS_ARGS} core
+ cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${SCONSBIN} ${SCONS_ARGS} \
+ CC=${CC:Q} CXX=${CXX:Q} CFLAGS=${CFLAGS:Q} CXXFLAGS=${CXXFLAGS:Q} \
+ LINKFLAGS=${LDFLAGS:Q} CPPPATH=${INCL_PATH:Q} VERBOSE=1 core
do-install:
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${SCONSBIN} ${SCONS_ARGS} \
- --prefix=${DESTDIR}${PREFIX} install
-
-do-test:
- cd ${WRKSRC} && ./test
+ CC=${CC:Q} CXX=${CXX:Q} CFLAGS=${CFLAGS:Q} CXXFLAGS=${CXXFLAGS:Q} \
+ LINKFLAGS=${LDFLAGS:Q} CPPPATH=${INCL_PATH:Q} \
+ --prefix=${DESTDIR}${PREFIX} install
post-install:
${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${PREFIX}/share/doc/mongodb
-.for file in ${MONGODB_MAN_FILES}
- ${INSTALL_MAN} ${WRKSRC}/debian/${file} \
- ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
-.endfor
+ ${INSTALL_MAN} ${WRKSRC}/debian/*.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
${INSTALL_DATA} ${WRKSRC}/debian/mongod.conf \
${DESTDIR}${PREFIX}/share/examples/mongodb
+.include "../../databases/mongo-c-driver/buildlink3.mk"
+.include "../../databases/sqlite3/buildlink3.mk"
+#.include "../../databases/wiredtiger/buildlink3.mk"
+#.include "../../devel/asio/buildlink3.mk"
.include "../../devel/boost-headers/buildlink3.mk"
.include "../../devel/boost-libs/buildlink3.mk"
-.include "../../devel/py-boost/buildlink3.mk"
.include "../../devel/libexecinfo/buildlink3.mk"
.include "../../devel/pcre/buildlink3.mk"
.include "../../devel/scons/buildlink3.mk"
.include "../../devel/snappy/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
+.include "../../lang/python/pyversion.mk"
.include "../../net/libpcap/buildlink3.mk"
+#.include "../../textproc/icu/buildlink3.mk"
.include "../../textproc/yaml-cpp/buildlink3.mk"
+.include "../../www/curl/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/databases/mongodb/PLIST b/databases/mongodb/PLIST
index c3e1c9abd2e..dee025ed0b1 100644
--- a/databases/mongodb/PLIST
+++ b/databases/mongodb/PLIST
@@ -1,7 +1,7 @@
-@comment $NetBSD: PLIST,v 1.2 2017/05/29 14:44:46 ryoon Exp $
+@comment $NetBSD: PLIST,v 1.3 2019/03/05 19:35:58 adam Exp $
+bin/install_compass
bin/mongo
bin/mongod
-bin/mongoperf
bin/mongos
man/man1/bsondump.1
man/man1/mongo.1
@@ -10,11 +10,8 @@ man/man1/mongodump.1
man/man1/mongoexport.1
man/man1/mongofiles.1
man/man1/mongoimport.1
-man/man1/mongooplog.1
-man/man1/mongoperf.1
man/man1/mongorestore.1
man/man1/mongos.1
-man/man1/mongosniff.1
man/man1/mongostat.1
man/man1/mongotop.1
share/doc/mongodb/README
diff --git a/databases/mongodb/distinfo b/databases/mongodb/distinfo
index bb36fc50c04..06d7476c6ec 100644
--- a/databases/mongodb/distinfo
+++ b/databases/mongodb/distinfo
@@ -1,34 +1,25 @@
-$NetBSD: distinfo,v 1.23 2018/08/29 14:10:47 tnn Exp $
+$NetBSD: distinfo,v 1.24 2019/03/05 19:35:58 adam Exp $
-SHA1 (mongodb-src-r3.4.4.tar.gz) = 6f9f2d8a3c1c2f4089fd03f8be0b86ff0431d955
-RMD160 (mongodb-src-r3.4.4.tar.gz) = 2a65f380204a92762ceea2be35dbe2c671e106f6
-SHA512 (mongodb-src-r3.4.4.tar.gz) = dbae89b49c363e7258021cd31385e4449bfdfdfd5adfcb1683e4431372731e58ec33bf8f7576d2d52659a52461bd6a32fbc67d5c6e36d52184ec1aabb345d940
-Size (mongodb-src-r3.4.4.tar.gz) = 39867133 bytes
-SHA1 (patch-SConstruct) = 6ec188274fb25614494ec192be7809a6a01962de
-SHA1 (patch-debian_mongod.conf) = e5074b5f7ad50560b99d652feab58da764ba542c
-SHA1 (patch-src_mongo_base_initializer.h) = add32c5940c922a98122d0e6883eb3ad52dc25c5
-SHA1 (patch-src_mongo_db_dbwebserver.cpp) = 1e7bb9588930742839d2bc9e26b33751a64f98c7
-SHA1 (patch-src_mongo_db_fts_unicode_string.cpp) = 98c5b1b39c07190f08ec9f22ec3002b0a803f72f
-SHA1 (patch-src_mongo_db_matcher_expression__leaf.cpp) = 52064034fabb5de63eccf87ddd140303c54f0312
+SHA1 (mongodb-src-r4.0.6.tar.gz) = 460caeb57bae951c0c019e0519c58695902d3f9c
+RMD160 (mongodb-src-r4.0.6.tar.gz) = 4bcb89f6e386699723119da71071a9bfb15742e9
+SHA512 (mongodb-src-r4.0.6.tar.gz) = 72e04154cf221833522bb0c2cc99acc2a86d20e2dcbf1f8c6ff0a870edf7b2529a55b6821c664805c00c12a311ae374a276ef1e3ccea1ed84fb125bb8726906a
+Size (mongodb-src-r4.0.6.tar.gz) = 49511958 bytes
+SHA1 (patch-SConstruct) = ec9987638b202ed8314667993c03414a1601563c
+SHA1 (patch-site__scons_mongo_platform.py) = ae62ec86206b9e20bd82c4b22621cab887390c72
+SHA1 (patch-site__scons_site__tools_libtool.py) = 2fb5947703f4292acc1306f92ca7938e8cbc62e0
+SHA1 (patch-src_mongo_base_initializer.h) = 675d655f4472f055a1d10144bbbebd75fbde6cb2
+SHA1 (patch-src_mongo_db_matcher_expression__leaf.cpp) = f95cd3fc88f1dfdf0d3aa5431d0c3407da020dfa
SHA1 (patch-src_mongo_db_repl_isself.c) = 82321c918b91ce1a68ce79c14589126aca6baf96
-SHA1 (patch-src_mongo_db_repl_master__slave.cpp) = 2f37f0819a2b2743df01f6b6ab0b3013b3b7d726
-SHA1 (patch-src_mongo_db_repl_oplog__fetcher.cpp) = e12dbfbd4e70ee210cdd4eb0582661666e8eb06a
-SHA1 (patch-src_mongo_installer_msi_SConscript) = 78424fa10f90470dd941b900ef8fd131d28f6e65
-SHA1 (patch-src_mongo_platform_random.cpp) = 59c31e55fc2dc5a2b82b8f16dacf8736d8354cdb
-SHA1 (patch-src_mongo_platform_stack__locator__dragonfly.cpp) = fb885c491e4de1cfbc2875620d854af726e5b45f
-SHA1 (patch-src_mongo_platform_stack__locator__netbsd.cpp) = 3b09e86b2401555b6ab4c31d14c0693d766119c2
-SHA1 (patch-src_mongo_shell_bench.cpp) = c0fd15347d35e37daf87b642148215dee3ab7220
-SHA1 (patch-src_mongo_shell_linenoise__utf8.h) = f975925f56125d48b5124894fa1adf1382a634d2
-SHA1 (patch-src_mongo_util_intrusive__counter.h) = 9f1af59e1bc86e33bf183a6dda1737007afc7a18
-SHA1 (patch-src_mongo_util_net_miniwebserver.cpp) = 3715e826b8d03793066a84b2c1680c32c6ee6368
-SHA1 (patch-src_mongo_util_processinfo__dragonfly.cpp) = 62c236ce820dfe81f45625b15e022cca0f2c10ee
-SHA1 (patch-src_mongo_util_processinfo__netbsd.cpp) = 6eabe5ffec4168bb9ba8a58b7d742772d38b4714
-SHA1 (patch-src_third__party_IntelRDFPMathLib20U1_LIBRARY_float128_dpml__exception.c) = ef3b260e8a49227cbbabf427500b7c70bce15083
-SHA1 (patch-src_third__party_IntelRDFPMathLib20U1_LIBRARY_float128_op__system.h) = 39f6fba82e2870ee4a5d99785033621225a72a16
-SHA1 (patch-src_third__party_IntelRDFPMathLib20U1_LIBRARY_src_bid__functions.h) = d3a85d3a3b33691466c65cdf51c56f221429aea9
+SHA1 (patch-src_mongo_platform_random.cpp) = e6265dc33d1de7e9bfce63fa96aad67bb762e789
+SHA1 (patch-src_mongo_platform_stack__locator__netbsd.cpp) = 0826e976048c79598ead6146f143ab3b4a2577fb
+SHA1 (patch-src_mongo_shell_linenoise__utf8.h) = a29cbf034716ce48a23192320caf4928282b6c1a
+SHA1 (patch-src_mongo_util_intrusive__counter.h) = 4c8e0d2e834686403a557de489ad518071851911
+SHA1 (patch-src_mongo_util_processinfo__netbsd.cpp) = fec6c7304f253204ccc03c11e93f6c430453c980
+SHA1 (patch-src_mongo_util_time__support.cpp) = 29dc7b0a0d278d2f92ae63882e87ce674d258ccf
+SHA1 (patch-src_third__party_IntelRDFPMathLib20U1_LIBRARY_float128_op__system.h) = 6cb2473f13ec3f8946959f3dfb94a70e95965703
+SHA1 (patch-src_third__party_IntelRDFPMathLib20U1_LIBRARY_src_bid__functions.h) = aed897879501d74b19dd06a142ded0abf910898d
+SHA1 (patch-src_third__party_asio-master_asio_include_asio_detail_config.hpp) = c7464a56a2eb03fdb93f8ab90bf5732f6a0f9095
SHA1 (patch-src_third__party_mozjs-38_platform_x86__64_netbsd_build_js-confdefs.h) = c2ad1041b5c1ff9fac9085d2a8963781f51873a8
SHA1 (patch-src_third__party_mozjs-38_platform_x86__64_netbsd_include_js-config.h) = 7ddbb4e3bf4126a1be2195acc82ff859e8130a01
SHA1 (patch-src_third__party_s2_base_port.h) = 892ce91b5aaa432f34e1e7c169b7fd6eea2a3e94
-SHA1 (patch-src_third__party_wiredtiger_SConscript) = 71fd2326a4e95fec674326225bce5ccf5793aa5a
-SHA1 (patch-src_third__party_wiredtiger_build__dragonfly_wiredtiger__config.h) = 0b00da401f832d985107dfa5dcc6447db4beec6d
-SHA1 (patch-src_third__party_wiredtiger_build__netbsd_wiredtiger__config.h) = edd3c4e5784e52ad0078bcb7ef1e0902bc354285
+SHA1 (patch-src_third__party_wiredtiger_SConscript) = e97dea310463f246c0a8007a1ba9c5385105036d
diff --git a/databases/mongodb/options.mk b/databases/mongodb/options.mk
index 040dcaf11cf..90dd7e7d8bd 100644
--- a/databases/mongodb/options.mk
+++ b/databases/mongodb/options.mk
@@ -1,25 +1,20 @@
-# $NetBSD: options.mk,v 1.3 2016/02/26 16:03:09 fhajny Exp $
+# $NetBSD: options.mk,v 1.4 2019/03/05 19:35:58 adam Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.mongodb
PKG_SUPPORTED_OPTIONS= ssl wiredtiger
-PKG_SUGGESTED_OPTIONS= #
-
-.if !empty(MACHINE_ARCH:Mx86_64)
-PKG_SUGGESTED_OPTIONS+= wiredtiger
-.endif
.include "../../mk/bsd.options.mk"
.if !empty(PKG_OPTIONS:Mssl)
.include "../../security/openssl/buildlink3.mk"
-SCONS_ARGS+= --ssl
+SCONS_ARGS+= --ssl=openssl
.endif
# The prospect of using databases/wiredtiger is unclear yet;
# MongoDB doesn't provide guarantees for non-bundled WiredTiger:
# https://groups.google.com/forum/#!msg/mongodb-dev/31FQSo4KVCI/Fx-WtJ9fzU4J
.if !empty(PKG_OPTIONS:Mwiredtiger)
-. if empty(MACHINE_ARCH:Mx86_64)
+. if ${MACHINE_ARCH} == "x86_64"
PKG_FAIL_REASON+= "WiredTiger is not supported on 32-bit platforms"
. endif
SCONS_ARGS+= --wiredtiger=on
diff --git a/databases/mongodb/patches/patch-SConstruct b/databases/mongodb/patches/patch-SConstruct
index 5ee02944c46..ec843f8aca1 100644
--- a/databases/mongodb/patches/patch-SConstruct
+++ b/databases/mongodb/patches/patch-SConstruct
@@ -1,78 +1,14 @@
-$NetBSD: patch-SConstruct,v 1.7 2017/10/08 22:17:06 tnn Exp $
+$NetBSD: patch-SConstruct,v 1.8 2019/03/05 19:35:58 adam Exp $
-Add support for NetBSD/Dragonfly, fix locations.
-Respect LDFLAGS and CXXFLAGS
+Add support for NetBSD and Dragonfly.
+Fix locations.
+Don't compile with debug info.
+Don't mess with the linker.
+Respect LDFLAGS and CXXFLAGS.
---- SConstruct.orig 2017-04-20 21:43:42.000000000 +0000
+--- SConstruct.orig 2019-01-30 14:26:33.000000000 +0000
+++ SConstruct
-@@ -30,7 +30,7 @@ EnsureSConsVersion( 2, 3, 0 )
- def print_build_failures():
- from SCons.Script import GetBuildFailures
- for bf in GetBuildFailures():
-- print "%s failed: %s" % (bf.node, bf.errstr)
-+ print("%s failed: %s" % (bf.node, bf.errstr))
- atexit.register(print_build_failures)
-
- def versiontuple(v):
-@@ -49,8 +49,12 @@ def get_running_os_name():
- running_os = os.sys.platform
- if running_os.startswith('linux'):
- running_os = 'linux'
-+ elif running_os.startswith('dragonfly'):
-+ running_os = 'dragonfly'
- elif running_os.startswith('freebsd'):
- running_os = 'freebsd'
-+ elif running_os.startswith('netbsd'):
-+ running_os = 'netbsd'
- elif running_os.startswith('openbsd'):
- running_os = 'openbsd'
- elif running_os == 'sunos5':
-@@ -68,7 +72,7 @@ def env_get_os_name_wrapper(self):
-
- def is_os_raw(target_os, os_list_to_check):
- okay = False
-- posix_os_list = [ 'linux', 'openbsd', 'freebsd', 'osx', 'solaris' ]
-+ posix_os_list = [ 'linux', 'openbsd', 'freebsd', 'osx', 'solaris', 'dragonfly', 'netbsd' ]
-
- for p in os_list_to_check:
- if p == 'posix' and target_os in posix_os_list:
-@@ -511,7 +515,7 @@ try:
- version_data = json.load(version_fp)
-
- if 'version' not in version_data:
-- print "version.json does not contain a version string"
-+ print("version.json does not contain a version string")
- Exit(1)
- if 'githash' not in version_data:
- version_data['githash'] = utils.getGitVersion()
-@@ -519,7 +523,7 @@ try:
- except IOError as e:
- # If the file error wasn't because the file is missing, error out
- if e.errno != errno.ENOENT:
-- print "Error opening version.json: {0}".format(e.strerror)
-+ print("Error opening version.json: {0}".format(e.strerror))
- Exit(1)
-
- version_data = {
-@@ -528,7 +532,7 @@ except IOError as e:
- }
-
- except ValueError as e:
-- print "Error decoding version.json: {0}".format(e)
-+ print("Error decoding version.json: {0}".format(e))
- Exit(1)
-
- # Setup the command-line variables
-@@ -598,7 +602,7 @@ def variable_distsrc_converter(val):
-
- variables_files = variable_shlex_converter(get_option('variables-files'))
- for file in variables_files:
-- print "Using variable customization file %s" % file
-+ print("Using variable customization file %s" % file)
-
- env_vars = Variables(
- files=variables_files,
-@@ -892,6 +896,7 @@ envDict = dict(BUILD_ROOT=buildDir,
+@@ -974,6 +974,7 @@ envDict = dict(BUILD_ROOT=buildDir,
INSTALL_DIR=installDir,
CONFIG_HEADER_DEFINES={},
LIBDEPS_TAG_EXPANSIONS=[],
@@ -80,95 +16,50 @@ Respect LDFLAGS and CXXFLAGS
)
env = Environment(variables=env_vars, **envDict)
-@@ -901,12 +906,12 @@ env.AddMethod(env_os_is_wrapper, 'Target
- env.AddMethod(env_get_os_name_wrapper, 'GetTargetOSName')
-
- def fatal_error(env, msg, *args):
-- print msg.format(*args)
-+ print(msg.format(*args))
- Exit(1)
-
- def conf_error(env, msg, *args):
-- print msg.format(*args)
-- print "See {0} for details".format(env['CONFIGURELOG'].abspath)
-+ print(msg.format(*args))
-+ print("See {0} for details".format(env['CONFIGURELOG'].abspath))
-
- Exit(1)
-
-@@ -926,7 +931,7 @@ else:
- env.AddMethod(lambda env: env['VERBOSE'], 'Verbose')
-
- if has_option('variables-help'):
-- print env_vars.GenerateHelpText(env)
-+ print(env_vars.GenerateHelpText(env))
- Exit(0)
-
- unknown_vars = env_vars.UnknownVariables()
-@@ -1029,7 +1034,9 @@ def CheckForProcessor(context, which_arc
+@@ -1110,7 +1111,9 @@ def CheckForProcessor(context, which_arc
os_macros = {
- "windows": "_WIN32",
- "solaris": "__sun",
-+ "dragonfly": "__DragonFly__",
- "freebsd": "__FreeBSD__",
-+ "netbsd": "__NetBSD__",
- "openbsd": "__OpenBSD__",
- "osx": "__APPLE__",
- "linux": "__linux__",
-@@ -1124,7 +1131,7 @@ else:
- env['TARGET_ARCH'] = detected_processor
-
- if env['TARGET_OS'] not in os_macros:
-- print "No special config for [{0}] which probably means it won't work".format(env['TARGET_OS'])
-+ print("No special config for [{0}] which probably means it won't work".format(env['TARGET_OS']))
- elif not detectConf.CheckForOS(env['TARGET_OS']):
- env.ConfError("TARGET_OS ({0}) is not supported by compiler", env['TARGET_OS'])
-
-@@ -1360,7 +1367,7 @@ elif env['_LIBDEPS'] == '$_LIBDEPS_LIBS'
-
- libdeps.setup_environment(env, emitting_shared=(link_model.startswith("dynamic")))
+ "windows": "defined(_WIN32)",
+ "solaris": "defined(__sun)",
++ "dragonfly": "defined(__DragonFly__)",
+ "freebsd": "defined(__FreeBSD__)",
++ "netbsd": "defined(__NetBSD__)",
+ "openbsd": "defined(__OpenBSD__)",
+ "iOS": "defined(__APPLE__) && TARGET_OS_IOS && !TARGET_OS_SIMULATOR",
+ "iOS-sim": "defined(__APPLE__) && TARGET_OS_IOS && TARGET_OS_SIMULATOR",
+@@ -1514,7 +1517,7 @@ if env['_LIBDEPS'] == '$_LIBDEPS_LIBS':
+ if not env.TargetOSIs('solaris', 'darwin', 'windows', 'openbsd'):
+ env.Tool('thin_archive')
-if env.TargetOSIs('linux', 'freebsd', 'openbsd'):
+if env.TargetOSIs('linux', 'dragonfly', 'freebsd', 'netbsd', 'openbsd'):
env['LINK_LIBGROUP_START'] = '-Wl,--start-group'
env['LINK_LIBGROUP_END'] = '-Wl,--end-group'
- env['LINK_WHOLE_ARCHIVE_START'] = '-Wl,--whole-archive'
-@@ -1388,10 +1395,24 @@ if env.TargetOSIs('linux'):
- elif env.TargetOSIs('solaris'):
- env.Append( LIBS=["socket","resolv","lgrp"] )
-
-+elif os.sys.platform.startswith( "dragonfly" ):
-+ env.Append( CPPPATH=[ "@PREFIX@/include" ] )
-+ env.Append( LIBPATH=[ "@PREFIX@/lib" ] )
-+ env.Append( LIBS=[ "m" ] )
-+ env.Append( LIBS=[ "kvm" ] )
-+ env.Append( CPPDEFINES=[ "__dragonfly__" ] )
-+
- elif env.TargetOSIs('freebsd'):
+ # NOTE: The leading and trailing spaces here are important. Do not remove them.
+@@ -1554,9 +1557,15 @@ elif env.TargetOSIs('freebsd'):
env.Append( LIBS=[ "kvm" ] )
env.Append( CCFLAGS=[ "-fno-omit-frame-pointer" ] )
-+elif os.sys.platform.startswith( "netbsd" ):
-+ env.Append( CPPPATH=[ "@PREFIX@/include" ] )
-+ env.Append( LIBPATH=[ "@PREFIX@/lib" ] )
-+ env.Append( LIBS=[ "m" ] )
-+ env.Append( LIBS=[ "kvm" ] )
-+ env.Append( CPPDEFINES=[ "__netbsd__" ] )
++elif env.TargetOSIs('dragonfly'):
++ env.Append( LIBS=["m", "kvm"] )
++
+ elif env.TargetOSIs('darwin'):
+ env.Append( LIBS=["resolv"] )
+
++elif env.TargetOSIs('netbsd'):
++ env.Append( LIBS=["m", "kvm"] )
+
elif env.TargetOSIs('openbsd'):
env.Append( LIBS=[ "kvm" ] )
-@@ -1570,6 +1591,9 @@ if env.TargetOSIs('posix'):
-
- env.Append( CXXFLAGS=["-Woverloaded-virtual"] )
- env.Append( LINKFLAGS=["-pthread"] )
-+ env.Append( CPPDEFINES=["XP_UNIX=1"] )
-+ 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.
-@@ -2158,9 +2182,9 @@ def doConfigure(myenv):
+@@ -1777,7 +1786,6 @@ if env.TargetOSIs('posix'):
+ # -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used.
+ env.Append( CCFLAGS=["-fno-omit-frame-pointer",
+ "-fno-strict-aliasing",
+- "-ggdb",
+ "-pthread",
+ "-Wall",
+ "-Wsign-compare",
+@@ -2413,9 +2421,9 @@ def doConfigure(myenv):
if usingLibStdCxx:
def CheckModernLibStdCxx(context):
test_body = """
@@ -181,15 +72,16 @@ Respect LDFLAGS and CXXFLAGS
"""
context.Message('Checking for libstdc++ 5.3.0 or better... ')
-@@ -2764,6 +2788,7 @@ def doConfigure(myenv):
- # permit more than four parameters.
- "BOOST_THREAD_DONT_PROVIDE_VARIADIC_THREAD",
- "BOOST_SYSTEM_NO_DEPRECATED",
-+ "BOOST_OPTIONAL_USE_SINGLETON_DEFINITION_OF_NONE",
- ]
- )
-
-@@ -2830,7 +2855,7 @@ def doConfigure(myenv):
+@@ -2649,7 +2657,7 @@ def doConfigure(myenv):
+ #
+ myenv.Append( CCFLAGS=["/Zc:inline"])
+
+- if myenv.ToolchainIs('gcc', 'clang'):
++ if myenv.ToolchainIs('gcc', 'clang') and get_option('runtime-hardening') == "on":
+ # This tells clang/gcc to use the gold linker if it is available - we prefer the gold linker
+ # because it is much faster. Don't use it if the user has already configured another linker
+ # selection manually.
+@@ -3202,7 +3210,7 @@ def doConfigure(myenv):
myenv.ConfError("Couldn't find SASL header/libraries")
# requires ports devel/libexecinfo to be installed
@@ -198,3 +90,12 @@ Respect LDFLAGS and CXXFLAGS
if not conf.CheckLib("execinfo"):
myenv.ConfError("Cannot find libexecinfo, please install devel/libexecinfo.")
+@@ -3427,7 +3435,7 @@ def doConfigure(myenv):
+
+ outputIndex = next((idx for idx in [0,1] if conf.CheckAltivecVbpermqOutput(idx)), None)
+ if outputIndex is not None:
+- conf.env.SetConfigHeaderDefine("MONGO_CONFIG_ALTIVEC_VEC_VBPERMQ_OUTPUT_INDEX", outputIndex)
++ conf.env.SetConfigHeaderDefine("MONGO_CONFIG_ALTIVEC_VEC_VBPERMQ_OUTPUT_INDEX", outputIndex)
+ else:
+ myenv.ConfError("Running on ppc64le, but can't find a correct vec_vbpermq output index. Compiler or platform not supported")
+
diff --git a/databases/mongodb/patches/patch-debian_mongod.conf b/databases/mongodb/patches/patch-debian_mongod.conf
deleted file mode 100644
index 7b1b6a99998..00000000000
--- a/databases/mongodb/patches/patch-debian_mongod.conf
+++ /dev/null
@@ -1,23 +0,0 @@
-$NetBSD: patch-debian_mongod.conf,v 1.4 2017/05/29 14:44:47 ryoon Exp $
-
-Use proper paths in default config file.
---- debian/mongod.conf.orig 2017-04-20 21:43:42.000000000 +0000
-+++ debian/mongod.conf
-@@ -5,7 +5,7 @@
-
- # Where and how to store data.
- storage:
-- dbPath: /var/lib/mongodb
-+ dbPath: /var/mongodb
- journal:
- enabled: true
- # engine:
-@@ -16,7 +16,7 @@ storage:
- systemLog:
- destination: file
- logAppend: true
-- path: /var/log/mongodb/mongod.log
-+ path: /var/mongodb/mongod.log
-
- # network interfaces
- net:
diff --git a/databases/mongodb/patches/patch-site__scons_mongo_platform.py b/databases/mongodb/patches/patch-site__scons_mongo_platform.py
new file mode 100644
index 00000000000..cd7dfa9fa36
--- /dev/null
+++ b/databases/mongodb/patches/patch-site__scons_mongo_platform.py
@@ -0,0 +1,26 @@
+$NetBSD: patch-site__scons_mongo_platform.py,v 1.1 2019/03/05 19:35:58 adam Exp $
+
+Add NetBSD and Dragonfly support.
+
+--- site_scons/mongo/platform.py.orig 2019-03-04 21:59:06.197965476 +0000
++++ site_scons/mongo/platform.py
+@@ -22,6 +22,10 @@ def get_running_os_name():
+ running_os = 'linux'
+ elif running_os.startswith('freebsd'):
+ running_os = 'freebsd'
++ elif running_os.startswith('dragonfly'):
++ running_os = 'dragonfly'
++ elif running_os.startswith('netbsd'):
++ running_os = 'netbsd'
+ elif running_os.startswith('openbsd'):
+ running_os = 'openbsd'
+ elif running_os == 'sunos5':
+@@ -40,7 +44,7 @@ def env_get_os_name_wrapper(self):
+ def is_os_raw(target_os, os_list_to_check):
+ darwin_os_list = [ 'macOS', 'tvOS', 'tvOS-sim', 'iOS', 'iOS-sim', 'watchOS', 'watchOS-sim' ]
+ linux_os_list = [ 'android', 'linux' ]
+- posix_os_list = [ 'openbsd', 'freebsd', 'solaris' ] + darwin_os_list + linux_os_list
++ posix_os_list = [ 'netbsd', 'openbsd', 'freebsd', 'dragonfly', 'solaris' ] + darwin_os_list + linux_os_list
+
+ os_families = {
+ "darwin": darwin_os_list,
diff --git a/databases/mongodb/patches/patch-site__scons_site__tools_libtool.py b/databases/mongodb/patches/patch-site__scons_site__tools_libtool.py
new file mode 100644
index 00000000000..1f65d274b2e
--- /dev/null
+++ b/databases/mongodb/patches/patch-site__scons_site__tools_libtool.py
@@ -0,0 +1,15 @@
+$NetBSD: patch-site__scons_site__tools_libtool.py,v 1.1 2019/03/05 19:35:58 adam Exp $
+
+Use system libtool (Darwin only).
+
+--- site_scons/site_tools/libtool.py.orig 2019-03-04 18:25:28.000000000 +0000
++++ site_scons/site_tools/libtool.py
+@@ -2,7 +2,7 @@ import SCons
+
+ def generate(env):
+
+- env['AR'] = 'libtool'
++ env['AR'] = '/usr/bin/libtool'
+ env['ARCOM'] = '$AR -static -o $TARGET $ARFLAGS $SOURCES'
+ env['ARFLAGS'] = ["-s", "-no_warning_for_no_symbols"]
+
diff --git a/databases/mongodb/patches/patch-src_mongo_base_initializer.h b/databases/mongodb/patches/patch-src_mongo_base_initializer.h
index c7a45a33735..2547071a752 100644
--- a/databases/mongodb/patches/patch-src_mongo_base_initializer.h
+++ b/databases/mongodb/patches/patch-src_mongo_base_initializer.h
@@ -1,9 +1,10 @@
-$NetBSD: patch-src_mongo_base_initializer.h,v 1.1 2015/05/02 08:10:33 ryoon Exp $
+$NetBSD: patch-src_mongo_base_initializer.h,v 1.2 2019/03/05 19:35:58 adam Exp $
Fixes at least SunOS.
---- src/mongo/base/initializer.h.orig 2014-04-07 00:36:57.000000000 +0000
+
+--- src/mongo/base/initializer.h.orig 2019-01-30 14:26:33.000000000 +0000
+++ src/mongo/base/initializer.h
-@@ -17,6 +17,7 @@
+@@ -32,6 +32,7 @@
#include <string>
#include <vector>
diff --git a/databases/mongodb/patches/patch-src_mongo_db_dbwebserver.cpp b/databases/mongodb/patches/patch-src_mongo_db_dbwebserver.cpp
deleted file mode 100644
index 99fc9bfed1a..00000000000
--- a/databases/mongodb/patches/patch-src_mongo_db_dbwebserver.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD: patch-src_mongo_db_dbwebserver.cpp,v 1.1 2017/07/11 19:35:51 joerg Exp $
-
---- src/mongo/db/dbwebserver.cpp.orig 2017-07-11 17:07:27.098292902 +0000
-+++ src/mongo/db/dbwebserver.cpp
-@@ -35,6 +35,7 @@
-
- #include "mongo/db/dbwebserver.h"
-
-+#include <string>
- #include <pcrecpp.h>
-
- #include "mongo/base/init.h"
-@@ -67,6 +68,7 @@ namespace mongo {
- using std::map;
- using std::stringstream;
- using std::vector;
-+using std::string;
-
- using namespace html;
-
diff --git a/databases/mongodb/patches/patch-src_mongo_db_fts_unicode_string.cpp b/databases/mongodb/patches/patch-src_mongo_db_fts_unicode_string.cpp
deleted file mode 100644
index 076c8ba5090..00000000000
--- a/databases/mongodb/patches/patch-src_mongo_db_fts_unicode_string.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-src_mongo_db_fts_unicode_string.cpp,v 1.1 2016/10/10 13:15:40 ryoon Exp $
-
-* Fix build with boost 1.62.0
-
---- src/mongo/db/fts/unicode/string.cpp.orig 2016-09-26 12:10:04.000000000 +0000
-+++ src/mongo/db/fts/unicode/string.cpp
-@@ -274,7 +274,7 @@ bool String::substrMatch(const std::stri
-
- // Case sensitive and diacritic sensitive.
- return boost::algorithm::boyer_moore_search(
-- haystack.begin(), haystack.end(), needle.begin(), needle.end()) != haystack.end();
-+ haystack.begin(), haystack.end(), needle.begin(), needle.end()) != std::make_pair(haystack.end(), haystack.end());
- }
-
- } // namespace unicode
diff --git a/databases/mongodb/patches/patch-src_mongo_db_matcher_expression__leaf.cpp b/databases/mongodb/patches/patch-src_mongo_db_matcher_expression__leaf.cpp
index ac3c9616c07..100823504fb 100644
--- a/databases/mongodb/patches/patch-src_mongo_db_matcher_expression__leaf.cpp
+++ b/databases/mongodb/patches/patch-src_mongo_db_matcher_expression__leaf.cpp
@@ -1,8 +1,10 @@
-$NetBSD: patch-src_mongo_db_matcher_expression__leaf.cpp,v 1.1 2017/07/11 19:35:51 joerg Exp $
+$NetBSD: patch-src_mongo_db_matcher_expression__leaf.cpp,v 1.2 2019/03/05 19:35:58 adam Exp $
---- src/mongo/db/matcher/expression_leaf.cpp.orig 2017-07-11 17:17:17.311043545 +0000
+Fix building.
+
+--- src/mongo/db/matcher/expression_leaf.cpp.orig 2019-01-30 14:26:33.000000000 +0000
+++ src/mongo/db/matcher/expression_leaf.cpp
-@@ -31,6 +31,7 @@
+@@ -33,6 +33,7 @@
#include "mongo/db/matcher/expression_leaf.h"
#include <cmath>
@@ -10,11 +12,11 @@ $NetBSD: patch-src_mongo_db_matcher_expression__leaf.cpp,v 1.1 2017/07/11 19:35:
#include <pcrecpp.h>
#include "mongo/bson/bsonelement_comparator.h"
-@@ -45,6 +46,7 @@
+@@ -48,6 +49,7 @@
#include "mongo/util/mongoutils/str.h"
namespace mongo {
+using std::string;
- Status LeafMatchExpression::setPath(StringData path) {
- _path = path;
+ ComparisonMatchExpressionBase::ComparisonMatchExpressionBase(
+ MatchType type,
diff --git a/databases/mongodb/patches/patch-src_mongo_db_repl_master__slave.cpp b/databases/mongodb/patches/patch-src_mongo_db_repl_master__slave.cpp
deleted file mode 100644
index cce2d033c61..00000000000
--- a/databases/mongodb/patches/patch-src_mongo_db_repl_master__slave.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD: patch-src_mongo_db_repl_master__slave.cpp,v 1.1 2017/07/11 19:35:51 joerg Exp $
-
---- src/mongo/db/repl/master_slave.cpp.orig 2017-07-11 17:40:23.338075821 +0000
-+++ src/mongo/db/repl/master_slave.cpp
-@@ -45,6 +45,7 @@
- #include "mongo/db/repl/master_slave.h"
-
- #include <pcrecpp.h>
-+#include <string>
-
- #include "mongo/db/auth/authorization_manager.h"
- #include "mongo/db/auth/authorization_session.h"
-@@ -78,6 +79,7 @@ using std::endl;
- using std::max;
- using std::min;
- using std::set;
-+using std::string;
- using std::stringstream;
- using std::unique_ptr;
- using std::vector;
diff --git a/databases/mongodb/patches/patch-src_mongo_db_repl_oplog__fetcher.cpp b/databases/mongodb/patches/patch-src_mongo_db_repl_oplog__fetcher.cpp
deleted file mode 100644
index 615203e051c..00000000000
--- a/databases/mongodb/patches/patch-src_mongo_db_repl_oplog__fetcher.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-src_mongo_db_repl_oplog__fetcher.cpp,v 1.1 2018/08/29 14:07:30 tnn Exp $
-
-Fix build w/ boost >= 1.66
-
---- src/mongo/db/repl/oplog_fetcher.cpp.orig 2018-08-29 14:02:00.126096548 +0000
-+++ src/mongo/db/repl/oplog_fetcher.cpp
-@@ -265,7 +265,7 @@ StatusWith<boost::optional<rpc::OplogQue
- if (!metadataResult.isOK()) {
- return metadataResult.getStatus();
- }
-- oqMetadata = boost::make_optional<rpc::OplogQueryMetadata>(metadataResult.getValue());
-+ oqMetadata = boost::make_optional(metadataResult.getValue());
- }
- return oqMetadata;
- }
diff --git a/databases/mongodb/patches/patch-src_mongo_installer_msi_SConscript b/databases/mongodb/patches/patch-src_mongo_installer_msi_SConscript
deleted file mode 100644
index 85f706357ca..00000000000
--- a/databases/mongodb/patches/patch-src_mongo_installer_msi_SConscript
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-src_mongo_installer_msi_SConscript,v 1.1 2017/10/08 22:17:06 tnn Exp $
-
---- src/mongo/installer/msi/SConscript.orig 2017-04-20 21:43:42.000000000 +0000
-+++ src/mongo/installer/msi/SConscript
-@@ -69,8 +69,8 @@ else:
- upgrade_code = '9295A251-1B1F-45FB-96FF-35B57E490613'
-
- if 'msi' in BUILD_TARGETS and msi_edition == 'SSL' and msi_flavor != '2008R2Plus':
-- print "Building the MongoDB SSL MSI is only supported on Windows 2008 R2+ or Windows 7+ platforms."
-- print "You must add --win-version-min=ws08r2 to your scons flags"
-+ print("Building the MongoDB SSL MSI is only supported on Windows 2008 R2+ or Windows 7+ platforms.")
-+ print("You must add --win-version-min=ws08r2 to your scons flags")
- exit(1)
-
- if msi_platform == 'x64':
diff --git a/databases/mongodb/patches/patch-src_mongo_platform_random.cpp b/databases/mongodb/patches/patch-src_mongo_platform_random.cpp
index 606d47b4230..25bc2eabee0 100644
--- a/databases/mongodb/patches/patch-src_mongo_platform_random.cpp
+++ b/databases/mongodb/patches/patch-src_mongo_platform_random.cpp
@@ -1,10 +1,11 @@
-$NetBSD: patch-src_mongo_platform_random.cpp,v 1.3 2016/02/12 03:37:24 ryoon Exp $
+$NetBSD: patch-src_mongo_platform_random.cpp,v 1.4 2019/03/05 19:35:58 adam Exp $
Add NetBSD support.
---- src/mongo/platform/random.cpp.orig 2016-01-05 18:31:44.000000000 +0000
+
+--- src/mongo/platform/random.cpp.orig 2019-01-30 14:26:33.000000000 +0000
+++ src/mongo/platform/random.cpp
-@@ -145,7 +145,7 @@ SecureRandom* SecureRandom::create() {
- return new WinSecureRandom();
+@@ -150,7 +150,7 @@ std::unique_ptr<SecureRandom> SecureRand
+ return stdx::make_unique<WinSecureRandom>();
}
-#elif defined(__linux__) || defined(__sun) || defined(__APPLE__) || defined(__FreeBSD__)
diff --git a/databases/mongodb/patches/patch-src_mongo_platform_stack__locator__dragonfly.cpp b/databases/mongodb/patches/patch-src_mongo_platform_stack__locator__dragonfly.cpp
deleted file mode 100644
index a8a71cdcdcb..00000000000
--- a/databases/mongodb/patches/patch-src_mongo_platform_stack__locator__dragonfly.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-$NetBSD: patch-src_mongo_platform_stack__locator__dragonfly.cpp,v 1.1 2016/02/12 03:37:24 ryoon Exp $
-
---- src/mongo/platform/stack_locator_dragonfly.cpp.orig 2016-02-11 11:27:13.489023328 +0000
-+++ src/mongo/platform/stack_locator_dragonfly.cpp
-@@ -0,0 +1,58 @@
-+/**
-+ * Copyright (C) 2015 MongoDB Inc.
-+ *
-+ * This program is free software: you can redistribute it and/or modify
-+ * it under the terms of the GNU Affero General Public License, version 3,
-+ * as published by the Free Software Foundation.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU Affero General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Affero General Public License
-+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
-+ *
-+ * As a special exception, the copyright holders give permission to link the
-+ * code of portions of this program with the OpenSSL library under certain
-+ * conditions as described in each individual source file and distribute
-+ * linked combinations including the program with the OpenSSL library. You
-+ * must comply with the GNU Affero General Public License in all respects for
-+ * all of the code used other than as permitted herein. If you modify file(s)
-+ * with this exception, you may extend this exception to your version of the
-+ * file(s), but you are not obligated to do so. If you do not wish to do so,
-+ * delete this exception statement from your version. If you delete this
-+ * exception statement from all source files in the program, then also delete
-+ * it in the license file.
-+ */
-+
-+#include "mongo/platform/basic.h"
-+
-+#include "mongo/platform/stack_locator.h"
-+
-+#include <pthread.h>
-+#include <pthread_np.h>
-+
-+#include "mongo/util/assert_util.h"
-+#include "mongo/util/scopeguard.h"
-+
-+namespace mongo {
-+
-+StackLocator::StackLocator() {
-+ pthread_attr_t attr;
-+ size_t size;
-+
-+ pthread_t self = pthread_self();
-+
-+ invariant(pthread_attr_init(&attr) == 0);
-+ ON_BLOCK_EXIT(pthread_attr_destroy, &attr);
-+
-+ invariant(pthread_attr_get_np(self, &attr) == 0);
-+
-+ invariant(pthread_attr_getstack(&attr, &_end, &size) == 0);
-+
-+ // TODO: Assumes stack grows downward on FreeBSD
-+ _begin = static_cast<char*>(_end) + size;
-+}
-+
-+} // namespace mongo
diff --git a/databases/mongodb/patches/patch-src_mongo_platform_stack__locator__netbsd.cpp b/databases/mongodb/patches/patch-src_mongo_platform_stack__locator__netbsd.cpp
index 37cf2925324..6aab7154b00 100644
--- a/databases/mongodb/patches/patch-src_mongo_platform_stack__locator__netbsd.cpp
+++ b/databases/mongodb/patches/patch-src_mongo_platform_stack__locator__netbsd.cpp
@@ -1,63 +1,23 @@
-$NetBSD: patch-src_mongo_platform_stack__locator__netbsd.cpp,v 1.1 2016/02/12 03:37:24 ryoon Exp $
+$NetBSD: patch-src_mongo_platform_stack__locator__netbsd.cpp,v 1.2 2019/03/05 19:35:58 adam Exp $
---- src/mongo/platform/stack_locator_netbsd.cpp.orig 2016-02-11 12:24:33.443209041 +0000
+Add NetBSD support.
+
+--- src/mongo/platform/stack_locator_netbsd.cpp.orig 2019-03-05 15:19:27.000000000 +0000
+++ src/mongo/platform/stack_locator_netbsd.cpp
-@@ -0,0 +1,58 @@
-+/**
-+ * Copyright (C) 2015 MongoDB Inc.
-+ *
-+ * This program is free software: you can redistribute it and/or modify
-+ * it under the terms of the GNU Affero General Public License, version 3,
-+ * as published by the Free Software Foundation.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU Affero General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Affero General Public License
-+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
-+ *
-+ * As a special exception, the copyright holders give permission to link the
-+ * code of portions of this program with the OpenSSL library under certain
-+ * conditions as described in each individual source file and distribute
-+ * linked combinations including the program with the OpenSSL library. You
-+ * must comply with the GNU Affero General Public License in all respects for
-+ * all of the code used other than as permitted herein. If you modify file(s)
-+ * with this exception, you may extend this exception to your version of the
-+ * file(s), but you are not obligated to do so. If you do not wish to do so,
-+ * delete this exception statement from your version. If you delete this
-+ * exception statement from all source files in the program, then also delete
-+ * it in the license file.
-+ */
-+
-+#include "mongo/platform/basic.h"
-+
-+#include "mongo/platform/stack_locator.h"
-+
-+#include <pthread.h>
-+
-+
-+#include "mongo/util/assert_util.h"
-+#include "mongo/util/scopeguard.h"
-+
-+namespace mongo {
-+
-+StackLocator::StackLocator() {
-+ pthread_attr_t attr;
-+ size_t size;
-+
-+ pthread_t self = pthread_self();
-+
-+ invariant(pthread_attr_init(&attr) == 0);
-+ ON_BLOCK_EXIT(pthread_attr_destroy, &attr);
-+
-+ invariant(pthread_attr_get_np(self, &attr) == 0);
-+
-+ invariant(pthread_attr_getstack(&attr, &_end, &size) == 0);
-+
-+ // TODO: Assumes stack grows downward on FreeBSD
-+ _begin = static_cast<char*>(_end) + size;
-+}
-+
-+} // namespace mongo
+@@ -33,7 +31,6 @@
+ #include "mongo/platform/stack_locator.h"
+
+ #include <pthread.h>
+-#include <pthread_np.h>
+
+ #include "mongo/util/assert_util.h"
+ #include "mongo/util/scopeguard.h"
+@@ -53,7 +50,7 @@ StackLocator::StackLocator() {
+
+ invariant(pthread_attr_getstack(&attr, &_end, &size) == 0);
+
+- // TODO: Assumes stack grows downward on FreeBSD
++ // TODO: Assumes stack grows downward on NetBSD
+ _begin = static_cast<char*>(_end) + size;
+ }
+
diff --git a/databases/mongodb/patches/patch-src_mongo_shell_bench.cpp b/databases/mongodb/patches/patch-src_mongo_shell_bench.cpp
deleted file mode 100644
index addb02b88fd..00000000000
--- a/databases/mongodb/patches/patch-src_mongo_shell_bench.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD: patch-src_mongo_shell_bench.cpp,v 1.1 2017/07/11 19:35:51 joerg Exp $
-
---- src/mongo/shell/bench.cpp.orig 2017-07-11 16:39:09.026014232 +0000
-+++ src/mongo/shell/bench.cpp
-@@ -34,6 +34,7 @@
-
- #include "mongo/shell/bench.h"
-
-+#include <string>
- #include <iostream>
- #include <pcrecpp.h>
-
-@@ -78,6 +79,7 @@ namespace mongo {
- using std::unique_ptr;
- using std::cout;
- using std::map;
-+using std::string;
-
- const std::map<OpType, std::string> opTypeName{{OpType::NONE, "none"},
- {OpType::NOP, "nop"},
diff --git a/databases/mongodb/patches/patch-src_mongo_shell_linenoise__utf8.h b/databases/mongodb/patches/patch-src_mongo_shell_linenoise__utf8.h
index 9ace20b4b1e..c6a67917c29 100644
--- a/databases/mongodb/patches/patch-src_mongo_shell_linenoise__utf8.h
+++ b/databases/mongodb/patches/patch-src_mongo_shell_linenoise__utf8.h
@@ -1,17 +1,18 @@
-$NetBSD: patch-src_mongo_shell_linenoise__utf8.h,v 1.3 2016/02/12 03:37:24 ryoon Exp $
+$NetBSD: patch-src_mongo_shell_linenoise__utf8.h,v 1.4 2019/03/05 19:35:58 adam Exp $
Use Boost swap instead of std. Fixes build on SunOS.
---- src/mongo/shell/linenoise_utf8.h.orig 2016-01-05 18:31:44.000000000 +0000
+
+--- src/mongo/shell/linenoise_utf8.h.orig 2019-01-30 14:26:33.000000000 +0000
+++ src/mongo/shell/linenoise_utf8.h
-@@ -27,6 +27,7 @@
- * then also delete it in the license file.
+@@ -29,6 +29,7 @@
+ * it in the license file.
*/
+#include <boost/core/swap.hpp>
#include <algorithm>
#include <memory>
#include <string.h>
-@@ -178,9 +179,9 @@ struct UtfStringMixin {
+@@ -176,9 +177,9 @@ struct UtfStringMixin {
}
void swap(UtfStringMixin& other) {
diff --git a/databases/mongodb/patches/patch-src_mongo_util_intrusive__counter.h b/databases/mongodb/patches/patch-src_mongo_util_intrusive__counter.h
index 396c3a27ca9..0949c397cbc 100644
--- a/databases/mongodb/patches/patch-src_mongo_util_intrusive__counter.h
+++ b/databases/mongodb/patches/patch-src_mongo_util_intrusive__counter.h
@@ -1,4 +1,6 @@
-$NetBSD: patch-src_mongo_util_intrusive__counter.h,v 1.2 2016/02/12 03:37:24 ryoon Exp $
+$NetBSD: patch-src_mongo_util_intrusive__counter.h,v 1.3 2019/03/05 19:35:58 adam Exp $
+
+Fix buidling.
--- src/mongo/util/intrusive_counter.h.orig 2016-01-05 18:31:44.000000000 +0000
+++ src/mongo/util/intrusive_counter.h
diff --git a/databases/mongodb/patches/patch-src_mongo_util_net_miniwebserver.cpp b/databases/mongodb/patches/patch-src_mongo_util_net_miniwebserver.cpp
deleted file mode 100644
index 29a8c8d90ca..00000000000
--- a/databases/mongodb/patches/patch-src_mongo_util_net_miniwebserver.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD: patch-src_mongo_util_net_miniwebserver.cpp,v 1.1 2017/07/11 19:35:51 joerg Exp $
-
---- src/mongo/util/net/miniwebserver.cpp.orig 2017-07-11 17:42:54.304511569 +0000
-+++ src/mongo/util/net/miniwebserver.cpp
-@@ -33,6 +33,7 @@
-
- #include "mongo/util/net/miniwebserver.h"
-
-+#include <string>
- #include <pcrecpp.h>
-
- #include "mongo/config.h"
-@@ -45,6 +46,7 @@
- namespace mongo {
-
- using std::shared_ptr;
-+using std::string;
- using std::stringstream;
- using std::vector;
-
diff --git a/databases/mongodb/patches/patch-src_mongo_util_processinfo__dragonfly.cpp b/databases/mongodb/patches/patch-src_mongo_util_processinfo__dragonfly.cpp
deleted file mode 100644
index 3bb24028040..00000000000
--- a/databases/mongodb/patches/patch-src_mongo_util_processinfo__dragonfly.cpp
+++ /dev/null
@@ -1,195 +0,0 @@
-$NetBSD: patch-src_mongo_util_processinfo__dragonfly.cpp,v 1.1 2016/02/12 03:37:24 ryoon Exp $
-
---- src/mongo/util/processinfo_dragonfly.cpp.orig 2016-02-11 12:26:02.935580479 +0000
-+++ src/mongo/util/processinfo_dragonfly.cpp
-@@ -0,0 +1,190 @@
-+/* Copyright 2012 10gen Inc.
-+ *
-+ * This program is free software: you can redistribute it and/or modify
-+ * it under the terms of the GNU Affero General Public License, version 3,
-+ * as published by the Free Software Foundation.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU Affero General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Affero General Public License
-+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
-+ *
-+ * As a special exception, the copyright holders give permission to link the
-+ * code of portions of this program with the OpenSSL library under certain
-+ * conditions as described in each individual source file and distribute
-+ * linked combinations including the program with the OpenSSL library. You
-+ * must comply with the GNU Affero General Public License in all respects
-+ * for all of the code used other than as permitted herein. If you modify
-+ * file(s) with this exception, you may extend this exception to your
-+ * version of the file(s), but you are not obligated to do so. If you do not
-+ * wish to do so, delete this exception statement from your version. If you
-+ * delete this exception statement from all source files in the program,
-+ * then also delete it in the license file.
-+ */
-+
-+#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl
-+
-+#include <cstdlib>
-+#include <string>
-+
-+#include <kvm.h>
-+#include <sys/file.h>
-+#include <sys/mman.h>
-+#include <sys/param.h>
-+#include <sys/sysctl.h>
-+#include <sys/types.h>
-+#include <sys/user.h>
-+#include <sys/vmmeter.h>
-+#include <unistd.h>
-+#include <vm/vm_param.h>
-+
-+#include "mongo/util/scopeguard.h"
-+#include "mongo/util/log.h"
-+#include "processinfo.h"
-+
-+using namespace std;
-+
-+namespace mongo {
-+
-+ProcessInfo::ProcessInfo(ProcessId pid) : _pid(pid) {}
-+
-+ProcessInfo::~ProcessInfo() {}
-+
-+/**
-+ * Get a sysctl string value by name. Use string specialization by default.
-+ */
-+template <typename T>
-+int getSysctlByNameWithDefault(const char* sysctlName, const T& defaultValue, T* result);
-+
-+template <>
-+int getSysctlByNameWithDefault<uintptr_t>(const char* sysctlName,
-+ const uintptr_t& defaultValue,
-+ uintptr_t* result) {
-+ uintptr_t value = 0;
-+ size_t len = sizeof(value);
-+ if (sysctlbyname(sysctlName, &value, &len, NULL, 0) == -1) {
-+ *result = defaultValue;
-+ return errno;
-+ }
-+ if (len > sizeof(value)) {
-+ *result = defaultValue;
-+ return EINVAL;
-+ }
-+
-+ *result = value;
-+ return 0;
-+}
-+
-+template <>
-+int getSysctlByNameWithDefault<string>(const char* sysctlName,
-+ const string& defaultValue,
-+ string* result) {
-+ char value[256] = {0};
-+ size_t len = sizeof(value);
-+ if (sysctlbyname(sysctlName, &value, &len, NULL, 0) == -1) {
-+ *result = defaultValue;
-+ return errno;
-+ }
-+ *result = value;
-+ return 0;
-+}
-+
-+bool ProcessInfo::checkNumaEnabled() {
-+ return false;
-+}
-+
-+int ProcessInfo::getVirtualMemorySize() {
-+ kvm_t* kd = NULL;
-+ int cnt = 0;
-+ char err[_POSIX2_LINE_MAX] = {0};
-+ if ((kd = kvm_open(NULL, "/dev/null", "/dev/null", O_RDONLY, err)) == NULL)
-+ return -1;
-+ kinfo_proc* task = kvm_getprocs(kd, KERN_PROC_PID, _pid.toNative(), &cnt);
-+ kvm_close(kd);
-+ return task->ki_size / 1024 / 1024; // convert from bytes to MB
-+}
-+
-+int ProcessInfo::getResidentSize() {
-+ kvm_t* kd = NULL;
-+ int cnt = 0;
-+ char err[_POSIX2_LINE_MAX] = {0};
-+ if ((kd = kvm_open(NULL, "/dev/null", "/dev/null", O_RDONLY, err)) == NULL)
-+ return -1;
-+ kinfo_proc* task = kvm_getprocs(kd, KERN_PROC_PID, _pid.toNative(), &cnt);
-+ kvm_close(kd);
-+ return task->ki_rssize * sysconf(_SC_PAGESIZE) / 1024 / 1024; // convert from pages to MB
-+}
-+
-+double ProcessInfo::getSystemMemoryPressurePercentage() {
-+ return 0.0;
-+}
-+
-+void ProcessInfo::SystemInfo::collectSystemInfo() {
-+ osType = "BSD";
-+ osName = "FreeBSD";
-+
-+ int status = getSysctlByNameWithDefault("kern.version", string("unknown"), &osVersion);
-+ if (status != 0)
-+ log() << "Unable to collect OS Version. (errno: " << status << " msg: " << strerror(status)
-+ << ")" << endl;
-+
-+ status = getSysctlByNameWithDefault("hw.machine_arch", string("unknown"), &cpuArch);
-+ if (status != 0)
-+ log() << "Unable to collect Machine Architecture. (errno: " << status
-+ << " msg: " << strerror(status) << ")" << endl;
-+ addrSize = cpuArch.find("64") != std::string::npos ? 64 : 32;
-+
-+ uintptr_t numBuffer;
-+ uintptr_t defaultNum = 1;
-+ status = getSysctlByNameWithDefault("hw.physmem", defaultNum, &numBuffer);
-+ memSize = numBuffer;
-+ if (status != 0)
-+ log() << "Unable to collect Physical Memory. (errno: " << status
-+ << " msg: " << strerror(status) << ")" << endl;
-+
-+ status = getSysctlByNameWithDefault("hw.ncpu", defaultNum, &numBuffer);
-+ numCores = numBuffer;
-+ if (status != 0)
-+ log() << "Unable to collect Number of CPUs. (errno: " << status
-+ << " msg: " << strerror(status) << ")" << endl;
-+
-+ pageSize = static_cast<unsigned long long>(sysconf(_SC_PAGESIZE));
-+
-+ hasNuma = checkNumaEnabled();
-+}
-+
-+void ProcessInfo::getExtraInfo(BSONObjBuilder& info) {}
-+
-+bool ProcessInfo::supported() {
-+ return true;
-+}
-+
-+bool ProcessInfo::blockCheckSupported() {
-+ return true;
-+}
-+
-+bool ProcessInfo::blockInMemory(const void* start) {
-+ char x = 0;
-+ if (mincore(alignToStartOfPage(start), getPageSize(), &x)) {
-+ log() << "mincore failed: " << errnoWithDescription() << endl;
-+ return 1;
-+ }
-+ return x & 0x1;
-+}
-+
-+bool ProcessInfo::pagesInMemory(const void* start, size_t numPages, vector<char>* out) {
-+ out->resize(numPages);
-+ // int mincore(const void *addr, size_t len, char *vec);
-+ if (mincore(alignToStartOfPage(start), numPages * getPageSize(), &(out->front()))) {
-+ log() << "mincore failed: " << errnoWithDescription() << endl;
-+ return false;
-+ }
-+ for (size_t i = 0; i < numPages; ++i) {
-+ (*out)[i] = 0x1;
-+ }
-+ return true;
-+}
-+}
diff --git a/databases/mongodb/patches/patch-src_mongo_util_processinfo__netbsd.cpp b/databases/mongodb/patches/patch-src_mongo_util_processinfo__netbsd.cpp
index d84b61ca54b..ab468b2052b 100644
--- a/databases/mongodb/patches/patch-src_mongo_util_processinfo__netbsd.cpp
+++ b/databases/mongodb/patches/patch-src_mongo_util_processinfo__netbsd.cpp
@@ -1,217 +1,40 @@
-$NetBSD: patch-src_mongo_util_processinfo__netbsd.cpp,v 1.2 2017/06/24 04:24:56 kamil Exp $
+$NetBSD: patch-src_mongo_util_processinfo__netbsd.cpp,v 1.3 2019/03/05 19:35:58 adam Exp $
---- src/mongo/util/processinfo_netbsd.cpp.orig 2017-06-24 01:47:17.271883765 +0000
+NetBSD support.
+
+--- src/mongo/util/processinfo_netbsd.cpp.orig 2019-03-04 22:59:41.311405065 +0000
+++ src/mongo/util/processinfo_netbsd.cpp
-@@ -0,0 +1,212 @@
-+/* Copyright 2012 10gen Inc.
-+ *
-+ * This program is free software: you can redistribute it and/or modify
-+ * it under the terms of the GNU Affero General Public License, version 3,
-+ * as published by the Free Software Foundation.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU Affero General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Affero General Public License
-+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
-+ *
-+ * As a special exception, the copyright holders give permission to link the
-+ * code of portions of this program with the OpenSSL library under certain
-+ * conditions as described in each individual source file and distribute
-+ * linked combinations including the program with the OpenSSL library. You
-+ * must comply with the GNU Affero General Public License in all respects
-+ * for all of the code used other than as permitted herein. If you modify
-+ * file(s) with this exception, you may extend this exception to your
-+ * version of the file(s), but you are not obligated to do so. If you do not
-+ * wish to do so, delete this exception statement from your version. If you
-+ * delete this exception statement from all source files in the program,
-+ * then also delete it in the license file.
-+ */
-+
-+#if defined(__NetBSD__)
+@@ -27,6 +27,7 @@
+ * exception statement from all source files in the program, then also delete
+ * it in the license file.
+ */
+#define _KMEMUSER
-+#endif
-+
-+#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl
-+
-+#include <cstdlib>
-+#include <string>
-+
-+#include <kvm.h>
-+#include <sys/file.h>
-+#include <sys/mman.h>
-+#include <sys/param.h>
-+#include <sys/sysctl.h>
-+#include <sys/types.h>
-+#include <sys/vmmeter.h>
-+#include <unistd.h>
-+
-+#include "mongo/util/scopeguard.h"
-+#include "mongo/util/log.h"
-+#include "processinfo.h"
-+
-+using namespace std;
-+
-+namespace mongo {
-+
-+ProcessInfo::ProcessInfo(ProcessId pid) : _pid(pid) {}
-+
-+ProcessInfo::~ProcessInfo() {}
-+
-+/**
-+ * Get a sysctl string value by name. Use string specialization by default.
-+ */
-+template <typename T>
-+int getSysctlByIDWithDefault(const int* sysctlID,
-+ const int idLen,
-+ const T& defaultValue,
-+ T* result);
-+
-+template <>
-+int getSysctlByIDWithDefault<uintptr_t>(const int* sysctlID,
-+ const int idLen,
-+ const uintptr_t& defaultValue,
-+ uintptr_t* result) {
-+ uintptr_t value = 0;
-+ size_t len = sizeof(value);
-+ if (sysctl(sysctlID, idLen, &value, &len, NULL, 0) == -1) {
-+ *result = defaultValue;
-+ return errno;
-+ }
-+ if (len > sizeof(value)) {
-+ *result = defaultValue;
-+ return EINVAL;
-+ }
-+
-+ *result = value;
-+ return 0;
-+}
-+
-+template <>
-+int getSysctlByIDWithDefault<string>(const int* sysctlID,
-+ const int idLen,
-+ const string& defaultValue,
-+ string* result) {
-+ char value[256] = {0};
-+ size_t len = sizeof(value);
-+ if (sysctl(sysctlID, idLen, &value, &len, NULL, 0) == -1) {
-+ *result = defaultValue;
-+ return errno;
-+ }
-+ *result = value;
-+ return 0;
-+}
-+
-+bool ProcessInfo::checkNumaEnabled() {
-+ return false;
-+}
-+
-+int ProcessInfo::getVirtualMemorySize() {
-+ kvm_t* kd = NULL;
-+ int cnt = 0;
-+ char err[_POSIX2_LINE_MAX] = {0};
-+ if ((kd = kvm_openfiles(NULL, NULL, NULL, KVM_NO_FILES, err)) == NULL) {
-+ log() << "Unable to get virt mem size: " << err << endl;
-+ return -1;
-+ }
-+
-+ kinfo_proc2* task = kvm_getproc2(kd, KERN_PROC_PID, _pid.toNative(), sizeof(kinfo_proc2), &cnt);
-+ kvm_close(kd);
-+ return ((task->p_vm_dsize + task->p_vm_ssize + task->p_vm_tsize) * sysconf(_SC_PAGESIZE)) /
-+ 1048576;
-+}
-+
-+int ProcessInfo::getResidentSize() {
-+ kvm_t* kd = NULL;
-+ int cnt = 0;
-+ char err[_POSIX2_LINE_MAX] = {0};
-+ if ((kd = kvm_openfiles(NULL, NULL, NULL, KVM_NO_FILES, err)) == NULL) {
-+ log() << "Unable to get res mem size: " << err << endl;
-+ return -1;
-+ }
-+ kinfo_proc2* task = kvm_getproc2(kd, KERN_PROC_PID, _pid.toNative(), sizeof(kinfo_proc2), &cnt);
-+ kvm_close(kd);
-+ return (task->p_vm_rssize * sysconf(_SC_PAGESIZE)) / 1048576; // convert from pages to MB
-+}
-+
-+double ProcessInfo::getSystemMemoryPressurePercentage() {
-+ return 0.0;
-+}
-+
-+void ProcessInfo::SystemInfo::collectSystemInfo() {
-+ osType = "BSD";
-+ osName = "NetBSD";
-+ int mib[2];
-+
-+ mib[0] = CTL_KERN;
-+ mib[1] = KERN_VERSION;
-+ int status = getSysctlByIDWithDefault(mib, 2, string("unknown"), &osVersion);
-+ if (status != 0)
-+ log() << "Unable to collect OS Version. (errno: " << status << " msg: " << strerror(status)
-+ << ")" << endl;
-+
-+ mib[0] = CTL_HW;
-+ mib[1] = HW_MACHINE;
-+ status = getSysctlByIDWithDefault(mib, 2, string("unknown"), &cpuArch);
-+ if (status != 0)
-+ log() << "Unable to collect Machine Architecture. (errno: " << status
-+ << " msg: " << strerror(status) << ")" << endl;
-+ addrSize = cpuArch.find("64") != std::string::npos ? 64 : 32;
-+
-+ uintptr_t numBuffer;
-+ uintptr_t defaultNum = 1;
-+ mib[0] = CTL_HW;
-+ mib[1] = HW_PHYSMEM;
-+ status = getSysctlByIDWithDefault(mib, 2, defaultNum, &numBuffer);
-+ memSize = numBuffer;
-+ if (status != 0)
-+ log() << "Unable to collect Physical Memory. (errno: " << status
-+ << " msg: " << strerror(status) << ")" << endl;
-+
-+ mib[0] = CTL_HW;
-+ mib[1] = HW_NCPU;
-+ status = getSysctlByIDWithDefault(mib, 2, defaultNum, &numBuffer);
-+ numCores = numBuffer;
-+ if (status != 0)
-+ log() << "Unable to collect Number of CPUs. (errno: " << status
-+ << " msg: " << strerror(status) << ")" << endl;
-+
-+ pageSize = static_cast<unsigned long long>(sysconf(_SC_PAGESIZE));
-+
-+ hasNuma = checkNumaEnabled();
-+}
-+
-+void ProcessInfo::getExtraInfo(BSONObjBuilder& info) {}
-+
-+bool ProcessInfo::supported() {
-+ return true;
-+}
-+
-+bool ProcessInfo::blockCheckSupported() {
-+ return true;
-+}
-+
-+bool ProcessInfo::blockInMemory(const void* start) {
-+ char x = 0;
-+ if (mincore((void*)alignToStartOfPage(start), getPageSize(), &x)) {
-+ log() << "mincore failed: " << errnoWithDescription() << endl;
-+ return 1;
-+ }
-+ return x & 0x1;
-+}
-+
-+bool ProcessInfo::pagesInMemory(const void* start, size_t numPages, vector<char>* out) {
-+ out->resize(numPages);
-+ // int mincore(const void *addr, size_t len, char *vec);
-+ if (mincore((void*)alignToStartOfPage(start), numPages * getPageSize(), &(out->front()))) {
-+ log() << "mincore failed: " << errnoWithDescription() << endl;
-+ return false;
-+ }
-+ for (size_t i = 0; i < numPages; ++i) {
-+ (*out)[i] = 0x1;
-+ }
-+ return true;
-+}
-+}
+
+ #define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl
+
+@@ -39,7 +40,6 @@
+ #include <sys/param.h>
+ #include <sys/sysctl.h>
+ #include <sys/types.h>
+-#include <sys/user.h>
+ #include <sys/vmmeter.h>
+ #include <unistd.h>
+
+@@ -112,7 +112,7 @@ int ProcessInfo::getVirtualMemorySize()
+ return -1;
+ }
+
+- kinfo_proc* task = kvm_getprocs(kd, KERN_PROC_PID, _pid.toNative(), sizeof(kinfo_proc), &cnt);
++ kinfo_proc2* task = kvm_getproc2(kd, KERN_PROC_PID, _pid.toNative(), sizeof(kinfo_proc), &cnt);
+ int vss = ((task->p_vm_dsize + task->p_vm_ssize + task->p_vm_tsize) * sysconf(_SC_PAGESIZE)) /
+ 1048576;
+ kvm_close(kd);
+@@ -127,7 +127,7 @@ int ProcessInfo::getResidentSize() {
+ log() << "Unable to get res mem size: " << err;
+ return -1;
+ }
+- kinfo_proc* task = kvm_getprocs(kd, KERN_PROC_PID, _pid.toNative(), sizeof(kinfo_proc), &cnt);
++ kinfo_proc2* task = kvm_getproc2(kd, KERN_PROC_PID, _pid.toNative(), sizeof(kinfo_proc), &cnt);
+ int rss = (task->p_vm_rssize * sysconf(_SC_PAGESIZE)) / 1048576; // convert from pages to MB
+ kvm_close(kd);
+ return rss;
diff --git a/databases/mongodb/patches/patch-src_mongo_util_time__support.cpp b/databases/mongodb/patches/patch-src_mongo_util_time__support.cpp
new file mode 100644
index 00000000000..02cf883697c
--- /dev/null
+++ b/databases/mongodb/patches/patch-src_mongo_util_time__support.cpp
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_mongo_util_time__support.cpp,v 1.1 2019/03/05 19:35:58 adam Exp $
+
+Add support for NetBSD, OpenBSD, and DragonFly.
+
+--- src/mongo/util/time_support.cpp.orig 2019-03-04 22:11:39.324289612 +0000
++++ src/mongo/util/time_support.cpp
+@@ -938,7 +938,7 @@ private:
+ // Find minimum timer resolution of OS
+ Nanoseconds getMinimumTimerResolution() {
+ Nanoseconds minTimerResolution;
+-#if defined(__linux__) || defined(__FreeBSD__)
++#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ struct timespec tp;
+ clock_getres(CLOCK_REALTIME, &tp);
+ minTimerResolution = Nanoseconds{tp.tv_nsec};
diff --git a/databases/mongodb/patches/patch-src_third__party_IntelRDFPMathLib20U1_LIBRARY_float128_dpml__exception.c b/databases/mongodb/patches/patch-src_third__party_IntelRDFPMathLib20U1_LIBRARY_float128_dpml__exception.c
deleted file mode 100644
index ede5ba2324a..00000000000
--- a/databases/mongodb/patches/patch-src_third__party_IntelRDFPMathLib20U1_LIBRARY_float128_dpml__exception.c
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-src_third__party_IntelRDFPMathLib20U1_LIBRARY_float128_dpml__exception.c,v 1.1 2017/05/29 14:44:47 ryoon Exp $
-
---- src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/dpml_exception.c.orig 2017-04-20 21:43:42.000000000 +0000
-+++ src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/dpml_exception.c
-@@ -131,6 +131,7 @@
- #if !defined(DPML_SIGNAL) && !defined(MINIMAL_SILENT_MODE_EXCEPTION_HANDLER) && \
- !defined(wnt)
-
-+# include <sys/types.h>
- # include <sys/signal.h>
- # define DPML_SIGNAL(p) raise(SIGFPE)
-
diff --git a/databases/mongodb/patches/patch-src_third__party_IntelRDFPMathLib20U1_LIBRARY_float128_op__system.h b/databases/mongodb/patches/patch-src_third__party_IntelRDFPMathLib20U1_LIBRARY_float128_op__system.h
index 95f94df3941..b5aabc738cc 100644
--- a/databases/mongodb/patches/patch-src_third__party_IntelRDFPMathLib20U1_LIBRARY_float128_op__system.h
+++ b/databases/mongodb/patches/patch-src_third__party_IntelRDFPMathLib20U1_LIBRARY_float128_op__system.h
@@ -1,4 +1,6 @@
-$NetBSD: patch-src_third__party_IntelRDFPMathLib20U1_LIBRARY_float128_op__system.h,v 1.1 2017/05/29 14:44:47 ryoon Exp $
+$NetBSD: patch-src_third__party_IntelRDFPMathLib20U1_LIBRARY_float128_op__system.h,v 1.2 2019/03/05 19:35:58 adam Exp $
+
+Support NetBSD.
--- src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/op_system.h.orig 2017-04-20 21:43:42.000000000 +0000
+++ src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/op_system.h
diff --git a/databases/mongodb/patches/patch-src_third__party_IntelRDFPMathLib20U1_LIBRARY_src_bid__functions.h b/databases/mongodb/patches/patch-src_third__party_IntelRDFPMathLib20U1_LIBRARY_src_bid__functions.h
index 6ca17d20a87..4e65b25fd13 100644
--- a/databases/mongodb/patches/patch-src_third__party_IntelRDFPMathLib20U1_LIBRARY_src_bid__functions.h
+++ b/databases/mongodb/patches/patch-src_third__party_IntelRDFPMathLib20U1_LIBRARY_src_bid__functions.h
@@ -1,13 +1,15 @@
-$NetBSD: patch-src_third__party_IntelRDFPMathLib20U1_LIBRARY_src_bid__functions.h,v 1.1 2017/05/29 14:44:47 ryoon Exp $
+$NetBSD: patch-src_third__party_IntelRDFPMathLib20U1_LIBRARY_src_bid__functions.h,v 1.2 2019/03/05 19:35:58 adam Exp $
---- src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h.orig 2017-04-20 21:43:42.000000000 +0000
+Fix buidling.
+
+--- src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h.orig 2019-01-30 14:26:33.000000000 +0000
+++ src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h
-@@ -159,7 +159,7 @@ typedef unsigned long fexcept_t;
+@@ -164,7 +164,7 @@ typedef unsigned long fexcept_t;
typedef unsigned bid__int64 fexcept_t;
#endif
#else
--#ifdef __QNX__
-+#if defined(__QNX__) || defined(__NetBSD__)
+-#if defined(__QNX__) || defined(__OpenBSD__)
++#if defined(__QNX__) || defined(__NetBSD__) || defined(__OpenBSD__)
#include <fenv.h>
#else
typedef unsigned short int fexcept_t;
diff --git a/databases/mongodb/patches/patch-src_third__party_asio-master_asio_include_asio_detail_config.hpp b/databases/mongodb/patches/patch-src_third__party_asio-master_asio_include_asio_detail_config.hpp
new file mode 100644
index 00000000000..a868a87c2d4
--- /dev/null
+++ b/databases/mongodb/patches/patch-src_third__party_asio-master_asio_include_asio_detail_config.hpp
@@ -0,0 +1,26 @@
+$NetBSD: patch-src_third__party_asio-master_asio_include_asio_detail_config.hpp,v 1.1 2019/03/05 19:35:58 adam Exp $
+
+experimental/string_view is deprecated.
+
+--- src/third_party//asio-master/asio/include/asio/detail/config.hpp.orig 2019-03-04 18:53:19.000000000 +0000
++++ src/third_party//asio-master/asio/include/asio/detail/config.hpp
+@@ -784,17 +784,15 @@
+ # if !defined(ASIO_DISABLE_STD_STRING_VIEW)
+ # if defined(__clang__)
+ # if (__cplusplus >= 201402)
+-# if __has_include(<experimental/string_view>)
++# if __has_include(<string_view>)
+ # define ASIO_HAS_STD_STRING_VIEW 1
+-# define ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW 1
+-# endif // __has_include(<experimental/string_view>)
++# endif // __has_include(<string_view>)
+ # endif // (__cplusplus >= 201402)
+ # endif // defined(__clang__)
+ # if defined(__GNUC__)
+ # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4)
+ # if (__cplusplus >= 201402)
+ # define ASIO_HAS_STD_STRING_VIEW 1
+-# define ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW 1
+ # endif // (__cplusplus >= 201402)
+ # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
+ # endif // defined(__GNUC__)
diff --git a/databases/mongodb/patches/patch-src_third__party_wiredtiger_SConscript b/databases/mongodb/patches/patch-src_third__party_wiredtiger_SConscript
index c418d4d2684..523b6c251dd 100644
--- a/databases/mongodb/patches/patch-src_third__party_wiredtiger_SConscript
+++ b/databases/mongodb/patches/patch-src_third__party_wiredtiger_SConscript
@@ -1,6 +1,6 @@
-$NetBSD: patch-src_third__party_wiredtiger_SConscript,v 1.5 2017/10/08 22:17:06 tnn Exp $
+$NetBSD: patch-src_third__party_wiredtiger_SConscript,v 1.6 2019/03/05 19:35:58 adam Exp $
-* Add NetBSD case.
+Support NetBSD and Dragonfly.
--- src/third_party/wiredtiger/SConscript.orig 2017-04-20 21:43:42.000000000 +0000
+++ src/third_party/wiredtiger/SConscript
@@ -17,12 +17,3 @@ $NetBSD: patch-src_third__party_wiredtiger_SConscript,v 1.5 2017/10/08 22:17:06
elif env.TargetOSIs('openbsd'):
env.Append(CPPPATH=["build_openbsd"])
elif env.TargetOSIs('linux'):
-@@ -93,7 +97,7 @@ if (VERSION_MAJOR == None or
- VERSION_MINOR == None or
- VERSION_PATCH == None or
- VERSION_STRING == None):
-- print "Failed to find version variables in " + version_file
-+ print("Failed to find version variables in " + version_file)
- Exit(1)
-
- wiredtiger_includes = """
diff --git a/databases/mongodb/patches/patch-src_third__party_wiredtiger_build__dragonfly_wiredtiger__config.h b/databases/mongodb/patches/patch-src_third__party_wiredtiger_build__dragonfly_wiredtiger__config.h
deleted file mode 100644
index ed84687206a..00000000000
--- a/databases/mongodb/patches/patch-src_third__party_wiredtiger_build__dragonfly_wiredtiger__config.h
+++ /dev/null
@@ -1,159 +0,0 @@
-$NetBSD: patch-src_third__party_wiredtiger_build__dragonfly_wiredtiger__config.h,v 1.1 2016/02/12 03:37:24 ryoon Exp $
-
---- src/third_party/wiredtiger/build_dragonfly/wiredtiger_config.h.orig 2016-02-11 11:07:15.049932059 +0000
-+++ src/third_party/wiredtiger/build_dragonfly/wiredtiger_config.h
-@@ -0,0 +1,154 @@
-+/* wiredtiger_config.h. Generated from config.hin by configure. */
-+/* build_posix/config.hin. Generated from configure.ac by autoheader. */
-+
-+/* Define if building universal (internal helper macro) */
-+/* #undef AC_APPLE_UNIVERSAL_BUILD */
-+
-+/* Define to 1 to pause for debugger attach on failure. */
-+/* #undef HAVE_ATTACH */
-+
-+/* Build the LevelDB API with Basho LevelDB support. */
-+/* #undef HAVE_BASHOLEVELDB */
-+
-+/* Snappy support automatically loaded. */
-+/* #undef HAVE_BUILTIN_EXTENSION_SNAPPY */
-+
-+/* Zlib support automatically loaded. */
-+/* #undef HAVE_BUILTIN_EXTENSION_ZLIB */
-+
-+/* Define to 1 if you have the `clock_gettime' function. */
-+#define HAVE_CLOCK_GETTIME 1
-+
-+/* Define to 1 for diagnostic tests. */
-+/* #undef HAVE_DIAGNOSTIC */
-+
-+/* Define to 1 if you have the <dlfcn.h> header file. */
-+#define HAVE_DLFCN_H 1
-+
-+/* Define to 1 if you have the `fallocate' function. */
-+/* #undef HAVE_FALLOCATE */
-+
-+/* Define to 1 if you have the `fcntl' function. */
-+#define HAVE_FCNTL 1
-+
-+/* Define to 1 if you have the `fdatasync' function. */
-+/* #undef HAVE_FDATASYNC */
-+
-+/* Define to 1 if you have the `fread_unlocked' function. */
-+/* #undef HAVE_FREAD_UNLOCKED */
-+
-+/* Define to 1 if you have the `ftruncate' function. */
-+#define HAVE_FTRUNCATE 1
-+
-+/* Define to 1 if you have the `gettimeofday' function. */
-+#define HAVE_GETTIMEOFDAY 1
-+
-+/* Build the LevelDB API with HyperLevelDB support. */
-+/* #undef HAVE_HYPERLEVELDB */
-+
-+/* Define to 1 if you have the <inttypes.h> header file. */
-+#define HAVE_INTTYPES_H 1
-+
-+/* Define to 1 if you have the `bz2' library (-lbz2). */
-+/* #undef HAVE_LIBBZ2 */
-+
-+/* Define to 1 if you have the `dl' library (-ldl). */
-+/* #undef HAVE_LIBDL */
-+
-+/* Define to 1 if you have the `pthread' library (-lpthread). */
-+#define HAVE_LIBPTHREAD 1
-+
-+/* Define to 1 if you have the `rt' library (-lrt). */
-+#define HAVE_LIBRT 1
-+
-+/* Define to 1 if you have the `snappy' library (-lsnappy). */
-+/* #undef HAVE_LIBSNAPPY */
-+
-+/* Define to 1 if you have the `z' library (-lz). */
-+/* #undef HAVE_LIBZ */
-+
-+/* Define to 1 if you have the <memory.h> header file. */
-+#define HAVE_MEMORY_H 1
-+
-+/* Define to 1 if you have the `posix_fadvise' function. */
-+#define HAVE_POSIX_FADVISE 1
-+
-+/* Define to 1 if you have the `posix_fallocate' function. */
-+#define HAVE_POSIX_FALLOCATE 1
-+
-+/* Define to 1 if you have the `posix_madvise' function. */
-+#define HAVE_POSIX_MADVISE 1
-+
-+/* Define to 1 if you have the `posix_memalign' function. */
-+#define HAVE_POSIX_MEMALIGN 1
-+
-+/* Define to 1 if you have the <pthread_np.h> header file. */
-+#define HAVE_PTHREAD_NP_H 1
-+
-+/* Build the LevelDB API with RocksDB support. */
-+/* #undef HAVE_ROCKSDB */
-+
-+/* Define to 1 if you have the <stdint.h> header file. */
-+#define HAVE_STDINT_H 1
-+
-+/* Define to 1 if you have the <stdlib.h> header file. */
-+#define HAVE_STDLIB_H 1
-+
-+/* Define to 1 if you have the <strings.h> header file. */
-+#define HAVE_STRINGS_H 1
-+
-+/* Define to 1 if you have the <string.h> header file. */
-+#define HAVE_STRING_H 1
-+
-+/* Define to 1 if you have the `strtouq' function. */
-+#define HAVE_STRTOUQ 1
-+
-+/* Define to 1 if you have the `sync_file_range' function. */
-+/* #undef HAVE_SYNC_FILE_RANGE */
-+
-+/* Define to 1 if you have the <sys/stat.h> header file. */
-+#define HAVE_SYS_STAT_H 1
-+
-+/* Define to 1 if you have the <sys/types.h> header file. */
-+#define HAVE_SYS_TYPES_H 1
-+
-+/* Define to 1 if you have the <unistd.h> header file. */
-+#define HAVE_UNISTD_H 1
-+
-+/* Enable verbose message configuration. */
-+/* #undef HAVE_VERBOSE */
-+
-+/* Define to 1 if you have the <x86intrin.h> header file. */
-+/* #undef HAVE_X86INTRIN_H */
-+
-+/* Spinlock type from mutex.h. */
-+#define SPINLOCK_TYPE SPINLOCK_PTHREAD_MUTEX
-+
-+/* Define to 1 if you have the ANSI C header files. */
-+#define STDC_HEADERS 1
-+
-+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
-+ significant byte first (like Motorola and SPARC, unlike Intel). */
-+#if defined AC_APPLE_UNIVERSAL_BUILD
-+# if defined __BIG_ENDIAN__
-+# define WORDS_BIGENDIAN 1
-+# endif
-+#else
-+# ifndef WORDS_BIGENDIAN
-+/* # undef WORDS_BIGENDIAN */
-+# endif
-+#endif
-+
-+/* Default alignment of buffers used for I/O */
-+#define WT_BUFFER_ALIGNMENT_DEFAULT 0
-+
-+/* Enable large inode numbers on Mac OS X 10.5. */
-+#ifndef _DARWIN_USE_64_BIT_INODE
-+# define _DARWIN_USE_64_BIT_INODE 1
-+#endif
-+
-+/* Number of bits in a file offset, on hosts where this is settable. */
-+/* #undef _FILE_OFFSET_BITS */
-+
-+/* Define for large files, on AIX-style hosts. */
-+/* #undef _LARGE_FILES */
diff --git a/databases/mongodb/patches/patch-src_third__party_wiredtiger_build__netbsd_wiredtiger__config.h b/databases/mongodb/patches/patch-src_third__party_wiredtiger_build__netbsd_wiredtiger__config.h
deleted file mode 100644
index f4c4a701f5b..00000000000
--- a/databases/mongodb/patches/patch-src_third__party_wiredtiger_build__netbsd_wiredtiger__config.h
+++ /dev/null
@@ -1,161 +0,0 @@
-$NetBSD: patch-src_third__party_wiredtiger_build__netbsd_wiredtiger__config.h,v 1.3 2016/10/10 13:15:40 ryoon Exp $
-
-* Copy from OpenBSD case.
-
---- src/third_party/wiredtiger/build_netbsd/wiredtiger_config.h.orig 2016-02-11 11:07:20.607136772 +0000
-+++ src/third_party/wiredtiger/build_netbsd/wiredtiger_config.h
-@@ -0,0 +1,154 @@
-+/* wiredtiger_config.h. Generated from config.hin by configure. */
-+/* build_posix/config.hin. Generated from configure.ac by autoheader. */
-+
-+/* Define if building universal (internal helper macro) */
-+/* #undef AC_APPLE_UNIVERSAL_BUILD */
-+
-+/* Define to 1 to pause for debugger attach on failure. */
-+/* #undef HAVE_ATTACH */
-+
-+/* Build the LevelDB API with Basho LevelDB support. */
-+/* #undef HAVE_BASHOLEVELDB */
-+
-+/* Snappy support automatically loaded. */
-+/* #undef HAVE_BUILTIN_EXTENSION_SNAPPY */
-+
-+/* Zlib support automatically loaded. */
-+/* #undef HAVE_BUILTIN_EXTENSION_ZLIB */
-+
-+/* Define to 1 if you have the `clock_gettime' function. */
-+#define HAVE_CLOCK_GETTIME 1
-+
-+/* Define to 1 for diagnostic tests. */
-+/* #undef HAVE_DIAGNOSTIC */
-+
-+/* Define to 1 if you have the <dlfcn.h> header file. */
-+#define HAVE_DLFCN_H 1
-+
-+/* Define to 1 if you have the `fallocate' function. */
-+/* #undef HAVE_FALLOCATE */
-+
-+/* Define to 1 if you have the `fcntl' function. */
-+#define HAVE_FCNTL 1
-+
-+/* Define to 1 if you have the `fdatasync' function. */
-+/* #undef HAVE_FDATASYNC */
-+
-+/* Define to 1 if you have the `fread_unlocked' function. */
-+/* #undef HAVE_FREAD_UNLOCKED */
-+
-+/* Define to 1 if you have the `ftruncate' function. */
-+#define HAVE_FTRUNCATE 1
-+
-+/* Define to 1 if you have the `gettimeofday' function. */
-+#define HAVE_GETTIMEOFDAY 1
-+
-+/* Build the LevelDB API with HyperLevelDB support. */
-+/* #undef HAVE_HYPERLEVELDB */
-+
-+/* Define to 1 if you have the <inttypes.h> header file. */
-+#define HAVE_INTTYPES_H 1
-+
-+/* Define to 1 if you have the `bz2' library (-lbz2). */
-+/* #undef HAVE_LIBBZ2 */
-+
-+/* Define to 1 if you have the `dl' library (-ldl). */
-+/* #undef HAVE_LIBDL */
-+
-+/* Define to 1 if you have the `pthread' library (-lpthread). */
-+#define HAVE_LIBPTHREAD 1
-+
-+/* Define to 1 if you have the `rt' library (-lrt). */
-+/* #undef HAVE_LIBRT */
-+
-+/* Define to 1 if you have the `snappy' library (-lsnappy). */
-+/* #undef HAVE_LIBSNAPPY */
-+
-+/* Define to 1 if you have the `z' library (-lz). */
-+/* #undef HAVE_LIBZ */
-+
-+/* Define to 1 if you have the <memory.h> header file. */
-+#define HAVE_MEMORY_H 1
-+
-+/* Define to 1 if you have the `posix_fadvise' function. */
-+/* #undef HAVE_POSIX_FADVISE */
-+
-+/* Define to 1 if you have the `posix_fallocate' function. */
-+/* #undef HAVE_POSIX_FALLOCATE */
-+
-+/* Define to 1 if you have the `posix_madvise' function. */
-+#define HAVE_POSIX_MADVISE 1
-+
-+/* Define to 1 if you have the `posix_memalign' function. */
-+#define HAVE_POSIX_MEMALIGN 1
-+
-+/* Define to 1 if you have the <pthread_np.h> header file. */
-+/* #undef HAVE_PTHREAD_NP_H */
-+
-+/* Build the LevelDB API with RocksDB support. */
-+/* #undef HAVE_ROCKSDB */
-+
-+/* Define to 1 if you have the <stdint.h> header file. */
-+#define HAVE_STDINT_H 1
-+
-+/* Define to 1 if you have the <stdlib.h> header file. */
-+#define HAVE_STDLIB_H 1
-+
-+/* Define to 1 if you have the <strings.h> header file. */
-+#define HAVE_STRINGS_H 1
-+
-+/* Define to 1 if you have the <string.h> header file. */
-+#define HAVE_STRING_H 1
-+
-+/* Define to 1 if you have the `strtouq' function. */
-+#define HAVE_STRTOUQ 1
-+
-+/* Define to 1 if you have the `sync_file_range' function. */
-+/* #undef HAVE_SYNC_FILE_RANGE */
-+
-+/* Define to 1 if you have the <sys/stat.h> header file. */
-+#define HAVE_SYS_STAT_H 1
-+
-+/* Define to 1 if you have the <sys/types.h> header file. */
-+#define HAVE_SYS_TYPES_H 1
-+
-+/* Define to 1 if you have the <unistd.h> header file. */
-+#define HAVE_UNISTD_H 1
-+
-+/* Enable verbose message configuration. */
-+/* #undef HAVE_VERBOSE */
-+
-+/* Define to 1 if you have the <x86intrin.h> header file. */
-+/* #undef HAVE_X86INTRIN_H */
-+
-+/* Spinlock type from mutex.h. */
-+#define SPINLOCK_TYPE SPINLOCK_PTHREAD_MUTEX
-+
-+/* Define to 1 if you have the ANSI C header files. */
-+#define STDC_HEADERS 1
-+
-+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
-+ significant byte first (like Motorola and SPARC, unlike Intel). */
-+#if defined AC_APPLE_UNIVERSAL_BUILD
-+# if defined __BIG_ENDIAN__
-+# define WORDS_BIGENDIAN 1
-+# endif
-+#else
-+# ifndef WORDS_BIGENDIAN
-+/* # undef WORDS_BIGENDIAN */
-+# endif
-+#endif
-+
-+/* Default alignment of buffers used for I/O */
-+#define WT_BUFFER_ALIGNMENT_DEFAULT 0
-+
-+/* Enable large inode numbers on Mac OS X 10.5. */
-+#ifndef _DARWIN_USE_64_BIT_INODE
-+# define _DARWIN_USE_64_BIT_INODE 1
-+#endif
-+
-+/* Number of bits in a file offset, on hosts where this is settable. */
-+/* #undef _FILE_OFFSET_BITS */
-+
-+/* Define for large files, on AIX-style hosts. */
-+/* #undef _LARGE_FILES */