# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 # $Id$ PortSystem 1.0 PortGroup compiler_blacklist_versions 1.0 PortGroup conflicts_build 1.0 PortGroup cxx11 1.0 PortGroup xcodeversion 1.0 name mongodb epoch 1 version 3.2.10 license {AGPL-3 OpenSSLException} categories databases maintainers ryandesign description High-performance, schema-free document-oriented database long_description ${description} platforms darwin homepage http://www.mongodb.org/ master_sites http://downloads.mongodb.org/src/ distname ${name}-src-r${version} checksums rmd160 24bc6881712d247672b8f02326123fb8ed30bec7 \ sha256 3bef44f50f302159c26194bcac9d51c81d98d57ea728f55400774850a70f5120 depends_build port:scons depends_lib port:libpcap \ path:lib/libssl.dylib:openssl license_noconflict scons use_configure no # mongodb 3.0.5 and later requires C++11. Forcing the use of libc++ is # acceptable because mongodb already requires OS X 10.7 or later, so we # know libc++ is available; mongodb doesn't provide any libraries for # other ports to use; and the only C++ libraries mongodb uses (boost, # pcre, snappy) are bundled. configure.cxx_stdlib libc++ compiler.blacklist-append *gcc* {clang < 503.0.40} macports-clang-3.3 # TODO: fix me conflicts_build libbson mongo-c-driver mongo-cxx-driver # https://jira.mongodb.org/browse/SERVER-20320 minimum_xcodeversions {11 4.4} if {[vercmp ${configure.sdk_version} 10.8] < 0} { configure.sdk_version 10.8 } configure.cflags {*}${configure.cc_archflags} configure.ldflags {*}${configure.ld_archflags} if {${configure.sdkroot} ne ""} { configure.cflags-append -isysroot${configure.sdkroot} configure.ldflags-append -Wl,-syslibroot,${configure.sdkroot} } build.cmd ${prefix}/bin/scons build.target all mongobridge mongosniff build.args CC="${configure.cc}" \ CCFLAGS="${configure.cflags}" \ CPPPATH="${prefix}/include" \ CXX="${configure.cxx}" \ LIBPATH="${prefix}/lib" \ LINKFLAGS="${configure.ldflags}" \ TARGET_ARCH=${build_arch} \ --disable-warnings-as-errors \ --libc++ \ --osx-version-min=${macosx_deployment_target} \ --ssl \ --wiredtiger=on # Specify a short variant dir because the default variant dir is deeply nested # and can be very long, so long that on some systems the build will fail with # "Argument list too long"; see https://jira.mongodb.org/browse/SERVER-13829 build.args-append VARIANT_DIR=MP # https://jira.mongodb.org/browse/SERVER-22810 supported_archs x86_64 destroot.args {*}${build.args} destroot.destdir --prefix=${destroot}${prefix} set dbdir ${prefix}/var/db/mongodb set logdir ${prefix}/var/log/mongodb set mongouser _mongo add_users ${mongouser} group=${mongouser} realname=MongoDB\ Server post-destroot { xinstall -W ${worksrcpath} mongobridge ${destroot}${prefix}/bin xinstall -m 755 -o ${mongouser} -g ${mongouser} -d \ ${destroot}${dbdir} \ ${destroot}${logdir} destroot.keepdirs-append \ ${destroot}${dbdir} \ ${destroot}${logdir} } startupitem.create yes startupitem.executable sudo -u ${mongouser} ${prefix}/bin/mongod --dbpath ${dbdir} --logpath ${logdir}/mongodb.log --logappend if {${os.platform} eq "darwin" && ${os.major} < 11} { depends_build depends_lib pre-fetch { ui_error "${name} @${version} requires OS X 10.7 or greater." return -code error "incompatible OS X version" } } livecheck.url ${homepage}downloads livecheck.regex {mongodb-src-r(\d+\.\d*[02468]\.\d+)\.}