diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-08-12 13:29:26 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-08-12 13:29:26 +0200 |
commit | 52939ce2fa7b1aaf4b4f649ea0c9ec26e132ee34 (patch) | |
tree | a17bbb7ea7e6a4fe18e0a6910d30c4a967acd755 | |
parent | 9b9ad20a90f55ffb31bad71d724845d9e5511a4f (diff) | |
download | qtlocation-mapboxgl-52939ce2fa7b1aaf4b4f649ea0c9ec26e132ee34.tar.gz |
pass absolute path to npm executable
-rwxr-xr-x | configure | 9 | ||||
-rw-r--r-- | mapboxgl.gyp | 2 | ||||
-rwxr-xr-x | scripts/npm_install.sh | 2 | ||||
-rwxr-xr-x | setup-libraries.sh | 9 |
4 files changed, 18 insertions, 4 deletions
@@ -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 |