source: trunk/dports/databases/mongodb/Portfile

Last change on this file was 153456, checked in by ryandesign@…, 12 months ago

mongodb: Update to 3.2.10

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.0 KB
Line 
1# -*- 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
2# $Id: Portfile 153456 2016-10-01 03:51:01Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           compiler_blacklist_versions 1.0
6PortGroup           conflicts_build 1.0
7PortGroup           cxx11 1.0
8PortGroup           xcodeversion 1.0
9
10name                mongodb
11epoch               1
12version             3.2.10
13license             {AGPL-3 OpenSSLException}
14categories          databases
15maintainers         ryandesign
16
17description         High-performance, schema-free document-oriented database
18long_description    ${description}
19
20platforms           darwin
21
22homepage            http://www.mongodb.org/
23master_sites        http://downloads.mongodb.org/src/
24distname            ${name}-src-r${version}
25
26checksums           rmd160  24bc6881712d247672b8f02326123fb8ed30bec7 \
27                    sha256  3bef44f50f302159c26194bcac9d51c81d98d57ea728f55400774850a70f5120
28
29depends_build       port:scons
30
31depends_lib         port:libpcap \
32                    path:lib/libssl.dylib:openssl
33
34license_noconflict  scons
35
36use_configure       no
37
38# mongodb 3.0.5 and later requires C++11. Forcing the use of libc++ is
39# acceptable because mongodb already requires OS X 10.7 or later, so we
40# know libc++ is available; mongodb doesn't provide any libraries for
41# other ports to use; and the only C++ libraries mongodb uses (boost,
42# pcre, snappy) are bundled.
43configure.cxx_stdlib libc++
44
45compiler.blacklist-append *gcc* {clang < 503.0.40} macports-clang-3.3
46
47# TODO: fix me
48conflicts_build     libbson mongo-c-driver mongo-cxx-driver
49
50# https://jira.mongodb.org/browse/SERVER-20320
51minimum_xcodeversions   {11 4.4}
52if {[vercmp ${configure.sdk_version} 10.8] < 0} {
53    configure.sdk_version   10.8
54}
55
56configure.cflags    {*}${configure.cc_archflags}
57configure.ldflags   {*}${configure.ld_archflags}
58
59if {${configure.sdkroot} ne ""} {
60    configure.cflags-append -isysroot${configure.sdkroot}
61    configure.ldflags-append -Wl,-syslibroot,${configure.sdkroot}
62}
63
64build.cmd           ${prefix}/bin/scons
65build.target        all mongobridge mongosniff
66build.args          CC="${configure.cc}" \
67                    CCFLAGS="${configure.cflags}" \
68                    CPPPATH="${prefix}/include" \
69                    CXX="${configure.cxx}" \
70                    LIBPATH="${prefix}/lib" \
71                    LINKFLAGS="${configure.ldflags}" \
72                    TARGET_ARCH=${build_arch} \
73                    --disable-warnings-as-errors \
74                    --libc++ \
75                    --osx-version-min=${macosx_deployment_target} \
76                    --ssl \
77                    --wiredtiger=on
78
79# Specify a short variant dir because the default variant dir is deeply nested
80# and can be very long, so long that on some systems the build will fail with
81# "Argument list too long"; see https://jira.mongodb.org/browse/SERVER-13829
82build.args-append   VARIANT_DIR=MP
83
84# https://jira.mongodb.org/browse/SERVER-22810
85supported_archs     x86_64
86
87destroot.args       {*}${build.args}
88destroot.destdir    --prefix=${destroot}${prefix}
89
90set dbdir           ${prefix}/var/db/mongodb
91set logdir          ${prefix}/var/log/mongodb
92set mongouser       _mongo
93add_users           ${mongouser} group=${mongouser} realname=MongoDB\ Server
94
95post-destroot {
96    xinstall -W ${worksrcpath} mongobridge ${destroot}${prefix}/bin
97
98    xinstall -m 755 -o ${mongouser} -g ${mongouser} -d \
99        ${destroot}${dbdir} \
100        ${destroot}${logdir}
101    destroot.keepdirs-append  \
102        ${destroot}${dbdir} \
103        ${destroot}${logdir}
104}
105
106startupitem.create      yes
107startupitem.executable  sudo -u ${mongouser} ${prefix}/bin/mongod --dbpath ${dbdir} --logpath ${logdir}/mongodb.log --logappend
108
109if {${os.platform} eq "darwin" && ${os.major} < 11} {
110    depends_build
111    depends_lib
112    pre-fetch {
113        ui_error "${name} @${version} requires OS X 10.7 or greater."
114        return -code error "incompatible OS X version"
115    }
116}
117
118livecheck.url       ${homepage}downloads
119livecheck.regex     {mongodb-src-r(\d+\.\d*[02468]\.\d+)\.}
Note: See TracBrowser for help on using the repository browser.