Index: databases/mongodb34/Makefile =================================================================== --- databases/mongodb34/Makefile (nonexistent) +++ databases/mongodb34/Makefile (working copy) @@ -0,0 +1,92 @@ +# $FreeBSD$ + +PORTNAME= mongodb +PORTVERSION= ${DISTVERSION:S/-//g} +DISTVERSIONPREFIX= r +CATEGORIES= databases net +MASTER_SITES= https://fastdl.mongodb.org/src/ \ + http://fastdl.mongodb.org/src/ \ + http://download.mongodb.org/src/ +PKGNAMESUFFIX= ${PORTVERSION:R:S/.//} +DISTVERSION= 3.4.3 +DISTNAME= mongodb-src-${DISTVERSIONPREFIX}${DISTVERSION} + +MAINTAINER= brendan+freebsd@bbqsrc.net +COMMENT= Distributed document-oriented "NoSQL" database + +# mongodb is AGPLv3, C++ driver is APACHE20 +LICENSE= AGPLv3 APACHE20 +LICENSE_COMB= multi + +LIB_DEPENDS= libpcre.so:devel/pcre \ + libsnappy.so:archivers/snappy \ + libboost_system.so:devel/boost-libs +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}yaml>=3.11:devel/py-yaml \ + ${PYTHON_PKGNAMEPREFIX}pymongo>=3.0:databases/pymongo + +CHOSEN_COMPILER_TYPE= clang + +ONLY_FOR_ARCHS= amd64 +ONLY_FOR_ARCHS_REASON= "Only supported on amd64 (i386 deprecated in v3)" + +CONFLICTS_BUILD= mongo-cxx-driver +OPTIONS_DEFINE= SASL SSL +OPTIONS_DEFAULT= SASL SSL + +SASL_LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2 +SASL_MAKE_ARGS= --use-sasl-client + +SSL_USE= yes +SSL_MAKE_ARGS= --ssl + +USES= compiler:c++14-lang cpe execinfo python:build scons + +WITH_DEBUG=yes +MAKE_ARGS= --prefix=${STAGEDIR}${PREFIX} \ + --use-system-pcre --use-system-snappy \ + --use-system-boost --use-system-zlib \ + --cxx-std=14 --libc++ \ + --runtime-hardening=on \ + --disable-warnings-as-errors \ + VERBOSE=on + +USERS= mongodb +GROUPS= mongodb + +USE_RC_SUBR= mongod + +ALL_TARGET= core +TEST_TARGET= unittests + +.include + +.if ${PORT_OPTIONS:MSSL} +USES+= ssl +.endif + +.include + +.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} < 37 +BUILD_DEPENDS+= ${LOCALBASE}/bin/clang37:lang/clang37 +CPP= ${LOCALBASE}/bin/clang-cpp37 +CC= ${LOCALBASE}/bin/clang37 +CXX= ${LOCALBASE}/bin/clang++37 +.endif + +post-install: +.for f in mongo mongod mongoperf mongos + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${f} +.endfor + ${CP} ${WRKSRC}/rpm/mongod.conf ${STAGEDIR}${PREFIX}/etc/mongodb.conf.sample + +do-test: + @cd ${BUILD_WRKSRC} && ${SETENV} ${MAKE_ENV} \ + ${MAKE_CMD} ${_MAKE_JOBS} ${MAKE_ARGS} ${TEST_TARGET} &&\ + ${PYTHON_CMD} ${BUILD_WRKSRC}/buildscripts/resmoke.py\ + --suites=unittests --jobs=${MAKE_JOBS_NUMBER} + +PORTSCOUT= limitw:1,even + +CPE_PRODUCT= mongodb + +.include Property changes on: databases/mongodb34/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: databases/mongodb34/distinfo =================================================================== --- databases/mongodb34/distinfo (nonexistent) +++ databases/mongodb34/distinfo (working copy) @@ -0,0 +1,3 @@ +TIMESTAMP = 1490971850 +SHA256 (mongodb-src-r3.4.3.tar.gz) = 889d49312ed072130936cfa3281123a0e89228c04f3f8e992a0b92669b28d767 +SIZE (mongodb-src-r3.4.3.tar.gz) = 39832718 Property changes on: databases/mongodb34/distinfo ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: databases/mongodb34/files/mongod.in =================================================================== --- databases/mongodb34/files/mongod.in (nonexistent) +++ databases/mongodb34/files/mongod.in (working copy) @@ -0,0 +1,62 @@ +#!/bin/sh + +# PROVIDE: mongod +# REQUIRE: NETWORK ldconfig +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# mongod_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable mongod. +# mongod_limits (bool): Set to "NO" by default. +# Set it to yes to run `limits -e -U mongodb` +# just before mongod starts. +# mongod_dbpath (str): Default to "/var/db/mongodb" +# Base database directory. +# mongod_flags (str): Custom additional arguments to be passed to mongod. +# Default to "--logpath ${mongod_dbpath}/mongod.log --logappend". +# mongod_config (str): Default to "%%PREFIX%%/etc/mongodb.conf" +# Path to config file +# + +. /etc/rc.subr + +name="mongod" +rcvar=mongod_enable + +load_rc_config $name + +: ${mongod_enable="NO"} +: ${mongod_limits="NO"} +: ${mongod_dbpath="/var/db/mongodb"} +: ${mongod_flags="--logpath ${mongod_dbpath}/mongod.log --logappend"} +: ${mongod_user="mongodb"} +: ${mongod_group="mongodb"} +: ${mongod_config="%%PREFIX%%/etc/mongodb.conf"} + +pidfile="${mongod_dbpath}/mongod.lock" +command=%%PREFIX%%/bin/${name} +command_args="--config $mongod_config --dbpath $mongod_dbpath --fork >/dev/null 2>/dev/null" +start_precmd="${name}_prestart" + +mongod_create_dbpath() +{ + mkdir ${mongod_dbpath} >/dev/null 2>/dev/null + [ $? -eq 0 ] && chown -R ${mongod_user}:${mongod_group} ${mongod_dbpath} +} + + +mongod_prestart() +{ + if [ ! -d ${mongod_dbpath} ]; then + mongod_create_dbpath || return 1 + fi + if checkyesno mongod_limits; then + eval `/usr/bin/limits -e -U ${mongod_user}` 2>/dev/null + else + return 0 + fi +} + +run_rc_command "$1" Property changes on: databases/mongodb34/files/mongod.in ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: databases/mongodb34/files/patch-SConstruct =================================================================== --- databases/mongodb34/files/patch-SConstruct (nonexistent) +++ databases/mongodb34/files/patch-SConstruct (working copy) @@ -0,0 +1,72 @@ +--- SConstruct.orig 2017-02-01 11:00:25.000000000 -0800 ++++ SConstruct 2017-02-03 15:15:08.834295000 -0800 +@@ -929,9 +929,9 @@ if has_option('variables-help'): + print env_vars.GenerateHelpText(env) + Exit(0) + +-unknown_vars = env_vars.UnknownVariables() +-if unknown_vars: +- env.FatalError("Unknown variables specified: {0}", ", ".join(unknown_vars.keys())) ++#unknown_vars = env_vars.UnknownVariables() ++#if unknown_vars: ++# env.FatalError("Unknown variables specified: {0}", ", ".join(unknown_vars.keys())) + + def set_config_header_define(env, varname, varval = 1): + env['CONFIG_HEADER_DEFINES'][varname] = varval +@@ -1550,7 +1550,7 @@ if env.TargetOSIs('posix'): + # If runtime hardening is requested, then build anything + # destined for an executable with the necessary flags for PIE. + env.AppendUnique( +- PROGCCFLAGS=['-fPIE'], ++ PROGCCFLAGS=['-fpic'], + PROGLINKFLAGS=['-pie'], + ) + +@@ -1564,7 +1564,7 @@ if env.TargetOSIs('posix'): + "-Wno-unknown-pragmas", + "-Winvalid-pch"] ) + # env.Append( " -Wconversion" ) TODO: this doesn't really work yet +- if env.TargetOSIs('linux', 'osx', 'solaris'): ++ if env.TargetOSIs('linux', 'osx', 'solaris', 'freebsd'): + if not has_option("disable-warnings-as-errors"): + env.Append( CCFLAGS=["-Werror"] ) + +@@ -1592,19 +1592,19 @@ if env.TargetOSIs('posix'): + env.Append( CCFLAGS=["-fprofile-arcs", "-ftest-coverage"] ) + env.Append( LINKFLAGS=["-fprofile-arcs", "-ftest-coverage"] ) + +- if optBuild: +- env.Append( CCFLAGS=["-O2"] ) +- else: +- env.Append( CCFLAGS=["-O0"] ) ++ #if optBuild: ++ # env.Append( CCFLAGS=["-O2"] ) ++ #else: ++ # env.Append( CCFLAGS=["-O0"] ) + + # Promote linker warnings into errors. We can't yet do this on OS X because its linker considers + # noall_load obsolete and warns about it. +- if not env.TargetOSIs('osx'): +- env.Append( +- LINKFLAGS=[ +- "-Wl,--fatal-warnings", +- ], +- ) ++ #if not env.TargetOSIs('osx'): ++ # env.Append( ++ # LINKFLAGS=[ ++ # "-Wl,--fatal-warnings", ++ # ], ++ # ) + + mmapv1 = False + if get_option('mmapv1') == 'auto': +@@ -2461,7 +2461,7 @@ def doConfigure(myenv): + }} + """.format(storage_class) + context.Message('Checking for storage class {0} '.format(storage_class)) +- ret = context.TryLink(textwrap.dedent(test_body), ".cpp") ++ ret = context.TryCompile(textwrap.dedent(test_body), ".cpp") + context.Result(ret) + return ret + Property changes on: databases/mongodb34/files/patch-SConstruct ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: databases/mongodb34/files/patch-rpm_mongod.conf =================================================================== --- databases/mongodb34/files/patch-rpm_mongod.conf (nonexistent) +++ databases/mongodb34/files/patch-rpm_mongod.conf (working copy) @@ -0,0 +1,31 @@ +--- rpm/mongod.conf.orig 2016-10-03 11:32:42.000000000 -0700 ++++ rpm/mongod.conf 2016-10-04 17:46:16.568923000 -0700 +@@ -1,4 +1,4 @@ +-# mongod.conf ++# mongodb.conf + + # for documentation of all options, see: + # http://docs.mongodb.org/manual/reference/configuration-options/ +@@ -7,11 +7,11 @@ + systemLog: + destination: file + logAppend: true +- path: /var/log/mongodb/mongod.log ++ path: /var/log/mongodb/log + + # Where and how to store data. + storage: +- dbPath: /var/lib/mongo ++ dbPath: /var/db/mongo + journal: + enabled: true + # engine: +@@ -21,7 +21,7 @@ storage: + # how the process runs + processManagement: + fork: true # fork and run in background +- pidFilePath: /var/run/mongodb/mongod.pid # location of pidfile ++ pidFilePath: /var/run/mongodb/pid # location of pidfile + + # network interfaces + net: Property changes on: databases/mongodb34/files/patch-rpm_mongod.conf ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: databases/mongodb34/files/patch-src_mongo_db_fts_unicode_string.cpp =================================================================== --- databases/mongodb34/files/patch-src_mongo_db_fts_unicode_string.cpp (nonexistent) +++ databases/mongodb34/files/patch-src_mongo_db_fts_unicode_string.cpp (working copy) @@ -0,0 +1,11 @@ +--- src/mongo/db/fts/unicode/string.cpp.orig 2017-01-18 18:38:12.914420000 -0800 ++++ src/mongo/db/fts/unicode/string.cpp 2017-01-18 18:39:31.136578000 -0800 +@@ -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 Property changes on: databases/mongodb34/files/patch-src_mongo_db_fts_unicode_string.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: databases/mongodb34/pkg-descr =================================================================== --- databases/mongodb34/pkg-descr (nonexistent) +++ databases/mongodb34/pkg-descr (working copy) @@ -0,0 +1,5 @@ +Mongo (from "humongous") is a high-performance, open source, +schema-free, document-oriented database. A common name in the +"NOSQL" community. + +WWW: http://www.mongodb.org/ Property changes on: databases/mongodb34/pkg-descr ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: databases/mongodb34/pkg-plist =================================================================== --- databases/mongodb34/pkg-plist (nonexistent) +++ databases/mongodb34/pkg-plist (working copy) @@ -0,0 +1,5 @@ +@sample etc/mongodb.conf.sample +bin/mongo +bin/mongod +bin/mongoperf +bin/mongos Property changes on: databases/mongodb34/pkg-plist ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property