93 lines
3.1 KiB
Plaintext
93 lines
3.1 KiB
Plaintext
$NetBSD: patch-SConstruct,v 1.2 2015/05/05 15:54:49 joerg 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:
|
|
@@ -571,6 +577,7 @@ envDict = dict(BUILD_ROOT=buildDir,
|
|
CONFIGUREDIR=sconsDataDir.Dir('sconf_temp'),
|
|
CONFIGURELOG=sconsDataDir.File('config.log'),
|
|
INSTALL_DIR=installDir,
|
|
+ ENV = os.environ
|
|
)
|
|
|
|
if windows:
|
|
@@ -848,6 +855,12 @@ elif solaris:
|
|
env.Append( CPPDEFINES=[ "__sunos__" ] )
|
|
env.Append( LIBS=["socket","resolv","lgrp"] )
|
|
|
|
+elif os.sys.platform.startswith( "dragonfly" ):
|
|
+ env.Append( CPPPATH=[ "/usr/pkg/include" ] )
|
|
+ env.Append( LIBPATH=[ "/usr/pkg/lib" ] )
|
|
+ env.Append( LIBS=[ "m" ] )
|
|
+ env.Append( CPPDEFINES=[ "__dragonfly__" ] )
|
|
+
|
|
elif freebsd:
|
|
env.Append( LIBS=[ "kvm" ] )
|
|
env.Append( EXTRACPPPATH=[ "/usr/local/include" ] )
|
|
@@ -855,6 +868,12 @@ elif freebsd:
|
|
env.Append( CPPDEFINES=[ "__freebsd__" ] )
|
|
env.Append( CCFLAGS=[ "-fno-omit-frame-pointer" ] )
|
|
|
|
+elif os.sys.platform.startswith( "netbsd" ):
|
|
+ env.Append( CPPPATH=[ "/usr/pkg/include" ] )
|
|
+ env.Append( LIBPATH=[ "/usr/pkg/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 +1039,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 +2185,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 +2431,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")
|