# -*- 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
PortGroup compiler_blacklist_versions 1.0
PortGroup conflicts_build 1.0
license {AGPL-3 OpenSSLException}
description High-performance, schema-free document-oriented database
long_description ${description}
homepage http://www.mongodb.org/
master_sites http://downloads.mongodb.org/src/
distname ${name}-src-r${version}
checksums rmd160 5ff3ef27495e57d683a47105a5b1f95f48b72ffc \
sha256 0415a9b503f62e40d2ba87f555b553757a14fac281d1d6a583d8d880b8720921
depends_lib port:libpcap \
path:lib/libssl.dylib:openssl
# 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
conflicts_build libbson mongo-c-driver mongo-cxx-driver
build.cmd ${prefix}/bin/scons
build.target all mongobridge mongosniff
build.args CC="${configure.cc}" \
CCFLAGS="${configure.cc_archflags}" \
CPPPATH="${prefix}/include" \
LIBPATH="${prefix}/lib" \
LINKFLAGS="${configure.ld_archflags}" \
TARGET_ARCH=${build_arch} \
--disable-warnings-as-errors \
--osx-version-min=${macosx_deployment_target} \