summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-08-12 13:29:26 +0200
committerKonstantin Käfer <mail@kkaefer.com>2014-08-12 13:29:26 +0200
commit52939ce2fa7b1aaf4b4f649ea0c9ec26e132ee34 (patch)
treea17bbb7ea7e6a4fe18e0a6910d30c4a967acd755
parent9b9ad20a90f55ffb31bad71d724845d9e5511a4f (diff)
downloadqtlocation-mapboxgl-52939ce2fa7b1aaf4b4f649ea0c9ec26e132ee34.tar.gz
pass absolute path to npm executable
-rwxr-xr-xconfigure9
-rw-r--r--mapboxgl.gyp2
-rwxr-xr-xscripts/npm_install.sh2
-rwxr-xr-xsetup-libraries.sh9
4 files changed, 18 insertions, 4 deletions
diff --git a/configure b/configure
index f1a39cbbcf..a38c587d69 100755
--- a/configure
+++ b/configure
@@ -22,6 +22,11 @@ parser.add_option("--node",
dest="node",
help="Name of the node executable (defaults to node)")
+parser.add_option("--npm",
+ action="store",
+ dest="npm",
+ help="Name of the npm executable (defaults to npm)")
+
parser.add_option("--pkg-config-root",
action="store",
dest="pkgconfig_root",
@@ -59,6 +64,10 @@ def configure_mbgl(o):
o['variables']['node'] = options.node
else:
o['variables']['node'] = 'node'
+ if options.npm:
+ o['variables']['npm'] = options.npm
+ else:
+ o['variables']['npm'] = 'npm'
o['target_defaults']['default_configuration'] = 'Debug' if options.debug else 'Release'
diff --git a/mapboxgl.gyp b/mapboxgl.gyp
index 5af90fbc97..5682d7e02a 100644
--- a/mapboxgl.gyp
+++ b/mapboxgl.gyp
@@ -49,7 +49,7 @@
'outputs': [
'bin/node_modules',
],
- 'action': ['./scripts/npm_install.sh']
+ 'action': ['./scripts/npm_install.sh', '<@(npm)']
}
],
},
diff --git a/scripts/npm_install.sh b/scripts/npm_install.sh
index b6a4eef5f6..7437af9619 100755
--- a/scripts/npm_install.sh
+++ b/scripts/npm_install.sh
@@ -4,5 +4,5 @@ set -e
set -o pipefail
cd bin
-npm install --clang=1
+$1 install --clang=1
cd ../
diff --git a/setup-libraries.sh b/setup-libraries.sh
index aa0360d988..3e5e897a79 100755
--- a/setup-libraries.sh
+++ b/setup-libraries.sh
@@ -40,6 +40,9 @@ if [[ $MISSING_DEPS != "" ]]; then
exit 1
fi
+NODE=`which node`
+NPM=`which npm`
+
if [ ! -d 'mapnik-packaging/.git' ]; then
git clone --depth=1 https://github.com/mapnik/mapnik-packaging.git
fi
@@ -92,7 +95,8 @@ cd ../../
./configure \
--pkg-config-root=`pwd`/mapnik-packaging/osx/out/build-cpp11-libcpp-universal/lib/pkgconfig \
--boost=`pwd`/mapnik-packaging/osx/out/build-cpp11-libcpp-universal \
---node=`which node`
+--npm=$NPM \
+--node=$NODE
elif [ ${UNAME} = 'Linux' ]; then
@@ -122,5 +126,6 @@ cd ../../
./configure \
--pkg-config-root=`pwd`/mapnik-packaging/osx/out/build-cpp11-libstdcpp-gcc-x86_64-linux/lib/pkgconfig \
--boost=`pwd`/mapnik-packaging/osx/out/build-cpp11-libstdcpp-gcc-x86_64-linux \
---node=`which node`
+--npm=$NPM \
+--node=$NODE
fi