blob: 7832de0e4e4bdfcbf16a7b9ded2bd4bc84a93c61 [file] [log] [blame]
# -*- 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: Portfile 105364 2013-04-18 22:24:52Z ryandesign@macports.org $
PortSystem 1.0
PortGroup compiler_blacklist_versions 1.0
name mongodb
epoch 1
version 2.4.2
license AGPL-3
categories databases
maintainers ryandesign
revision 1
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 896884f72ae94caee1405df658bd7878ef5c5fbb \
sha256 d0a26fef7f425a6652ebfc3addbc7e1b01a10be65c9d68e464730687bd6721c3
depends_build port:scons
depends_lib port:libpcap \
port:pcre \
port:snappy \
port:v8 \
port:boost
license_noconflict scons
# As of mongodb 2.2.0, we use the bundled copy of boost to guard against
# potential incompatible changes that might be made in the boost port.
patchfiles patch-SConstruct.diff \
patch-distsrc-client-SConstruct.diff \
patch-src-SConscript.client.diff \
patch-src-mongo-util-compress.cpp.diff
post-patch {
reinplace "s|@@PREFIX@@|${prefix}|g" \
${worksrcpath}/distsrc/client/SConstruct
}
use_configure no
variant universal {}
compiler.blacklist gcc-4.0 {clang < 318.0.45}
build.env TERM=xterm \
ARCHFLAGS="[get_canonical_archflags]" \
CPPFLAGS="${configure.cppflags}" \
LDFLAGS="${configure.ldflags}"
build.cmd ${prefix}/bin/scons
build.target all mongobridge mongosniff
build.args --cc=${configure.cc} \
--cxx=${configure.cxx} \
--full \
--use-system-pcre \
--use-system-snappy \
--use-system-boost \
--use-system-v8 \
--extralib=pcre,pcrecpp,snappy
eval destroot.env [option build.env]
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} == "darwin" && ${os.major} < 10} {
depends_build
depends_lib
pre-fetch {
ui_error "${name} ${version} requires OS X 10.6 or greater."
return -code error "incompatible OS X version"
}
}
livecheck.url ${homepage}downloads
livecheck.regex {mongodb-src-r(\d+\.\d*[02468]\.\d+)\.}