Permalink
Browse files

Support arbitrary variation name, fixes build error in Node 0.5.5+.

  • Loading branch information...
justmoon committed Nov 4, 2011
1 parent 70ed3b3 commit 1fa8dd5877bf9de1e0b438290fca19f7b53119ab
Showing with 8 additions and 1 deletion.
  1. +1 −1 kyoto.js
  2. +7 −0 wscript
View
@@ -5,7 +5,7 @@
// possible to do all of this in the bindings, but it's easier this
// way.
-var K = require('./build/default/_kyoto'),
+var K = require('./build/_kyoto'),
LOGIC = K.PolyDB.LOGIC,
NOREC = K.PolyDB.NOREC;
View
@@ -1,10 +1,16 @@
+import os
+
def set_options(opt):
opt.tool_options('compiler_cxx')
def configure(conf):
conf.check_tool('compiler_cxx')
conf.check_tool('node_addon')
+def build_post(bld):
+ module_path = bld.path.find_resource('_kyoto.node').abspath(bld.env)
+ os.system('cp %r build/_kyoto.node' % module_path)
+
def build(bld):
obj = bld.new_task_gen('cxx', 'shlib', 'node_addon')
## http://groups.google.com/group/nodejs/browse_thread/thread/af28b0857a60c7e6
@@ -13,3 +19,4 @@ def build(bld):
obj.source = 'src/_kyoto.cc'
obj.defines = "__STDC_LIMIT_MACROS"
obj.lib = ["kyotocabinet"]
+ bld.add_post_fun(build_post)

0 comments on commit 1fa8dd5

Please sign in to comment.