2019-07-22 17:15:26 -06:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
2021-07-14 02:56:09 -06:00
|
|
|
# Fix build when libatomic.so does not exist in the system.
|
|
|
|
# This may be provided by compiler-rt which requires no additional
|
|
|
|
# linker flags to be used.
|
|
|
|
[ -r "$KISS_ROOT/usr/lib/libatomic.so" ] || {
|
|
|
|
sed 's/-latomic//' node.gyp > _
|
|
|
|
mv -f _ node.gyp
|
|
|
|
}
|
|
|
|
|
2021-07-20 09:44:36 -06:00
|
|
|
# Attempt to increase file descriptor limit
|
|
|
|
# as build may exhaust default (1024).
|
2021-07-20 09:53:01 -06:00
|
|
|
#
|
|
|
|
# -n is non-POSIX hence we "attempt".
|
|
|
|
# shellcheck disable=2039
|
2021-07-20 09:44:36 -06:00
|
|
|
ulimit -n 4096 2>/dev/null || :
|
|
|
|
|
2019-10-23 02:14:44 -06:00
|
|
|
./configure \
|
2020-03-04 13:48:52 -07:00
|
|
|
--shared-zlib \
|
2021-07-07 15:00:14 -06:00
|
|
|
--shared-openssl \
|
2021-06-30 12:11:48 -06:00
|
|
|
--with-intl=none \
|
2020-03-04 13:48:52 -07:00
|
|
|
--without-etw \
|
|
|
|
--without-dtrace \
|
|
|
|
--without-report \
|
2020-03-04 13:57:53 -07:00
|
|
|
--without-node-snapshot \
|
|
|
|
--without-node-code-cache \
|
2020-03-04 13:48:52 -07:00
|
|
|
--ninja
|
2019-07-22 17:15:26 -06:00
|
|
|
|
2020-03-04 13:48:52 -07:00
|
|
|
ninja -C out/Release
|
|
|
|
tools/install.py install "$1" /usr
|
2020-03-04 13:57:53 -07:00
|
|
|
|
2020-08-06 03:30:02 -06:00
|
|
|
# Remove unneeded files.
|
2021-07-06 07:04:54 -06:00
|
|
|
rm -rf \
|
|
|
|
"$1/usr/include/node/openssl" \
|
|
|
|
"$1/usr/share/doc" \
|
|
|
|
"$1/usr/share/systemtap" \
|
|
|
|
"$1/usr/lib/node_modules/npm/scripts" \
|
|
|
|
"$1/usr/lib/node_modules/npm/configure"
|