Ticket #36290: mongodb-2.2.0.diff
File mongodb-2.2.0.diff, 9.6 KB (added by kimuraw (kimura wataru), 12 years ago) |
---|
-
mongodb/Portfile
5 5 6 6 name mongodb 7 7 epoch 1 8 version 2. 0.78 version 2.2.0 9 9 license AGPL-3 10 10 categories databases 11 11 maintainers ryandesign … … 19 19 master_sites http://downloads.mongodb.org/src/ 20 20 distname ${name}-src-r${version} 21 21 22 checksums rmd160 7a80f463ea2f7f1de80972fcded3fbe982e6f8f0\23 sha256 b204d94bc912692bdc154402fbfc2e5c4bd60b09dcbe244f3b2b7657f0a8273622 checksums rmd160 08a411e74d3f66e5714f04d537e8c45bcd0fc2fe \ 23 sha256 084626e476ac747dfae143889c24a10f739cd54480af9bf253f50999f065608b 24 24 25 25 depends_build port:scons 26 26 27 depends_lib port:boost \ 28 port:pcre \ 27 depends_lib port:pcre \ 29 28 port:spidermonkey \ 30 29 port:libpcap \ 31 30 port:snappy 32 31 33 32 patchfiles patch-SConstruct.diff \ 34 33 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 36 36 37 37 post-patch { 38 38 reinplace "s|@@PREFIX@@|${prefix}|g" \ … … 48 48 compiler.blacklist clang 49 49 } 50 50 51 pre-configure {52 # https://trac.macports.org/ticket/3511853 # https://jira.mongodb.org/browse/SERVER-431454 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_patch56 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 67 51 build.env TERM=xterm \ 68 52 CFLAGS="[get_canonical_archflags cc]" \ 69 53 CPPFLAGS="-I${prefix}/include/js" \ 70 54 CXXFLAGS="[get_canonical_archflags cxx]" \ 71 LINKFLAGS="[get_canonical_archflags ld] -lpcre"55 LINKFLAGS="[get_canonical_archflags ld]" 72 56 73 57 build.cmd scons 74 58 build.target all mongobridge mongosniff 75 59 build.args --cxx=${configure.cxx} \ 76 60 --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 79 65 80 66 eval destroot.env [option build.env] 81 67 destroot.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 @@ 1 diff --git SConstruct SConstruct 2 index 1792804..ab051d3 100644 3 --- SConstruct 4 +++ SConstruct 5 @@ -486,21 +486,14 @@ if "darwin" == os.sys.platform: 4 6 darwin = True 5 7 platform = "osx" # prettier than darwin 6 8 … … 12 14 nix = True 13 15 14 16 - 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 - 17 - env.Append( EXTRACPPPATH=["/usr/64/include"] ) 18 - env.Append( EXTRALIBPATH=["/usr/64/lib"] ) 19 - if installDir == DEFAULT_INSTALL_DIR: 20 - installDir = "/usr/64/" 19 21 - 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"]) ) 22 24 + env.Append( CPPPATH=["@@PREFIX@@/include"] ) 23 25 + env.Append( LIBPATH=["@@PREFIX@@/lib"] ) 24 26 + env["CFLAGS"] = os.getenv("CFLAGS") 25 27 + env["CPPFLAGS"] = os.getenv("CPPFLAGS") 26 28 + env["CXXFLAGS"] = os.getenv("CXXFLAGS") 27 29 + env["LINKFLAGS"] = os.getenv("LINKFLAGS") 28 +29 30 30 elif "linux2" == os.sys.platform or "linux3" == os.sys.platform:31 elif os.sys.platform.startswith("linux"): 31 32 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 yet39 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 called49 # 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 1 diff --git distsrc/client/SConstruct distsrc/client/SConstruct 2 index abc93ca..cd30518 100755 3 --- distsrc/client/SConstruct 4 +++ distsrc/client/SConstruct 5 @@ -47,7 +47,7 @@ linux = False 6 win = False 5 7 6 if "darwin" == os.sys.platform:8 if "darwin" == sys.platform: 7 9 - addExtraLibs( "/opt/local/" ) 8 10 + addExtraLibs( "@@PREFIX@@/" ) 9 11 nix = True 10 elif "linux2" == os.sys.platform or "linux3" == os.sys.platform:12 elif sys.platform in ("linux2", "linux3"): 11 13 nix = True -
mongodb/files/patch-src-mongo-util-compress.cpp.diff
1 diff --git src/mongo/util/compress.cpp src/mongo/util/compress.cpp 2 index 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
1 diff --git src/mongo/SConscript src/mongo/SConscript 2 index 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', 14 diff --git src/third_party/SConscript src/third_party/SConscript 15 index 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 -05002 +++ util/compress.cpp 2011-10-27 19:30:16.000000000 -05003 @@ -1,6 +1,6 @@4 // @file compress.cpp5 6 -#include "../third_party/snappy/snappy.h"7 +#include <snappy.h>8 #include "compress.h"9 #include <string>10 #include <string.h>