Skip to content

Commit

Permalink
more osx fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
oransel committed Feb 29, 2012
1 parent 02053e1 commit 65c890b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
3 changes: 3 additions & 0 deletions HISTORY
@@ -1,3 +1,6 @@
0.2.5 2012-02-29:
Fixes OS X builds

0.2.1 2012-01-29:
Fixes explain function crashes

Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -2,7 +2,7 @@
"author": "Mustafa Oransel",
"name": "talib",
"description": "Technical Analysis Library",
"version": "0.2.4",
"version": "0.2.5",
"homepage":"https://github.com/oransel/node-talib",
"repository": {
"type":"git",
Expand Down
9 changes: 7 additions & 2 deletions src/lib/build.js
@@ -1,4 +1,9 @@
var exec = require('child_process').exec;
var arch = process.arch == 'ia32' ? 'i386' : process.arch == 'x64' ? 'x86_64' : process.arch;

console.log('building talib functions...');
exec('export CFLAGS="-arch ' + arch + '" && export LDFLAGS="-arch ' + arch + '" && ./configure && make ARCH=' + arch);
var flags = "";
if (process.platform == 'darwin') {
var arch = process.arch == 'ia32' ? 'i386' : process.arch == 'x64' ? 'x86_64' : process.arch;
flags = 'export CFLAGS="-arch ' + arch + '" && export LDFLAGS="-arch ' + arch + '" && ';
}
exec(flags + './configure && make');
2 changes: 1 addition & 1 deletion src/talib.cpp
Expand Up @@ -74,7 +74,7 @@ class Talib : ObjectWrap {
persistent_function_template->SetClassName(String::NewSymbol("TALib"));

// Define fields
target->Set(String::New("version"), String::New("0.2.1"));
target->Set(String::New("version"), String::New("0.2.5"));

// Define accessors
target->SetAccessor(String::New("functions"), GetFunctions, NULL);
Expand Down

0 comments on commit 65c890b

Please sign in to comment.