fix install from source on FreeBSD 10
Compile with CXX=c++ on FreeBSD, as FreeBSD >= 10.0 no longer has GCC in the base system (c++ is hardlinked to clang++ on FreeBSD 10.0 and g++ on FreeBSD < 10).master
parent
dcba513108
commit
3b21b76106
5
nvm.sh
5
nvm.sh
|
@ -304,6 +304,7 @@ nvm() {
|
||||||
make='make'
|
make='make'
|
||||||
if [ "$os" = "freebsd" ]; then
|
if [ "$os" = "freebsd" ]; then
|
||||||
make='gmake'
|
make='gmake'
|
||||||
|
MAKE_CXX="CXX=c++"
|
||||||
fi
|
fi
|
||||||
local tmpdir="$NVM_DIR/src"
|
local tmpdir="$NVM_DIR/src"
|
||||||
local tmptarball="$tmpdir/node-$VERSION.tar.gz"
|
local tmptarball="$tmpdir/node-$VERSION.tar.gz"
|
||||||
|
@ -321,9 +322,9 @@ nvm() {
|
||||||
tar -xzf "$tmptarball" -C "$tmpdir" && \
|
tar -xzf "$tmptarball" -C "$tmpdir" && \
|
||||||
cd "$tmpdir/node-$VERSION" && \
|
cd "$tmpdir/node-$VERSION" && \
|
||||||
./configure --prefix="$NVM_DIR/$VERSION" $ADDITIONAL_PARAMETERS && \
|
./configure --prefix="$NVM_DIR/$VERSION" $ADDITIONAL_PARAMETERS && \
|
||||||
$make && \
|
$make $MAKE_CXX && \
|
||||||
rm -f "$NVM_DIR/$VERSION" 2>/dev/null && \
|
rm -f "$NVM_DIR/$VERSION" 2>/dev/null && \
|
||||||
$make install
|
$make $MAKE_CXX install
|
||||||
)
|
)
|
||||||
then
|
then
|
||||||
nvm use $VERSION
|
nvm use $VERSION
|
||||||
|
|
Loading…
Reference in New Issue