$OpenBSD: patch-deps_npm_node_modules_node-gyp_lib_install_js,v 1.8 2016/01/29 20:12:04 abieber Exp $

Allow building of sub-packages (ie. node-sqlite3) with USE_SYSTRACE
set, also prevents downloading of the node distfile again.

--- deps/npm/node_modules/node-gyp/lib/install.js.orig	Wed Sep 16 07:23:58 2015
+++ deps/npm/node_modules/node-gyp/lib/install.js	Wed Sep 16 07:24:17 2015
@@ -178,7 +178,7 @@ function install (gyp, argv, callback) {
       }
 
       // now download the node tarball
-      var tarPath = gyp.opts.tarball
+      var tarPath = gyp.opts['tarball'] || '${PREFIX}/share/node/${DISTNAME}${EXTRACT_SUFX}' // Fix for OpenBSD
       var badDownload = false
         , extractCount = 0
         , gunzip = zlib.createGunzip()
