2016-10-12 20:36:47 +00:00
|
|
|
diff -up ./node_build/make.js.sodium ./node_build/make.js
|
|
|
|
--- ./node_build/make.js.sodium 2016-10-11 17:39:44.000000000 -0400
|
2016-10-15 02:25:36 +00:00
|
|
|
+++ ./node_build/make.js 2016-10-14 22:23:23.711086438 -0400
|
|
|
|
@@ -252,44 +252,8 @@ Builder.configure({
|
2016-04-18 20:23:46 +00:00
|
|
|
|
|
|
|
}).nThen(function (waitFor) {
|
|
|
|
|
|
|
|
- builder.config.libs.push(dependencyDir + '/cnacl/jsbuild/libnacl.a');
|
|
|
|
- builder.config.includeDirs.push(dependencyDir + '/cnacl/jsbuild/include/');
|
|
|
|
-
|
2016-10-12 20:36:47 +00:00
|
|
|
- // needed for Sign.c which pulls in crypto_int32.h
|
|
|
|
- builder.config.includeDirs.push(dependencyDir + '/cnacl/jsbuild/include_internal/');
|
|
|
|
-
|
2016-04-18 20:23:46 +00:00
|
|
|
- Fs.exists(dependencyDir + '/cnacl/jsbuild/libnacl.a', waitFor(function (exists) {
|
|
|
|
- if (exists) { return; }
|
|
|
|
-
|
|
|
|
- console.log("Build NaCl");
|
|
|
|
- var cwd = process.cwd();
|
|
|
|
- process.chdir(dependencyDir + '/cnacl/');
|
|
|
|
-
|
|
|
|
- var NaCl = require(process.cwd() + '/node_build/make.js');
|
|
|
|
- NaCl.build(function (args, callback) {
|
|
|
|
- if (builder.config.systemName !== 'win32') {
|
|
|
|
- args.unshift('-fPIC');
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- args.unshift(builder.config.optimizeLevel, '-fomit-frame-pointer');
|
|
|
|
-
|
|
|
|
- if (CFLAGS) {
|
|
|
|
- [].push.apply(args, CFLAGS.split(' '));
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (!builder.config.crossCompiling) {
|
|
|
|
- if (NO_MARCH_FLAG.indexOf(process.arch) < -1) {
|
|
|
|
- builder.config.cflags.push('-march=native');
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- builder.cc(args, callback);
|
|
|
|
- },
|
|
|
|
- builder.config,
|
|
|
|
- waitFor(function () {
|
|
|
|
- process.chdir(cwd);
|
|
|
|
- }));
|
|
|
|
- }));
|
|
|
|
+ builder.config.libs.push('-lsodium');
|
|
|
|
+ builder.config.includeDirs.push('/usr/include/sodium/');
|
|
|
|
|
|
|
|
}).nThen(function (waitFor) {
|
|
|
|
|
2016-10-15 02:25:36 +00:00
|
|
|
@@ -430,7 +394,7 @@ Builder.configure({
|
2016-04-18 20:23:46 +00:00
|
|
|
builder.buildExecutable('crypto/random/randombytes.c');
|
|
|
|
|
|
|
|
builder.lintFiles(function (fileName, file, callback) {
|
|
|
|
- if (/dependencies/.test(fileName)) {
|
|
|
|
+ if (/(dependencies|\/usr\/include)/.test(fileName)) {
|
|
|
|
callback('', false);
|
|
|
|
return;
|
|
|
|
}
|