# -*- 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 muniversal 1.0 name mongodb epoch 1 version 3.0.4 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 e67ad3559cbe1c2ee56ed4f5b33cf1901c0b76c2 \ sha256 6de7aa8b12ad892ee3852ac949069fda8cb87b3ee606a88226817505e2864360 depends_build port:scons depends_lib port:boost \ port:libpcap \ port:openssl \ port:pcre \ port:snappy license_noconflict scons patchfiles-append patch-src-mongo-util-compress.cpp.diff use_configure no compiler.blacklist *gcc* {clang < 503.0.40} macports-clang-3.3 # TODO: fix me conflicts_build libbson mongo-c-driver mongo-cxx-driver v8 build.env TERM=xterm build.cmd ${prefix}/bin/scons build.target all mongobridge mongosniff build.args --cc=${configure.cc} \ --cxx=${configure.cxx} \ --cpppath=${prefix}/include \ --libpath=${prefix}/lib \ --osx-version-min=${macosx_deployment_target} \ --ssl \ --system-boost-lib-search-suffixes=-mt \ --use-system-boost \ --use-system-pcre \ --use-system-snappy \ --extralib=pcre,pcrecpp,snappy supported_archs i386 x86_64 lappend merger_build_args(i386) --32 lappend merger_build_args(x86_64) --64 lappend merger_destroot_args(i386) --32 lappend merger_destroot_args(x86_64) --64 if {![variant_isset universal] && [info exists merger_build_args(${build_arch})]} { build.args-append $merger_build_args(${build_arch}) } eval destroot.env [option build.env] eval destroot.args [option 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 { if {[variant_isset universal]} { system -W ${worksrcpath} "lipo -create ${worksrcpath}-i386/mongobridge ${worksrcpath}-x86_64/mongobridge -output mongobridge" } 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+)\.}