summaryrefslogtreecommitdiff
path: root/databases/mongodb/patches/patch-SConstruct
diff options
context:
space:
mode:
Diffstat (limited to 'databases/mongodb/patches/patch-SConstruct')
-rw-r--r--databases/mongodb/patches/patch-SConstruct84
1 files changed, 84 insertions, 0 deletions
diff --git a/databases/mongodb/patches/patch-SConstruct b/databases/mongodb/patches/patch-SConstruct
new file mode 100644
index 00000000000..03c5ebe5e69
--- /dev/null
+++ b/databases/mongodb/patches/patch-SConstruct
@@ -0,0 +1,84 @@
+$NetBSD: patch-SConstruct,v 1.1 2015/05/02 08:10:33 ryoon Exp $
+
+Add support for NetBSD/Dragonfly, fix locations.
+--- SConstruct.orig 2015-04-08 20:28:08.000000000 +0000
++++ SConstruct
+@@ -53,7 +53,9 @@ nix = False
+ linux = False
+ darwin = False
+ windows = False
++dragonfly = False
+ freebsd = False
++netbsd = False
+ openbsd = False
+ solaris = False
+
+@@ -65,8 +67,12 @@ elif platform.startswith("linux"):
+ platform = "linux"
+ elif "sunos5" == platform:
+ solaris = True
++elif platform.startswith( "dragonfly" ):
++ dragonfly = True
+ elif platform.startswith( "freebsd" ):
+ freebsd = True
++elif platform.startswith( "netbsd" ):
++ netbsd = True
+ elif platform.startswith( "openbsd" ):
+ openbsd = True
+ elif "win32" == platform:
+@@ -848,6 +854,12 @@ elif solaris:
+ env.Append( CPPDEFINES=[ "__sunos__" ] )
+ env.Append( LIBS=["socket","resolv","lgrp"] )
+
++elif os.sys.platform.startswith( "dragonfly" ):
++ env.Append( CPPPATH=[ "@PREFIX@/include" ] )
++ env.Append( LIBPATH=[ "@PREFIX@/lib" ] )
++ env.Append( LIBS=[ "m" ] )
++ env.Append( CPPDEFINES=[ "__dragonfly__" ] )
++
+ elif freebsd:
+ env.Append( LIBS=[ "kvm" ] )
+ env.Append( EXTRACPPPATH=[ "/usr/local/include" ] )
+@@ -855,6 +867,12 @@ elif freebsd:
+ env.Append( CPPDEFINES=[ "__freebsd__" ] )
+ env.Append( CCFLAGS=[ "-fno-omit-frame-pointer" ] )
+
++elif os.sys.platform.startswith( "netbsd" ):
++ env.Append( CPPPATH=[ "@PREFIX@/include" ] )
++ env.Append( LIBPATH=[ "@PREFIX@/lib" ] )
++ env.Append( LIBS=[ "m" ] )
++ env.Append( CPPDEFINES=[ "__netbsd__" ] )
++
+ elif openbsd:
+ env.Append( EXTRACPPPATH=[ "/usr/local/include" ] )
+ env.Append( EXTRALIBPATH=[ "/usr/local/lib" ] )
+@@ -1020,8 +1038,11 @@ if nix:
+ env.Append( CCFLAGS=["-Werror"] )
+
+ env.Append( CPPDEFINES=["_FILE_OFFSET_BITS=64"] )
++ env.Append( CPPDEFINES=["XP_UNIX=1"] )
+ env.Append( CXXFLAGS=["-Wnon-virtual-dtor", "-Woverloaded-virtual"] )
++ env.Append( CXXFLAGS=os.environ['CXXFLAGS'] )
+ env.Append( LINKFLAGS=["-fPIC", "-pthread"] )
++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] )
+
+ # SERVER-9761: Ensure early detection of missing symbols in dependent libraries at program
+ # startup.
+@@ -2163,7 +2184,7 @@ def doConfigure(myenv):
+ Exit(1)
+
+ # requires ports devel/libexecinfo to be installed
+- if freebsd or openbsd:
++ if freebsd or openbsd or netbsd or dragonfly:
+ if not conf.CheckLib("execinfo"):
+ print("Cannot find libexecinfo, please install devel/libexecinfo.")
+ Exit(1)
+@@ -2409,7 +2430,7 @@ Export("mongoCodeVersion")
+ Export("usev8")
+ Export("v8version v8suffix")
+ Export("boostSuffix")
+-Export("darwin windows solaris linux freebsd nix openbsd")
++Export("darwin windows solaris linux freebsd nix openbsd netbsd dragonfly")
+ Export('module_sconscripts')
+ Export("debugBuild optBuild")
+ Export("s3push")