Ticket #31159: mongodb-2.0.1.diff

File mongodb-2.0.1.diff, 8.3 KB (added by ryandesign (Ryan Carsten Schmidt), 13 years ago)

proposed patch

  • files/lion.patch

     
    1 --- util/processinfo_darwin.cpp.orig
    2 +++ util/processinfo_darwin.cpp
    3 @@ -19,7 +19,7 @@
    4  #include "processinfo.h"
    5  #include "log.h"
    6  
    7 -
    8 +#include <mach/vm_statistics.h>
    9  #include <mach/task_info.h>
    10  
    11  #include <mach/mach_init.h>
    12 @@ -27,7 +27,7 @@
    13  #include <mach/mach_traps.h>
    14  #include <mach/task.h>
    15  #include <mach/vm_map.h>
    16 -#include <mach/shared_memory_server.h>
    17 +#include <mach/shared_region.h>
    18  #include <iostream>
    19  
    20  #include <sys/types.h>
  • 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
     5 
     6 if "darwin" == os.sys.platform:
     7-    addExtraLibs( "/opt/local/" )
     8+    addExtraLibs( "@@PREFIX@@/" )
     9     nix = True
     10 elif "linux2" == os.sys.platform or "linux3" == os.sys.platform:
     11     nix = True
  • files/patch-SConstruct.diff

     
    1 --- SConstruct.orig     2011-03-16 10:33:30.000000000 -0500
    2 +++ SConstruct  2011-03-27 03:30:06.000000000 -0500
    3 @@ -447,21 +447,14 @@
     1--- SConstruct.orig     2011-10-21 19:52:16.000000000 -0500
     2+++ SConstruct  2011-10-27 20:35:05.000000000 -0500
     3@@ -473,21 +473,15 @@
    44     darwin = True
    55     platform = "osx" # prettier than darwin
    66 
     
    2020-        env.Append( CPPPATH=filterExists(["/sw/include" , "/opt/local/include"]) )
    2121-        env.Append( LIBPATH=filterExists(["/sw/lib/", "/opt/local/lib"]) )
    2222+    env.Append( CPPPATH=["@@PREFIX@@/include"] )
    23 +    env.Append( LIBPATH=["@@PREFIX@@/lib/"] )
     23+    env.Append( LIBPATH=["@@PREFIX@@/lib"] )
    2424+    env["CFLAGS"] = os.getenv("CFLAGS")
     25+    env["CPPFLAGS"] = os.getenv("CPPFLAGS")
    2526+    env["CXXFLAGS"] = os.getenv("CXXFLAGS")
    2627+    env["LINKFLAGS"] = os.getenv("LINKFLAGS")
    2728+
    2829 
    29  elif "linux2" == os.sys.platform:
     30 elif "linux2" == os.sys.platform or "linux3" == os.sys.platform:
    3031     linux = True
    31 @@ -931,11 +924,7 @@
    32          haveReadLine = False
    33          if darwin:
    34              myenv.Append( CPPDEFINES=[ "USE_READLINE" ] )
    35 -            if force64:
    36 -                myCheckLib( "readline" , True )
    37 -                myCheckLib( "ncurses" , True )
    38 -            else:
    39 -                myenv.Append( LINKFLAGS=" /usr/lib/libreadline.dylib " )
    40 +            myenv.Append( LINKFLAGS=" @@PREFIX@@/lib/libreadline.dylib " )
    41          elif openbsd:
    42              myenv.Append( CPPDEFINES=[ "USE_READLINE" ] )
    43              myCheckLib( "termcap" , True )
    44 @@ -1176,8 +1165,6 @@
    45          shellEnv["LINKFLAGS"].remove("-m64")
    46          shellEnv["CPPPATH"].remove( "/usr/64/include" )
    47          shellEnv["LIBPATH"].remove( "/usr/64/lib" )
    48 -        shellEnv.Append( CPPPATH=filterExists(["/sw/include" , "/opt/local/include"]) )
    49 -        shellEnv.Append( LIBPATH=filterExists(["/sw/lib/", "/opt/local/lib" , "/usr/lib", "/usr/local/lib" ]) )
     32@@ -670,7 +664,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@@ -757,21 +751,6 @@
     42         keyfile = "jstests/libs/key%s" % keysuffix
     43         os.chmod( keyfile , stat.S_IWUSR|stat.S_IRUSR )
    5044 
    51      l = shellEnv["LIBS"]
     45-for x in os.listdir( "third_party" ):
     46-    if not x.endswith( ".py" ) or x.find( "#" ) >= 0:
     47-        continue
     48-         
     49-    shortName = x.rpartition( "." )[0]
     50-    path = "third_party/%s" % x
     51-
     52-
     53-    myModule = imp.load_module( "third_party_%s" % shortName , open( path , "r" ) , path , ( ".py" , "r" , imp.PY_SOURCE ) )
     54-    fileLists = { "commonFiles" : commonFiles , "serverOnlyFiles" : serverOnlyFiles , "scriptingFiles" : scriptingFiles }
     55-   
     56-    options_topass["windows"] = windows
     57-    options_topass["nix"] = nix
     58-   
     59-    myModule.configure( env , fileLists , options_topass )
    5260 
     61 coreServerFiles += scriptingFiles
     62 
     63@@ -963,7 +942,7 @@
     64 
     65         myCheckLib( "tcmalloc" , True );  # if successful, appedded 'tcmalloc' to myenv[ LIBS ]
     66         myenv.Append( CPPDEFINES=[ "HEAP_CHECKING" ] )
     67-        myenv.Append( CPPFLAGS="-fno-omit-frame-pointer" )
     68+        myenv.Append( CPPFLAGS=" -fno-omit-frame-pointer " )
     69 
     70     # FIXME doConfigure() is being called twice, in the case of the shell. So if it is called
     71     # with shell==True, it'd be on its second call and it would need to rearrange the libraries'
  • 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>
  • Portfile

     
    44
    55name                mongodb
    66epoch               1
    7 version             1.8.3
     7version             2.0.1
    88license             AGPL-3.0
    99categories          databases
    1010maintainers         nomaintainer
     
    1818master_sites        http://downloads.mongodb.org/src/
    1919distname            ${name}-src-r${version}
    2020
    21 checksums           rmd160  9662b6963e7e6a4b5adcbea3faa36dd50a794457 \
    22                     sha256  ee121c9698a48b819f1c5b5ba10a98d565bd732d527743f1475f54f697dd63e2
     21checksums           rmd160  e98af1398a9eb0ce0b5a6eae28dc93963cac4630 \
     22                    sha256  4acbf4186b03fffabd6ea36f8312b173ea0f34b919833675b5f7330ef0470749
    2323
    2424depends_build       port:scons
    2525
     
    2727                    port:pcre \
    2828                    port:spidermonkey \
    2929                    port:libpcap \
    30                     port:readline
     30                    port:snappy
    3131
    32 patchfiles          patch-SConstruct.diff
     32patchfiles          patch-SConstruct.diff \
     33                    patch-distsrc-client-SConstruct.diff \
     34                    patch-util-compress.cpp.diff
    3335
    3436post-patch {
    35     reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/SConstruct
     37    # Delete all included third-party libraries, except linenoise for which
     38    # we don't have a port yet (there doesn't seem to be a stable release).
     39    foreach x [glob ${worksrcpath}/third_party/*] {
     40        if {"linenoise" != [file tail ${x}]} {
     41            delete ${x}
     42        }
     43    }
     44   
     45    reinplace "s|@@PREFIX@@|${prefix}|g" \
     46        ${worksrcpath}/SConstruct \
     47        ${worksrcpath}/distsrc/client/SConstruct
    3648}
    3749
    3850use_configure       no
     
    4153
    4254build.env           TERM=xterm \
    4355                    CFLAGS="[get_canonical_archflags]" \
     56                    CPPFLAGS="-I${prefix}/include/js -DXP_UNIX" \
    4457                    CXXFLAGS="[get_canonical_archflags]" \
    45                     LINKFLAGS="[get_canonical_archflags]"
     58                    LINKFLAGS="[get_canonical_archflags] -ljs -lpcre -lpcrecpp -lsnappy"
    4659build.cmd           scons
    4760build.args          --usesm --cxx=${configure.cxx} --full
    4861build.target        all mongobridge mongosniff
     
    7487startupitem.create      yes
    7588startupitem.executable  sudo -u ${mongouser} ${prefix}/bin/mongod --dbpath ${dbdir} --logpath ${logdir}/mongodb.log --logappend
    7689
    77 platform darwin 11 {
    78     patchfiles-append lion.patch
    79 }
    80 
    8190livecheck.url       ${homepage}downloads
    8291livecheck.regex     {mongodb-src-r(\d+\.\d*[02468]\.\d+)\.}