From 058f1f26b190e6b888f1cacc14019bed7b612dcb Mon Sep 17 00:00:00 2001 From: Igor Klopov Date: Sat, 1 Oct 2016 19:55:13 +0000 Subject: [PATCH] add support for freebsd --- lib/build.js | 3 ++- lib/system.js | 2 +- lib/upload.js | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/build.js b/lib/build.js index 099ac4e..fce0541 100644 --- a/lib/build.js +++ b/lib/build.js @@ -54,7 +54,8 @@ async function compileOnUnix (nodeVersion, targetArch) { armv6: 'arm', armv7: 'arm' }[targetArch]; args.push('--dest-cpu', cpu); await spawn('./configure', args, { cwd: nodePath }); - const promise = spawn('make', [], { cwd: nodePath }); + const make = process.platform === 'freebsd' ? 'gmake' : 'make'; + const promise = spawn(make, [], { cwd: nodePath }); progress(promise, thresholds('make', nodeVersion)); await promise; return path.join(nodePath, 'out/Release/node'); diff --git a/lib/system.js b/lib/system.js index 327a042..1f9586b 100644 --- a/lib/system.js +++ b/lib/system.js @@ -25,7 +25,7 @@ function getHostPlatform () { } function getKnownPlatforms () { - return [ 'linux', 'macos', 'win' ]; + return [ 'freebsd', 'linux', 'macos', 'win' ]; } export function toFancyArch (arch) { diff --git a/lib/upload.js b/lib/upload.js index c9bf10b..47fbbba 100644 --- a/lib/upload.js +++ b/lib/upload.js @@ -18,6 +18,9 @@ function dontBuild (nodeVersion, targetArch) { // official node 0.12 does not compile on arm if (/^v?0/.test(nodeVersion) && /^arm/.test(targetArch)) return true; + // some obstacles on freebsd + if (/^v?0/.test(nodeVersion) && + hostPlatform === 'freebsd') return true; return false; }