Ticket #36290: mongodb-2.2.0.diff

File mongodb-2.2.0.diff, 9.6 KB (added by kimuraw (kimura wataru), 12 years ago)

update port:mongodb to 2.2.0

  • mongodb/Portfile

     
    55
    66name                mongodb
    77epoch               1
    8 version             2.0.7
     8version             2.2.0
    99license             AGPL-3
    1010categories          databases
    1111maintainers         ryandesign
     
    1919master_sites        http://downloads.mongodb.org/src/
    2020distname            ${name}-src-r${version}
    2121
    22 checksums           rmd160  7a80f463ea2f7f1de80972fcded3fbe982e6f8f0 \
    23                     sha256  b204d94bc912692bdc154402fbfc2e5c4bd60b09dcbe244f3b2b7657f0a82736
     22checksums           rmd160  08a411e74d3f66e5714f04d537e8c45bcd0fc2fe \
     23                    sha256  084626e476ac747dfae143889c24a10f739cd54480af9bf253f50999f065608b
    2424
    2525depends_build       port:scons
    2626
    27 depends_lib         port:boost \
    28                     port:pcre \
     27depends_lib         port:pcre \
    2928                    port:spidermonkey \
    3029                    port:libpcap \
    3130                    port:snappy
    3231
    3332patchfiles          patch-SConstruct.diff \
    3433                    patch-distsrc-client-SConstruct.diff \
    35                     patch-util-compress.cpp.diff
     34                    patch-src-mongo-util-compress.cpp.diff \
     35                    patch-use-system-sm.diff
    3636
    3737post-patch {
    3838    reinplace "s|@@PREFIX@@|${prefix}|g" \
     
    4848    compiler.blacklist clang
    4949}
    5050
    51 pre-configure {
    52     # https://trac.macports.org/ticket/35118
    53     # https://jira.mongodb.org/browse/SERVER-4314
    54     set boost_version_int [exec awk {/#define BOOST_VERSION/ {print $3}} ${prefix}/include/boost/version.hpp]
    55     scan ${boost_version_int} {%1d%3d%2d} boost_major boost_minor boost_patch
    56     set boost_version "${boost_major}.${boost_minor}.${boost_patch}"
    57     if {[vercmp ${boost_version} 1.50] >= 0} {
    58         ui_error "mongodb ${version} requires boost 1.49.0 or older but you have boost ${boost_version}."
    59         ui_error "To downgrade boost, see https://trac.macports.org/wiki/howto/InstallingOlderPort"
    60         ui_error "or more specifically https://trac.macports.org/ticket/35118#comment:12"
    61         ui_error "After installing boost 1.49.0, install mongodb without upgrading dependencies, i.e.:"
    62         ui_error "    sudo port -n install mongodb"
    63         return -code error "boost ${boost_version} is too new"
    64     }
    65 }
    66 
    6751build.env           TERM=xterm \
    6852                    CFLAGS="[get_canonical_archflags cc]" \
    6953                    CPPFLAGS="-I${prefix}/include/js" \
    7054                    CXXFLAGS="[get_canonical_archflags cxx]" \
    71                     LINKFLAGS="[get_canonical_archflags ld] -lpcre"
     55                    LINKFLAGS="[get_canonical_archflags ld]"
    7256
    7357build.cmd           scons
    7458build.target        all mongobridge mongosniff
    7559build.args          --cxx=${configure.cxx} \
    7660                    --full \
    77                     --use-system-all \
    78                     --usesm
     61                    --use-system-pcre \
     62                    --use-system-snappy \
     63                    --use-system-sm \
     64                    --extralib=pcre,pcrecpp,snappy,js
    7965
    8066eval destroot.env   [option build.env]
    8167destroot.args       ${build.args}
  • mongodb/files/patch-SConstruct.diff

     
    1 --- SConstruct.orig     2012-05-08 09:51:28.000000000 -0500
    2 +++ SConstruct  2012-05-13 18:54:07.000000000 -0500
    3 @@ -503,21 +503,15 @@
     1diff --git SConstruct SConstruct
     2index 1792804..ab051d3 100644
     3--- SConstruct
     4+++ SConstruct
     5@@ -486,21 +486,14 @@ if "darwin" == os.sys.platform:
    46     darwin = True
    57     platform = "osx" # prettier than darwin
    68 
     
    1214     nix = True
    1315 
    1416-    if force64:
    15 -        env.Append( CPPPATH=["/usr/64/include"] )
    16 -        env.Append( LIBPATH=["/usr/64/lib"] )
    17 -        if installDir == DEFAULT_INSTALL_DIR and not distBuild:
    18 -            installDir = "/usr/64/"
     17-       env.Append( EXTRACPPPATH=["/usr/64/include"] )
     18-       env.Append( EXTRALIBPATH=["/usr/64/lib"] )
     19-       if installDir == DEFAULT_INSTALL_DIR:
     20-           installDir = "/usr/64/"
    1921-    else:
    20 -        env.Append( CPPPATH=filterExists(["/sw/include" , "/opt/local/include"]) )
    21 -        env.Append( LIBPATH=filterExists(["/sw/lib/", "/opt/local/lib"]) )
     22-       env.Append( EXTRACPPPATH=filterExists(["/sw/include" , "/opt/local/include"]) )
     23-       env.Append( EXTRALIBPATH=filterExists(["/sw/lib/", "/opt/local/lib"]) )
    2224+    env.Append( CPPPATH=["@@PREFIX@@/include"] )
    2325+    env.Append( LIBPATH=["@@PREFIX@@/lib"] )
    2426+    env["CFLAGS"] = os.getenv("CFLAGS")
    2527+    env["CPPFLAGS"] = os.getenv("CPPFLAGS")
    2628+    env["CXXFLAGS"] = os.getenv("CXXFLAGS")
    2729+    env["LINKFLAGS"] = os.getenv("LINKFLAGS")
    28 +
    2930 
    30  elif "linux2" == os.sys.platform or "linux3" == os.sys.platform:
     31 elif os.sys.platform.startswith("linux"):
    3132     linux = True
    32 @@ -700,7 +694,7 @@
    33          env["CXX"] = "distcc " + env["CXX"]
    34          
    35      # -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used.
    36 -    env.Append( CPPFLAGS="-fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch" )
    37 +    env.Append( CPPFLAGS=" -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch " )
    38      # env.Append( " -Wconversion" ) TODO: this doesn't really work yet
    39      if linux:
    40          env.Append( CPPFLAGS=" -Werror " )
    41 @@ -995,7 +989,7 @@
    42  
    43          myCheckLib( "tcmalloc" , True );  # if successful, appedded 'tcmalloc' to myenv[ LIBS ]
    44          myenv.Append( CPPDEFINES=[ "HEAP_CHECKING" ] )
    45 -        myenv.Append( CPPFLAGS="-fno-omit-frame-pointer" )
    46 +        myenv.Append( CPPFLAGS=" -fno-omit-frame-pointer " )
    47  
    48      # FIXME doConfigure() is being called twice, in the case of the shell. So if it is called
    49      # with shell==True, it'd be on its second call and it would need to rearrange the libraries'
  • mongodb/files/patch-distsrc-client-SConstruct.diff

     
    1 --- distsrc/client/SConstruct.orig      2011-09-11 09:09:34.000000000 -0500
    2 +++ distsrc/client/SConstruct   2011-09-13 03:50:05.000000000 -0500
    3 @@ -39,7 +39,7 @@
    4  linux = False
     1diff --git distsrc/client/SConstruct distsrc/client/SConstruct
     2index abc93ca..cd30518 100755
     3--- distsrc/client/SConstruct
     4+++ distsrc/client/SConstruct
     5@@ -47,7 +47,7 @@ linux = False
     6 win = False
    57 
    6  if "darwin" == os.sys.platform:
     8 if "darwin" == sys.platform:
    79-    addExtraLibs( "/opt/local/" )
    810+    addExtraLibs( "@@PREFIX@@/" )
    911     nix = True
    10  elif "linux2" == os.sys.platform or "linux3" == os.sys.platform:
     12 elif sys.platform in ("linux2", "linux3"):
    1113     nix = True
  • mongodb/files/patch-src-mongo-util-compress.cpp.diff

     
     1diff --git src/mongo/util/compress.cpp src/mongo/util/compress.cpp
     2index 8bde468..6b999c8 100644
     3--- src/mongo/util/compress.cpp
     4+++ src/mongo/util/compress.cpp
     5@@ -2,7 +2,7 @@
     6 
     7 #include "mongo/util/compress.h"
     8 
     9-#include "third_party/snappy/snappy.h"
     10+#include <snappy.h>
     11 
     12 namespace mongo {
     13 
  • mongodb/files/patch-use-system-sm.diff

     
     1diff --git src/mongo/SConscript src/mongo/SConscript
     2index 06022a1..e1dd08f 100644
     3--- src/mongo/SConscript
     4+++ src/mongo/SConscript
     5@@ -175,7 +175,7 @@ env.CppUnitTest('bson_template_evaluator_test', ['scripting/bson_template_evalua
     6 
     7 if usesm:
     8     env.StaticLibrary('scripting', scripting_common_files + ['scripting/engine_spidermonkey.cpp'],
     9-                      LIBDEPS=['$BUILD_DIR/third_party/js-1.7/js', 'bson_template_evaluator'])
     10+                      LIBDEPS=['$BUILD_DIR/third_party/shim_spidermonkey', 'bson_template_evaluator'])
     11 elif usev8:
     12     env.StaticLibrary('scripting', scripting_common_files + ['scripting/engine_v8.cpp',
     13                                                              'scripting/v8_db.cpp',
     14diff --git src/third_party/SConscript src/third_party/SConscript
     15index 5a53571..e4d7a63 100644
     16--- src/third_party/SConscript
     17+++ src/third_party/SConscript
     18@@ -33,6 +33,10 @@ else:
     19     env.StaticLibrary('shim_snappy', ['shim_snappy.cpp'], LIBDEPS=['snappy/snappy'])
     20 
     21 if use_system_version_of_library("sm"):
     22+    if windows:
     23+        env.Append(CPPDEFINES=['XP_WIN'])
     24+    else:
     25+        env.Append(CPPDEFINES=['XP_UNIX'])
     26     env.StaticLibrary("shim_spidermonkey", ['shim_spidermonkey.cpp'], SYSLIBDEPS=['js'])
     27 else:
     28     if windows:
  • mongodb/files/patch-util-compress.cpp.diff

     
    1 --- util/compress.cpp.orig      2011-10-21 19:52:16.000000000 -0500
    2 +++ util/compress.cpp   2011-10-27 19:30:16.000000000 -0500
    3 @@ -1,6 +1,6 @@
    4  // @file compress.cpp
    5  
    6 -#include "../third_party/snappy/snappy.h"
    7 +#include <snappy.h>
    8  #include "compress.h"
    9  #include <string>
    10  #include <string.h>