pass absolute path to npm executable
This commit is contained in:
9
configure
vendored
9
configure
vendored
@@ -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'
|
||||
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
'outputs': [
|
||||
'bin/node_modules',
|
||||
],
|
||||
'action': ['./scripts/npm_install.sh']
|
||||
'action': ['./scripts/npm_install.sh', '<@(npm)']
|
||||
}
|
||||
],
|
||||
},
|
||||
|
||||
@@ -4,5 +4,5 @@ set -e
|
||||
set -o pipefail
|
||||
|
||||
cd bin
|
||||
npm install --clang=1
|
||||
$1 install --clang=1
|
||||
cd ../
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user