2
0
mirror of https://codeberg.org/kiss-community/repo synced 2024-11-16 11:40:21 -07:00
repo/extra/nodejs/build
git-bruh 2486a9965c
nodejs: use --with-intl=small-icu
Fixes broken unicode property escapes used in some projects

```js
var UP = /[\p{Lu}]/u;
```

Compile time addition: ~1 minute (total is 10+ minutes)

Size addition:

```diff
-50MB	total
+60MB	total
```
2023-02-16 14:10:20 +05:30

30 lines
743 B
Bash
Executable File

#!/bin/sh -e
# 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.
case $("$CC" -print-file-name=libatomic.so) in */*) ;; *)
sed 's/-latomic//' node.gyp > _
mv -f _ node.gyp
esac
./configure \
--shared-zlib \
--shared-openssl \
--with-intl=small-icu \
--without-report \
--without-node-snapshot \
--without-node-code-cache \
--ninja
ninja -C out/Release
tools/install.py install "$1" /usr
# Remove unneeded files.
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"