development/nodejs: Updated for version 18.4.0.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Willy Sudiarto Raharjo 2022-06-18 00:42:42 +07:00
parent 96a05c1875
commit efc1834d5a
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
2 changed files with 8 additions and 21 deletions

View File

@ -28,7 +28,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=nodejs
SRCNAM=node
VERSION=${VERSION:-17.9.0}
VERSION=${VERSION:-18.4.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -41,9 +41,6 @@ if [ -z "$ARCH" ]; then
esac
fi
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@ -87,8 +84,10 @@ sed -i 's|share/||' tools/install.py
## Fix libdir for 64-bit.
sed -i "s|lib/|lib${LIBDIRSUFFIX}/|g" tools/install.py
sed -i "s/'lib'/'lib${LIBDIRSUFFIX}'/" lib/module.js
sed -i "s|\"lib\"|\"lib${LIBDIRSUFFIX}\"|" deps/npm/lib/npm.js
sed -i "s/'lib'/'lib${LIBDIRSUFFIX}'/" \
lib/module.js \
lib/internal/modules/cjs/loader.js \
deps/npm/lib/npm.js
sed -i "s|math.h|cmath|" src/node_crypto.cc
./configure \
@ -111,18 +110,6 @@ install -D -m 644 $CWD/npm.sh $PKG/usr/share/bash-completion/completions/npm
## Remove unneeded files.
find $PKG/usr \( -name '.git*' \) -exec rm -f {} \;
## Set NODE_PATH to look for globally installed modules.
mkdir -p $PKG/etc/profile.d
cat > $PKG/etc/profile.d/${SRCNAM}.csh << EOF
#!/bin/csh
setenv NODE_PATH /usr/lib${LIBDIRSUFFIX}/node_modules
EOF
cat > $PKG/etc/profile.d/${SRCNAM}.sh << EOF
#!/bin/sh
export NODE_PATH=/usr/lib${LIBDIRSUFFIX}/node_modules
EOF
chmod 0755 $PKG/etc/profile.d/*
# Fix some files path
mv $PKG/usr/doc/node $PKG/usr/share/nodejs
mv $PKG/usr/systemtap $PKG/usr/share/systemtap

View File

@ -1,8 +1,8 @@
PRGNAM="nodejs"
VERSION="17.9.0"
VERSION="18.4.0"
HOMEPAGE="https://nodejs.org/"
DOWNLOAD="https://nodejs.org/dist/v17.9.0/node-v17.9.0.tar.xz"
MD5SUM="6d38cc79aea65207088205c13d9c5b02"
DOWNLOAD="https://nodejs.org/dist/v18.4.0/node-v18.4.0.tar.xz"
MD5SUM="83d607a7053f3fef379300700fda73a9"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""