null+****@clear*****
null+****@clear*****
2012年 4月 18日 (水) 20:40:37 JST
Yoji SHIDARA 2012-04-18 20:40:37 +0900 (Wed, 18 Apr 2012)
New Revision: eeab61d4cce7a70e7623e5b3abeeba0a99700968
Log:
use node-gyp instead of node-waf
Added files:
binding.gyp
Removed files:
wscript
Modified files:
lib/nroonga.js
package.json
src/nroonga.coffee
Added: binding.gyp (+10 -0) 100644
===================================================================
--- /dev/null
+++ binding.gyp 2012-04-18 20:40:37 +0900 (6a76427)
@@ -0,0 +1,10 @@
+{
+ "targets": [
+ {
+ "target_name": "nroonga_bindings",
+ "sources": [ "src/nroonga.cc" ],
+ "include_dirs": ["<!@(pkg-config --cflags-only-I groonga | sed -e 's/-I//g')"],
+ "libraries": ["<!@(pkg-config --libs-only-l groonga)"]
+ }
+ ]
+}
Modified: lib/nroonga.js (+1 -1)
===================================================================
--- lib/nroonga.js 2012-04-18 20:37:26 +0900 (ca71972)
+++ lib/nroonga.js 2012-04-18 20:40:37 +0900 (0bbadbd)
@@ -1,7 +1,7 @@
(function() {
var msgpack, nroonga, optionsToCommandString, overrideOutputType;
- nroonga = module.exports = require('./nroonga_bindings.node');
+ nroonga = module.exports = require('../build/Release/nroonga_bindings.node');
msgpack = require('msgpack2');
Modified: package.json (+3 -2)
===================================================================
--- package.json 2012-04-18 20:37:26 +0900 (16904e4)
+++ package.json 2012-04-18 20:40:37 +0900 (b77977e)
@@ -21,10 +21,11 @@
},
"scripts": {
"test": "expresso",
- "watch": "coffee -c -w -o lib src"
+ "watch": "coffee -c -w -o lib src",
+ "install": "node-gyp rebuild"
},
"main": "./lib/nroonga",
"engines": {
- "node": "~ 0.6.9"
+ "node": "~ 0.6.15"
}
}
Modified: src/nroonga.coffee (+1 -1)
===================================================================
--- src/nroonga.coffee 2012-04-18 20:37:26 +0900 (c946699)
+++ src/nroonga.coffee 2012-04-18 20:40:37 +0900 (469f715)
@@ -1,4 +1,4 @@
-nroonga = module.exports = require('./nroonga_bindings.node')
+nroonga = module.exports = require('../build/Release/nroonga_bindings.node')
msgpack = require('msgpack2')
optionsToCommandString = (command, options) ->
Deleted: wscript (+0 -36) 100644
===================================================================
--- wscript 2012-04-18 20:37:26 +0900 (d555ac5)
+++ /dev/null
@@ -1,36 +0,0 @@
-import os
-from os.path import exists
-from shutil import copy2 as copy
-
-import Options
-import Utils
-
-TARGET = 'nroonga_bindings'
-TARGET_FILE = '%s.node' % TARGET
-built = 'build/Release/%s' % TARGET_FILE
-dest = 'lib/%s' % TARGET_FILE
-
-def set_options(opt):
- opt.tool_options("compiler_cxx")
-
-def configure(conf):
- conf.check_tool("compiler_cxx")
- conf.check_tool("node_addon")
- conf.check_cfg(package='groonga', args='--cflags --libs')
-
-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.target = "nroonga_bindings"
- obj.source = "src/nroonga.cc"
- obj.uselib = ["GROONGA"]
-
-def shutdown():
- if Options.commands['clean']:
- if exists(TARGET_FILE):
- os.unlink(TARGET_FILE)
- if exists(dest):
- os.unlink(dest)
- else:
- if exists(built):
- copy(built, dest)