[151595] trunk/dports/databases/mongodb/Portfile

ryandesign at macports.org ryandesign at macports.org
Thu Aug 18 04:40:59 PDT 2016


Revision: 151595
          https://trac.macports.org/changeset/151595
Author:   ryandesign at macports.org
Date:     2016-08-18 04:40:59 -0700 (Thu, 18 Aug 2016)
Log Message:
-----------
mongodb: fix build on 10.7 by using 10.8 SDK

There's either a bug or a behavior we don't understand in the 10.7 version
of math.h that prevents mongodb from building, because the legacy BSD
"drem" function, which is used by the bundled copy of the Google s2
library, cannot be found.

Modified Paths:
--------------
    trunk/dports/databases/mongodb/Portfile

Modified: trunk/dports/databases/mongodb/Portfile
===================================================================
--- trunk/dports/databases/mongodb/Portfile	2016-08-18 10:32:57 UTC (rev 151594)
+++ trunk/dports/databases/mongodb/Portfile	2016-08-18 11:40:59 UTC (rev 151595)
@@ -5,6 +5,7 @@
 PortGroup           compiler_blacklist_versions 1.0
 PortGroup           conflicts_build 1.0
 PortGroup           cxx11 1.0
+PortGroup           xcodeversion 1.0
 
 name                mongodb
 epoch               1
@@ -46,14 +47,28 @@
 # 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.cc_archflags}" \
+                    CCFLAGS="${configure.cflags}" \
                     CPPPATH="${prefix}/include" \
                     CXX="${configure.cxx}" \
                     LIBPATH="${prefix}/lib" \
-                    LINKFLAGS="${configure.ld_archflags}" \
+                    LINKFLAGS="${configure.ldflags}" \
                     TARGET_ARCH=${build_arch} \
                     --disable-warnings-as-errors \
                     --libc++ \
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160818/47f02995/attachment.html>


More information about the macports-changes mailing list