sodium-native
Advanced tools
Comparing version 2.1.2 to 2.1.3
# CHANGELOG | ||
## v2.1.3 | ||
Rework build process so it is more versatile on UNIX operating systems by | ||
parsing the libtool archive files for correct .so name. This fixes builds on | ||
OpenBSD (#54) | ||
## v2.1.2 | ||
Fix `armv7l` builds. | ||
## v2.1.1 | ||
@@ -4,0 +14,0 @@ |
{ | ||
"name": "sodium-native", | ||
"version": "2.1.2", | ||
"version": "2.1.3", | ||
"description": "Low level bindings for libsodium", | ||
"main": "index.js", | ||
"dependencies": { | ||
"ini": "^1.3.5", | ||
"nan": "^2.4.0", | ||
@@ -8,0 +9,0 @@ "node-gyp-build": "^3.0.0" |
@@ -5,5 +5,7 @@ var os = require('os') | ||
var proc = require('child_process') | ||
var ini = require('ini') | ||
var release = path.join(__dirname, 'build/Release') | ||
var debug = path.join(__dirname, 'build/Debug') | ||
var tmp = path.join(__dirname, 'tmp') | ||
var build = fs.existsSync(release) ? release : debug | ||
@@ -23,7 +25,4 @@ var arch = process.env.ARCH || os.arch() | ||
case 'openbsd': | ||
buildBSD() | ||
break | ||
default: | ||
buildLinux() | ||
buildUnix() | ||
break | ||
@@ -41,20 +40,8 @@ } | ||
function buildLinux () { | ||
var lib = path.join(__dirname, 'lib/libsodium-' + arch + '.so.23') | ||
var dst = path.join(build, 'libsodium.so.23') | ||
if (fs.existsSync(dst)) return | ||
copy(lib, dst, function (err) { | ||
if (err) throw err | ||
}) | ||
} | ||
function buildUnix () { | ||
var lib = fs.realpathSync(path.join(__dirname, 'lib/libsodium-' + arch + '.so')) | ||
function buildBSD () { | ||
var lib = path.join(__dirname, 'lib/libsodium-' + arch + '.so.23') | ||
var dst = path.join(build, 'libsodium.so.23') | ||
var la = ini.decode(fs.readFileSync(path.join(tmp, 'lib/libsodium.la')).toString()) | ||
var dst = path.join(build, la.dlname) | ||
if (os.platform() === 'openbsd') { | ||
lib = lib + '.0' | ||
dst = dst + '.0' | ||
} | ||
if (fs.existsSync(dst)) return | ||
@@ -61,0 +48,0 @@ copy(lib, dst, function (err) { |
@@ -7,2 +7,3 @@ #!/usr/bin/env node | ||
var path = require('path') | ||
var ini = require('ini') | ||
@@ -30,7 +31,5 @@ var dir = path.join(__dirname, 'libsodium') | ||
case 'openbsd': | ||
console.log(path.join(__dirname, 'lib/libsodium-' + arch + '.so.23.0')) | ||
break | ||
case 'freebsd': | ||
case 'linux': | ||
console.log(path.join(__dirname, 'lib/libsodium-' + arch + '.so.23')) | ||
console.log(path.join(__dirname, 'lib/libsodium-' + arch + '.so')) | ||
break | ||
@@ -58,14 +57,7 @@ case 'win32': | ||
case 'openbsd': | ||
buildUnix('so.23.0', function (err) { | ||
default: | ||
buildUnix('so', function (err) { | ||
if (err) throw err | ||
}) | ||
break | ||
case 'freebsd': | ||
buildBSD() | ||
break | ||
default: | ||
buildLinux() | ||
break | ||
} | ||
@@ -104,3 +96,5 @@ | ||
var lib = fs.realpathSync(path.join(tmp, 'lib/libsodium.' + ext)) | ||
var la = ini.decode(fs.readFileSync(path.join(tmp, 'lib/libsodium.la')).toString()) | ||
var lib = fs.realpathSync(path.join(la.libdir, la.dlname)) | ||
fs.rename(lib, res, function (err) { | ||
@@ -124,14 +118,2 @@ if (err) throw err | ||
function buildBSD () { | ||
buildUnix('so.23', function (err) { | ||
if (err) throw err | ||
}) | ||
} | ||
function buildLinux () { | ||
buildUnix('so.23', function (err) { | ||
if (err) throw err | ||
}) | ||
} | ||
function spawn (cmd, args, opts, cb) { | ||
@@ -138,0 +120,0 @@ var c = proc.spawn(cmd, args, opts) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20196304
3
1489
+ Addedini@^1.3.5
+ Addedini@1.3.8(transitive)