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
Fraser Tweedale 2014-02-22 11:58:39 +10:00
parent dcba513108
commit 3b21b76106
1 changed files with 3 additions and 2 deletions

5
nvm.sh
View File

@ -304,6 +304,7 @@ nvm() {
make='make'
if [ "$os" = "freebsd" ]; then
make='gmake'
MAKE_CXX="CXX=c++"
fi
local tmpdir="$NVM_DIR/src"
local tmptarball="$tmpdir/node-$VERSION.tar.gz"
@ -321,9 +322,9 @@ nvm() {
tar -xzf "$tmptarball" -C "$tmpdir" && \
cd "$tmpdir/node-$VERSION" && \
./configure --prefix="$NVM_DIR/$VERSION" $ADDITIONAL_PARAMETERS && \
$make && \
$make $MAKE_CXX && \
rm -f "$NVM_DIR/$VERSION" 2>/dev/null && \
$make install
$make $MAKE_CXX install
)
then
nvm use $VERSION