Skip to content

Commit

Permalink
Fixed: indentation, compilation on 64-bit illumos (all Solaris?) based
Browse files Browse the repository at this point in the history
machines

NODESVN-3 #resolve-issue fixed #time 45m
  • Loading branch information
enmand committed Feb 6, 2012
1 parent b870734 commit 9f50127
Showing 1 changed file with 35 additions and 27 deletions.
62 changes: 35 additions & 27 deletions wscript
Original file line number Diff line number Diff line change
@@ -1,38 +1,46 @@
test_paths = ['/usr/', '/usr/local/', '/opt/local/']
import platform
test_paths = ['/opt/local/']

def set_options(opt):
opt.tool_options("compiler_cxx")
opt.tool_options("compiler_cxx")

def configure(conf):
conf.check_tool("compiler_cxx")
conf.check_tool("node_addon")
conf.check(lib='svn_fs-1', libpath=build_paths('lib'))
conf.check(lib='svn_fs_base-1', libpath=build_paths('lib'))
conf.check(lib='svn_fs_fs-1', libpath=build_paths('lib'))
conf.check(lib='svn_client-1', libpath=build_paths('lib'))
conf.check(lib='svn_subr-1', libpath=build_paths('lib'))
conf.check(lib='svn_repos-1', libpath=build_paths('lib'))
conf.check(lib='svn_ra-1', libpath=build_paths('lib'))
conf.check(lib='apr-1', libpath=build_paths('lib'))
conf.check(lib='aprutil-1', libpath=build_paths('lib'));
conf.check_tool("compiler_cxx")
conf.check_tool("node_addon")

if platform.architecture()[0][:2] == "64":
conf.env.append_value('CXXFLAGS', ['-m64'])
conf.env.append_value('LINKFLAGS', ['-m64'])

conf.check(lib='svn_fs-1', libpath=build_paths('lib'))
conf.check(lib='svn_fs_base-1', libpath=build_paths('lib'))
conf.check(lib='svn_fs_fs-1', libpath=build_paths('lib'))
conf.check(lib='svn_client-1', libpath=build_paths('lib'))
conf.check(lib='svn_subr-1', libpath=build_paths('lib'))
conf.check(lib='svn_repos-1', libpath=build_paths('lib'))
conf.check(lib='svn_ra-1', libpath=build_paths('lib'))
conf.check(lib='apr-1', libpath=build_paths('lib'))
conf.check(lib='aprutil-1', libpath=build_paths('lib'));

def build(bld):
obj = bld.new_task_gen("cxx", "shlib", "node_addon")
obj.cxxflags = ["-g", "-D_FILE_OFFSET_BITS=64", "-D_LARGEFILE_SOURCE", "-Wall"]
obj.lib = ['svn_client-1', 'apr-1', 'aprutil-1', 'lib'];
obj.libpath = build_paths('lib') ;
obj.target = "nodesvn"
obj.source = "src/svn.cc"
obj.includes = build_paths('include') + build_paths('include/subversion-1') + build_paths('include/apr-1/') + build_paths('include/apr-1.0')
obj = bld.new_task_gen("cxx", "shlib", "node_addon")
if platform.architecture()[0][:2] == "64":
obj.cxxflags = ["-g", "-m64", "-D_FILE_OFFSET_BITS=64", "-D_LARGEFILE_SOURCE", "-Wall"]
obj.ldflags = ['-m64']

obj.lib = ['svn_client-1', 'apr-1', 'aprutil-1'];
obj.libpath = build_paths('lib') ;
obj.target = "nodesvn"
obj.source = "src/svn.cc"
obj.includes = build_paths('include') + build_paths('include/subversion-1') + build_paths('include/apr-1/') + build_paths('include/apr-1.0')

def all(bld):
configure(bld);
all(bld);
configure(bld);
all(bld);

def build_paths(type):
def normal(path):
if path[-1] == '/':
return path[:-1];
return map(lambda path: normal(path)+'/'+type, test_paths[:]);
def normal(path):
if path[-1] == '/':
return path[:-1];
return map(lambda path: normal(path)+'/'+type, test_paths[:]);

0 comments on commit 9f50127

Please sign in to comment.