Skip to content
Browse files

update to node 0.8 and gyp

  • Loading branch information...
1 parent ee7c758 commit 2d516c846dc97106bd65e5c1bc60af3a234f1a63 @rashfael rashfael committed Aug 27, 2012
Showing with 49 additions and 32 deletions.
  1. +22 −0 binding.gyp
  2. +23 −0 deps/msgpack/msgpack.gyp
  3. +2 −6 lib/msgpack.js
  4. +2 −6 package.json
  5. +0 −20 src/wscript
View
22 binding.gyp
@@ -0,0 +1,22 @@
+{
+ "targets": [
+ {
+ 'target_name': 'msgpackBinding',
+ 'sources': [
+ 'src/msgpack.cc',
+ ],
+ 'include_dirs': [
+ 'deps/msgpack'
+ ],
+ 'dependencies': [
+ 'deps/msgpack/msgpack.gyp:libmsgpack'
+ ],
+ 'cflags_cc': [
+ '-fexceptions',
+ '-Wall',
+ '-O3'
+ ],
+ },
+
+ ]
+}
View
23 deps/msgpack/msgpack.gyp
@@ -0,0 +1,23 @@
+{
+ "targets": [
+ {
+ 'target_name': 'libmsgpack',
+ 'include_dirs': [ '.' ],
+ 'type': 'static_library',
+ 'sources': [
+ 'object.cpp',
+ 'objectc.c',
+ 'unpack.c',
+ 'vrefbuffer.c',
+ 'zone.c',
+
+ ],
+ 'cflags_cc': [
+ '-fexceptions',
+ '-Wall',
+ '-O3'
+ ],
+ },
+
+ ]
+}
View
8 lib/msgpack.js
@@ -3,12 +3,8 @@
var buffer = require('buffer');
var events = require('events');
var mpBindings;
-try {
- // Node v0.5.5 or later
- mpBindings = require(__dirname + "/../build/Release/mpBindings");
-} catch(e) {
- mpBindings = require(__dirname + '/../build/default/mpBindings');
-}
+mpBindings = require(__dirname + "/../build/Release/msgpackBinding");
+
var sys;
try {
sys = require('util');
View
8 package.json
@@ -1,7 +1,7 @@
{
"name": "msgpack",
"description": "A space-efficient object serialization library for node.js",
- "version": "0.1.3",
+ "version": "0.1.5",
"homepage": "https://github.com/pgriess/node-msgpack",
"author": "Peter Griess <pg@std.in>",
"contributors": [
@@ -16,12 +16,8 @@
"lib": "lib"
},
"engines": {
- "node": ">=0.1.97"
+ "node": ">=0.8.0"
},
- "scripts": {
- "preinstall": "make",
- "preuninstall": "make clean"
- },
"bin": {
"json2msgpack": "./bin/json2msgpack",
"msgpack2json": "./bin/msgpack2json"
View
20 src/wscript
@@ -1,20 +0,0 @@
-srcdir = '.'
-blddir = '../build'
-VERSION = '0.0.1'
-
-def set_options(ctx):
- ctx.tool_options('compiler_cxx')
-
-def configure(ctx):
- ctx.check_tool('compiler_cxx')
- ctx.check_tool('node_addon')
-
-def build(ctx):
- t = ctx.new_task_gen('cxx', 'shlib', 'node_addon')
- t.target = 'mpBindings'
- t.source = 'msgpack.cc'
- t.includes = ['../deps/msgpack/dist/include']
- t.lib = ['msgpack']
- t.libpath = ['../deps/msgpack/dist/lib']
-
-# vim:ts=4 sw=4 et filetype=python

0 comments on commit 2d516c8

Please sign in to comment.
Something went wrong with that request. Please try again.